mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 09:12:19 -05:00
Resolve 83
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@505 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
2bd8708be0
commit
8c09614190
@ -71,6 +71,8 @@ end;
|
||||
|
||||
destructor TClient.Destroy;
|
||||
begin
|
||||
IOManager.SetState(True);
|
||||
|
||||
MOCR.Free;
|
||||
MDTM.Free;
|
||||
MBitmaps.Free;
|
||||
|
@ -261,6 +261,7 @@ interface
|
||||
procedure SetImageTarget(idx: integer);
|
||||
procedure SetKeyMouseTarget(idx: integer);
|
||||
procedure FreeTarget(idx: integer);
|
||||
procedure SetState(val: Boolean);
|
||||
|
||||
protected
|
||||
function SetImageTarget(target: TTarget): integer;
|
||||
@ -275,11 +276,13 @@ interface
|
||||
frozen: TTarget;
|
||||
freezebuffer: prgb32;
|
||||
bothsame: boolean;
|
||||
FStopping: Boolean;
|
||||
|
||||
idxarr: array of TTarget;
|
||||
|
||||
function GetTargetIdx(target: TTarget): integer;
|
||||
function GetIdxTarget(idx: integer): TTarget;
|
||||
property Stopping: Boolean Read FStopping write SetState;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -446,7 +449,7 @@ end;
|
||||
procedure TIOManager_Abstract.BitmapDestroyed(Bitmap : TMufasaBitmap);
|
||||
begin
|
||||
if image is TBitmapTarget then
|
||||
if TBitmapTarget(image).bitmap = Bitmap then
|
||||
if (TBitmapTarget(image).bitmap = Bitmap) and (not FStopping) then
|
||||
raise Exception.Create('Target bitmap was destroyed!');
|
||||
end;
|
||||
|
||||
@ -554,6 +557,12 @@ begin
|
||||
result := keymouse.GetKeyCode(c);
|
||||
end;
|
||||
|
||||
// TRUE when STOPPING.
|
||||
procedure TIOManager_Abstract.SetState(val: Boolean);
|
||||
begin
|
||||
FStopping := val;
|
||||
end;
|
||||
|
||||
//***implementation*** TTarget
|
||||
|
||||
procedure TTarget.GetTargetDimensions(var w, h: integer); begin raise Exception.Create('GetTargetDimensions not available for this target'); end;
|
||||
|
Loading…
Reference in New Issue
Block a user