mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Move alloc.h to game/ and use it in client/prediction/entity.h
This commit is contained in:
parent
7dab9e430d
commit
a1b7e0c37c
|
@ -1968,6 +1968,7 @@ set_src(ENGINE_GFX GLOB src/engine/gfx
|
|||
image_manipulation.h
|
||||
)
|
||||
set_src(GAME_SHARED GLOB src/game
|
||||
alloc.h
|
||||
collision.cpp
|
||||
collision.h
|
||||
ddracechat.h
|
||||
|
@ -2470,7 +2471,6 @@ if(SERVER)
|
|||
upnp.h
|
||||
)
|
||||
set_src(GAME_SERVER GLOB_RECURSE src/game/server
|
||||
alloc.h
|
||||
ddracechat.cpp
|
||||
ddracecommands.cpp
|
||||
entities/character.cpp
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* (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 GAME_SERVER_ALLOC_H
|
||||
#define GAME_SERVER_ALLOC_H
|
||||
#ifndef GAME_ALLOC_H
|
||||
#define GAME_ALLOC_H
|
||||
|
||||
#include <new>
|
||||
|
|
@ -3,23 +3,11 @@
|
|||
#ifndef GAME_CLIENT_PREDICTION_ENTITY_H
|
||||
#define GAME_CLIENT_PREDICTION_ENTITY_H
|
||||
|
||||
#include "gameworld.h"
|
||||
#include <base/vmath.h>
|
||||
|
||||
#define MACRO_ALLOC_HEAP() \
|
||||
public: \
|
||||
void *operator new(size_t Size) \
|
||||
{ \
|
||||
void *p = malloc(Size); \
|
||||
mem_zero(p, Size); \
|
||||
return p; \
|
||||
} \
|
||||
void operator delete(void *pPtr) \
|
||||
{ \
|
||||
free(pPtr); \
|
||||
} \
|
||||
\
|
||||
private:
|
||||
#include <game/alloc.h>
|
||||
|
||||
#include "gameworld.h"
|
||||
|
||||
class CEntity
|
||||
{
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
#include <base/vmath.h>
|
||||
|
||||
#include "alloc.h"
|
||||
#include <game/alloc.h>
|
||||
|
||||
#include "gameworld.h"
|
||||
|
||||
class CCollision;
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
|
||||
#include <engine/shared/protocol.h>
|
||||
|
||||
#include "alloc.h"
|
||||
#include <game/alloc.h>
|
||||
|
||||
#include "teeinfo.h"
|
||||
|
||||
#include <memory>
|
||||
|
|
Loading…
Reference in a new issue