The Map class defines the map element from JugiMap Editor.
More...
#include <jmMap.h>
Inherited by MapAGK, MapCC, MapNC, and MapSFML.
The Map class defines the map element from JugiMap Editor.
A map object stores Layer objects and is their owner.
◆ Map() [1/2]
◆ Map() [2/2]
◆ ~Map()
◆ DeleteContent()
Delete the map content.
This function deletes layers and their content (sprites, vector shapes, ...). SourceGraphics objects (source sprites, textures, ...) assigned to map objects are not deleted!
◆ InitAsWorldMap()
Initialize this map as a word map.
◆ InitAsParallaxMap()
void InitAsParallaxMap |
( |
Vec2i |
_worldMapSize | ) |
|
|
virtual |
Initialize this map as a parallax map linked to a world map with the given size *_worldMapSize*.
◆ InitAsScreenMap()
void InitAsScreenMap |
( |
Vec2i |
_screenMapDesignSize | ) |
|
|
virtual |
Initialize this map as a screen map with the given design size *_screenMapDesignSize*.
◆ InitEngineObjects()
void InitEngineObjects |
( |
MapType |
_mapType | ) |
|
|
virtual |
Initialize the engine map objects.
This function initialize the engine objects of all map elements. It should be called after a map was initialized by type.
Reimplemented in MapNC, and MapCC.
◆ UpdateEngineObjects()
void UpdateEngineObjects |
( |
| ) |
|
|
virtual |
Update the engine map objects.
This function must be called before the engine begin with drawing (rendering).
Reimplemented in MapNC, MapAGK, and MapCC.
◆ DrawEngineObjects()
void DrawEngineObjects |
( |
| ) |
|
|
virtual |
Draw the engine map objects.
This function is needed only for the engines which do not handle drawing (rendering) internally.
Reimplemented in MapSFML.
◆ SetCamera()
void SetCamera |
( |
Camera * |
_camera | ) |
|
|
inline |
Assign a camera to this map.
A camera must be assigned before calling the UpdateEngineMap() function. The type of an assigned camera depends of the map type:
- For a world map use a WorldMapCamera camera.
- For a parallax map use the same camera as is used for the world map.
- For a screen map use a ScreenMapCamera.
◆ GetType()
Returns the type of this map.
◆ GetTileSize()
Returns the tile size of this map.
◆ GetTilesCount()
Returns the number of tile rows and columns.
◆ GetCamera()
Returns the camera assigned to this map.
◆ GetLayers()
std::vector<Layer*>& GetLayers |
( |
| ) |
|
|
inline |
Returns a reference to the layers of this map.
◆ GetParameters()
Returns a reference to the parameters of this map.
◆ GetWorldMapSize()
Vec2i GetWorldMapSize |
( |
| ) |
|
|
inline |
Returns the world map size.
The returned value depends of the map type:
- For a world map it is the size of the map.
- For a parallax map it is the size of the linked world map.
- For a screen map it is not defined (zero vector). This function should not be called before the map initalization (calling InitWorldMap, InitParallaxMap or InitScreenMap)!
◆ GetScreenMapDesignSize()
Vec2i GetScreenMapDesignSize |
( |
| ) |
|
|
inline |
Returns the screen map design size.
The returned value depends of the map type:
- For world maps and parallax maps it is not defined.
- For a screen map it is the design size set at initialization. This function should not be called before the map initalization (calling InitWorldMap, InitParallaxMap or InitScreenMap)!
◆ GetSize()
Returns the size of this map.
◆ CaptureForLerpDrawing()
void CaptureForLerpDrawing |
( |
| ) |
|
Capture the sprite properties, usually the position only, required for the lerp drawing.
- See also
- Globals::SetUseLerpDrawing
◆ SetVisible()
virtual void SetVisible |
( |
bool |
_visible | ) |
|
|
inlinevirtual |
◆ IsVisible()
Returns true if this map is visible; otherwise returns false.
- See also
- IsVisible
◆ AddSpriteLayer()
SpriteLayer * AddSpriteLayer |
( |
const std::string & |
_name | ) |
|
Adds the given *_layer* to this map.
If the *_index* is specified the layer will be inserted at that position in the layers vector; otherwise it will be added at the end. This function is available for the cases where we manually create maps or layers.
◆ _SetName()
void _SetName |
( |
const std::string & |
_name | ) |
|
|
inline |
Sets the name of this map to the given *_name*.
This function is available for the cases where we manually create maps.
◆ _SetZOrderStart()
void _SetZOrderStart |
( |
int |
_zOrderStart | ) |
|
|
inline |
Sets the starting z-order.
This function should be used before loading the map to set starting z-order value for layers.
- See also
- GetZOrderStart
◆ GetZOrderStart()
◆ RebuildWidgets()
Returns the next z-order to be used with a next (manually) added layer to the map.
The documentation for this class was generated from the following files:
- C:/Development/JugiMapProject/JugiMapFRM/framework_c++/jugimap/jmMap.h
- C:/Development/JugiMapProject/JugiMapFRM/framework_c++/jugimap/jmMap.cpp