mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
47 lines
846 B
C++
47 lines
846 B
C++
/** @file
|
|
*
|
|
* @par History
|
|
*/
|
|
|
|
|
|
#ifndef PLIB_FILEMAPSERVER_H
|
|
#define PLIB_FILEMAPSERVER_H
|
|
|
|
#include "../clib/binaryfile.h"
|
|
#include "mapblock.h"
|
|
#include "mapcell.h"
|
|
#include "mapserver.h"
|
|
|
|
namespace Pol
|
|
{
|
|
namespace Plib
|
|
{
|
|
class RealmDescriptor;
|
|
} // namespace Plib
|
|
} // namespace Pol
|
|
|
|
namespace Pol
|
|
{
|
|
namespace Plib
|
|
{
|
|
class FileMapServer : public MapServer
|
|
{
|
|
public:
|
|
explicit FileMapServer( const RealmDescriptor& descriptor );
|
|
virtual ~FileMapServer() {}
|
|
virtual MAPCELL GetMapCell( unsigned short x, unsigned short y ) const override;
|
|
virtual size_t sizeEstimate() const override;
|
|
|
|
protected:
|
|
mutable Clib::BinaryFile _mapfile;
|
|
mutable int _cur_mapblock_index;
|
|
mutable MAPBLOCK _cur_mapblock;
|
|
|
|
// not implemented:
|
|
FileMapServer& operator=( const FileMapServer& );
|
|
FileMapServer( const FileMapServer& );
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif
|