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//------------------------------------------------------------------------------
23{
24public:
27
28private:
29 friend class World;
30
31 PackedLevel() {}; // only worlds may create this
32
33 // only worlds may destroy this
35 {
36 for (auto& t : tables)
37 {
38 if (t.columns != nullptr)
39 delete[] t.columns;
40 }
41 };
42
43 // the destination world if we are to instantiate this level
45
52
54};
55
56} // namespace Game
Definition level.h:23
Util::Array< Game::Entity > Instantiate() const
instantiates the level into game world
Definition level.cc:19
PackedLevel()
Definition level.h:31
~PackedLevel()
Definition level.h:34
Util::Array< EntityGroup > tables
Definition level.h:53
Game::World * world
Definition level.h:44
Definition world.h:50
Nebula's dynamic array class.
Definition array.h:60
Game::EditorState.
Definition orientation.h:7
Definition level.h:47
SizeT numRows
Definition level.h:49
MemDb::TableId dstTable
Definition level.h:48
ubyte * columns
Definition level.h:50
Table identifier.
Definition tableid.h:14
unsigned char ubyte
Definition types.h:34
int SizeT
Definition types.h:49