mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-24 02:02:17 -05:00
Some minor changes.. Revert if you dislike.
This commit is contained in:
parent
981ec3760a
commit
34cf62b181
@ -170,21 +170,7 @@ end;
|
||||
procedure ext_OpenScriptEx(FileName: string; Run: boolean);
|
||||
begin
|
||||
FileName := SetDirSeparators(FileName);
|
||||
with SimbaForm do
|
||||
begin
|
||||
AddTab();
|
||||
with CurrScript do
|
||||
begin
|
||||
SynEdit.Lines.LoadFromFile(FileName);
|
||||
StartText := SynEdit.Lines.Text;
|
||||
ScriptName := ExtractFileNameOnly(FileName);
|
||||
ScriptFile := FileName;
|
||||
ScriptChanged := False;
|
||||
end;
|
||||
RefreshTab();
|
||||
UpdateTitle();
|
||||
end;
|
||||
|
||||
SimbaForm.LoadScriptFile(FileName,True,false);
|
||||
if (Run) then
|
||||
SimbaForm.RunScript();
|
||||
end;
|
||||
|
@ -107,6 +107,16 @@ begin
|
||||
Result:=Random(Abs(aFrom-aTo))+Min(aTo,AFrom);
|
||||
end;
|
||||
|
||||
function ps_Random(Int: integer): integer; extdecl;
|
||||
begin
|
||||
result := Random(int);
|
||||
end;
|
||||
|
||||
function ps_RandomE : extended;
|
||||
begin
|
||||
result := Random;
|
||||
end;
|
||||
|
||||
function ps_ArcTan2(y,x : extended) : extended; extdecl;
|
||||
begin
|
||||
result := ArcTan2(y,x);
|
||||
|
@ -37,21 +37,15 @@ begin;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure ps_Wait(t: Integer); extdecl;
|
||||
procedure ps_Wait(t: DWord); extdecl;
|
||||
{$ifdef MSWINDOWS}
|
||||
begin
|
||||
if t < 0 then
|
||||
raise Exception.CreateFmt('The given wait time ([%d]) is invalid.',[t])
|
||||
else
|
||||
Sleep(t);
|
||||
Sleep(t);
|
||||
end;
|
||||
{$else}
|
||||
var
|
||||
EndTime : DWord;
|
||||
begin
|
||||
if t < 0 then
|
||||
raise Exception.CreateFmt('The given wait time ([%d]) is invalid.',[t]);
|
||||
|
||||
if t > 50 then
|
||||
begin;
|
||||
EndTime := GetTickCount + t;
|
||||
@ -266,11 +260,6 @@ begin
|
||||
'+//1sR/NLyhCQ==')));
|
||||
end;
|
||||
|
||||
function ps_Random(Int: integer): integer; extdecl;
|
||||
begin
|
||||
result := Random(int);
|
||||
end;
|
||||
|
||||
procedure ps_SetClipBoard(const Data: string); extdecl;
|
||||
begin
|
||||
try
|
||||
|
@ -76,6 +76,8 @@ AddFunction(@ps_point,'function Point(x,y:integer) : TPoint;');
|
||||
AddFunction(@ps_Distance,'function Distance(xs,ys,xe,ye : integer) : integer;');
|
||||
AddFunction(@ps_hypot,'function Hypot(X, Y: Extended): Extended;');
|
||||
AddFunction(@ps_RandomRange,'function RandomRange(aFrom,aTo: Integer): Integer;');
|
||||
AddFunction(@ps_Random,'function Random(Int: integer): integer;');
|
||||
AddFunction(@ps_RandomE,'function RandomE: extended;');
|
||||
AddFunction(@ps_incex,'procedure IncEx(var x : integer; increase : integer);');
|
||||
AddFunction(@ps_DecEx,'procedure DecEx(var x : integer; Decrease : integer);');
|
||||
AddFunction(@ps_BinCoe,'function BinCoe(a, b: LongInt): Extended;');
|
||||
@ -160,8 +162,8 @@ AddFunction(@ps_ExtractFileExt,'function ExtractFileExt(const FileName: string):
|
||||
|
||||
{other}
|
||||
SetCurrSection('Other');
|
||||
AddFunction(@ps_Wait, 'procedure wait(t: integer);');
|
||||
AddFunction(@ps_Wait, 'procedure Sleep(t: integer);');
|
||||
AddFunction(@ps_Wait, 'procedure wait(t: LongWord);');
|
||||
AddFunction(@ps_Wait, 'procedure Sleep(t: LongWord);');
|
||||
{$IFNDEF MML_EXPORT_THREADSAFE}
|
||||
AddFunction(@ps_GetTClient,'function GetTClient : TClient;');
|
||||
AddFunction(@ps_SetSupressExceptions, 'procedure SetSupressExceptions(Supress : boolean);');
|
||||
@ -180,7 +182,6 @@ AddFunction(@ps_DecodeDate,'procedure DecodeDate ( const SourceDate : TDateTime
|
||||
AddFunction(@ps_ConvertTime,'procedure ConvertTime(Time: integer; var h, m, s: integer);');
|
||||
AddFunction(@ps_HakunaMatata,'procedure HakunaMatata;');
|
||||
AddFunction(@ps_Simba,'procedure Simba;');
|
||||
AddFunction(@ps_Random,'function Random(Int: integer): integer;');
|
||||
AddFunction(@ps_PlaySound,'procedure PlaySound( Sound : string);');
|
||||
AddFunction(@ps_StopSound,'procedure StopSound;');
|
||||
{$IFNDEF MML_EXPORT_THREADSAFE}
|
||||
|
Loading…
Reference in New Issue
Block a user