mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-25 18:52:15 -05:00
Working on importing types and shit to CPascal... ATM it complains like hell about unknown types but runs
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@525 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
4570a4738d
commit
3864347683
Binary file not shown.
Binary file not shown.
@ -10,8 +10,8 @@
|
||||
<MainUnit Value="0"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<Title Value="Simba"/>
|
||||
<Icon Value="0"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
|
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
object Form1: TForm1
|
||||
Left = 273
|
||||
Left = 593
|
||||
Height = 557
|
||||
Top = 233
|
||||
Top = 321
|
||||
Width = 734
|
||||
ActiveControl = ScriptPanel
|
||||
Caption = 'THA FUKING SIMBA'
|
||||
@ -387,10 +387,10 @@ object Form1: TForm1
|
||||
EditLabel.AnchorSideTop.Side = asrCenter
|
||||
EditLabel.AnchorSideRight.Control = LabeledEditSearch
|
||||
EditLabel.AnchorSideBottom.Control = LabeledEditSearch
|
||||
EditLabel.Left = 67
|
||||
EditLabel.Left = 65
|
||||
EditLabel.Height = 18
|
||||
EditLabel.Top = 10
|
||||
EditLabel.Width = 34
|
||||
EditLabel.Width = 36
|
||||
EditLabel.Caption = 'Find: '
|
||||
EditLabel.ParentColor = False
|
||||
LabelPosition = lpLeft
|
||||
@ -405,7 +405,7 @@ object Form1: TForm1
|
||||
Left = 320
|
||||
Height = 22
|
||||
Top = 7
|
||||
Width = 97
|
||||
Width = 98
|
||||
Caption = 'Match case'
|
||||
OnClick = CheckBoxMatchCaseClick
|
||||
TabOrder = 1
|
||||
|
@ -160,6 +160,7 @@ var
|
||||
libcpascal: integer;
|
||||
interp_init: function(precomp: TPrecompiler_Callback; err: TErrorHandeler_Callback): Pointer; cdecl;
|
||||
interp_meth: procedure(interp: Pointer; addr: Pointer; def: PChar); cdecl;
|
||||
interp_type: procedure(interp: Pointer; def: PChar); cdecl;
|
||||
interp_set: procedure(interp: Pointer; ppg: PChar); cdecl;
|
||||
interp_comp: function(interp: Pointer): boolean; cdecl;
|
||||
interp_run: function(interp: Pointer): boolean; cdecl;
|
||||
@ -704,6 +705,7 @@ begin
|
||||
raise Exception.Create('CPascal library not found');
|
||||
Pointer(interp_init):= GetProcAddress(libcpascal, PChar('interp_init'));
|
||||
Pointer(interp_meth):= GetProcAddress(libcpascal, PChar('interp_meth'));
|
||||
Pointer(interp_type):= GetProcAddress(libcpascal, PChar('interp_type'));
|
||||
Pointer(interp_set):= GetProcAddress(libcpascal, PChar('interp_set'));
|
||||
Pointer(interp_comp):= GetProcAddress(libcpascal, PChar('interp_comp'));
|
||||
Pointer(interp_run):= GetProcAddress(libcpascal, PChar('interp_run'));
|
||||
@ -758,8 +760,12 @@ begin
|
||||
CurrThread := Self;
|
||||
Starttime := GetTickCount;
|
||||
psWriteln('Invoking CPascal Interpreter');
|
||||
if interp_comp(instance) then
|
||||
begin
|
||||
interp_type(self.instance,'type extended = real;');
|
||||
interp_type(self.instance,'type tdtm = integer;');
|
||||
interp_type(self.instance,'type pdtm = ^tdtm;');
|
||||
interp_type(self.instance,'type TEIOS_Exported = record int1,int2,int3,int4,int5,int6,int7,int8,int9,int10,int11,int12,int13,int14:integer; end;');
|
||||
//interp_type(self.instance,'type pointer = integer;');
|
||||
|
||||
for i := high(PluginsToLoad) downto 0 do
|
||||
for ii := 0 to PluginsGlob.MPlugins[PluginsToLoad[i]].MethodLen - 1 do
|
||||
with PluginsGlob.MPlugins[PluginsToLoad[i]].Methods[ii] do
|
||||
@ -768,6 +774,8 @@ begin
|
||||
if ExportedMethods[i].FuncPtr <> nil then
|
||||
with ExportedMethods[i] do
|
||||
interp_meth(self.instance,FuncPtr,PChar(FuncDecl));
|
||||
if interp_comp(instance) then
|
||||
begin
|
||||
psWriteln('Compiled Successfully in ' + IntToStr(GetTickCount - Starttime) + 'ms');
|
||||
if CompileOnly then
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user