2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Fix all the packed structures.

Now we actually build a significant amount of stuff on Linux.
This commit is contained in:
Darryl Pogue
2012-01-29 00:19:37 -08:00
parent 945e1ac37b
commit 85b5842ece
28 changed files with 57 additions and 55 deletions

View File

@ -1214,7 +1214,7 @@ void pfConsole::AddLineF(const char * fmt, ...) {
char str[1024];
va_list args;
va_start(args, fmt);
_vsnprintf(str, arrsize(str), fmt, args);
hsVsnprintf(str, arrsize(str), fmt, args);
va_end(args);
AddLine(str);
}

View File

@ -114,7 +114,7 @@ class pfConsole : public hsKeyedObject
static uint32_t fConsoleTextColor;
static pfConsole *fTheConsole;
static void _cdecl IAddLineCallback( const char *string );
static void CDECL IAddLineCallback( const char *string );
static plPipeline *fPipeline;

View File

@ -238,7 +238,7 @@ bool AsyncFileSeek (
*
***/
#include <PshPack1.h>
#pragma pack(push,1)
struct AsyncSocketConnectPacket {
uint8_t connType;
uint16_t hdrBytes;
@ -247,7 +247,7 @@ struct AsyncSocketConnectPacket {
uint32_t branchId;
Uuid productId;
};
#include <PopPack.h>
#pragma pack(pop)
/****************************************************************************

View File

@ -122,7 +122,7 @@ void LogUnregisterHandler (FLogHandler callback) {
}
//===========================================================================
void __cdecl LogMsg (ELogSeverity severity, const char format[], ...) {
void CDECL LogMsg (ELogSeverity severity, const char format[], ...) {
ASSERT(format);
va_list args;
@ -132,7 +132,7 @@ void __cdecl LogMsg (ELogSeverity severity, const char format[], ...) {
}
//===========================================================================
void __cdecl LogMsg (ELogSeverity severity, const wchar_t format[], ...) {
void CDECL LogMsg (ELogSeverity severity, const wchar_t format[], ...) {
ASSERT(format);
va_list args;

View File

@ -63,7 +63,7 @@ const unsigned kAsyncTimeInfinite = (unsigned) -1;
#ifdef _MSC_VER
#define THREADCALL __stdcall
#else
#define THREADCALL __cdecl
#define THREADCALL CDECL
#endif
struct AsyncThread;

View File

@ -67,7 +67,7 @@ enum {
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
#define CSRNET_MSG(a) \
CsrNet_##a () : SimpleNet_MsgHeader(kSimpleNetChannelCsr, kCsrNet_##a) { }
@ -82,7 +82,7 @@ struct CsrNet_ExecConsoleCmd : SimpleNet_MsgHeader {
//============================================================================
// END PACKED DATA STRUCTURES
//============================================================================
#include <PopPack.h>
#pragma pack(pop)
#endif // PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNCSRNET_PNCSRNET_H

View File

@ -93,7 +93,7 @@ enum {
//============================================================================
// Begin networked data scructures
#include <PshPack1.h>
#pragma pack(push,1)
//============================================================================
//========================================================================
@ -134,5 +134,5 @@ enum {
//============================================================================
// End networked data structures
#include <PopPack.h>
#pragma pack(pop)
//============================================================================

View File

@ -106,7 +106,7 @@ enum {
//============================================================================
// Begin networked data structures
#include <PshPack1.h>
#pragma pack(push,1)
//============================================================================
//========================================================================
@ -180,5 +180,5 @@ enum {
//============================================================================
// End networked data structures
#include <PopPack.h>
#pragma pack(pop)
//============================================================================

View File

@ -124,7 +124,7 @@ enum {
//============================================================================
// Begin networked data structures
#include <PshPack1.h>
#pragma pack(push,1)
//============================================================================
//========================================================================
@ -199,5 +199,5 @@ enum {
//============================================================================
// End networked data structures
#include <PopPack.h>
//============================================================================
#pragma pack(pop)
//============================================================================

View File

@ -117,7 +117,7 @@ enum {
//============================================================================
// Begin networked data structures
#include <PshPack1.h>
#pragma pack(push,1)
//============================================================================
//========================================================================
@ -225,5 +225,5 @@ enum {
//============================================================================
// End networked data structures
#include <PopPack.h>
#pragma pack(pop)
//============================================================================

View File

@ -96,7 +96,7 @@ enum {
//============================================================================
// Begin networked data scructures
#include <PshPack1.h>
#pragma pack(push,1)
//============================================================================
//========================================================================
@ -132,5 +132,5 @@ enum {
//============================================================================
// End networked data structures
#include <PopPack.h>
#pragma pack(pop)
//============================================================================

View File

@ -96,7 +96,7 @@ enum {
//============================================================================
// Begin networked data structures
#include <PshPack1.h>
#pragma pack(push,1)
//============================================================================
//========================================================================
@ -153,5 +153,5 @@ enum {
//============================================================================
// End networked data structures
#include <PopPack.h>
#pragma pack(pop)
//============================================================================

View File

@ -165,7 +165,7 @@ enum {
//============================================================================
// Begin networked data scructures
#include <PshPack1.h>
#pragma pack(push,1)
//============================================================================
struct GameMsgHeader {
@ -247,7 +247,7 @@ enum {
//============================================================================
// End networked data structures
#include <PopPack.h>
#pragma pack(pop)
//============================================================================

View File

@ -95,7 +95,7 @@ static bool MailNotifyProc (
void ** userState
);
static void __cdecl Send (
static void CDECL Send (
AsyncSocket sock,
const char str[],
...
@ -431,7 +431,7 @@ static bool MailNotifyProc (
}
//===========================================================================
static void __cdecl Send (
static void CDECL Send (
AsyncSocket sock,
const char str[],
...

View File

@ -603,7 +603,7 @@ namespace Connect {
*
***/
#include <PshPack1.h>
#pragma pack(push,1)
enum {
kNetCliCli2SrvConnect,
kNetCliSrv2CliEncrypt,
@ -627,7 +627,7 @@ struct NetCli_Srv2Cli_Encrypt : NetCli_PacketHeader {
struct NetCli_Srv2Cli_Error : NetCli_PacketHeader {
uint32_t error; // ENetError
};
#include <PopPack.h>
#pragma pack(pop)
//===========================================================================

View File

@ -218,7 +218,7 @@ COMPILER_ASSERT_HEADER(Cli2Auth, kNumAuth2CliMessages <= (uint16_t)-1);
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
/*****************************************************************************
@ -1046,4 +1046,4 @@ struct Auth2Cli_ScoreGetRanksReply {
//============================================================================
// END PACKED DATA STRUCTURES
//============================================================================
#include <PopPack.h>
#pragma pack(pop)

View File

@ -101,7 +101,7 @@ COMPILER_ASSERT_HEADER(Cli2Scr, kNumCsr2CliMessages <= (uint16_t)-1);
* Networked structures
*
***/
#include <PshPack1.h>
#pragma pack(push,1)
//============================================================================
// Connect packet
@ -174,5 +174,5 @@ struct Csr2Cli_LoginReply : Cli2Csr_MsgHeader {
};
#include <PopPack.h>
#pragma pack(pop)

View File

@ -97,7 +97,7 @@ static const unsigned kFileSrvBuildId = 0;
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
/*****************************************************************************
@ -208,4 +208,4 @@ struct File2Cli_FileDownloadReply : Cli2File_MsgHeader {
//============================================================================
// END PACKED DATA STRUCTURES
//============================================================================
#include <PopPack.h>
#pragma pack(pop)

View File

@ -86,7 +86,7 @@ COMPILER_ASSERT_HEADER(Cli2Game, kNumGame2CliMessages <= (uint16_t)-1);
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
/*****************************************************************************
@ -191,4 +191,4 @@ struct Game2Cli_GameMgrMsg {
//============================================================================
// END PACKED DATA STRUCTURES
//============================================================================
#include <PopPack.h>
#pragma pack(pop)

View File

@ -78,7 +78,7 @@ COMPILER_ASSERT_HEADER(Cli2GateKeeper, kNumGateKeeper2CliMessages <= (uint16_t)-
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
/*****************************************************************************
@ -154,4 +154,5 @@ struct GateKeeper2Cli_AuthSrvIpAddressReply {
uint32_t messageId;
uint32_t transId;
wchar_t address[24];
};
};
#pragma pack(pop)

View File

@ -160,7 +160,7 @@ enum {
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
/*****************************************************************************
@ -554,7 +554,7 @@ struct Db2Srv_CsrAcctInfoReply : SrvMsgHeader {
//============================================================================
// END PACKED DATA STRUCTURES
//============================================================================
#include <PopPack.h>
#pragma pack(pop)
/*****************************************************************************

View File

@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
// Srv2Log
enum {
@ -103,7 +103,7 @@ struct Srv2Log_LogMsg : SrvMsgHeader {
//============================================================================
// END PACKED DATA STRUCTURES
//============================================================================
#include <PopPack.h>
#pragma pack(pop)
/*****************************************************************************

View File

@ -96,7 +96,7 @@ enum {
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
/*****************************************************************************
@ -252,7 +252,7 @@ struct Mcp2Srv_PropagateBuffer : SrvMsgHeader {
//============================================================================
// END PACKED DATA STRUCTURES
//============================================================================
#include <PopPack.h>
#pragma pack(pop)
/*****************************************************************************

View File

@ -54,7 +54,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
// kNetProtocolSrv2Score messages
enum {
@ -169,7 +169,7 @@ struct Score2Srv_ScoreGetRanksReply : SrvMsgHeader {
//============================================================================
// END PACKED DATA STRUCTURES
//============================================================================
#include <PopPack.h>
#pragma pack(pop)
/*****************************************************************************

View File

@ -68,7 +68,7 @@ enum {
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
/*****************************************************************************
@ -129,7 +129,7 @@ struct State2Srv_ObjectFetched : SrvMsgHeader {
//============================================================================
// END PACKED DATA STRUCTURES
//============================================================================
#include <PopPack.h>
#pragma pack(pop)
/*****************************************************************************

View File

@ -142,7 +142,7 @@ enum {
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
/*****************************************************************************
@ -453,7 +453,7 @@ struct Vault2Srv_CurrentPopulationRequest : SrvMsgHeader {
//============================================================================
// END PACKED DATA STRUCTURES
//============================================================================
#include <PopPack.h>
#pragma pack(pop)
/*****************************************************************************

View File

@ -79,14 +79,14 @@ const NetMsgField kNetMsgFieldBuildId = NET_MSG_FIELD_DWORD();
*
***/
#include <PshPack1.h>
#pragma pack(push,1)
struct SrvPlayerInfo {
unsigned playerInt;
wchar_t playerName[kMaxPlayerNameLength];
wchar_t avatarShape[kMaxVaultNodeStringLength];
unsigned explorer;
};
#include <PopPack.h>
#pragma pack(pop)
/*****************************************************************************
@ -441,14 +441,14 @@ struct NetVaultNodeFieldArray {
//============================================================================
// NetVaultNodeRef (packed because is sent over wire directly)
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
struct NetVaultNodeRef {
unsigned parentId;
unsigned childId;
unsigned ownerId;
bool seen;
};
#include <PopPack.h>
#pragma pack(pop)
//============================================================================
// SrvPackBuffer

View File

@ -84,7 +84,7 @@ COMPILER_ASSERT_HEADER(ESimpleNetChannel, kMaxSimpleNetChannels <= 0xff);
//============================================================================
// BEGIN PACKED DATA STRUCTURES
//============================================================================
#include <PshPack1.h>
#pragma pack(push,1)
//============================================================================
// Connect packet
@ -179,5 +179,6 @@ void SimpleNetSend (
SimpleNetConn * conn,
SimpleNet_MsgHeader * msg
);
#pragma pack(pop)
#endif // PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNSIMPLENET_PNSIMPLENET_H