Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
TilesetManager::TilesetInfo Struct Reference

Information about a loaded tileset. More...

#include <World.h>

Public Member Functions

 TilesetInfo ()
 Default constructor with explicit initialization.
 

Public Attributes

uint32_t firstgid
 First Global ID in this tileset.
 
uint32_t lastgid
 Last Global ID (firstgid + tilecount - 1)
 
std::string name
 Tileset name.
 
int tilewidth
 Width of each tile.
 
int tileheight
 Height of each tile.
 
int columns
 Number of columns in atlas.
 
int imagewidth
 Total atlas width.
 
int imageheight
 Total atlas height.
 
int margin
 Margin around atlas.
 
int spacing
 Spacing between tiles.
 
bool isCollection
 True if collection tileset.
 
int tileoffsetX
 Global X offset for all tiles.
 
int tileoffsetY
 Global Y offset for all tiles.
 
SDL_Texturetexture
 Atlas texture (image-based)
 
std::map< uint32_t, SDL_Texture * > individualTiles
 Per-tile textures.
 
std::map< uint32_t, SDL_RectindividualSrcRects
 Per-tile source rects.
 

Detailed Description

Information about a loaded tileset.

Stores tileset properties including dimensions, offsets, and textures. Critical for proper tile rendering with correct positioning.

Definition at line 105 of file World.h.

Constructor & Destructor Documentation

◆ TilesetInfo()

TilesetManager::TilesetInfo::TilesetInfo ( )
inline

Default constructor with explicit initialization.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 141 of file World.h.

Member Data Documentation

◆ columns

int TilesetManager::TilesetInfo::columns

Number of columns in atlas.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 112 of file World.h.

Referenced by TilesetManager::GetTileTexture().

◆ firstgid

uint32_t TilesetManager::TilesetInfo::firstgid

First Global ID in this tileset.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 107 of file World.h.

Referenced by TilesetManager::GetTileTexture(), and TilesetManager::LoadTilesets().

◆ imageheight

int TilesetManager::TilesetInfo::imageheight

Total atlas height.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 114 of file World.h.

◆ imagewidth

int TilesetManager::TilesetInfo::imagewidth

Total atlas width.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 113 of file World.h.

◆ individualSrcRects

std::map<uint32_t, SDL_Rect> TilesetManager::TilesetInfo::individualSrcRects

Per-tile source rects.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 136 of file World.h.

Referenced by TilesetManager::GetTileTexture().

◆ individualTiles

std::map<uint32_t, SDL_Texture*> TilesetManager::TilesetInfo::individualTiles

Per-tile textures.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 135 of file World.h.

Referenced by TilesetManager::GetTileTexture().

◆ isCollection

bool TilesetManager::TilesetInfo::isCollection

True if collection tileset.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 117 of file World.h.

Referenced by TilesetManager::GetTileTexture().

◆ lastgid

uint32_t TilesetManager::TilesetInfo::lastgid

Last Global ID (firstgid + tilecount - 1)

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 108 of file World.h.

◆ margin

int TilesetManager::TilesetInfo::margin

Margin around atlas.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 115 of file World.h.

Referenced by TilesetManager::GetTileTexture().

◆ name

std::string TilesetManager::TilesetInfo::name

Tileset name.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 109 of file World.h.

Referenced by TilesetManager::GetTileTexture().

◆ spacing

int TilesetManager::TilesetInfo::spacing

Spacing between tiles.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 116 of file World.h.

Referenced by TilesetManager::GetTileTexture().

◆ texture

SDL_Texture* TilesetManager::TilesetInfo::texture

Atlas texture (image-based)

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 132 of file World.h.

Referenced by TilesetManager::GetTileTexture().

◆ tileheight

int TilesetManager::TilesetInfo::tileheight

Height of each tile.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 111 of file World.h.

Referenced by TilesetManager::GetTileTexture().

◆ tileoffsetX

int TilesetManager::TilesetInfo::tileoffsetX

Global X offset for all tiles.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 128 of file World.h.

Referenced by TilesetManager::LoadTilesets(), and RenderMultiLayerForCamera().

◆ tileoffsetY

int TilesetManager::TilesetInfo::tileoffsetY

Global Y offset for all tiles.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 129 of file World.h.

Referenced by RenderMultiLayerForCamera().

◆ tilewidth

int TilesetManager::TilesetInfo::tilewidth

Width of each tile.

Examples
/home/runner/work/Olympe-Engine/Olympe-Engine/Source/World.h.

Definition at line 110 of file World.h.

Referenced by TilesetManager::GetTileTexture().


The documentation for this struct was generated from the following file: