Generates and lights the spawn area of the world.
More...
#include <SpawnPrepare.h>
|
struct | sMakeSharedTag |
| Private tag allows public constructors that can only be used with private access. More...
|
|
|
static void | PrepareChunks (cWorld &a_World, int a_SpawnChunkX, int a_SpawnChunkZ, int a_PrepareDistance) |
|
Generates and lights the spawn area of the world.
Runs as a separate thread.
Definition at line 9 of file SpawnPrepare.h.
◆ cSpawnPrepare()
cSpawnPrepare::cSpawnPrepare |
( |
cWorld & |
a_World, |
|
|
int |
a_SpawnChunkX, |
|
|
int |
a_SpawnChunkZ, |
|
|
int |
a_PrepareDistance, |
|
|
int |
a_FirstIdx, |
|
|
sMakeSharedTag |
|
|
) |
| |
◆ DecodeChunkCoords()
void cSpawnPrepare::DecodeChunkCoords |
( |
int |
a_Idx, |
|
|
int & |
a_ChunkX, |
|
|
int & |
a_ChunkZ |
|
) |
| |
|
protected |
Decodes the index into chunk coords.
Provides the specific chunk ordering.
Definition at line 76 of file SpawnPrepare.cpp.
◆ PrepareChunks()
void cSpawnPrepare::PrepareChunks |
( |
cWorld & |
a_World, |
|
|
int |
a_SpawnChunkX, |
|
|
int |
a_SpawnChunkZ, |
|
|
int |
a_PrepareDistance |
|
) |
| |
|
static |
◆ PreparedChunkCallback()
void cSpawnPrepare::PreparedChunkCallback |
( |
int |
a_ChunkX, |
|
|
int |
a_ChunkZ |
|
) |
| |
|
protected |
◆ cSpawnPrepareCallback
◆ m_EvtFinished
cEvent cSpawnPrepare::m_EvtFinished |
|
protected |
Event used to signal that the preparation is finished.
Definition at line 36 of file SpawnPrepare.h.
◆ m_LastReportChunkCount
int cSpawnPrepare::m_LastReportChunkCount |
|
protected |
Number of chunks prepared when the last progress report was emitted.
Definition at line 42 of file SpawnPrepare.h.
◆ m_LastReportTime
std::chrono::steady_clock::time_point cSpawnPrepare::m_LastReportTime |
|
protected |
The timestamp of the last progress report emitted.
Definition at line 39 of file SpawnPrepare.h.
◆ m_MaxIdx
int cSpawnPrepare::m_MaxIdx |
|
protected |
The maximum index of the prepared chunks.
Queueing stops when m_NextIdx reaches this number.
Definition at line 30 of file SpawnPrepare.h.
◆ m_NextIdx
int cSpawnPrepare::m_NextIdx |
|
protected |
The index of the next chunk to be queued in the lighting thread.
Definition at line 27 of file SpawnPrepare.h.
◆ m_NumPrepared
std::atomic<int> cSpawnPrepare::m_NumPrepared |
|
protected |
Total number of chunks already finished preparing.
Preparation finishes when this number reaches m_MaxIdx.
Definition at line 33 of file SpawnPrepare.h.
◆ m_PrepareDistance
int cSpawnPrepare::m_PrepareDistance |
|
protected |
◆ m_SpawnChunkX
int cSpawnPrepare::m_SpawnChunkX |
|
protected |
◆ m_SpawnChunkZ
int cSpawnPrepare::m_SpawnChunkZ |
|
protected |
◆ m_World
cWorld& cSpawnPrepare::m_World |
|
protected |
The documentation for this class was generated from the following files: