mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-11 10:38:20 +00:00
a69dc599a9
Fix pointer and pointer array variable naming Huge renaming to match our rules Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)[^a]\w+\[ (?!(return|delete)\b)\b\w+ (?!(m_|ms_|g_|gs_|s_))[^a]\w+\[ Further format static variables Format almost all pointer names accordingly Used regex: (?!(return)\b)\b\w+ \*(?!(m_p|p|s_p|m_ap|s_ap|g_p|g_ap|ap|gs_ap|ms_ap|gs_p|ms_p))\w+\b[^:\(p] clang-format Fix CI fail Fix misnamed non pointer as pointer and non array as array Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)p\w+\b (?!return\b)\b\w+ (ms_|m_|g_|gs_|s_)a\w+\b[^\[] clang-format Revert to SCREAMING_SNAKE_CASE and reinstate dead code
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
|
#ifndef ENGINE_MAP_H
|
|
#define ENGINE_MAP_H
|
|
|
|
#include "kernel.h"
|
|
#include <base/hash.h>
|
|
|
|
enum
|
|
{
|
|
MAX_MAP_LENGTH = 128
|
|
};
|
|
|
|
class IMap : public IInterface
|
|
{
|
|
MACRO_INTERFACE("map", 0)
|
|
public:
|
|
virtual void *GetData(int Index) = 0;
|
|
virtual int GetDataSize(int Index) = 0;
|
|
virtual void *GetDataSwapped(int Index) = 0;
|
|
virtual void UnloadData(int Index) = 0;
|
|
virtual void *GetItem(int Index, int *pType, int *pID) = 0;
|
|
virtual int GetItemSize(int Index) = 0;
|
|
virtual void GetType(int Type, int *pStart, int *pNum) = 0;
|
|
virtual void *FindItem(int Type, int ID) = 0;
|
|
virtual int NumItems() = 0;
|
|
};
|
|
|
|
class IEngineMap : public IMap
|
|
{
|
|
MACRO_INTERFACE("enginemap", 0)
|
|
public:
|
|
virtual bool Load(const char *pMapName) = 0;
|
|
virtual bool IsLoaded() = 0;
|
|
virtual void Unload() = 0;
|
|
virtual SHA256_DIGEST Sha256() = 0;
|
|
virtual unsigned Crc() = 0;
|
|
virtual int MapSize() = 0;
|
|
virtual IOHANDLE File() = 0;
|
|
};
|
|
|
|
extern IEngineMap *CreateEngineMap();
|
|
|
|
#endif
|