Skip to content

Commit

Permalink
new
Browse files Browse the repository at this point in the history
new
  • Loading branch information
hernangior committed Aug 17, 2020
1 parent bf3a43e commit 147b1cb
Show file tree
Hide file tree
Showing 2,070 changed files with 6,577,390 additions and 0 deletions.
Binary file added AlienInvasion-1.10/AlienInvasion-1.10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 111 additions & 0 deletions AlienInvasion-1.10/AlienInvasion-1.10_EULA.txt

Large diffs are not rendered by default.

Binary file added AlienInvasion-1.10/GetItInstall.dat
Binary file not shown.
Binary file added AlienInvasion-1.10/IconAlienInvasion-1.10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AlienInvasion-1.10/Src/5000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AlienInvasion-1.10/Src/AlienBug.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AlienInvasion-1.10/Src/AlienBug2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AlienInvasion-1.10/Src/AlienBug3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,512 changes: 3,512 additions & 0 deletions AlienInvasion-1.10/Src/AlienInvasion.deployproj

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions AlienInvasion-1.10/Src/AlienInvasion.dpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
program AlienInvasion;

uses
System.StartUpCopy,
FMX.Forms,
uGame in 'uGame.pas' {GameForm},
uGameOver in 'uGameOver.pas' {FrameGameOver: TFrame},
uHighScores in 'uHighScores.pas' {FrameHighScores: TFrame},
uInstructions in 'uInstructions.pas' {FrameInstructions: TFrame},
uLevelComplete in 'uLevelComplete.pas' {FrameLevelComplete: TFrame},
uMainMenu in 'uMainMenu.pas' {FrameMainMenu: TFrame},
uSettings in 'uSettings.pas' {FrameSettings: TFrame};

{$R *.res}

begin
Application.Initialize;
Application.CreateForm(TGameForm, GameForm);
Application.Run;
end.
2,927 changes: 2,927 additions & 0 deletions AlienInvasion-1.10/Src/AlienInvasion.dproj

Large diffs are not rendered by default.

130 changes: 130 additions & 0 deletions AlienInvasion-1.10/Src/AnonThread.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
//---------------------------------------------------------------------------

// This software is Copyright (c) 2016 Embarcadero Technologies, Inc.
// You may only use this software if you are an authorized licensee
// of Delphi, C++Builder or RAD Studio (Embarcadero Products).
// This software is considered a Redistributable as defined under
// the software license agreement that comes with the Embarcadero Products
// and is subject to that software license agreement.

//---------------------------------------------------------------------------

unit AnonThread;

interface

uses
System.Classes, System.SysUtils, System.Generics.Collections;

type
EAnonymousThreadException = class(Exception);

TAnonymousThread<T> = class(TThread)
private
class var
CRunningThreads:TList<TThread>;
private
FThreadFunc: TFunc<T>;
FOnErrorProc: TProc<Exception>;
FOnFinishedProc: TProc<T>;
FResult: T;
FStartSuspended: Boolean;
private
procedure ThreadTerminate(Sender: TObject);
protected
procedure Execute; override;
public
constructor Create(AThreadFunc: TFunc<T>; AOnFinishedProc: TProc<T>;
AOnErrorProc: TProc<Exception>; ACreateSuspended: Boolean = False;
AFreeOnTerminate: Boolean = True);

class constructor Create;
class destructor Destroy;
end;

implementation

{$IFDEF MACOS}
uses
{$IFDEF IOS}
iOSapi.Foundation
{$ELSE}
MacApi.Foundation
{$ENDIF IOS}
;
{$ENDIF MACOS}

{ TAnonymousThread }

class constructor TAnonymousThread<T>.Create;
begin
inherited;
CRunningThreads := TList<TThread>.Create;
end;

class destructor TAnonymousThread<T>.Destroy;
begin
CRunningThreads.Free;
inherited;
end;

constructor TAnonymousThread<T>.Create(AThreadFunc: TFunc<T>; AOnFinishedProc: TProc<T>;
AOnErrorProc: TProc<Exception>; ACreateSuspended: Boolean = False; AFreeOnTerminate: Boolean = True);
begin
FOnFinishedProc := AOnFinishedProc;
FOnErrorProc := AOnErrorProc;
FThreadFunc := AThreadFunc;
OnTerminate := ThreadTerminate;
FreeOnTerminate := AFreeOnTerminate;
FStartSuspended := ACreateSuspended;

//Store a reference to this thread instance so it will play nicely in an ARC
//environment. Failure to do so can result in the TThread.Execute method
//not executing. See http://qc.embarcadero.com/wc/qcmain.aspx?d=113580
CRunningThreads.Add(Self);

inherited Create(ACreateSuspended);
end;

procedure TAnonymousThread<T>.Execute;
{$IFDEF MACOS}
var
lPool: NSAutoreleasePool;
{$ENDIF}
begin
{$IFDEF MACOS}
//Need to create an autorelease pool, otherwise any autorelease objects
//may leak.
//See https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmAutoreleasePools.html#//apple_ref/doc/uid/20000047-CJBFBEDI
lPool := TNSAutoreleasePool.Create;
try
{$ENDIF}
FResult := FThreadFunc;
{$IFDEF MACOS}
finally
lPool.drain;
end;
{$ENDIF}
end;

procedure TAnonymousThread<T>.ThreadTerminate(Sender: TObject);
var
lException: Exception;
begin
try
if Assigned(FatalException) and Assigned(FOnErrorProc) then
begin
if FatalException is Exception then
lException := Exception(FatalException)
else
lException := EAnonymousThreadException.Create(FatalException.ClassName);
FOnErrorProc(lException)
end
else if Assigned(FOnFinishedProc) then
FOnFinishedProc(FResult);
finally
CRunningThreads.Remove(Self);
end;
end;

end.
Binary file added AlienInvasion-1.10/Src/Assets/AlienBug.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/AlienBug2.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/AlienBug3.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/asteroids.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/background.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AlienInvasion-1.10/Src/Assets/buttons.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/buttons_blue.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/flyingsaucer.fla
Binary file not shown.
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/health.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/laser.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/powerup.fla
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AlienInvasion-1.10/Src/Assets/shield.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/slimeattack.fla
Binary file not shown.
Binary file added AlienInvasion-1.10/Src/Assets/slimeattack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AlienInvasion-1.10/Src/Assets/slimeattack.xml
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AlienInvasion-1.10/Src/Assets/slimeattack_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AlienInvasion-1.10/Src/Assets/title.fla
Binary file not shown.
Loading

0 comments on commit 147b1cb

Please sign in to comment.