1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-01 13:22:16 -05:00

Filling the core now actually works :-).. Still needs someway to do this after the formcreate, kinda slows down the program :(.

This commit is contained in:
Raymond 2010-03-27 13:12:06 +01:00
parent 90e1e538a6
commit f5669af1d9
3 changed files with 10 additions and 10 deletions

View File

@ -21,11 +21,11 @@
PSCompile.inc for the Mufasa Macro Library PSCompile.inc for the Mufasa Macro Library
} }
Sender.Comp.AddConstantN('AppPath','string').SetString(CurrThread.AppPath); Sender.Comp.AddConstantN('AppPath','string').SetString(Self.AppPath);
Sender.Comp.AddConstantN('ScriptPath','string').SetString(CurrThread.ScriptPath); Sender.Comp.AddConstantN('ScriptPath','string').SetString(Self.ScriptPath);
Sender.Comp.AddConstantN('IncludePath','string').SetString(CurrThread.IncludePath); Sender.Comp.AddConstantN('IncludePath','string').SetString(Self.IncludePath);
Sender.Comp.AddConstantN('PluginPath','string').SetString(CurrThread.PluginPath); Sender.Comp.AddConstantN('PluginPath','string').SetString(Self.PluginPath);
Sender.Comp.AddConstantN('FontPath','string').SetString(CurrThread.FontPath); Sender.Comp.AddConstantN('FontPath','string').SetString(Self.FontPath);
Sender.Comp.AddTypeS('TReplaceFlag', '(rfReplaceAll, rfIgnoreCase)'); Sender.Comp.AddTypeS('TReplaceFlag', '(rfReplaceAll, rfIgnoreCase)');
Sender.Comp.AddTypeS('TReplaceFlags','set of TReplaceFlag'); Sender.Comp.AddTypeS('TReplaceFlags','set of TReplaceFlag');
Sender.Comp.AddTypeS('StrExtr','(Numbers, Letters, Others);'); Sender.Comp.AddTypeS('StrExtr','(Numbers, Letters, Others);');

View File

@ -591,22 +591,22 @@ begin
{$I PSInc/pscompile.inc} {$I PSInc/pscompile.inc}
Fonts := Client.MOCR.GetFonts; Fonts := Client.MOCR.GetFonts;
for i := fonts.count - 1 downto 0 do for i := fonts.count - 1 downto 0 do
PSScript.Comp.AddConstantN(Fonts[i].Name,'string').SetString(Fonts[i].Name); Sender.Comp.AddConstantN(Fonts[i].Name,'string').SetString(Fonts[i].Name);
for i := high(PluginsToLoad) downto 0 do for i := high(PluginsToLoad) downto 0 do
for ii := 0 to PluginsGlob.MPlugins[PluginsToLoad[i]].MethodLen - 1 do for ii := 0 to PluginsGlob.MPlugins[PluginsToLoad[i]].MethodLen - 1 do
PSScript.AddFunctionEx(PluginsGlob.MPlugins[PluginsToLoad[i]].Methods[ii].FuncPtr, Sender.AddFunctionEx(PluginsGlob.MPlugins[PluginsToLoad[i]].Methods[ii].FuncPtr,
PluginsGlob.MPlugins[PluginsToLoad[i]].Methods[ii].FuncStr, PluginsGlob.MPlugins[PluginsToLoad[i]].Methods[ii].FuncStr,
Muf_Conv_to_PS_Conv(PluginsGlob.MPlugins[PluginsToLoad[i]].Methods[ii].FuncConv)); Muf_Conv_to_PS_Conv(PluginsGlob.MPlugins[PluginsToLoad[i]].Methods[ii].FuncConv));
for i := 0 to high(VirtualKeys) do for i := 0 to high(VirtualKeys) do
PSScript.Comp.AddConstantN(Format('VK_%S',[VirtualKeys[i].Str]),'Byte').SetInt(VirtualKeys[i].Key); Sender.Comp.AddConstantN(Format('VK_%S',[VirtualKeys[i].Str]),'Byte').SetInt(VirtualKeys[i].Key);
// Here we add all the Consts/Types to the engine. // Here we add all the Consts/Types to the engine.
//Export all the methods //Export all the methods
for i := 0 to high(ExportedMethods) do for i := 0 to high(ExportedMethods) do
if ExportedMethods[i].FuncPtr <> nil then if ExportedMethods[i].FuncPtr <> nil then
PSScript.AddFunctionEx(ExportedMethods[i].FuncPtr,ExportedMethods[i].FuncDecl, Sender.AddFunctionEx(ExportedMethods[i].FuncPtr,ExportedMethods[i].FuncDecl,
{$ifdef PS_StdCall}cdStdCall{$else}cdRegister {$endif}); {$ifdef PS_StdCall}cdStdCall{$else}cdRegister {$endif});
end; end;

View File

@ -247,7 +247,7 @@ procedure TPSScriptExtension.GetCodeProps;
btSingle: Result := FloatToStr(v.tsingle); btSingle: Result := FloatToStr(v.tsingle);
btDouble: Result := FloatToStr(v.tdouble); btDouble: Result := FloatToStr(v.tdouble);
btExtended: Result := FloatToStr(v.textended); btExtended: Result := FloatToStr(v.textended);
btString: Result := tbtString(v.tstring); btString: Result := MakeString(tbtString(v.tstring));
{$IFNDEF PS_NOINT64} {$IFNDEF PS_NOINT64}
btS64: Result := IntToStr(v.ts64); btS64: Result := IntToStr(v.ts64);
{$ENDIF} {$ENDIF}