Add threadlock and universal fs functions

This commit is contained in:
murdle
2026-03-01 23:19:08 +02:00
parent 5b984ad854
commit f0632c2364
92 changed files with 618 additions and 281 deletions

View File

@@ -126,7 +126,7 @@ private:
// 4J - this block of declarations was scattered round the code but have gathered everything into one place
rteMap renderableTileEntities; // 4J - changed - was vector<shared_ptr<TileEntity>, now hashed by chunk so we can find them
CRITICAL_SECTION m_csRenderableTileEntities;
ThreadLock m_csRenderableTileEntities;
MultiPlayerLevel *level[4]; // 4J - now one per player
Textures *textures;
// vector<Chunk *> *sortedChunks[4]; // 4J - removed - not sorting our chunks anymore
@@ -164,7 +164,7 @@ private:
public:
void fullyFlagRenderableTileEntitiesToBeRemoved(); // 4J added
CRITICAL_SECTION m_csDirtyChunks;
ThreadLock m_csDirtyChunks;
bool m_nearDirtyChunk;
@@ -186,7 +186,7 @@ public:
RecentTile(int x, int y, int z, Level *level);
~RecentTile();
};
CRITICAL_SECTION m_csDestroyedTiles;
ThreadLock m_csDestroyedTiles;
vector<RecentTile *> m_destroyedTiles;
public:
void destroyingTileAt( Level *level, int x, int y, int z ); // For game to let this manager know that a tile is about to be destroyed (must be called before it actually is)
@@ -271,7 +271,7 @@ public:
static void staticCtor();
static int rebuildChunkThreadProc(void* lpParam);
CRITICAL_SECTION m_csChunkFlags;
ThreadLock m_csChunkFlags;
#endif
void nonStackDirtyChunksAdded();
};