removed game cursor & alt+1/2/3/9 -> ctrl+1/2/3/9

git-svn-id: svn://kolibrios.org@1007 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
bw 2009-01-29 04:32:44 +00:00
parent ba74256d24
commit a03f69b310
2 changed files with 16 additions and 14 deletions

View File

@ -83,7 +83,7 @@ begin
ImagePut(LRLScreen^, LRLFontBuffer^, 25 - ImageSizex(LRLFontBuffer^) div 2, 0, 0, 0, 319, 199); ImagePut(LRLScreen^, LRLFontBuffer^, 25 - ImageSizex(LRLFontBuffer^) div 2, 0, 0, 0, 319, 199);
end; end;
ImagePutTransparent(LRLScreen^, LRLMousePointer^, MouseX, MouseY, 0, 0, 319, 199); {ImagePutTransparent(LRLScreen^, LRLMousePointer^, MouseX, MouseY, 0, 0, 319, 199);}
end; end;

View File

@ -1,8 +1,9 @@
unit LRLRoutines; {$codepage utf8}
{$mode objfpc} {$mode objfpc}
{$asmmode intel} {$asmmode intel}
unit LRLRoutines;
interface interface
@ -86,6 +87,7 @@ const
KEY_LBRACKET = $1A00; KEY_LBRACKET = $1A00;
KEY_RBRACKET = $1B00; KEY_RBRACKET = $1B00;
KEY_ENTER = $1C00; KEY_ENTER = $1C00;
KEY_CTRL = $1D00;
KEY_A = $1E00; KEY_A = $1E00;
KEY_S = $1F00; KEY_S = $1F00;
@ -200,7 +202,7 @@ var
LastKeyEvent: Word = $FFFF; LastKeyEvent: Word = $FFFF;
LastKeyUp : Boolean = True; LastKeyUp : Boolean = True;
LastKeyDown: Boolean = False; LastKeyDown: Boolean = False;
AltDown : Boolean = False; CtrlDown : Boolean = False;
ShiftDown : Boolean = False; ShiftDown : Boolean = False;
LShiftDown : Boolean = False; LShiftDown : Boolean = False;
RShiftDown : Boolean = False; RShiftDown : Boolean = False;
@ -272,7 +274,7 @@ var
begin begin
if (ScreenWidth = BUFFER_WIDTH) and (ScreenHeight = BUFFER_HEIGHT) then if (ScreenWidth = BUFFER_WIDTH) and (ScreenHeight = BUFFER_HEIGHT) then
begin begin
{¯¥à¥­®á ®¤¨­ ¢ ®¤¨­} {перенос один в один}
B := @ScreenPalBuffer; B := @ScreenPalBuffer;
C := ScreenRGBBuffer; C := ScreenRGBBuffer;
for I := 0 to BUFFER_HEIGHT - 1 do for I := 0 to BUFFER_HEIGHT - 1 do
@ -284,7 +286,7 @@ begin
end; end;
end else end else
begin begin
{¬ áèâ ¡¨à®¢ ­¨¥} {масштабирование}
XStep := (BUFFER_WIDTH shl 16) div ScreenWidth; XStep := (BUFFER_WIDTH shl 16) div ScreenWidth;
YStep := (BUFFER_HEIGHT shl 16) div ScreenHeight; YStep := (BUFFER_HEIGHT shl 16) div ScreenHeight;
Horizontal; Horizontal;
@ -390,7 +392,7 @@ begin
Height := PWord(@FontData + 2)^; Height := PWord(@FontData + 2)^;
Table := PWord(@FontData + 4); Table := PWord(@FontData + 4);
{ à áç¥â ¤«¨­ë áâப¨ } { расчет длины строки }
Width := 0; Width := 0;
for I := 1 to Length(Source) do for I := 1 to Length(Source) do
begin begin
@ -401,7 +403,7 @@ begin
PWord(@Buffer)^ := Width; PWord(@Buffer)^ := Width;
PWord(@Buffer + 2)^ := Height; PWord(@Buffer + 2)^ := Height;
{ ¢ë¢®¤ áâப¨ } { вывод строки }
X := 0; X := 0;
for I := 1 to Length(Source) do for I := 1 to Length(Source) do
begin begin
@ -534,9 +536,9 @@ begin
LastKeyUp := not LastKeyDown; LastKeyUp := not LastKeyDown;
if LastKeyUp then Dec(Result, KEY_UP_BASE); if LastKeyUp then Dec(Result, KEY_UP_BASE);
if Result = KEY_ALT then if Result = KEY_CTRL then
begin begin
AltDown := LastKeyDown; CtrlDown := LastKeyDown;
Result := $FFFF; Result := $FFFF;
end else end else
@ -554,7 +556,7 @@ begin
Result := $FFFF; Result := $FFFF;
end else end else
if AltDown then if CtrlDown then
case Result of case Result of
KEY_1: begin Result := $FFFF; if LastKeyDown then ScreenMode(1); end; KEY_1: begin Result := $FFFF; if LastKeyDown then ScreenMode(1); end;
KEY_2: begin Result := $FFFF; if LastKeyDown then ScreenMode(2); end; KEY_2: begin Result := $FFFF; if LastKeyDown then ScreenMode(2); end;