|
Stardew Engine
|
#include <Game2DLayer.h>

Public Member Functions | |
| VECTOR (struct Worldspace2DVert) pWorldspaceVertices | |
| buffers of vertices and indices populated each frame | |
| VECTOR (VertIndexT) pWorldspaceIndices | |
Data Fields | |
| struct GameFrameworkLayer * | pLayer |
| for convenience, a reference back to the layer | |
| HEntity2DQuadtreeNode | hEntitiesQuadTree |
| The top node of a quad tree that holds references to static sprites for culling. | |
| hAtlas | hAtlas |
| handle to atlas containing sprite data | |
| struct TileMap | tilemap |
| tilemap comprised of a list of tilemap layers | |
| bool | bLoaded |
| mostly pointless | |
| bool | bFreeLookMode |
| When in this mode the game is paused and you have a different set of controls to freely move the camera around, in future I might add editing. | |
| struct Transform2D | camera |
| the one and only camera | |
| int | cameraClampedToTilemapLayer |
| Which layer, if any, is the camera clamped to. If it is not clamped (the default) then this should be -1. | |
| struct FreeLookCameraModeControls | freeLookCtrls |
| controls for free look mode | |
| H2DWorldspaceVertexBuffer | vertexBuffer |
| char | atlasFilePath [MAX_GAME_LAYER_ASSET_FILE_PATH_LEN] |
| Path of loaded atlas file. | |
| char | tilemapFilePath [MAX_GAME_LAYER_ASSET_FILE_PATH_LEN] |
| path of loaded level file | |
| bool | bDebugLayerAttatched |
| flag for whether the debug overlay is pushed on top of the game | |
| char | debugMsg [256] |
| A message to display on the screen when the debug overlay is on top of the game2dlayer. | |
| struct GameFrameworkEventListener * | pDebugListener |
| Listens for the debug overlay game framework layer being pushed. | |
| int | windowW |
| Window width. | |
| int | windowH |
| Window height. | |
| HPhysicsWorld | hPhysicsWorld |
| Physics world handle. | |
| struct Entity2DCollection | entities |
| Entities collection. | |
| void * | pUserData |
| Game specific data. | |
| PreFirstInitFn | preFirstInitCallback |
| a callback called when the layer is pushed, and the level and all entities are loaded, but have not had their init methods called yet. An opportunity for your game to load sprite handles from the atlas that the entities will use in their init methods. | |
| PreLoadLevelFn | preLoadLevelFn |
| DrawContext * | pDrawContext |
| HACK : todo: sort out the availabilty of these draw and input contexts todo: use global getter for draw context. | |
| bool | bSkipDraw |
| bool | bCurrentLocationIsDirty |
| Current location has changed in such a way that it needs to be saved, when a new area is moved to or you sleep. | |
| LevelDataPacketExtenderFn | levelDataPacketExtender |
| AS THE SERVER : Write extra game specific data to the level data packet the server sends initially to each client. | |
| LevelDataRequestHandlerExtenderFn | levelDataRequestHandlerExtender |
| AS THE SERVER : Read extra game specific data from the level data request packet the client sends to the server. | |
| LevelDataHandlerExtenderFn | levelDataHandlerExtender |
| AS THE CLIENT : Read extra game specific data the server has written to the initial level data packet. | |
| GameLayer2DData::VECTOR | ( | struct Worldspace2DVert | ) |
buffers of vertices and indices populated each frame
| GameLayer2DData::VECTOR | ( | VertIndexT | ) |
| char GameLayer2DData::atlasFilePath[MAX_GAME_LAYER_ASSET_FILE_PATH_LEN] |
Path of loaded atlas file.
| bool GameLayer2DData::bCurrentLocationIsDirty |
Current location has changed in such a way that it needs to be saved, when a new area is moved to or you sleep.
| bool GameLayer2DData::bDebugLayerAttatched |
flag for whether the debug overlay is pushed on top of the game
| bool GameLayer2DData::bFreeLookMode |
When in this mode the game is paused and you have a different set of controls to freely move the camera around, in future I might add editing.
| bool GameLayer2DData::bLoaded |
mostly pointless
| bool GameLayer2DData::bSkipDraw |
| struct Transform2D GameLayer2DData::camera |
the one and only camera
| int GameLayer2DData::cameraClampedToTilemapLayer |
Which layer, if any, is the camera clamped to. If it is not clamped (the default) then this should be -1.
| char GameLayer2DData::debugMsg[256] |
A message to display on the screen when the debug overlay is on top of the game2dlayer.
| struct Entity2DCollection GameLayer2DData::entities |
Entities collection.
| struct FreeLookCameraModeControls GameLayer2DData::freeLookCtrls |
controls for free look mode
| hAtlas GameLayer2DData::hAtlas |
handle to atlas containing sprite data
| HEntity2DQuadtreeNode GameLayer2DData::hEntitiesQuadTree |
The top node of a quad tree that holds references to static sprites for culling.
| HPhysicsWorld GameLayer2DData::hPhysicsWorld |
Physics world handle.
| LevelDataHandlerExtenderFn GameLayer2DData::levelDataHandlerExtender |
AS THE CLIENT : Read extra game specific data the server has written to the initial level data packet.
| LevelDataPacketExtenderFn GameLayer2DData::levelDataPacketExtender |
AS THE SERVER : Write extra game specific data to the level data packet the server sends initially to each client.
| LevelDataRequestHandlerExtenderFn GameLayer2DData::levelDataRequestHandlerExtender |
AS THE SERVER : Read extra game specific data from the level data request packet the client sends to the server.
| struct GameFrameworkEventListener* GameLayer2DData::pDebugListener |
Listens for the debug overlay game framework layer being pushed.
| DrawContext* GameLayer2DData::pDrawContext |
HACK : todo: sort out the availabilty of these draw and input contexts todo: use global getter for draw context.
| struct GameFrameworkLayer* GameLayer2DData::pLayer |
for convenience, a reference back to the layer
| PreFirstInitFn GameLayer2DData::preFirstInitCallback |
a callback called when the layer is pushed, and the level and all entities are loaded, but have not had their init methods called yet. An opportunity for your game to load sprite handles from the atlas that the entities will use in their init methods.
| PreLoadLevelFn GameLayer2DData::preLoadLevelFn |
| void* GameLayer2DData::pUserData |
Game specific data.
| struct TileMap GameLayer2DData::tilemap |
tilemap comprised of a list of tilemap layers
| char GameLayer2DData::tilemapFilePath[MAX_GAME_LAYER_ASSET_FILE_PATH_LEN] |
path of loaded level file
| H2DWorldspaceVertexBuffer GameLayer2DData::vertexBuffer |
| int GameLayer2DData::windowH |
Window height.
| int GameLayer2DData::windowW |
Window width.