Switched to the #pragma once system
This commit is contained in:
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef BASESCENE_HPP_
|
||||
#define BASESCENE_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "scene_list.hpp"
|
||||
|
||||
@@ -70,5 +69,3 @@ private:
|
||||
static SDL_Surface* screen;
|
||||
SceneList nextScene = SceneList::CONTINUE;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+1
-4
@@ -19,11 +19,8 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CHANNELS_HPP_
|
||||
#define CHANNELS_HPP_
|
||||
#pragma once
|
||||
|
||||
enum Channels {
|
||||
SERVER = 0
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CLIENTAPPLICATION_HPP_
|
||||
#define CLIENTAPPLICATION_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "scene_list.hpp"
|
||||
#include "base_scene.hpp"
|
||||
@@ -54,5 +53,3 @@ private:
|
||||
int clientIndex = -1;
|
||||
int accountIndex = -1;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef TERMINALERROR_HPP_
|
||||
#define TERMINALERROR_HPP_
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
@@ -30,5 +29,3 @@ public:
|
||||
explicit terminal_error(const std::string& str): runtime_error(str) {}
|
||||
explicit terminal_error(const char* cstr): runtime_error(cstr) {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef BASECHARACTER_HPP_
|
||||
#define BASECHARACTER_HPP_
|
||||
#pragma once
|
||||
|
||||
//components
|
||||
#include "character_defines.hpp"
|
||||
@@ -51,5 +50,3 @@ protected:
|
||||
std::string handle;
|
||||
std::string avatar;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef BASEMONSTER_HPP_
|
||||
#define BASEMONSTER_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "entity.hpp"
|
||||
|
||||
@@ -41,5 +40,3 @@ protected:
|
||||
std::string handle;
|
||||
std::string avatar;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef ENTITY_HPP_
|
||||
#define ENTITY_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "bounding_box.hpp"
|
||||
#include "sprite_sheet.hpp"
|
||||
@@ -52,5 +51,3 @@ protected:
|
||||
Vector2 motion;
|
||||
BoundingBox bounds;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef LOCALCHARACTER_HPP_
|
||||
#define LOCALCHARACTER_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "base_character.hpp"
|
||||
#include "bounding_box.hpp"
|
||||
@@ -38,5 +37,3 @@ public:
|
||||
private:
|
||||
//NOTE: NO MEMBERS
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef INWORLD_HPP_
|
||||
#define INWORLD_HPP_
|
||||
#pragma once
|
||||
|
||||
//maps
|
||||
#include "region_pager_base.hpp"
|
||||
@@ -166,5 +165,3 @@ protected:
|
||||
ConfigUtility& config = ConfigUtility::GetSingleton();
|
||||
UDPNetworkUtility& network = UDPNetworkUtility::GetSingleton();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef DISCONNECTEDSCREEN_HPP_
|
||||
#define DISCONNECTEDSCREEN_HPP_
|
||||
#pragma once
|
||||
|
||||
//graphics
|
||||
#include "image.hpp"
|
||||
@@ -62,5 +61,3 @@ protected:
|
||||
//auto return
|
||||
std::chrono::steady_clock::time_point startTick;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef LOBBYMENU_HPP_
|
||||
#define LOBBYMENU_HPP_
|
||||
#pragma once
|
||||
|
||||
//graphics & ui
|
||||
#include "image.hpp"
|
||||
@@ -101,5 +100,3 @@ protected:
|
||||
BoundingBox listBox;
|
||||
ServerInformation* selection = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef MAINMENU_HPP_
|
||||
#define MAINMENU_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "base_scene.hpp"
|
||||
|
||||
@@ -55,5 +54,3 @@ protected:
|
||||
Button optionsButton;
|
||||
Button quitButton;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef OPTIONSMENU_HPP_
|
||||
#define OPTIONSMENU_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "base_scene.hpp"
|
||||
|
||||
@@ -54,5 +53,3 @@ protected:
|
||||
RasterFont font;
|
||||
Button backButton;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SPLASHSCREEN_HPP_
|
||||
#define SPLASHSCREEN_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "base_scene.hpp"
|
||||
|
||||
@@ -43,5 +42,3 @@ protected:
|
||||
std::chrono::steady_clock::time_point startTick;
|
||||
Image logo;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SCENELIST_HPP_
|
||||
#define SCENELIST_HPP_
|
||||
#pragma once
|
||||
|
||||
enum class SceneList {
|
||||
//these are reserved
|
||||
@@ -36,5 +35,3 @@ enum class SceneList {
|
||||
WORLD,
|
||||
DISCONNECTEDSCREEN,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef TIMER_HPP_
|
||||
#define TIMER_HPP_
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
@@ -50,5 +49,3 @@ private:
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, Timer& t);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CHARACTERDEFINES_HPP_
|
||||
#define CHARACTERDEFINES_HPP_
|
||||
#pragma once
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@@ -38,5 +37,3 @@ constexpr int CHARACTER_BOUNDS_HEIGHT = 32;
|
||||
//the character's sprite format
|
||||
constexpr int CHARACTER_CELLS_X = 4;
|
||||
constexpr int CHARACTER_CELLS_Y = 4;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef IMAGE_HPP_
|
||||
#define IMAGE_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "SDL/SDL.h"
|
||||
#include <string>
|
||||
@@ -69,5 +68,3 @@ protected:
|
||||
SDL_Rect clip = {0, 0, 0, 0};
|
||||
bool local = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SPRITESHEET_HPP_
|
||||
#define SPRITESHEET_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "image.hpp"
|
||||
|
||||
@@ -62,5 +61,3 @@ private:
|
||||
Uint16 xIndex = 0, yIndex = 0; //current cell being drawn
|
||||
double delay = 0.0, tick = 0.0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef TILESHEET_HPP_
|
||||
#define TILESHEET_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "region.hpp"
|
||||
|
||||
@@ -50,5 +49,3 @@ private:
|
||||
Image image;
|
||||
int xCount = 0, yCount = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef REGION_HPP_
|
||||
#define REGION_HPP_
|
||||
#pragma once
|
||||
|
||||
#include <bitset>
|
||||
|
||||
@@ -59,5 +58,3 @@ private:
|
||||
type_t tiles[REGION_WIDTH][REGION_HEIGHT][REGION_DEPTH];
|
||||
std::bitset<REGION_WIDTH*REGION_HEIGHT> solid;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef REGIONAPI_HPP_
|
||||
#define REGIONAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_REGION_API "region"
|
||||
LUAMOD_API int openRegionAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef REGIONPAGERAPI_HPP_
|
||||
#define REGIONPAGERAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_REGION_PAGER_API "region_pager"
|
||||
LUAMOD_API int openRegionPagerAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef REGIONPAGERBASE_HPP_
|
||||
#define REGIONPAGERBASE_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "region.hpp"
|
||||
|
||||
@@ -57,5 +56,3 @@ public:
|
||||
protected:
|
||||
std::list<Region> regionList;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef REGIONPAGERLUA_HPP_
|
||||
#define REGIONPAGERLUA_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "region_pager_base.hpp"
|
||||
|
||||
@@ -65,5 +64,3 @@ protected:
|
||||
int createRef = LUA_NOREF;
|
||||
int unloadRef = LUA_NOREF;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CHARACTERPACKET_HPP_
|
||||
#define CHARACTERPACKET_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "serial_packet_base.hpp"
|
||||
|
||||
@@ -45,5 +44,3 @@ struct CharacterPacket : SerialPacketBase {
|
||||
|
||||
void serializeCharacter(void* buffer, CharacterPacket* packet);
|
||||
void deserializeCharacter(void* buffer, CharacterPacket* packet);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CLIENTPACKET_HPP_
|
||||
#define CLIENTPACKET_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "serial_packet_base.hpp"
|
||||
|
||||
@@ -33,5 +32,3 @@ struct ClientPacket : SerialPacketBase {
|
||||
|
||||
void serializeClient(void* buffer, ClientPacket* packet);
|
||||
void deserializeClient(void* buffer, ClientPacket* packet);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef MONSTERPACKET_HPP_
|
||||
#define MONSTERPACKET_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "serial_packet_base.hpp"
|
||||
|
||||
@@ -42,5 +41,3 @@ struct MonsterPacket : SerialPacketBase {
|
||||
|
||||
void serializeMonster(void* buffer, MonsterPacket* packet);
|
||||
void deserializeMonster(void* buffer, MonsterPacket* packet);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef REGIONPACKET_HPP_
|
||||
#define REGIONPACKET_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "serial_packet_base.hpp"
|
||||
|
||||
@@ -44,5 +43,3 @@ struct RegionPacket : SerialPacketBase {
|
||||
|
||||
void serializeRegion(void* buffer, RegionPacket* packet);
|
||||
void deserializeRegion(void* buffer, RegionPacket* packet);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SERIALPACKETBASE_HPP_
|
||||
#define SERIALPACKETBASE_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "serial_packet_type.hpp"
|
||||
|
||||
@@ -35,5 +34,3 @@ struct SerialPacketBase {
|
||||
|
||||
virtual ~SerialPacketBase() {};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SERVERPACKET_HPP_
|
||||
#define SERVERPACKET_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "serial_packet_base.hpp"
|
||||
|
||||
@@ -33,5 +32,3 @@ struct ServerPacket : SerialPacketBase {
|
||||
|
||||
void serializeServer(void* buffer, ServerPacket* packet);
|
||||
void deserializeServer(void* buffer, ServerPacket* packet);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef TEXTPACKET_HPP_
|
||||
#define TEXTPACKET_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "serial_packet_base.hpp"
|
||||
|
||||
@@ -36,5 +35,3 @@ struct TextPacket : SerialPacketBase {
|
||||
|
||||
void serializeText(void* buffer, TextPacket* packet);
|
||||
void deserializeText(void* buffer, TextPacket* packet);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SERIALPACKET_HPP_
|
||||
#define SERIALPACKET_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "serial_packet_base.hpp"
|
||||
#include "character_packet.hpp"
|
||||
@@ -62,5 +61,3 @@ constexpr int PACKET_BUFFER_SIZE =
|
||||
REGION_METADATA_FOOTPRINT +
|
||||
REGION_TILE_FOOTPRINT +
|
||||
REGION_SOLID_FOOTPRINT;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SERIALPACKETTYPE_HPP_
|
||||
#define SERIALPACKETTYPE_HPP_
|
||||
#pragma once
|
||||
|
||||
/* DOCS: The headers indicate what packet type is used for each message
|
||||
* different messages under the same header will carry different amounts of
|
||||
@@ -183,5 +182,3 @@ enum class SerialPacketType {
|
||||
|
||||
LAST
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SERIALIZEUTILITY_HPP_
|
||||
#define SERIALIZEUTILITY_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "serial_packet_base.hpp"
|
||||
|
||||
@@ -33,5 +32,3 @@ void deserialCopy(void** buffer, void* data, int size);
|
||||
//primary functions
|
||||
void serializePacket(void* buffer, SerialPacketBase* packet);
|
||||
void deserializePacket(void* buffer, SerialPacketBase* packet);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef UDPNETWORKUTILITY_HPP_
|
||||
#define UDPNETWORKUTILITY_HPP_
|
||||
#pragma once
|
||||
|
||||
//common
|
||||
#include "serial_packet_base.hpp"
|
||||
@@ -73,5 +72,3 @@ private:
|
||||
UDPsocket socket = nullptr;
|
||||
UDPpacket* packet = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef BUTTON_HPP_
|
||||
#define BUTTON_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "image.hpp"
|
||||
#include "raster_font.hpp"
|
||||
@@ -90,5 +89,3 @@ private:
|
||||
State state = State::NORMAL;
|
||||
std::string text;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef MENUBAR_HPP_
|
||||
#define MENUBAR_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "image.hpp"
|
||||
#include "raster_font.hpp"
|
||||
@@ -88,5 +87,3 @@ private:
|
||||
|
||||
friend class MenuBar;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef RASTERFONT_HPP_
|
||||
#define RASTERFONT_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "image.hpp"
|
||||
|
||||
@@ -50,5 +49,3 @@ public:
|
||||
private:
|
||||
Image image;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef BOUNDINGBOX_HPP_
|
||||
#define BOUNDINGBOX_HPP_
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
#include <algorithm>
|
||||
@@ -74,5 +73,3 @@ inline BoundingBox operator+(BoundingBox b, Vector2 v) {
|
||||
inline BoundingBox operator+(Vector2 v, BoundingBox b) {
|
||||
return b + v;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CONFIGUTILITY_HPP_
|
||||
#define CONFIGUTILITY_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "singleton.hpp"
|
||||
|
||||
@@ -51,5 +50,3 @@ private:
|
||||
|
||||
table_t configMap;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef FRAMERATE_HPP_
|
||||
#define FRAMERATE_HPP_
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
|
||||
@@ -44,5 +43,3 @@ private:
|
||||
int lastFrameRate = 0;
|
||||
Clock::time_point tick = Clock::now();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,13 +19,10 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef IPOPERATORS_HPP_
|
||||
#define IPOPERATORS_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "SDL_net.h"
|
||||
|
||||
//these should've come standard
|
||||
bool operator==(IPaddress lhs, IPaddress rhs);
|
||||
bool operator!=(IPaddress lhs, IPaddress rhs);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SINGLETON_HPP_
|
||||
#define SINGLETON_HPP_
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -59,5 +58,3 @@ private:
|
||||
|
||||
template<typename T>
|
||||
T* Singleton<T>::ptr = nullptr;
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef VECTOR2_HPP_
|
||||
#define VECTOR2_HPP_
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
#include <stdexcept>
|
||||
@@ -110,5 +109,3 @@ public:
|
||||
|
||||
//This is explicitly a POD
|
||||
static_assert(std::is_pod<Vector2>::value, "Vector2 is not a POD");
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef ACCOUNTDATA_HPP_
|
||||
#define ACCOUNTDATA_HPP_
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -55,5 +54,3 @@ private:
|
||||
bool mod = false;
|
||||
bool admin = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef ACCOUNTMANAGER_HPP_
|
||||
#define ACCOUNTMANAGER_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "account_data.hpp"
|
||||
#include "singleton.hpp"
|
||||
@@ -61,5 +60,3 @@ private:
|
||||
std::map<int, AccountData> elementMap;
|
||||
sqlite3* database = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CHARACTERAPI_HPP_
|
||||
#define CHARACTERAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_CHARACTER_API "character"
|
||||
LUAMOD_API int openCharacterAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CHARACTERDATA_HPP_
|
||||
#define CHARACTERDATA_HPP_
|
||||
#pragma once
|
||||
|
||||
//components
|
||||
#include "character_defines.hpp"
|
||||
@@ -47,5 +46,3 @@ private:
|
||||
std::string handle;
|
||||
std::string avatar;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CHARACTERMANAGER_HPP_
|
||||
#define CHARACTERMANAGER_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "character_data.hpp"
|
||||
#include "singleton.hpp"
|
||||
@@ -66,5 +65,3 @@ private:
|
||||
std::map<int, CharacterData> elementMap;
|
||||
sqlite3* database = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CHARACTERMANAGERAPI_HPP_
|
||||
#define CHARACTERMANAGERAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_CHARACTER_MANAGER_API "character_manager"
|
||||
LUAMOD_API int openCharacterManagerAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CLIENTDATA_HPP_
|
||||
#define CLIENTDATA_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "SDL_net.h"
|
||||
|
||||
@@ -49,5 +48,3 @@ private:
|
||||
Clock::time_point lastBeat = Clock::now();
|
||||
int attemptedBeats = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef CLIENTMANAGER_HPP_
|
||||
#define CLIENTMANAGER_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "client_data.hpp"
|
||||
#include "server_packet.hpp"
|
||||
@@ -61,5 +60,3 @@ private:
|
||||
std::map<int, ClientData> elementMap;
|
||||
int counter = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef ENTITY_HPP_
|
||||
#define ENTITY_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "bounding_box.hpp"
|
||||
#include "vector2.hpp"
|
||||
@@ -55,5 +54,3 @@ protected:
|
||||
BoundingBox bounds = {0, 0, 0, 0};
|
||||
const char* type;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef ENTITYAPI_HPP_
|
||||
#define ENTITYAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_ENTITY_API "entity"
|
||||
LUAMOD_API int openEntityAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef MONSTERAPI_HPP_
|
||||
#define MONSTERAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_MONSTER_API "monster"
|
||||
LUAMOD_API int openMonsterAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef MONSTERDATA_HPP_
|
||||
#define MONSTERDATA_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "entity.hpp"
|
||||
|
||||
@@ -56,5 +55,3 @@ private:
|
||||
std::string avatar;
|
||||
int scriptRef = LUA_NOREF;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef MONSTERMANAGER_HPP_
|
||||
#define MONSTERMANAGER_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "monster_data.hpp"
|
||||
|
||||
@@ -61,5 +60,3 @@ private:
|
||||
lua_State* lua = nullptr;
|
||||
sqlite3* database = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef MONSTERMANAGERAPI_HPP_
|
||||
#define MONSTERMANAGERAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_MONSTER_MANAGER_API "monster_manager"
|
||||
LUAMOD_API int openMonsterManagerAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef ROOMAPI_HPP_
|
||||
#define ROOMAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_ROOM_API "room"
|
||||
LUAMOD_API int openRoomAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef ROOMDATA_HPP_
|
||||
#define ROOMDATA_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "character_data.hpp"
|
||||
#include "region_pager_lua.hpp"
|
||||
@@ -78,5 +77,3 @@ private:
|
||||
//hooks
|
||||
int tickRef = LUA_NOREF;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef ROOMMANAGER_HPP_
|
||||
#define ROOMMANAGER_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "character_data.hpp"
|
||||
#include "room_data.hpp"
|
||||
@@ -80,5 +79,3 @@ private:
|
||||
int createRef = LUA_NOREF;
|
||||
int unloadRef = LUA_NOREF;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,12 +19,8 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef ROOMMANAGERAPI_HPP_
|
||||
#define ROOMMANAGERAPI_HPP_
|
||||
|
||||
#pragma once
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_ROOM_MANAGER_API "room_manager"
|
||||
LUAMOD_API int openRoomManagerAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SERVERAPPLICATION_HPP_
|
||||
#define SERVERAPPLICATION_HPP_
|
||||
#pragma once
|
||||
|
||||
//managers
|
||||
#include "account_manager.hpp"
|
||||
@@ -128,5 +127,3 @@ private:
|
||||
//misc
|
||||
bool running = true;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef NETWORKAPI_HPP_
|
||||
#define NETWORKAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_NETWORK_API "network"
|
||||
LUAMOD_API int openNetworkAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SERVERUTILITIES_HPP_
|
||||
#define SERVERUTILITIES_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "character_data.hpp"
|
||||
#include "serial_packet.hpp"
|
||||
@@ -37,5 +36,3 @@ void copyCharacterToPacket(CharacterPacket* const packet, int characterIndex);
|
||||
void copyCharacterToPacket(CharacterPacket* const packet, CharacterData* const characterData, int characterIndex);
|
||||
void pumpAndChangeRooms(int characterIndex, int newRoomIndex);
|
||||
void pumpAndChangeRooms(CharacterData* const characterData, int newRoomIndex, int characterIndex);
|
||||
|
||||
#endif
|
||||
@@ -19,13 +19,10 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef SERVERUTILITY_HPP_
|
||||
#define SERVERUTILITY_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "sqlite3.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
int runSQLScript(sqlite3* db, std::string fname, int (*callback)(void*,int,char**,char**) = nullptr, void* argPtr = nullptr);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef TRIGGERAPI_HPP_
|
||||
#define TRIGGERAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_TRIGGER_API "trigger"
|
||||
LUAMOD_API int openTriggerAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef TRIGGERDATA_HPP_
|
||||
#define TRIGGERDATA_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "bounding_box.hpp"
|
||||
#include "entity.hpp"
|
||||
@@ -57,5 +56,3 @@ private:
|
||||
int scriptRef = LUA_NOREF;
|
||||
std::list<Entity*> exclusionList;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,8 +19,7 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef TRIGGERMANAGER_HPP_
|
||||
#define TRIGGERMANAGER_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "bounding_box.hpp"
|
||||
#include "vector2.hpp"
|
||||
@@ -60,5 +59,3 @@ private:
|
||||
lua_State* lua = nullptr;
|
||||
int counter = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -19,12 +19,9 @@
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
*/
|
||||
#ifndef TRIGGERMANAGERAPI_HPP_
|
||||
#define TRIGGERMANAGERAPI_HPP_
|
||||
#pragma once
|
||||
|
||||
#include "lua.hpp"
|
||||
|
||||
#define TORTUGA_TRIGGER_MANAGER_API "trigger_manager"
|
||||
LUAMOD_API int openTriggerManagerAPI(lua_State* L);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user