Nebula
Loading...
Searching...
No Matches
level.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
9//------------------------------------------------------------------------------
10#include "core/refcounted.h"
11#include "memdb/database.h"
12#include "game/entity.h"
13
14namespace Game
15{
16
17class World;
18
19//------------------------------------------------------------------------------
37class PackedLevel
38{
39public:
42
43private:
44 friend class World;
45
46 PackedLevel() {}; // only worlds may create this
47
48 // only worlds may destroy this
50 {
51 for (auto& t : tables)
52 {
53 if (t.columns != nullptr)
54 delete[] t.columns;
55 }
56 };
57
58 // the destination world if we are to instantiate this level
60
67
69};
70
71} // namespace Game
Util::Array< Game::Entity > Instantiate() const
instantiates the level into game world
Definition level.cc:19
PackedLevel()
Definition level.h:46
~PackedLevel()
Definition level.h:49
Util::Array< EntityGroup > tables
Definition level.h:68
Game::World * world
Definition level.h:59
A container of entities, their components, and processors.
Nebula's dynamic array class.
Definition array.h:60
Game::EditorState.
Definition graphicsmanager.h:60
Definition level.h:62
SizeT numRows
Definition level.h:64
MemDb::TableId dstTable
Definition level.h:63
ubyte * columns
Definition level.h:65
Table identifier.
Definition tableid.h:14
unsigned char ubyte
Definition types.h:34
int SizeT
Definition types.h:49