VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
|
||||
$#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
$#include "tolua_base.h"
|
||||
|
||||
$cfile "cTorch.h"
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
** Generated automatically by tolua++-1.0.92 on 01/27/12 00:53:11.
|
||||
*/
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include "stdlib.h"
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "MemoryLeak.h"
|
||||
#include "BlockID.h"
|
||||
|
||||
//tolua_begin
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#ifdef _WIN32
|
||||
#include <WinSock.h>
|
||||
#include <WinSock.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
// Changes endianness
|
||||
|
||||
10
source/Globals.cpp
Normal file
10
source/Globals.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
// Globals.cpp
|
||||
|
||||
// This file is used for precompiled header generation in MSVC environments
|
||||
|
||||
#include "Globals.h"
|
||||
|
||||
|
||||
|
||||
|
||||
82
source/Globals.h
Normal file
82
source/Globals.h
Normal file
@@ -0,0 +1,82 @@
|
||||
|
||||
// Globals.h
|
||||
|
||||
// This file gets included from every module in the project, so that global symbols may be introduced easily
|
||||
// Also used for precompiled header generation in MSVC environments
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// OS-dependent stuff:
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#include <winsock.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h> // for mkdir
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <iostream>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// CRT stuff:
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// STL stuff:
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Common headers:
|
||||
#include "cSleep.h"
|
||||
#include "cCriticalSection.h"
|
||||
#include "cSemaphore.h"
|
||||
#include "cEvent.h"
|
||||
#include "cThread.h"
|
||||
#include "cMCLogger.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Common definitions:
|
||||
|
||||
/// Evaluates to the number of elements in an array (compile-time!)
|
||||
#define ARRAYCOUNT(X) (sizeof(X) / sizeof(*(X)))
|
||||
|
||||
// sprintf_s is the preferred call in MSVC ("secure"); make it *nix-compatible:
|
||||
#ifndef _WIN32
|
||||
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
||||
#define vsnprintf_s(buffer, buffer_size, maxcount, stringbuffer, ...) (vsnprintf(buffer, maxcount, stringbuffer, __VA_ARGS__))
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,37 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#include <WinSock.h>
|
||||
// #define socklen_t int
|
||||
// #ifdef SendMessage
|
||||
// #undef SendMessage
|
||||
// #endif
|
||||
#else
|
||||
|
||||
// Linux threads http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html
|
||||
|
||||
#include <netdb.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#define SOCKET int
|
||||
typedef void *HANDLE;
|
||||
#define CRITICAL_SECTION pthread_mutex_t
|
||||
#define SD_BOTH (2)
|
||||
#define closesocket(x) (shutdown(x, SD_BOTH), close(x))
|
||||
#define SOCKET_ERROR SO_ERROR
|
||||
#define EnterCriticalSection(x) pthread_mutex_lock(x)
|
||||
#define LeaveCriticalSection(x) pthread_mutex_unlock(x)
|
||||
#define InitializeCriticalSection(x) pthread_mutex_init(x, NULL)
|
||||
#define DeleteCriticalSection(x) (x)
|
||||
#define sprintf_s(x, y, ...) sprintf(x, __VA_ARGS__)
|
||||
#ifndef _WIN32
|
||||
// Linux threads http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html
|
||||
#include <netdb.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// TODO: We shouldn't need these! Use the OS support objects instead
|
||||
#define SOCKET int
|
||||
typedef void *HANDLE;
|
||||
#define CRITICAL_SECTION pthread_mutex_t
|
||||
#define SD_BOTH (2)
|
||||
#define closesocket(x) (shutdown(x, SD_BOTH), close(x))
|
||||
#define SOCKET_ERROR SO_ERROR
|
||||
#define EnterCriticalSection(x) pthread_mutex_lock(x)
|
||||
#define LeaveCriticalSection(x) pthread_mutex_unlock(x)
|
||||
#define InitializeCriticalSection(x) pthread_mutex_init(x, NULL)
|
||||
#define DeleteCriticalSection(x) (x)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
inline bool IsSocketError( int a_ReturnedValue )
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "ManualBindings.h"
|
||||
#include "tolua++.h"
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#include "cRoot.h"
|
||||
#include "cWorld.h"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
// _X: empty file??
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "SquirrelBindings.h"
|
||||
#if USE_SQUIRREL
|
||||
#pragma warning(disable:4100) // Getting A LOT of these warnings from SqPlus
|
||||
#pragma warning(disable:4127)
|
||||
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#include <sqplus/sqplus.h>
|
||||
#include <sqplus/SquirrelObject.h>
|
||||
#include <../squirrel/sqstate.h>
|
||||
@@ -16,6 +17,10 @@
|
||||
#include "cRoot.h"
|
||||
#include "cPlayer.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool SquirrelBindings::IsBound = false;
|
||||
|
||||
bool IsTopClosure( HSQUIRRELVM v )
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "Vector3d.h"
|
||||
#include "Vector3f.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Vector3d::Vector3d(const Vector3f & v )
|
||||
: x( v.x )
|
||||
, y( v.y )
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "Vector3f.h"
|
||||
#include "Vector3d.h"
|
||||
#include "Vector3i.h"
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "Vector3i.h"
|
||||
#include "Vector3d.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Vector3i::Vector3i( const Vector3d & v )
|
||||
: x( (int)v.x )
|
||||
, y( (int)v.y )
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cAggressiveMonster.h"
|
||||
|
||||
#include "Vector3f.h"
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cAuthenticator.h"
|
||||
#include "cBlockingTCPLink.h"
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#include "../iniFile/iniFile.h"
|
||||
#ifndef _WIN32
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
extern void ReplaceString( std::string & a_HayStack, const std::string & a_Needle, const std::string & a_ReplaceWith );
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cBlockToPickup.h"
|
||||
#include "Defines.h"
|
||||
#include "BlockID.h"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cBlockingTCPLink.h"
|
||||
#include "packets/cPacket.h"
|
||||
#include "MCSocket.h"
|
||||
#include <string>
|
||||
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <cstring>
|
||||
#include <errno.h>
|
||||
#include <cstring>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define MSG_NOSIGNAL (0)
|
||||
#define MSG_NOSIGNAL (0)
|
||||
#endif
|
||||
#ifdef __MACH__
|
||||
#define MSG_NOSIGNAL (0)
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "cSocket.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class cEvent;
|
||||
class cBlockingTCPLink //tolua_export
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cCavespider.h"
|
||||
|
||||
cCavespider::cCavespider()
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cChatColor.h"
|
||||
|
||||
const std::string cChatColor::Color = "\xa7"; // Old color was "\xc2\xa7" or in other words: "§"
|
||||
|
||||
@@ -1,20 +1,27 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cChestEntity.h"
|
||||
#include "cItem.h"
|
||||
#include <string>
|
||||
#include "cClientHandle.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cPlayer.h"
|
||||
#include "cWindow.h"
|
||||
#include "cWorld.h"
|
||||
#include "cRoot.h"
|
||||
#include "cPickup.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cChunk.h"
|
||||
#include <json/json.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class cWorld;
|
||||
class cRoot;
|
||||
|
||||
#include <json/json.h>
|
||||
|
||||
|
||||
|
||||
|
||||
cChestEntity::cChestEntity(int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
|
||||
: cBlockEntity( E_BLOCK_CHEST, a_X, a_Y, a_Z, a_Chunk )
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cChicken.h"
|
||||
|
||||
//TODO Drop egg every 5-10 minutes
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h> // for mkdir
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
@@ -16,11 +17,9 @@
|
||||
#include "cServer.h"
|
||||
#include "zlib.h"
|
||||
#include "Defines.h"
|
||||
#include <string> // memset
|
||||
#include "cChestEntity.h"
|
||||
#include "cFurnaceEntity.h"
|
||||
#include "cSignEntity.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cTorch.h"
|
||||
#include "cLadder.h"
|
||||
#include "cPickup.h"
|
||||
@@ -28,7 +27,6 @@
|
||||
#include "cItem.h"
|
||||
#include "cNoise.h"
|
||||
#include "cRoot.h"
|
||||
#include "cCriticalSection.h"
|
||||
#include "cWorldGenerator.h"
|
||||
#include "cBlockToPickup.h"
|
||||
#include "MersenneTwister.h"
|
||||
@@ -41,13 +39,9 @@
|
||||
|
||||
#include <json/json.h>
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#ifndef _WIN32
|
||||
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
extern bool g_bWaterPhysics;
|
||||
|
||||
@@ -57,6 +51,7 @@ typedef std::list< cFurnaceEntity* > FurnaceEntityList;
|
||||
typedef std::list< cClientHandle* > ClientHandleList;
|
||||
typedef std::list< cBlockEntity* > BlockEntityList;
|
||||
typedef std::list< cEntity* > EntityList;
|
||||
|
||||
struct cChunk::sChunkState
|
||||
{
|
||||
sChunkState()
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
#include "MemoryLeak.h"
|
||||
|
||||
#include "Globals.h"
|
||||
|
||||
#include "cChunkGenerator.h"
|
||||
#include "cChunkMap.h"
|
||||
#include "cChunk.h"
|
||||
#include "cWorld.h"
|
||||
|
||||
#include "cThread.h"
|
||||
#include "cCriticalSection.h"
|
||||
#include "cSemaphore.h"
|
||||
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
typedef std::pair<int, int> ChunkCoord;
|
||||
typedef std::list< ChunkCoord > ChunkCoordList;
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#if 0 // ignore all contents of this file
|
||||
#include "cChunkLoader.h"
|
||||
#include "cChunk.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cChunkMap.h"
|
||||
#include "cChunk.h"
|
||||
#include "cMCLogger.h"
|
||||
@@ -7,12 +10,8 @@
|
||||
#include <math.h> // floorf
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <cstring> // memcpy
|
||||
#include <cstdlib> // abs
|
||||
#include <stdio.h> // sprintf and stuff
|
||||
|
||||
|
||||
#define sprintf_s( dest, size, format, ... ) sprintf( dest, format, __VA_ARGS__ )
|
||||
#include <cstring> // memcpy
|
||||
#include <cstdlib> // abs
|
||||
#endif
|
||||
|
||||
#include "zlib.h"
|
||||
@@ -22,6 +21,10 @@
|
||||
|
||||
#define LAYER_SIZE (32)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cChunkMap::cChunkMap( int a_Width, int a_Height, cWorld* a_World )
|
||||
: m_Nodes( new cChunkNode[ a_Width * a_Height ] )
|
||||
, m_Width( a_Width )
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cClientHandle.h"
|
||||
#include "cServer.h"
|
||||
#include "cWorld.h"
|
||||
@@ -8,7 +11,6 @@
|
||||
#include "cInventory.h"
|
||||
#include "cChestEntity.h"
|
||||
#include "cSignEntity.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cWindow.h"
|
||||
#include "cCraftingWindow.h"
|
||||
#include "cItem.h"
|
||||
@@ -30,9 +32,6 @@
|
||||
#include "Vector3f.h"
|
||||
#include "Vector3d.h"
|
||||
|
||||
#include "cCriticalSection.h"
|
||||
#include "cSemaphore.h"
|
||||
#include "cEvent.h"
|
||||
#include "cSleep.h"
|
||||
#include "cRoot.h"
|
||||
|
||||
@@ -70,10 +69,6 @@
|
||||
#include "packets/cPacket_PlayerListItem.h"
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
||||
#endif
|
||||
|
||||
#define AddPistonDir( x, y, z, dir, amount ) switch(dir) { case 0: (y)-=(amount); break; case 1: (y)+=(amount); break;\
|
||||
case 2: (z)-=(amount); break; case 3: (z)+=(amount); break;\
|
||||
case 4: (x)-=(amount); break; case 5: (x)+=(amount); break; }
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cCow.h"
|
||||
|
||||
//TODO: Milk Cow
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cCraftingWindow.h"
|
||||
#include "cItem.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cRecipeChecker.h"
|
||||
#include "cPlayer.h"
|
||||
#include "cClientHandle.h"
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cCreativeInventory.h"
|
||||
#include <string> //memset
|
||||
#include "cPlayer.h"
|
||||
#include "cClientHandle.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cWindow.h"
|
||||
#include "cItem.h"
|
||||
#include "cRecipeChecker.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cCreeper.h"
|
||||
|
||||
cCreeper::cCreeper()
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
#include "cCriticalSection.h"
|
||||
#include "cMCLogger.h"
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cCuboid.h"
|
||||
|
||||
#include <algorithm> // swap
|
||||
|
||||
|
||||
|
||||
|
||||
void cCuboid::Sort()
|
||||
{
|
||||
if( p1.x > p2.x ) std::swap( p1.x, p2.x );
|
||||
if( p1.y > p2.y ) std::swap( p1.y, p2.y );
|
||||
if( p1.z > p2.z ) std::swap( p1.z, p2.z );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cEnderman.h"
|
||||
|
||||
cEnderman::cEnderman()
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cEntity.h"
|
||||
#include "cWorld.h"
|
||||
#include "cChunk.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cServer.h"
|
||||
#include "cRoot.h"
|
||||
#include "Vector3d.h"
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
#include "cEvent.h"
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <semaphore.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cEvent::cEvent( unsigned int a_NumEvents /* = 1 */ )
|
||||
: m_NumEvents( a_NumEvents )
|
||||
|
||||
@@ -1,24 +1,10 @@
|
||||
|
||||
#include "Globals.h"
|
||||
|
||||
#include "cFileFormatUpdater.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "Vector3d.h"
|
||||
#include "Vector3f.h"
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include <cstdio>
|
||||
#endif
|
||||
|
||||
#include "cItem.h"
|
||||
#include <json/json.h>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cFireSimulator.h"
|
||||
#include "cWorld.h"
|
||||
#include "Vector3i.h"
|
||||
#include "BlockID.h"
|
||||
#include "Defines.h"
|
||||
#include <vector>
|
||||
|
||||
cFireSimulator::cFireSimulator( cWorld* a_World )
|
||||
: cSimulator(a_World)
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cFluidSimulator.h"
|
||||
#include "cWorld.h"
|
||||
#include "Vector3i.h"
|
||||
#include "BlockID.h"
|
||||
#include "Defines.h"
|
||||
#include <vector>
|
||||
#include "cPickup.h"
|
||||
#include "cItem.h"
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cFurnaceEntity.h"
|
||||
#include "BlockID.h"
|
||||
#include "cItem.h"
|
||||
@@ -13,8 +16,6 @@
|
||||
|
||||
#include "packets/cPacket_InventoryProgressBar.h"
|
||||
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#include <json/json.h>
|
||||
|
||||
cFurnaceEntity::cFurnaceEntity(int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cFurnaceRecipe.h"
|
||||
#include "cItem.h"
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cFurnaceWindow.h"
|
||||
#include "cItem.h"
|
||||
#include "cFurnaceEntity.h"
|
||||
@@ -5,7 +8,9 @@
|
||||
|
||||
#include "packets/cPacket_WindowClick.h"
|
||||
|
||||
#include "cMCLogger.h"
|
||||
|
||||
|
||||
|
||||
|
||||
cFurnaceWindow::cFurnaceWindow( cFurnaceEntity* a_Owner )
|
||||
: cWindow( a_Owner, true )
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cGenSettings.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cGhast.h"
|
||||
|
||||
cGhast::cGhast()
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cGroup.h"
|
||||
|
||||
void cGroup::AddCommand( std::string a_Command )
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cGroupManager.h"
|
||||
#include "cGroup.h"
|
||||
#include "../iniFile/iniFile.h"
|
||||
#include "cChatColor.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cRoot.h"
|
||||
|
||||
extern std::vector< std::string > StringSplit( std::string str, std::string delim);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cHeartBeat.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "md5/md5.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cRoot.h"
|
||||
#include "cServer.h"
|
||||
#include "cSleep.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
cHeartBeat::cHeartBeat()
|
||||
{
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cInventory.h"
|
||||
#include <string> //memset
|
||||
#include "cPlayer.h"
|
||||
#include "cClientHandle.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cWindow.h"
|
||||
#include "cItem.h"
|
||||
#include "cRecipeChecker.h"
|
||||
@@ -14,6 +15,10 @@
|
||||
#include "packets/cPacket_WholeInventory.h"
|
||||
#include "packets/cPacket_InventorySlot.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cInventory::~cInventory()
|
||||
{
|
||||
delete [] m_Slots;
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cItem.h"
|
||||
#include <json/json.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cItem::GetJson( Json::Value & a_OutValue )
|
||||
{
|
||||
a_OutValue["ID"] = m_ItemID;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cLavaSimulator.h"
|
||||
#include "Defines.h"
|
||||
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cLog.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <ctime>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <sys/stat.h> // for mkdir
|
||||
#include <sys/types.h>
|
||||
|
||||
#define sprintf_s(buffer, buffer_size, stringbuffer, ...) (sprintf(buffer, stringbuffer, __VA_ARGS__))
|
||||
#define vsnprintf_s(buffer, buffer_size, maxcount, stringbuffer, ...) (vsnprintf(buffer, maxcount, stringbuffer, __VA_ARGS__))
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
cLog* cLog::s_Log = NULL;
|
||||
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cLuaCommandBinder.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cPlayer.h"
|
||||
#include "cPlugin_Lua.h"
|
||||
|
||||
#include "tolua++.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern std::vector<std::string> StringSplit(std::string str, std::string delim);
|
||||
extern bool report_errors(lua_State* lua, int status);
|
||||
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
#include "cMCLogger.h"
|
||||
#include "cLog.h"
|
||||
#include "cCriticalSection.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include <cstdarg>
|
||||
#include <time.h>
|
||||
#include "cLog.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
#define sprintf_s(buffer, buffer_size, stringbuffer, ...) (sprintf(buffer, stringbuffer, __VA_ARGS__))
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
cMCLogger* cMCLogger::s_MCLogger = 0;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
class cCriticalSection;
|
||||
class cLog;
|
||||
class cMCLogger //tolua_export
|
||||
{ //tolua_export
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cMakeDir.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
//#include <cstring> // If something is missing, uncomment some of these!
|
||||
//#include <cstdlib>
|
||||
//#include <stdio.h>
|
||||
#include <sys/stat.h> // for mkdir
|
||||
//#include <sys/types.h>
|
||||
#else
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
void cMakeDir::MakeDir( const char* a_Directory )
|
||||
{
|
||||
@@ -21,4 +18,8 @@ void cMakeDir::MakeDir( const char* a_Directory )
|
||||
#else
|
||||
mkdir(a_Directory, S_IRWXU | S_IRWXG | S_IRWXO);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cMonster.h"
|
||||
#include "cRoot.h"
|
||||
#include "cServer.h"
|
||||
#include "cClientHandle.h"
|
||||
#include "cWorld.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cChunk.h"
|
||||
#include "cPlayer.h"
|
||||
#include "BlockID.h"
|
||||
@@ -28,12 +30,12 @@
|
||||
#include "../iniFile/iniFile.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <cstdlib> // rand
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <cstdlib> // rand
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
|
||||
cMonster::cMonster()
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cMonsterConfig.h"
|
||||
#include "cMonster.h"
|
||||
#include "../iniFile/iniFile.h"
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <cstdio>
|
||||
//#include "../source/cprintf.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern std::vector<std::string> StringSplit(std::string str, std::string delim);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cNoise.h"
|
||||
#include <math.h>
|
||||
|
||||
@@ -7,6 +10,10 @@
|
||||
|
||||
#define FAST_FLOOR( x ) ( (x) < 0 ? ((int)x)-1 : ((int)x) )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cNoise::cNoise( unsigned int a_Seed )
|
||||
: m_Seed( a_Seed )
|
||||
{
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cPassiveAggressiveMonster.h"
|
||||
|
||||
#include "cPlayer.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cPassiveAggressiveMonster::cPassiveAggressiveMonster()
|
||||
{
|
||||
m_EMPersonality = PASSIVE;
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cPassiveMonster.h"
|
||||
#include "MersenneTwister.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cPassiveMonster::cPassiveMonster()
|
||||
{
|
||||
m_EMPersonality = PASSIVE;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cPawn.h"
|
||||
#include "cRoot.h"
|
||||
#include "cServer.h"
|
||||
#include "cWorld.h"
|
||||
#include "cPlayer.h"
|
||||
#include "cChunk.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cPluginManager.h"
|
||||
#include "Vector3d.h"
|
||||
#include "BlockID.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
@@ -12,7 +15,6 @@
|
||||
#include "cPluginManager.h"
|
||||
#include "cItem.h"
|
||||
#include "cRoot.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cTracer.h"
|
||||
#include "cChunk.h"
|
||||
|
||||
@@ -23,6 +25,10 @@
|
||||
#include "Vector3d.h"
|
||||
#include "Vector3f.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CLASS_DEFINITION( cPickup, cEntity )
|
||||
|
||||
cPickup::~cPickup()
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cPig.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cPig::cPig()
|
||||
{
|
||||
m_MobType = 90;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cPiston.h"
|
||||
#include "cRedstone.h"
|
||||
#include "cChunk.h"
|
||||
@@ -19,6 +22,10 @@ extern bool g_BlockPistonBreakable[];
|
||||
|
||||
#define FAST_FLOOR( x ) ( (x) < 0 ? ((int)x)-1 : ((int)x) )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cPiston::cPiston( cWorld* a_World )
|
||||
:m_World ( a_World )
|
||||
{
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cPlayer.h"
|
||||
#include "cServer.h"
|
||||
#include "cCreativeInventory.h"
|
||||
@@ -7,7 +10,6 @@
|
||||
#include "cPickup.h"
|
||||
#include "cPluginManager.h"
|
||||
#include "cChunk.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cWindow.h"
|
||||
#include "cBlockEntity.h"
|
||||
#include "cGroupManager.h"
|
||||
@@ -494,9 +496,6 @@ void cPlayer::SetIP( std::string a_IP )
|
||||
m_IP = a_IP;
|
||||
}
|
||||
|
||||
#ifdef SendMessage // Cause stupid windows.h defines SendMessage as SendMessageA
|
||||
#undef SendMessage
|
||||
#endif
|
||||
void cPlayer::SendMessage( const char* a_Message )
|
||||
{
|
||||
m_ClientHandle->Send( cPacket_Chat( a_Message ) );
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
#include "cPawn.h"
|
||||
#include "cSurvivalInventory.h"
|
||||
#include "cCreativeInventory.h"
|
||||
#include <list>
|
||||
#include <string> // TODO - use const char*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class cGroup;
|
||||
class cWindow;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#include "cPlugin.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cMCLogger.h"
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cPlugin.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cPlugin::cPlugin()
|
||||
: m_Version( 0 )
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cPluginManager.h"
|
||||
#include "cPlugin.h"
|
||||
#include "cPlugin_Lua.h"
|
||||
@@ -8,7 +11,6 @@
|
||||
#include "cRoot.h"
|
||||
#include "cLuaCommandBinder.h"
|
||||
#include "../iniFile/iniFile.h"
|
||||
#include <string> //strcmp
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "SquirrelBindings.h"
|
||||
@@ -18,6 +20,10 @@
|
||||
#pragma warning(default:4100;default:4127;default:4510;default:4610;default:4244;default:4512)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern std::vector<std::string> StringSplit(std::string str, std::string delim);
|
||||
|
||||
typedef std::list< cPlugin_Lua* > LuaPluginList;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#define LUA_USE_POSIX
|
||||
#include "cMCLogger.h"
|
||||
#include <string>
|
||||
#include "cPlugin_Lua.h"
|
||||
#include "cPluginManager.h"
|
||||
#include "cRoot.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#define LUA_USE_POSIX
|
||||
#include "cPlugin_NewLua.h"
|
||||
#include "cMCLogger.h"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cRecipeChecker.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <cstring>
|
||||
@@ -12,9 +12,12 @@
|
||||
#endif
|
||||
|
||||
#include "Defines.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cRoot.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef std::list< cRecipeChecker::Recipe* > RecipeList;
|
||||
struct cRecipeChecker::sRecipeCheckerState
|
||||
{
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cRedstone.h"
|
||||
#include "cPiston.h"
|
||||
#include "cRoot.h"
|
||||
#include "cWorld.h"
|
||||
#include "BlockID.h"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cRedstone::cRedstone( cWorld* a_World )
|
||||
:m_World ( a_World )
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cReferenceManager.h"
|
||||
#include "cEntity.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cReferenceManager::cReferenceManager( ENUM_REFERENCE_MANAGER_TYPE a_Type )
|
||||
: m_Type( a_Type )
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cRoot.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cServer.h"
|
||||
#include "cWorld.h"
|
||||
#include "cWebAdmin.h"
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSandSimulator.h"
|
||||
#include "cWorld.h"
|
||||
#include "Vector3i.h"
|
||||
#include "BlockID.h"
|
||||
#include "Defines.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSandSimulator::cSandSimulator( cWorld* a_World )
|
||||
: cSimulator(a_World)
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
#include "cSemaphore.h"
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <semaphore.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSemaphore::cSemaphore( unsigned int a_MaxCount, unsigned int a_InitialCount /* = 0 */ )
|
||||
#ifndef _WIN32
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
// ReDucTor is an awesome guy who helped me a lot
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cServer.h"
|
||||
#include "cClientHandle.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cThread.h"
|
||||
#include "cEvent.h"
|
||||
#include "cSleep.h"
|
||||
#include "cTimer.h"
|
||||
#include "cMonster.h"
|
||||
@@ -30,22 +30,18 @@
|
||||
|
||||
#include "packets/cPacket_Chat.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C" {
|
||||
#include "zlib.h"
|
||||
}
|
||||
|
||||
#ifdef SendMessage
|
||||
#undef SendMessage
|
||||
#endif
|
||||
|
||||
|
||||
bool g_bWaterPhysics = false;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSheep.h"
|
||||
|
||||
//Todo: Implement color
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSignEntity.h"
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#include "cPlayer.h"
|
||||
#include "cClientHandle.h"
|
||||
@@ -11,6 +13,10 @@
|
||||
|
||||
#include <json/json.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSignEntity::cSignEntity(ENUM_BLOCK_ID a_BlockType, int a_X, int a_Y, int a_Z, cChunk* a_Chunk)
|
||||
: cBlockEntity(a_BlockType, a_X, a_Y, a_Z, a_Chunk)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSilverfish.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSilverfish::cSilverfish()
|
||||
{
|
||||
m_MobType = 60;
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSimulator.h"
|
||||
#include "cWorld.h"
|
||||
#include "Vector3i.h"
|
||||
#include "BlockID.h"
|
||||
#include "Defines.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSimulator::cSimulator( cWorld* a_World )
|
||||
: m_World(a_World)
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSimulatorManager.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSimulatorManager::cSimulatorManager()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSkeleton.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSkeleton::cSkeleton()
|
||||
{
|
||||
m_MobType = 51;
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
#include "cSleep.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cSleep::MilliSleep( unsigned int a_MilliSeconds )
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSlime.h"
|
||||
|
||||
//TODO Implement sized slimes
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSlime::cSlime()
|
||||
{
|
||||
m_MobType = 55;
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSocket.h"
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
//#include <sys/socket.h>
|
||||
//#include <netinet/in.h>
|
||||
#include <arpa/inet.h> //inet_ntoa()
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
// #include <sys/socket.h>
|
||||
// #include <netinet/in.h>
|
||||
#include <arpa/inet.h> //inet_ntoa()
|
||||
#else
|
||||
#define socklen_t int
|
||||
#define socklen_t int
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSocket::cSocket( xSocket a_Socket )
|
||||
: m_Socket( a_Socket )
|
||||
, m_IPString( 0 )
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <WinSock.h>
|
||||
#ifdef SendMessage
|
||||
#undef SendMessage
|
||||
#endif
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
|
||||
|
||||
class cSocket
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSpider.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSpider::cSpider()
|
||||
{
|
||||
m_MobType = 52;
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSquid.h"
|
||||
#include "Vector3d.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSquid::cSquid()
|
||||
{
|
||||
m_MobType = 94;
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cStringMap.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
unsigned int cStringMap::size() const
|
||||
{
|
||||
return m_StringMap.size();
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
|
||||
// A std::map<string, string> interface for Lua
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "tolua++.h"
|
||||
#include <string>
|
||||
#include <map>
|
||||
// A std::map<string, string> interface for Lua
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class cStringMap // tolua_export
|
||||
{ // tolua_export
|
||||
@@ -16,4 +20,8 @@ public: // tolua_export
|
||||
std::string & get( const std::string & index ); //tolua_export
|
||||
private:
|
||||
std::map< std::string, std::string > m_StringMap;
|
||||
}; // tolua_export
|
||||
}; // tolua_export
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cSurvivalInventory.h"
|
||||
#include <string> //memset
|
||||
#include "cPlayer.h"
|
||||
#include "cClientHandle.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cWindow.h"
|
||||
#include "cItem.h"
|
||||
#include "cRecipeChecker.h"
|
||||
#include "cRoot.h"
|
||||
#include "packets/cPacket_WindowClick.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cSurvivalInventory::~cSurvivalInventory()
|
||||
{
|
||||
|
||||
|
||||
@@ -1,23 +1,27 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cTCPLink.h"
|
||||
#include "cSocket.h"
|
||||
#include "cEvent.h"
|
||||
#include "cThread.h"
|
||||
#include "MCSocket.h"
|
||||
|
||||
#include "cMCLogger.h"
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <cstring>
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define MSG_NOSIGNAL (0)
|
||||
#define MSG_NOSIGNAL (0)
|
||||
#endif
|
||||
#ifdef __MACH__
|
||||
#define MSG_NOSIGNAL (0)
|
||||
#define MSG_NOSIGNAL (0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cTCPLink::cTCPLink()
|
||||
: m_Socket( 0 )
|
||||
, m_StopEvent( new cEvent() )
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "cSocket.h"
|
||||
|
||||
class cEvent;
|
||||
class cTCPLink //tolua_export
|
||||
{ //tolua_export
|
||||
public: //tolua_export
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
#ifndef _WIN32
|
||||
#include <cstring>
|
||||
#include <semaphore.h>
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#else
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
#include "cThread.h"
|
||||
#include "cEvent.h"
|
||||
#include "cMCLogger.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// When in MSVC, the debugger provides "thread naming" by catching special exceptions. Interface here:
|
||||
#ifdef _MSC_VER
|
||||
//
|
||||
// Usage: SetThreadName (-1, "MainThread");
|
||||
//
|
||||
@@ -39,7 +34,11 @@ void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName)
|
||||
{
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // _MSC_VER
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cThread::cThread( ThreadFunc a_ThreadFunction, void* a_Param, const char* a_ThreadName /* = 0 */ )
|
||||
: m_ThreadFunction( a_ThreadFunction )
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
class cEvent;
|
||||
class cThread
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cTimer.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cTimer::cTimer()
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cTracer.h"
|
||||
#include "cWorld.h"
|
||||
|
||||
@@ -6,13 +9,12 @@
|
||||
#include "Vector3d.h"
|
||||
|
||||
#include "BlockID.h"
|
||||
#include "cMCLogger.h"
|
||||
#include "cEntity.h"
|
||||
|
||||
#include "Defines.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <stdlib.h> // abs()
|
||||
#include <stdlib.h> // abs()
|
||||
#endif
|
||||
|
||||
cTracer::cTracer(cWorld* a_World)
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
|
||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||
|
||||
#include "cWaterSimulator.h"
|
||||
#include "Defines.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cWaterSimulator::cWaterSimulator(cWorld *a_World)
|
||||
: cFluidSimulator(a_World)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "cFluidSimulator.h"
|
||||
|
||||
class cWaterSimulator : public cFluidSimulator
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user