mirror of
https://github.com/vapaamies/KolibriOS.git
synced 2025-09-21 02:30:07 +02:00
DrawImageEx bugfix
This commit is contained in:
@@ -90,7 +90,7 @@ begin
|
|||||||
|
|
||||||
with BitmapFile1^, BitmapFileHeader, BitmapInfoHeader do
|
with BitmapFile1^, BitmapFileHeader, BitmapInfoHeader do
|
||||||
begin
|
begin
|
||||||
Padding1 := (32 - biWidth * biBitCount mod 32) and not 32 div 6;
|
Padding1 := (32 - biWidth * biBitCount mod 32) and not 32 div 8;
|
||||||
Image1 := Pointer(LongWord(BitmapFile1) + bfOffBits);
|
Image1 := Pointer(LongWord(BitmapFile1) + bfOffBits);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ begin
|
|||||||
|
|
||||||
with BitmapFile2^, BitmapFileHeader, BitmapInfoHeader do
|
with BitmapFile2^, BitmapFileHeader, BitmapInfoHeader do
|
||||||
begin
|
begin
|
||||||
Padding2 := (32 - biWidth * biBitCount mod 32) and not 32 div 6;
|
Padding2 := (32 - biWidth * biBitCount mod 32) and not 32 div 8;
|
||||||
Image2 := Pointer(LongWord(BitmapFile2) + bfOffBits);
|
Image2 := Pointer(LongWord(BitmapFile2) + bfOffBits);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -110,13 +110,13 @@ begin
|
|||||||
|
|
||||||
with BitmapFile3^, BitmapFileHeader, BitmapInfoHeader do
|
with BitmapFile3^, BitmapFileHeader, BitmapInfoHeader do
|
||||||
begin
|
begin
|
||||||
Padding3 := (32 - biWidth * biBitCount mod 32) and not 32 div 6;
|
Padding3 := (32 - biWidth * biBitCount mod 32) and not 32 div 8;
|
||||||
Image3 := Pointer(LongWord(BitmapFile3) + bfOffBits);
|
Image3 := Pointer(LongWord(BitmapFile3) + bfOffBits);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
with GetScreenSize do
|
with GetScreenSize do
|
||||||
begin
|
begin
|
||||||
Right := Width div 4;
|
Right := 340;
|
||||||
Bottom := Height div 4;
|
Bottom := Height div 4;
|
||||||
Left := (Width - Right) div 2;
|
Left := (Width - Right) div 2;
|
||||||
Top := (Height - Bottom) div 2;
|
Top := (Height - Bottom) div 2;
|
||||||
|
@@ -519,7 +519,7 @@ const
|
|||||||
{63.1} procedure BoardWriteByte(Data: Byte); stdcall;
|
{63.1} procedure BoardWriteByte(Data: Byte); stdcall;
|
||||||
{63.2} function BoardReadByte(var Data: Byte): LongWord; stdcall;
|
{63.2} function BoardReadByte(var Data: Byte): LongWord; stdcall;
|
||||||
{64} function ReallocAppMemory(Count: LongWord): LongInt; stdcall;
|
{64} function ReallocAppMemory(Count: LongWord): LongInt; stdcall;
|
||||||
{65} procedure DrawImageEx(const Image; Left, Top: LongInt; Width, Height: LongWord; BPP: LongWord; const Palette: Pointer; Padding: LongWord); stdcall;
|
{65} procedure DrawImageEx(const Image; Left, Top: LongInt; Width, Height, BPP: LongWord; Palette: Pointer; Padding: LongWord); stdcall;
|
||||||
{66.1} procedure SetKeyboardInputMode(Mode: LongWord); stdcall;
|
{66.1} procedure SetKeyboardInputMode(Mode: LongWord); stdcall;
|
||||||
{66.2} function GetKeyboardInputMode: LongWord; stdcall;
|
{66.2} function GetKeyboardInputMode: LongWord; stdcall;
|
||||||
{66.3} function GetControlKeyState: LongWord; stdcall;
|
{66.3} function GetControlKeyState: LongWord; stdcall;
|
||||||
@@ -584,7 +584,7 @@ const
|
|||||||
{71.1} procedure SetWindowCaption(Caption: PKolibriChar); stdcall;
|
{71.1} procedure SetWindowCaption(Caption: PKolibriChar); stdcall;
|
||||||
{72.1.2} function SendActiveWindowKey(KeyCode: LongWord): LongInt; stdcall;
|
{72.1.2} function SendActiveWindowKey(KeyCode: LongWord): LongInt; stdcall;
|
||||||
{72.1.3} function SendActiveWindowButton(ButtonID: LongWord): LongInt; stdcall;
|
{72.1.3} function SendActiveWindowButton(ButtonID: LongWord): LongInt; stdcall;
|
||||||
{73} procedure Blit(const Src; SrcX, SrcY: LongInt; SrcW, SrcH: LongWord; DstX, DstY: LongInt; DstW, DstH: LongWord; Stride, Flags: LongWord); stdcall;
|
{73} procedure Blit(const Src; SrcX, SrcY: LongInt; SrcW, SrcH: LongWord; DstX, DstY: LongInt; DstW, DstH, Stride, Flags: LongWord); stdcall;
|
||||||
{74.-1} function GetActiveNetworkDevices: LongWord; stdcall;
|
{74.-1} function GetActiveNetworkDevices: LongWord; stdcall;
|
||||||
{74.0} function GetNetworkDeviceType(Device: Byte): LongInt; stdcall;
|
{74.0} function GetNetworkDeviceType(Device: Byte): LongInt; stdcall;
|
||||||
{74.1} function GetNetworkDeviceName(Device: Byte; var Buffer): LongInt; stdcall;
|
{74.1} function GetNetworkDeviceName(Device: Byte; var Buffer): LongInt; stdcall;
|
||||||
@@ -2343,9 +2343,11 @@ asm
|
|||||||
pop ebx
|
pop ebx
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure DrawImageEx(const Image; Left, Top: LongInt; Width, Height: LongWord; BPP: LongWord; const Palette: Pointer; Padding: LongWord); stdcall;
|
procedure DrawImageEx(const Image; Left, Top: LongInt; Width, Height, BPP: LongWord; Palette: Pointer; Padding: LongWord); stdcall;
|
||||||
asm
|
asm
|
||||||
push ebx
|
push ebx
|
||||||
|
push esi
|
||||||
|
push edi
|
||||||
mov eax, 65
|
mov eax, 65
|
||||||
mov ebx, Image
|
mov ebx, Image
|
||||||
mov ecx, Width
|
mov ecx, Width
|
||||||
@@ -2358,6 +2360,8 @@ asm
|
|||||||
mov edi, Palette
|
mov edi, Palette
|
||||||
mov ebp, Padding
|
mov ebp, Padding
|
||||||
int $40
|
int $40
|
||||||
|
pop edi
|
||||||
|
pop esi
|
||||||
pop ebx
|
pop ebx
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -3049,8 +3053,9 @@ asm
|
|||||||
pop ebx
|
pop ebx
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Blit(const Src; SrcX, SrcY: LongInt; SrcW, SrcH: LongWord; DstX, DstY: LongInt; DstW, DstH: LongWord; Stride, Flags: LongWord); stdcall;
|
procedure Blit(const Src; SrcX, SrcY: LongInt; SrcW, SrcH: LongWord; DstX, DstY: LongInt; DstW, DstH, Stride, Flags: LongWord); stdcall;
|
||||||
asm
|
asm
|
||||||
|
push ebx
|
||||||
push Stride
|
push Stride
|
||||||
push Src
|
push Src
|
||||||
push SrcH
|
push SrcH
|
||||||
@@ -3066,6 +3071,7 @@ asm
|
|||||||
mov ecx, esp
|
mov ecx, esp
|
||||||
int $40
|
int $40
|
||||||
add esp, 40
|
add esp, 40
|
||||||
|
pop ebx
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetActiveNetworkDevices: LongWord; stdcall;
|
function GetActiveNetworkDevices: LongWord; stdcall;
|
||||||
|
Reference in New Issue
Block a user