Fission FSN
Loading...
Searching...
No Matches
fsILayer.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: fsILayer.h
4*
5* Purpose: Interface to a tile map layer which can be normal
6* tiles or object groups
7*
8*********************************************************************/
9
10#ifndef fsILayerhdr
11#define fsILayerhdr
12
13#include <vector>
14#include <fsCore/fsBaseTypes.h>
15#include <fsCore/fsStr.h>
16#include <fsCore/fsPoint.h>
17
18#include "fsTileMapForward.h"
19
20namespace fsNTileMap
21{
23 {
24 public:
25
26 enum class eType
27 {
32 };
33
34 eType typeGet() const;
35
36 virtual std::vector<fsIObjectRef> objectsGet() const = 0;
37 virtual fsIObjectRef objectGet(const fsStr& pName) const = 0;
38 virtual fsITileRef tileGet(fsS32 pX, fsS32 pY) const = 0;
39
41 virtual fsStr imagePathGet() const = 0;
42
44 virtual fsPoint layerOffsetGet() const = 0;
45
46 virtual fsStr nameGet() const = 0;
47
48 virtual ~fsILayer() = default;
49
50 protected:
51
52 fsILayer() = default;
53
55
56 private:
57
58 };
59}
60
61#endif
62
virtual std::vector< fsIObjectRef > objectsGet() const =0
virtual fsITileRef tileGet(fsS32 pX, fsS32 pY) const =0
virtual fsPoint layerOffsetGet() const =0
Authored layer offset in map pixels (Tiled offsetx/offsety, or x/y).
eType typeGet() const
Definition fsILayer.cpp:6
eType
Definition fsILayer.h:27
@ IMAGE
Definition fsILayer.h:31
@ UNKNOWN
Definition fsILayer.h:28
@ OBJECT
Definition fsILayer.h:30
@ TILE
Definition fsILayer.h:29
virtual fsStr imagePathGet() const =0
Path (relative to the map) of an IMAGE layer's backdrop/parallax image.
virtual ~fsILayer()=default
virtual fsStr nameGet() const =0
virtual fsIObjectRef objectGet(const fsStr &pName) const =0
eType mType
Definition fsILayer.h:54
Definition fsStr.h:23
int fsS32
Definition fsBaseTypes.h:20
Definition fsILayer.h:21
std::shared_ptr< fsITile > fsITileRef
Definition fsTileMapForward.h:21
std::shared_ptr< fsIObject > fsIObjectRef
Definition fsTileMapForward.h:24
Definition fsPoint.h:17