Example projects made compilable by any version of Delphi

This commit is contained in:
Владислав Джавадов 2020-05-10 21:38:18 +03:00
parent db03f7a14a
commit 743e32c30b
9 changed files with 490 additions and 484 deletions

3
.gitignore vendored
View File

@ -9,4 +9,5 @@
*.dof
*.dsk
*.exe
*.map
*.map
*.tmp

View File

@ -5,9 +5,9 @@ uses
var
hConsole: Pointer;
ConsoleInit: procedure(WndWidth, WndHeight, ScrWidth, ScrHeight: LongWord; Caption: PChar); stdcall;
ConsoleInit: procedure(WndWidth, WndHeight, ScrWidth, ScrHeight: LongWord; Caption: PKolibriChar); stdcall;
ConsoleExit: procedure(bCloseWindow: Cardinal); stdcall;
Printf: function(const Format: PChar): Integer; cdecl varargs;
Printf: function(const Format: PKolibriChar): Integer; cdecl varargs;
GetConsoleCursorPos: procedure(X, Y: PInteger); stdcall;
SetConsoleCursorPos: procedure(X, Y: Integer); stdcall;
kbhit: function: Boolean;

View File

@ -4,7 +4,7 @@ uses
KolibriOS;
const
AppPath = PPChar(32);
AppPath = PPKolibriChar(32);
type
THeader = packed record
@ -27,7 +27,7 @@ type
Header: THeader;
end;
procedure ExtractFileDirectory(Source, Dest: PChar); stdcall;
procedure ExtractFileDirectory(Source, Dest: PKolibriChar); stdcall;
asm
PUSH ESI
PUSH EDI
@ -65,7 +65,7 @@ begin
TargaFile := LoadFile('Lena.tga', FileSize);
with TargaFile^ do
Image := Pointer(PChar(TargaFile) + SizeOf(Header) + Header.IDLength);
Image := Pointer(PKolibriChar(TargaFile) + SizeOf(Header) + Header.IDLength);
with GetScreenSize do
begin

View File

@ -4,7 +4,7 @@ uses
KolibriOS;
const
AppPath = PPChar(32);
AppPath = PPKolibriChar(32);
Picture1 = 'Flower(4bpp).bmp';
Picture2 = 'Mario(1bpp).bmp';
@ -47,7 +47,7 @@ type
Palette: array[0..0] of TRGBQuad;
end;
procedure ExtractFileDirectory(Src, Dst: PChar); stdcall;
procedure ExtractFileDirectory(Src, Dst: PKolibriChar); stdcall;
asm
PUSH ESI
PUSH EDI

View File

@ -4,16 +4,16 @@ uses
KolibriOS;
const
AppPath = PPChar(32);
CmdLine = PPChar(28);
AppPath = PPKolibriChar(32);
CmdLine = PPKolibriChar(28);
BUFFER_SIZE = 256;
var
hConsole: Pointer;
ConsoleInit: procedure(WndWidth, WndHeight, ScrWidth, ScrHeight: LongWord; Caption: PChar); stdcall;
ConsoleInit: procedure(WndWidth, WndHeight, ScrWidth, ScrHeight: LongWord; Caption: PKolibriChar); stdcall;
ConsoleExit: procedure(bCloseWindow: Cardinal); stdcall;
printf: function(const Format: PChar): Integer; cdecl varargs;
printf: function(const Format: PKolibriChar): Integer; CDecl varargs;
Buffer: array[0..BUFFER_SIZE - 1] of Char;

View File

@ -5,9 +5,9 @@ uses
var
hConsole: Pointer;
ConsoleInit: procedure(WndWidth, WndHeight, ScrWidth, ScrHeight: LongWord; Caption: PChar); stdcall;
ConsoleInit: procedure(WndWidth, WndHeight, ScrWidth, ScrHeight: LongWord; Caption: PKolibriChar); stdcall;
ConsoleExit: procedure(bCloseWindow: Cardinal); stdcall;
WriteN: procedure(Str: PChar; Count: LongWord); stdcall;
WriteN: procedure(Str: PKolibriChar; Count: LongWord); stdcall;
FileSize: LongWord;
Buffer: Pointer;

View File

@ -5,9 +5,9 @@ uses
var
hConsole: Pointer;
ConsoleInit: procedure(WndWidth, WndHeight, ScrWidth, ScrHeight: LongWord; Caption: PChar); stdcall;
ConsoleInit: procedure(WndWidth, WndHeight, ScrWidth, ScrHeight: LongWord; Caption: PKolibriChar); stdcall;
ConsoleExit: procedure(bCloseWindow: Cardinal); stdcall;
printf: function(const Format: PChar): Integer; cdecl varargs;
printf: function(const Format: PKolibriChar): Integer; cdecl varargs;
const
FolderPath = '/sys';

View File

@ -4,7 +4,7 @@ uses
KolibriOS;
const
AppPath = PPChar(32);
AppPath = PPKolibriChar(32);
ARROW_BUTTON = 2;
POINT_BUTTON = 3;
@ -39,7 +39,7 @@ type
BitmapInfoHeader: TBitmapInfoHeader;
end;
procedure ExtractFileDirectory(Src, Dst: PChar); stdcall;
procedure ExtractFileDirectory(Src, Dst: PKolibriChar); stdcall;
asm
PUSH ESI
PUSH EDI

File diff suppressed because it is too large Load Diff