mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-03-30 16:20:03 +00:00
[refactor] Mark all internal functions static
All packet handlers and helper functions that are only used in the source file they're declared in have been taken out of the namespaces in the corresponding header files, have been marked static, and have been reordered to avoid the need for declarations at the top of each source file. Each source file now contains a "using namespace" directive so that the static functions don't need to prefix the source file's symbols with their namespace. All redundant namespace prefixes found have been removed. An unused nano power resetting function in NanoManager has been removed.
This commit is contained in:
@@ -22,14 +22,8 @@ enum {
|
||||
};
|
||||
|
||||
namespace ChunkManager {
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
extern std::map<ChunkPos, Chunk*> chunks;
|
||||
|
||||
void newChunk(ChunkPos pos);
|
||||
void deleteChunk(ChunkPos pos);
|
||||
|
||||
void updatePlayerChunk(CNSocket* sock, ChunkPos from, ChunkPos to);
|
||||
void updateNPCChunk(int32_t id, ChunkPos from, ChunkPos to);
|
||||
|
||||
@@ -44,13 +38,10 @@ namespace ChunkManager {
|
||||
void removeNPCFromChunks(std::set<Chunk*> chnks, int32_t id);
|
||||
|
||||
bool chunkExists(ChunkPos chunk);
|
||||
void emptyChunk(ChunkPos chunkPos);
|
||||
ChunkPos chunkPosAt(int posX, int posY, uint64_t instanceID);
|
||||
std::set<Chunk*> getViewableChunks(ChunkPos chunkPos);
|
||||
|
||||
std::vector<ChunkPos> getChunksInMap(uint64_t mapNum);
|
||||
bool inPopulatedChunks(std::set<Chunk*>* chnks);
|
||||
void createInstance(uint64_t);
|
||||
void destroyInstance(uint64_t);
|
||||
void destroyInstanceIfEmpty(uint64_t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user