![]() |
CRM64Pro GDK v0.15.0
A free cross-platform game development kit built on top of SDL 3.0
|
Base class for all Scene layer types. More...
Base class for all Scene layer types.
Public Member Functions | |
| virtual float | getTotalWidth () const |
| Get the layer's total width in pixels. | |
| virtual float | getTotalHeight () const |
| Get the layer's total height in pixels. | |
| void | setOnUpdateCallback (SCENE_OnLayerCallback callback) |
| Set the callback for update events. | |
| void | setOnRenderCallback (SCENE_OnLayerCallback callback) |
| Set the callback for render events. | |
| SCENE_OnLayerCallback | getOnUpdateCallback () const |
| Get the update callback. | |
| SCENE_OnLayerCallback | getOnRenderCallback () const |
| Get the render callback. | |
Protected Member Functions | |
| virtual eSceneLayerType | getType () const =0 |
| Get the layer type. | |
| virtual Sint32 | update (Scene *pEngine, SceneLayerContext &context)=0 |
| Update layer content. | |
| virtual Sint32 | render (Scene *pEngine, SceneLayerContext &context)=0 |
| Render layer content. | |
|
virtual |
Get the layer's total width in pixels.
Reimplemented in CRM64Pro::SceneLayerImage, CRM64Pro::SceneLayerObject, and CRM64Pro::SceneLayerTile.
|
virtual |
Get the layer's total height in pixels.
Reimplemented in CRM64Pro::SceneLayerImage, CRM64Pro::SceneLayerObject, and CRM64Pro::SceneLayerTile.
| void CRM64Pro::SceneLayer::setOnUpdateCallback | ( | SCENE_OnLayerCallback | callback | ) |
Set the callback for update events.
| callback | Pointer to the user callback function. |
| void CRM64Pro::SceneLayer::setOnRenderCallback | ( | SCENE_OnLayerCallback | callback | ) |
Set the callback for render events.
| callback | Pointer to the user callback function. |
| SCENE_OnLayerCallback CRM64Pro::SceneLayer::getOnUpdateCallback | ( | ) | const |
Get the update callback.
| SCENE_OnLayerCallback CRM64Pro::SceneLayer::getOnRenderCallback | ( | ) | const |
Get the render callback.
|
protectedpure virtual |
Get the layer type.
Implemented in CRM64Pro::SceneLayerImage, CRM64Pro::SceneLayerObject, and CRM64Pro::SceneLayerTile.
|
protectedpure virtual |
Update layer content.
| pEngine | Pointer to the Scene instance. |
| context | Layer context structure containing update state (deltaTime, scroll position, etc). |
Implemented in CRM64Pro::SceneLayerImage, CRM64Pro::SceneLayerObject, and CRM64Pro::SceneLayerTile.
|
protectedpure virtual |
Render layer content.
| pEngine | Pointer to the Scene instance. |
| context | Layer context structure containing render state (render target, scroll position, etc). |
Implemented in CRM64Pro::SceneLayerImage, CRM64Pro::SceneLayerObject, and CRM64Pro::SceneLayerTile.