Refactor the NetMessageType system to work in unity builds and remove BLOCK_SIZE macro that caused conflicts and wasn't really used anyway.
This was SVN commit r7327.
This commit is contained in:
parent
02253f82f0
commit
4d891117c5
@ -44,6 +44,8 @@
|
||||
|
||||
#define CREATING_NMT
|
||||
|
||||
#ifndef NMT_CREATOR_IMPLEMENT
|
||||
|
||||
/*************************************************************************/
|
||||
// Pass 1, class definition
|
||||
#define NMT_CREATOR_PASS_CLASSDEF
|
||||
@ -117,7 +119,7 @@ public: \
|
||||
#include "NMTCreator.h"
|
||||
#undef NMT_CREATOR_PASS_CLASSDEF
|
||||
|
||||
#ifdef NMT_CREATOR_IMPLEMENT
|
||||
#else // NMT_CREATOR_IMPLEMENT
|
||||
|
||||
#include "StringConverters.h"
|
||||
|
||||
|
@ -27,10 +27,13 @@
|
||||
#include "precompiled.h"
|
||||
#include "simulation/Entity.h"
|
||||
#include "ps/Vector2D.h"
|
||||
#define ALLNETMSGS_IMPLEMENT
|
||||
#include "NetMessage.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "Network.h"
|
||||
#include "NetMessage.h"
|
||||
|
||||
#undef ALLNETMSGS_DONT_CREATE_NMTS
|
||||
#define ALLNETMSGS_IMPLEMENT
|
||||
#include "NetMessages.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <map>
|
||||
|
@ -66,6 +66,7 @@ MORE INFO
|
||||
#include "StreamSocket.h"
|
||||
|
||||
#include "NetMessage.h"
|
||||
#include "lib/bits.h" // round_up
|
||||
|
||||
#include <deque>
|
||||
#include <map>
|
||||
@ -73,9 +74,7 @@ MORE INFO
|
||||
//-------------------------------------------------
|
||||
// Typedefs and Macros
|
||||
//-------------------------------------------------
|
||||
#define BLOCK_SIZE 4096
|
||||
#define ALIGN_UP( _n, _block ) ( _n + _block - (_n % _block ) )
|
||||
#define ALIGN_BLOCK( _n ) ALIGN_UP( _n, BLOCK_SIZE )
|
||||
#define ALIGN_BLOCK( _n ) round_up(size_t(_n), size_t(4096))
|
||||
|
||||
typedef CLocker<std::deque <CNetMessage *> > CLockedMessageDeque;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user