Class TA3DGEApplication
Unit
a3dge
Declaration
type TA3DGEApplication = class(TCustomApplication)
Description
Base for all A3DGE applications.
It works much like LCL and VCL TCustomApplication class, so Lazarus and Delphi users should be used to this kind of stuff.
Only one application object should exist. If you create more than one an exception will raise.
You should call Initialize after creation.
See also
- Application
- Global reference to the A3DGE application object.
- TA3DGEApplication.Initialize
- Initialize the application.
Hierarchy
- TCustomApplication
- TA3DGEApplication
Overview
Methods
Properties
Description
Methods
 |
procedure DoLog (aEventType: TEventType; const aMessage: AnsiString); override; |
Implements log system.
|
 |
procedure PrintCommandLineOptions; virtual; |
Print command line options.
By default it prints information about default command line options.
Note that this information will be printed on the console terminal. On Windows it means you must compile without the -WG option or it will fail with an exception. Another option is to override this method to prevent printing on console.
See also
- ParseCommandLineOptions
- Parse command line options.
|
 |
procedure ParseCommandLineOptions; virtual; |
Parse command line options.
These are the options parsed by this method:
Note that options `-h` and `–log` won't be overriden as they're hard-wired to the core.
See also
- PrintCommandLineOptions
- Print command line options.
|
 |
constructor Create (aOwner: TComponent); override; |
Create the application object.
|
 |
procedure ShowErrorMessage (const aMessage: AnsiString); |
Show an error message on screen.
If the Display is open then it will try to render the message on it. If not it will print it in the standard output (the console or command terminal).
This is used internally to show uncatched exception messages.
Parameters
- aMessage
- The error message.
|
 |
procedure Initialize; override; |
Initialize the application.
You must call this before the game execution.
It will:
Checks and initializes EventLogFilter , Configuration and Display.
Loads configuration file and parses command line options.
Initializes Allegro and base subsystems.
Opens the display.
See also
- TA3DGEApplication.ParseCommandLineOptions
- Parse command line options.
- TDisplay.Open
- Open the display.
|
 |
procedure AddGameState ( aGameState: TGameState; const aName: AnsiString = '' ); |
Adds a game state, that will be owned by Application.
AddGameState adds the given state the list of gamestates in the application. If it is the first game state adde, it will be assigned as the current GameState.
Adding the state after Initialize will log it as etDebug , but adding it before will not.
Parameters
- aGameState
- The game state to add.
- aName
- If set, it will assign the name to the state.
See also
- TA3DGEApplication.GameState
- Manage the current game state.
- TA3DGEApplication.FindGameState
- Search for an owned state by name.
|
 |
procedure PauseUpdates; |
Pause game updates.
This will stop to update the current game state but other events will be triggered normally. You can use this while loading game data to prevent time jumps.
Do not forget to call ResumeUpdates to restore the normal game execution.
See also
- TA3DGEApplication.ResumeUpdates
- Resume game updates.
|
 |
procedure ClearEventQueue; |
Drops all events in system queue and clears keyboard..
|
Properties
 |
property Display: TDisplay read fDisplay; |
Access to display.
|
 |
property TicksPerSecond: Integer
read fTicksPerSecond write SetTicksPerSecond; |
How many times to call current state's Update method each second.
Default value is FPS.
|
 |
property Keyboard: TKeyboard read fKeyboard; |
Access to keyboard.
|
 |
property Mouse: TMouse read fMouse; |
Access to mouse.
|
 |
property SysFont: ALLEGRO_FONTptr read fSystemTextFont; |
System text font.
|
 |
property World3D: TWorld3D read fWorld; |
Global reference to the 3D world.
|
Generated by PasDoc 0.15.0. Generated on 2025-07-31 11:41:01.
|