1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-23 15:58:51 -05:00

Changes to RUTIS to allow it to work on Linux. Additional units may have to be touched when we start using them. This also does not yet touch the x64 compilation issues

This commit is contained in:
Merlijn Wajer 2010-08-24 00:09:05 +02:00
parent ff86c034e8
commit b8f4f97084
4 changed files with 16 additions and 13 deletions

View File

@ -42,7 +42,7 @@ Interface
{$ENDIF}
Uses
Windows, Forms, Classes,
lclintf, Forms, Classes,
{$ifdef DELPHI_7_UP}Variants,{$endif}
SysUtils,
Rutis_Defs, File_Manager;

View File

@ -42,7 +42,7 @@ Interface
{$ENDIF}
Uses
Windows, {$ifdef DELPHI_7_UP}Variants, {$endif}
lclintf, {$ifdef DELPHI_7_UP}Variants, {$endif}
SysUtils, Rutis_Stack;
//====================================================================

View File

@ -9,7 +9,7 @@ Interface
{$ENDIF}
Uses
Windows, Forms, Math, Dialogs, SysUtils,
lclintf, Forms, Math, Dialogs, SysUtils,
Rutis_Stack, Rutis_Defs, Rutis_Classes, TypInfo;
Type
@ -246,13 +246,15 @@ End;
Procedure _GetAsyncKeyState(Params : PRutisParamInfoArray; Result : PRutisParamInfo);
Begin
PBoolean(Result^.Data)^ := Boolean(GetAsyncKeyState(GetPWord(Params^[0].Data)) <> 0);
// XXX TODO FIXME OMG
//PBoolean(Result^.Data)^ := Boolean(GetAsyncKeyState(GetPWord(Params^[0].Data)) <> 0);
End;
{$ifndef WINCE}
Procedure _Beep(Params : PRutisParamInfoArray; Result : PRutisParamInfo);
Begin
Windows.Beep(GetPCardinal(Params^[0].Data), GetPCardinal(Params^[1].Data));
// XXX TO FIXME OMG
//Windows.Beep(GetPCardinal(Params^[0].Data), GetPCardinal(Params^[1].Data));
End;
{$endif WINCE}

View File

@ -44,7 +44,7 @@ Interface
{.$define DEBUG}
Uses
Windows, Forms, Classes,
lclintf, Forms, Classes,
{$ifdef DELPHI_7_UP}Variants,{$endif}
SysUtils, Math,
Rutis_Stack, Rutis_Defs, Rutis_Errors, RUTIS_Classes, RUTIS_Compiler_Delphi,
@ -2088,9 +2088,10 @@ End;
//======================= Compiler =============================================
//==============================================================================
{$ifdef FPC}
/// XXX TODO OMG WTF
{{$ifdef FPC}
function LoadLibraryA(lpLibFileName: LPCSTR): HINST; external KernelDLL name 'LoadLibraryA';
{$endif FPC}
{$endif FPC} }
Function TRutisEngine.RegisterExtDll(FileName : String) : Boolean;
Var i : Integer;
@ -2102,7 +2103,7 @@ Begin
i := length(fExtDlls);
SetLength(fExtDlls, i + 1);
fExtDlls[i].DllHandle := LoadLibraryA(PAnsiChar(FileName));
// fExtDlls[i].DllHandle := LoadLibraryA(PAnsiChar(FileName));
If fExtDlls[i].DllHandle = 0 Then
Begin
@ -2112,11 +2113,11 @@ Begin
With fExtDlls[i] Do
Begin
RegisterEXTMethods := TRegisterEXTMethods(GetProcAddress(DllHandle, 'RegisterEXTMethods'));
{ RegisterEXTMethods := TRegisterEXTMethods(GetProcAddress(DllHandle, 'RegisterEXTMethods'));
StartScript := TScriptAction(GetProcAddress(DllHandle, 'StartScript'));
StopScript := TScriptAction(GetProcAddress(DllHandle, 'StopScript'));
PauseScript := TScriptAction(GetProcAddress(DllHandle, 'PauseScript'));
Destroy := TScriptAction(GetProcAddress(DllHandle, 'Destroy'));
Destroy := TScriptAction(GetProcAddress(DllHandle, 'Destroy')); }
End;
fExtDlls[i].RegisterEXTMethods(self);
@ -2127,8 +2128,8 @@ End;
Procedure TRutisEngine.UnloadExtDlls;
Var i : Integer;
Begin
For i := 0 To high(fExtDlls) Do
FreeLibrary(fExtDlls[i].DllHandle);
{ For i := 0 To high(fExtDlls) Do
FreeLibrary(fExtDlls[i].DllHandle); }
SetLength(fExtDlls, 0);
End;