mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-13 21:05:12 -05:00
Merge branch 'master' of ssh://villavu.com:54367/simba
This commit is contained in:
commit
3a781aabf2
@ -1,8 +1,10 @@
|
|||||||
program DTMEditor_Extension;
|
program DTMEditor_Extension;
|
||||||
|
{$ifndef PS_EXTENSION}
|
||||||
var
|
var
|
||||||
Client : TClient;
|
Client : TClient;
|
||||||
Simba_MainMenu : TMainMenu;
|
Simba_MainMenu : TMainMenu;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
{$i mml.simba}
|
{$i mml.simba}
|
||||||
const
|
const
|
||||||
Version = '0.5';
|
Version = '0.5';
|
||||||
@ -607,7 +609,7 @@ begin
|
|||||||
h := GetImageTarget;
|
h := GetImageTarget;
|
||||||
if (bmpOverlay = nil) then
|
if (bmpOverlay = nil) then
|
||||||
bmpOverlay := bmpBuffer.Copy(0, 0, bmpBuffer.Width - 1, bmpBuffer.Height - 1);
|
bmpOverlay := bmpBuffer.Copy(0, 0, bmpBuffer.Width - 1, bmpBuffer.Height - 1);
|
||||||
SetTargetBitmap(bmpBuffer.Index);
|
SetTargetBitmap(bmpBuffer);
|
||||||
|
|
||||||
if FindColorsTolerance(Points, getColour, 0, 0, bmpBuffer.Width - 1, bmpBuffer.Height - 1, getTolerance) then
|
if FindColorsTolerance(Points, getColour, 0, 0, bmpBuffer.Width - 1, bmpBuffer.Height - 1, getTolerance) then
|
||||||
bmpOverlay.DrawTPA(Points, MarkCol);
|
bmpOverlay.DrawTPA(Points, MarkCol);
|
||||||
@ -1295,12 +1297,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifndef PS_EXTENSION}
|
||||||
procedure ThreadSafe_ShowForm;
|
procedure ThreadSafe_ShowForm;
|
||||||
var
|
var
|
||||||
v: TVariantArray;
|
v: TVariantArray;
|
||||||
begin
|
begin
|
||||||
ThreadSafeCall('ShowForm', v);
|
ThreadSafeCall('ShowForm', v);
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{
|
{
|
||||||
Simba integration
|
Simba integration
|
||||||
@ -1344,6 +1348,8 @@ begin;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
{$ifndef PS_EXTENSION}
|
||||||
Client := GetTClient;
|
Client := GetTClient;
|
||||||
ThreadSafe_ShowForm;
|
ThreadSafe_ShowForm;
|
||||||
|
{$endif}
|
||||||
end.
|
end.
|
||||||
|
@ -356,6 +356,8 @@ begin
|
|||||||
with PSInstance do
|
with PSInstance do
|
||||||
begin
|
begin
|
||||||
{$I ../../Units/MMLAddon/PSInc/psdefines.inc}
|
{$I ../../Units/MMLAddon/PSInc/psdefines.inc}
|
||||||
|
Defines.Add('PS_EXTENSION');
|
||||||
|
Defines.Add('EXTENSION');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
PSInstance.Script := Self.Script;
|
PSInstance.Script := Self.Script;
|
||||||
|
@ -46,7 +46,7 @@ uses
|
|||||||
CastaliaSimplePasPar, v_AutoCompleteForm, PSDump;
|
CastaliaSimplePasPar, v_AutoCompleteForm, PSDump;
|
||||||
|
|
||||||
const
|
const
|
||||||
SimbaVersion = 695;
|
SimbaVersion = 700;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -2980,14 +2980,14 @@ begin
|
|||||||
Result := false;
|
Result := false;
|
||||||
with TSaveDialog.Create(nil) do
|
with TSaveDialog.Create(nil) do
|
||||||
try
|
try
|
||||||
filter := 'Simba Files|*.Simba;*.simb;*.cogat;*.mufa;*.txt;*.' +
|
filter := 'Simba Files|*.simba;*.simb;*.cogat;*.mufa;*.txt;*.' +
|
||||||
LoadSettingDef('Settings/Extensions/FileExtension','sex')+
|
LoadSettingDef('Settings/Extensions/FileExtension','sex')+
|
||||||
'|Any files|*.*';
|
'|Any files|*.*';
|
||||||
if Execute then
|
if Execute then
|
||||||
begin;
|
begin;
|
||||||
if ExtractFileExt(FileName) = '' then
|
if ExtractFileExt(FileName) = '' then
|
||||||
begin;
|
begin;
|
||||||
ScriptFile := FileName + '.Simba';
|
ScriptFile := FileName + '.simba';
|
||||||
end else
|
end else
|
||||||
ScriptFile := FileName;
|
ScriptFile := FileName;
|
||||||
CurrScript.SynEdit.Lines.SaveToFile(ScriptFile);
|
CurrScript.SynEdit.Lines.SaveToFile(ScriptFile);
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
Math.inc for the Mufasa Macro Library
|
Math.inc for the Mufasa Macro Library
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ps_round(e : extended) : integer; extdecl;
|
||||||
|
begin
|
||||||
|
result := round(e);
|
||||||
|
end;
|
||||||
function ps_iAbs(a : integer) : integer;extdecl;
|
function ps_iAbs(a : integer) : integer;extdecl;
|
||||||
begin
|
begin
|
||||||
result := abs(a);
|
result := abs(a);
|
||||||
|
@ -52,7 +52,7 @@ AddFunction(@ps_CreateDTMPoint,'function CreateDTMPoint(x,y,c,t,asz : integer; b
|
|||||||
|
|
||||||
{maths}
|
{maths}
|
||||||
SetCurrSection('Math');
|
SetCurrSection('Math');
|
||||||
AddFunction(nil,'function Round(e:extended) : integer');
|
AddFunction(@ps_round,'function Round(e:extended) : integer');
|
||||||
AddFunction(@ps_ceil,'function ceil(e : extended) : integer');
|
AddFunction(@ps_ceil,'function ceil(e : extended) : integer');
|
||||||
AddFunction(@ps_floor,'function floor(e : extended) : integer');
|
AddFunction(@ps_floor,'function floor(e : extended) : integer');
|
||||||
AddFunction(@ps_pow,'function pow(base,exponent : extended) : extended');
|
AddFunction(@ps_pow,'function pow(base,exponent : extended) : extended');
|
||||||
|
@ -2042,7 +2042,7 @@ var
|
|||||||
i, h: Integer;
|
i, h: Integer;
|
||||||
begin
|
begin
|
||||||
h := High(tI);
|
h := High(tI);
|
||||||
Temp := tI;
|
Temp := Copy(tI);
|
||||||
for i := 0 to h do
|
for i := 0 to h do
|
||||||
tI[i] := Temp[h - i];
|
tI[i] := Temp[h - i];
|
||||||
end;
|
end;
|
||||||
|
@ -106,11 +106,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TPenColor_W(Self: TPen; const T: TColor);begin Self.Color := T; end;
|
||||||
|
procedure TPenColor_R(Self: TPen; var T: TColor);begin T := Self.Color; end;
|
||||||
|
procedure TPenMode_W(Self: TPen; const T: TPENMODE);begin Self.Mode := T; end;
|
||||||
|
procedure TPenMode_R(Self: TPen; var T: TPENMODE);begin T := Self.Mode; end;
|
||||||
|
procedure TPenWidth_W(Self: TPen; const T: Integer);begin Self.Width := T; Writeln(t); end;
|
||||||
|
procedure TPenWidth_R(Self: TPen; var T: Integer);begin T := Self.Width; Writeln(self.width) end;
|
||||||
|
procedure TPenStyle_W(Self: TPen; const T: TPenStyle);begin Self.Style := T; end;
|
||||||
|
procedure TPenStyle_R(Self: TPen; var T: TPenStyle);begin T := Self.Style; end;
|
||||||
|
|
||||||
procedure RIRegisterTPEN(Cl: TPSRuntimeClassImporter);
|
procedure RIRegisterTPEN(Cl: TPSRuntimeClassImporter);
|
||||||
begin
|
begin
|
||||||
with Cl.Add(TPEN) do
|
with Cl.Add(TPEN) do
|
||||||
begin
|
begin
|
||||||
RegisterConstructor(@TPEN.CREATE, 'CREATE');
|
RegisterConstructor(@TPEN.CREATE, 'CREATE');
|
||||||
|
RegisterPropertyHelper(@TPenStyle_R,@TPenStyle_W,'Style');
|
||||||
|
RegisterPropertyHelper(@TPenWidth_R,@TPenWidth_W,'Width');
|
||||||
|
RegisterPropertyHelper(@TPenMode_R,@TPenMode_W,'Mode');
|
||||||
|
RegisterPropertyHelper(@TPenColor_R,@TPenColor_W,'Color');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user