Rehti MMORPG  1.0.0
Rehti MMORPG is a free and open source MMORPG game.
TextureReader.hpp File Reference
#include <map>
#include <string>
#include "AssetTypes.hpp"
#include "CharacterReader.hpp"
#include "ObjectReader.hpp"
Include dependency graph for TextureReader.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::map< std::string, ImageDataloadObjectTextures (const GameObjects &gameObjects)
 Reads all the object's textures + character textures into a map (key=filename, value=ImageData) More...
 
std::map< std::string, ImageDataloadCharacterTextures (const GameCharacters &gameCharacters)
 Reads all the character's textures into a map (key=filename, value=ImageData) More...
 
std::map< std::string, ImageDataloadItemTextures (const GameItems &gameItems)
 Reads all the item object textures and item icons into a map (key=filename, value=ImageData) More...
 
std::map< int, ImageDataloadMapTextures ()
 Reads all different the map texture files. More...
 
std::vector< std::vector< int > > loadMapTexturePositions ()
 Loads map texture positions. E.g. which tile contains which texture. More...
 
ImageData createAreaBlendMap (const std::vector< std::vector< int >> &mapTexturePositionMatrix, int rowOffset, int columnOffset)
 Creates a blend map for one area. Blend map shows which texture is used on each tile. More...
 
ImageData loadDefaultTexture ()
 Loads default texture into memory. More...
 

Function Documentation

◆ createAreaBlendMap()

ImageData createAreaBlendMap ( const std::vector< std::vector< int >> &  mapTexturePositionMatrix,
int  rowOffset,
int  columnOffset 
)

Creates a blend map for one area. Blend map shows which texture is used on each tile.

Note
Supports only 5 different textures per area
Parameters
mapTexturePositionMatrixMatrix of texture positions with the corresponding texture id
rowOffsetAreas row offset in the mapTexturePositionMatrix
columnOffsetAreas column offset in the mapTexturePositionMatrix
Returns
Blend map image data
Here is the caller graph for this function:

◆ loadCharacterTextures()

std::map<std::string, ImageData> loadCharacterTextures ( const GameCharacters gameCharacters)

Reads all the character's textures into a map (key=filename, value=ImageData)

Parameters
gameCharactersGameCharacters
Returns
Map of texture filename and its corresponding ImageData
Here is the caller graph for this function:

◆ loadDefaultTexture()

ImageData loadDefaultTexture ( )

Loads default texture into memory.

Returns
ImageData of the default texture
Here is the caller graph for this function:

◆ loadItemTextures()

std::map<std::string, ImageData> loadItemTextures ( const GameItems gameItems)

Reads all the item object textures and item icons into a map (key=filename, value=ImageData)

Parameters
gameItemsGameItems
Returns
Map of texture filename and corresponding ImageData
Here is the caller graph for this function:

◆ loadMapTexturePositions()

std::vector<std::vector<int> > loadMapTexturePositions ( )

Loads map texture positions. E.g. which tile contains which texture.

Returns
Matrix of texture positions. Position is indicated by the row and column. The texture id on that position is the cell value.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadMapTextures()

std::map<int, ImageData> loadMapTextures ( )

Reads all different the map texture files.

Returns
Map of textures (key=textureId, value=ImageData)
Here is the caller graph for this function:

◆ loadObjectTextures()

std::map<std::string, ImageData> loadObjectTextures ( const GameObjects gameObjects)

Reads all the object's textures + character textures into a map (key=filename, value=ImageData)

Parameters
gameObjectsGameObjects
Returns
Map of texture filename and its corresponding ImageData
Here is the caller graph for this function: