28#include "IApplicationEventReceiver.h"
89 bool m_enableRunWhenPause;
109 typedef std::pair<std::string, IApplicationEventReceiver*>
appEventType;
301 m_enableRunWhenPause = b;
Base class for managing the application lifecycle, rendering, and event system in Skylicht Engine.
Definition CBaseApp.h:57
void enableRender(bool b)
Enable or disable rendering.
Definition CBaseApp.h:246
std::pair< std::string, IApplicationEventReceiver * > appEventType
Type for mapping application event receivers by name.
Definition CBaseApp.h:109
IVideoDriver * m_driver
Video driver pointer.
Definition CBaseApp.h:63
io::IFileSystem * m_fileSystem
File system pointer.
Definition CBaseApp.h:66
void showDebugConsole()
Show debug console (Windows only).
void sendEventToAppReceiver(int eventID, int param1=0, int param2=0)
Send an event to all registered application event receivers.
IVideoDriver * getDriver()
Get the Irrlicht video driver.
Definition CBaseApp.h:147
CBaseApp()
Default constructor for CBaseApp.
video::SColor m_clearColor
Color used to clear the screen.
Definition CBaseApp.h:92
bool isWideScreen()
Check if screen is widescreen format.
float m_timeStep
Time step for each frame(ms).
Definition CBaseApp.h:71
SExposedVideoData & getVideoData()
Get exposed video data for rendering pipeline.
Definition CBaseApp.h:171
float getSizeRatio()
Get the screen aspect ratio (width/height).
bool isRenderEnabled()
Check if rendering is enabled.
Definition CBaseApp.h:255
float getTimeStep()
Get the time step for the current frame.
Definition CBaseApp.h:180
bool m_renderEnabled
Flag to enable / disable rendering.
Definition CBaseApp.h:86
bool m_showFPS
Flag to display FPS in window caption.
Definition CBaseApp.h:80
void enableRunWhenPause(bool b)
Enable or disable running logic when the application is paused.
Definition CBaseApp.h:299
float m_clearScreenTime
Time to clear screen before rendering.
Definition CBaseApp.h:83
io::path getBuiltInPath(const char *name)
Get built-in asset path based on platform.
void unRegisterAppEvent(IApplicationEventReceiver *pEvent)
Unregister an application event receiver.
int getLimitFPS()
Get the FPS limit.
Definition CBaseApp.h:290
bool isNetworkAvailable()
Check network available or not?
void openURL(const char *url)
Open browse with url.
float m_totalTime
Total elapsed time since app started(ms).
Definition CBaseApp.h:74
void showFPS(bool b)
Show or hide FPS in window caption.
Definition CBaseApp.h:204
int m_limitFPS
FPS limit(-1 for unlimited).
Definition CBaseApp.h:77
IrrlichtDevice * getDevice()
Get the Irrlicht device.
Definition CBaseApp.h:138
int getHeight()
Get the screen height.
void setClearColor(const video::SColor &c)
Set the color used to clear the screen before rendering.
void registerAppEvent(const std::string &name, IApplicationEventReceiver *pEvent)
Register a new application event receiver.
int getWidth()
Get the screen width.
std::string getTexturePackageName(const char *name, const char *ext=".zip")
Get texture package name based on platform and compression support.
std::string m_appName
Application name.
Definition CBaseApp.h:95
void setLimitFPS(int fps)
Set the FPS limit for the application.
static void reportLeakMemory()
Report memory leaks (Visual Leak Detector, debug only).
io::IFileSystem * getFileSystem()
Get the Irrlicht file system.
Definition CBaseApp.h:156
void clearScreenTime(float t)
Set the duration to clear the screen before rendering.
Definition CBaseApp.h:237
IrrlichtDevice * m_device
Irrlicht device pointer.
Definition CBaseApp.h:60
virtual ~CBaseApp()
Destructor for CBaseApp.
std::vector< appEventType > m_appEventReceivers
List of registered application event receivers.
Definition CBaseApp.h:112
const char * getAppName()
Get the name of the application.
Definition CBaseApp.h:119
Definition IApplicationEventReceiver.h:31
The Irrlicht device. You can create it with createDevice() or createDeviceEx().
Definition IrrlichtDevice.h:44
The FileSystem manages files and archives and provides access to them.
Definition IFileSystem.h:33
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition IVideoDriver.h:388
Class representing a 32 bit ARGB color.
Definition SColor.h:285
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29
EAppEvent
Enumeration of application event types for event receiver system.
Definition CBaseApp.h:37
core::string< fschar_t > path
Type used for all file system related strings.
Definition path.h:17
structure for holding data describing a driver and operating system specific data.
Definition SExposedVideoData.h:29