ddnet/src/engine/shared/map.h

44 lines
1,007 B
C
Raw Normal View History

2020-09-18 16:45:42 +00:00
/* (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_SHARED_MAP_H
#define ENGINE_SHARED_MAP_H
#include <base/system.h>
#include "datafile.h"
#include <engine/map.h>
class CMap : public IEngineMap
{
CDataFileReader m_DataFile;
public:
CMap();
void *GetData(int Index) override;
int GetDataSize(int Index) override;
void *GetDataSwapped(int Index) override;
void UnloadData(int Index) override;
void *GetItem(int Index, int *pType, int *pID) override;
int GetItemSize(int Index) override;
void GetType(int Type, int *pStart, int *pNum) override;
void *FindItem(int Type, int ID) override;
int NumItems() override;
2020-09-18 16:45:42 +00:00
void Unload() override;
2020-09-18 16:45:42 +00:00
bool Load(const char *pMapName) override;
2020-09-18 16:45:42 +00:00
bool IsLoaded() override;
2020-09-18 16:45:42 +00:00
SHA256_DIGEST Sha256() override;
2020-09-18 16:45:42 +00:00
unsigned Crc() override;
2020-09-18 16:45:42 +00:00
int MapSize() override;
2020-09-18 16:45:42 +00:00
IOHANDLE File() override;
2020-09-18 16:45:42 +00:00
};
#endif