- Commit patches "code cleanup: void" and "code cleanup: const" by Stefan Huehner

- Replace every occurence of VOID with void (and LPVOID with void*)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@703 4a71c877-e1ca-e34f-864e-861f7616d084
master
Dennis Schridde 2006-09-13 09:09:05 +00:00
parent e0fda9c0b9
commit 728b9a9913
60 changed files with 548 additions and 556 deletions

View File

@ -272,7 +272,7 @@ BOOL closeWarzoneKey( void )
* \param *val Place where to store the setting
* \return Whether we succeed to find the setting
*/
BOOL getWarzoneKeyNumeric( STRING *pName, DWORD *val )
BOOL getWarzoneKeyNumeric( const STRING *pName, DWORD *val )
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
char *value = registry_get_key( pName );
@ -292,7 +292,7 @@ BOOL getWarzoneKeyNumeric( STRING *pName, DWORD *val )
// =======================================================================================================================
// =======================================================================================================================
//
BOOL getWarzoneKeyString( STRING *pName, STRING *pString )
BOOL getWarzoneKeyString( const STRING *pName, STRING *pString )
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
char *value = registry_get_key( pName );
@ -323,7 +323,7 @@ BOOL getWarzoneKeyBinary( STRING *pName, UCHAR *pData, UDWORD *pSize )
// =======================================================================================================================
// =======================================================================================================================
//
BOOL setWarzoneKeyNumeric( STRING *pName, DWORD val )
BOOL setWarzoneKeyNumeric( const STRING *pName, DWORD val )
{
//~~~~~~~~~~~~
char buf[32];
@ -338,7 +338,7 @@ BOOL setWarzoneKeyNumeric( STRING *pName, DWORD val )
// =======================================================================================================================
// =======================================================================================================================
//
BOOL setWarzoneKeyString( STRING *pName, STRING *pString )
BOOL setWarzoneKeyString( const STRING *pName, const STRING *pString )
{
registry_set_key( pName, pString );
return TRUE;
@ -348,7 +348,7 @@ BOOL setWarzoneKeyString( STRING *pName, STRING *pString )
// =======================================================================================================================
// =======================================================================================================================
//
BOOL setWarzoneKeyBinary( STRING *pName, VOID *pData, UDWORD size )
BOOL setWarzoneKeyBinary( STRING *pName, void *pData, UDWORD size )
{
return FALSE;
}

View File

@ -3,9 +3,9 @@
* load and save favourites to the registry.
*/
extern BOOL getWarzoneKeyNumeric (STRING *pName,DWORD *val);
extern BOOL openWarzoneKey (VOID);
extern BOOL closeWarzoneKey (VOID);
extern BOOL setWarzoneKeyNumeric (STRING *pName,DWORD val);
extern BOOL getWarzoneKeyString(STRING *pName, STRING *pString);
extern BOOL setWarzoneKeyString(STRING *pName, STRING *pString);
extern BOOL getWarzoneKeyNumeric (const STRING *pName,DWORD *val);
extern BOOL openWarzoneKey (void);
extern BOOL closeWarzoneKey (void);
extern BOOL setWarzoneKeyNumeric (const STRING *pName,DWORD val);
extern BOOL getWarzoneKeyString(const STRING *pName, STRING *pString);
extern BOOL setWarzoneKeyString(const STRING *pName, const STRING *pString);

View File

@ -269,7 +269,7 @@ static void processEvent(SDL_Event *event)
static void initCursors()
static void initCursors(void)
{
aCursors[CURSOR_ARROW - CURSOR_OFFSET] = init_system_cursor(cursor_arrow);
aCursors[CURSOR_DEST - CURSOR_OFFSET] = init_system_cursor(cursor_dest);
@ -300,7 +300,7 @@ static void initCursors()
}
static void freeCursors()
static void freeCursors(void)
{
unsigned int i = 0;
for( ; i < MAX_CURSORS; i++ )
@ -653,10 +653,10 @@ BOOL loadFileToBufferNoError(char *pFileName, char *pFileBuffer, UDWORD bufferSi
* Accepts string and returns hashed integer.
*/
/***************************************************************************/
UINT HashString( char *String )
UINT HashString( const char *String )
{
UINT iHashValue, i;
CHAR *c = (CHAR *) String;
const CHAR *c = (const CHAR *) String;
assert(String!=NULL);
assert(*String!=0x0);
@ -675,10 +675,10 @@ UINT HashString( char *String )
return iHashValue;
}
UINT HashStringIgnoreCase( char *String )
UINT HashStringIgnoreCase( const char *String )
{
UINT iHashValue, i;
CHAR *c = (CHAR *) String;
const CHAR *c = (const CHAR *) String;
assert(String!=NULL);
assert(*String!=0x0);

View File

@ -171,8 +171,8 @@ BOOL loadFileToBufferNoError(char *pFileName, char *pFileBuffer, UDWORD bufferSi
extern SDWORD ftol(float f);
UINT HashString( char *String );
UINT HashStringIgnoreCase( char *String );
UINT HashString( const char *String );
UINT HashStringIgnoreCase( const char *String );
/* Endianness hacks */

View File

@ -48,13 +48,13 @@ void resSetPreLoadCallback(RESPRELOAD_CALLBACK funcToCall)
}
/* set the callback function for the res loader*/
VOID resSetLoadCallback(RESLOAD_CALLBACK funcToCall)
void resSetLoadCallback(RESLOAD_CALLBACK funcToCall)
{
resLoadCallback = funcToCall;
}
/* do the callback for the resload display function */
VOID resDoResLoadCallback()
void resDoResLoadCallback()
{
if(resLoadCallback)
{
@ -533,7 +533,7 @@ void *resGetDataFromHash(STRING *pType, UDWORD HashedID)
/* Return the resource for a type and ID */
void *resGetData(STRING *pType, STRING *pID)
void *resGetData(const STRING *pType, const STRING *pID)
{
RES_TYPE *psT;
RES_DATA *psRes;

View File

@ -57,14 +57,14 @@ typedef struct _res_type
/* set the function to call when loading files with resloadfile*/
extern VOID resSetLoadCallback(RESLOAD_CALLBACK funcToCall);
extern void resSetLoadCallback(RESLOAD_CALLBACK funcToCall);
/* callback type for res pre-load callback*/
typedef BOOL (*RESPRELOAD_CALLBACK)(char *type, char *name, char *directory);
/* set the function to call when loading files with resloadfile*/
extern VOID resSetPreLoadCallback(RESPRELOAD_CALLBACK funcToCall);
extern void resSetPreLoadCallback(RESPRELOAD_CALLBACK funcToCall);
@ -108,14 +108,14 @@ extern BOOL resAddData(STRING *pType, STRING *pID, void *pData);
/* Return the resource for a type and ID */
extern void *resGetDataFromHash(STRING *pType, UDWORD HashedID);
extern void *resGetData(STRING *pType, STRING *pID);
extern void *resGetData(const STRING *pType, const STRING *pID);
extern BOOL resPresent(STRING *pType, STRING *pID);
void resToLower(STRING *pStr);
// return the HashedID string for a piece of data
extern BOOL resGetHashfromData(STRING *pType, void *pData, UDWORD *pHash);
VOID resDoResLoadCallback();
void resDoResLoadCallback(void);
//return last imd resource
char *GetLastResourceFilename(void);

View File

@ -99,7 +99,6 @@ typedef unsigned long ULONG;
typedef unsigned char * LPBYTE;
typedef signed int * LPDWORD;
typedef char * LPSTR;
typedef void * LPVOID;
typedef struct
{
@ -127,7 +126,7 @@ typedef int DPID;
#endif
#ifndef _MSC_VER // this breaks on .net, it wants the other format. --Qamly
#ifndef _MSC_VER // this breaks on .net, it wants the other format. --Qamly
#define _inline inline
#define __inline inline
#else
@ -155,13 +154,9 @@ typedef int DPID;
#define FALSE (0)
#endif
/* locale types */
#define VOID void
/* defines for ONEINX - use
/* defines for ONEINX - use
if (ONEINX)
{
code.....

View File

@ -22,7 +22,7 @@
// Simple derived types
typedef union {uint32 *dp; uint8 *bp; uint16 *wp;} iPointer;
extern void iV_Error(long n, char *msge, ...);
extern void iV_Error(long n, const char *msge, ...);
// If its a final build we need to undefine iv_error so that it doesn't generate any code !
#ifdef FINALBUILD

View File

@ -84,7 +84,7 @@ void iV_Abort(char *string, ...)
//*************************************************************************
#ifndef FINALBUILD
void iV_Error(long errorn, char *msge, ...)
void iV_Error(long errorn, const char *msge, ...)
{
va_list argptr;

View File

@ -391,7 +391,7 @@ int32 pie_Transform(iVector *v3d, iPoint *v2d)
//*************************************************************************
void pie_PerspectiveBegin() {
void pie_PerspectiveBegin(void) {
float width = pie_GetVideoBufferWidth();
float height = pie_GetVideoBufferHeight();
float xangle = width/6;
@ -406,7 +406,7 @@ void pie_PerspectiveBegin() {
glMatrixMode(GL_MODELVIEW);
}
void pie_PerspectiveEnd() {
void pie_PerspectiveEnd(void) {
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, pie_GetVideoBufferWidth(), pie_GetVideoBufferHeight(), 0, 1, -1);

View File

@ -84,8 +84,8 @@ extern int32 pie_RotateProject(SDWORD x, SDWORD y, SDWORD z, SDWORD* xs, SDWORD*
//*************************************************************************
extern void pie_PerspectiveBegin();
extern void pie_PerspectiveEnd();
extern void pie_PerspectiveBegin(void);
extern void pie_PerspectiveEnd(void);
//*************************************************************************

View File

@ -9,27 +9,27 @@
#include "netplay.h"
// ////////////////////////////////////////////////////////////////////////
BOOL NETinitAudioCapture(VOID)
BOOL NETinitAudioCapture(void)
{
debug(LOG_SOUND, "NETinitAudioCapture");
return FALSE;
}
// ////////////////////////////////////////////////////////////////////////
BOOL NETshutdownAudioCapture(VOID)
BOOL NETshutdownAudioCapture(void)
{
debug(LOG_SOUND, "NETshutdownAudioCapture");
return TRUE;
}
// ////////////////////////////////////////////////////////////////////////
BOOL NETstartAudioCapture(VOID)
BOOL NETstartAudioCapture(void)
{
debug(LOG_SOUND, "NETstartAudioCapture");
return FALSE;
}
// ////////////////////////////////////////////////////////////////////////
BOOL NETstopAudioCapture(VOID)
BOOL NETstopAudioCapture(void)
{
debug(LOG_SOUND, "NETstopAudioCapture");
return FALSE;
@ -38,7 +38,7 @@ BOOL NETstopAudioCapture(VOID)
// ////////////////////////////////////////////////////////////////////////
// update the pointers and process the buffer accordingly.
BOOL NETprocessAudioCapture(VOID)
BOOL NETprocessAudioCapture(void)
{
debug(LOG_SOUND, "NETprocessAudioCapture");
return FALSE;
@ -69,7 +69,7 @@ void NETplayIncomingAudio(NETMSG *pMsg)
// ////////////////////////////////////////////////////////////////////////
// close it all down
BOOL NETshutdownAudioPlayback(VOID)
BOOL NETshutdownAudioPlayback(void)
{
debug(LOG_SOUND, "NETshutdownAudioPlayback");
return TRUE;

View File

@ -30,7 +30,7 @@ UDWORD NEThashBuffer(char *pData, UDWORD size);
BOOL NETsetKey (UDWORD c1,UDWORD c2,UDWORD c3, UDWORD c4);
NETMSG* NETmanglePacket (NETMSG *msg);
VOID NETunmanglePacket (NETMSG *msg);
void NETunmanglePacket (NETMSG *msg);
BOOL NETmangleData ( long *input, long *result, UDWORD dataSize);
BOOL NETunmangleData ( long *input, long *result, UDWORD dataSize);
@ -228,7 +228,7 @@ NETMSG *NETmanglePacket(NETMSG *msg)
// decrypt a netplay packet
// messages SHOULD be 8byte multiples, not required tho. will return padded out..
VOID NETunmanglePacket(NETMSG *msg)
void NETunmanglePacket(NETMSG *msg)
{
NETMSG result;
UDWORD pos=0;

View File

@ -259,7 +259,7 @@ void NET_DestroyPlayer(unsigned int id) {
// ////////////////////////////////////////////////////////////////////////
// count players. call with null to enumerate the game already joined.
UDWORD NETplayerInfo()
UDWORD NETplayerInfo(void)
{
unsigned int i;
@ -345,14 +345,14 @@ void resize_global_player_data(unsigned int i, unsigned int size) {
}
// ////////////////////////////////////////////////////////////////////////
BOOL NETgetLocalPlayerData(DPID dpid,VOID *pData, DWORD *pSize)
BOOL NETgetLocalPlayerData(DPID dpid,void *pData, DWORD *pSize)
{
memcpy(pData, local_player_data[dpid].data, local_player_data[dpid].size);
return TRUE;
}
// ////////////////////////////////////////////////////////////////////////
BOOL NETgetGlobalPlayerData(DPID dpid,VOID *pData, DWORD *pSize)
BOOL NETgetGlobalPlayerData(DPID dpid,void *pData, DWORD *pSize)
{
if(!NetPlay.bComms)
{
@ -365,7 +365,7 @@ BOOL NETgetGlobalPlayerData(DPID dpid,VOID *pData, DWORD *pSize)
return TRUE;
}
// ////////////////////////////////////////////////////////////////////////
BOOL NETsetLocalPlayerData(DPID dpid,VOID *pData, DWORD size)
BOOL NETsetLocalPlayerData(DPID dpid,void *pData, DWORD size)
{
local_player_data[dpid].size = size;
resize_local_player_data(dpid, size);
@ -374,7 +374,7 @@ BOOL NETsetLocalPlayerData(DPID dpid,VOID *pData, DWORD size)
}
// ////////////////////////////////////////////////////////////////////////
BOOL NETsetGlobalPlayerData(DPID dpid, VOID *pData, DWORD size)
BOOL NETsetGlobalPlayerData(DPID dpid, void *pData, DWORD size)
{
if(!NetPlay.bComms)
{
@ -496,7 +496,7 @@ BOOL NETinit(BOOL bFirstCall)
// ////////////////////////////////////////////////////////////////////////
// SHUTDOWN THE CONNECTION.
HRESULT NETshutdown(VOID)
HRESULT NETshutdown(void)
{
unsigned int i;
debug( LOG_NET, "NETshutdown" );
@ -516,7 +516,7 @@ HRESULT NETshutdown(VOID)
// ////////////////////////////////////////////////////////////////////////
//close the open game..
HRESULT NETclose(VOID)
HRESULT NETclose(void)
{
unsigned int i;
@ -571,7 +571,7 @@ HRESULT NETclose(VOID)
// ////////////////////////////////////////////////////////////////////////
// return bytes of data sent recently.
UDWORD NETgetBytesSent(VOID)
UDWORD NETgetBytesSent(void)
{
static UDWORD lastsec=0;
static UDWORD timy=0;
@ -586,13 +586,13 @@ UDWORD NETgetBytesSent(VOID)
return lastsec;
}
UDWORD NETgetRecentBytesSent(VOID)
UDWORD NETgetRecentBytesSent(void)
{
return nStats.bytesSent;
}
UDWORD NETgetBytesRecvd(VOID)
UDWORD NETgetBytesRecvd(void)
{
static UDWORD lastsec=0;
static UDWORD timy=0;
@ -605,14 +605,14 @@ UDWORD NETgetBytesRecvd(VOID)
return lastsec;
}
UDWORD NETgetRecentBytesRecvd(VOID)
UDWORD NETgetRecentBytesRecvd(void)
{
return nStats.bytesRecvd;
}
//return number of packets sent last sec.
UDWORD NETgetPacketsSent(VOID)
UDWORD NETgetPacketsSent(void)
{
static UDWORD lastsec=0;
static UDWORD timy=0;
@ -628,13 +628,13 @@ UDWORD NETgetPacketsSent(VOID)
}
UDWORD NETgetRecentPacketsSent(VOID)
UDWORD NETgetRecentPacketsSent(void)
{
return nStats.packetsSent;
}
UDWORD NETgetPacketsRecvd(VOID)
UDWORD NETgetPacketsRecvd(void)
{
static UDWORD lastsec=0;
static UDWORD timy=0;
@ -647,7 +647,7 @@ UDWORD NETgetPacketsRecvd(VOID)
return lastsec;
}
UDWORD NETgetRecentPacketsRecvd(VOID)
UDWORD NETgetRecentPacketsRecvd(void)
{
return nStats.packetsRecvd;
}
@ -952,7 +952,7 @@ receive_message:
// ////////////////////////////////////////////////////////////////////////
// Protocol functions
BOOL NETsetupTCPIP(LPVOID *addr, char * machine)
BOOL NETsetupTCPIP(void ** addr, char * machine)
{
debug( LOG_NET, "NETsetupTCPIP\n" );
@ -971,7 +971,7 @@ BOOL NETsetupTCPIP(LPVOID *addr, char * machine)
}
// select a current protocol. Call with a connection returned by findprotocol.
BOOL NETselectProtocol(LPVOID lpConnection)
BOOL NETselectProtocol(void * lpConnection)
{
return TRUE;
}
@ -1299,7 +1299,7 @@ BOOL NEThostGame(LPSTR SessionName, LPSTR PlayerName,
// ////////////////////////////////////////////////////////////////////////
// Stop the dplay interface from accepting more players.
BOOL NEThaltJoining(VOID)
BOOL NEThaltJoining(void)
{
debug( LOG_NET, "NEThaltJoining\n" );

View File

@ -2,7 +2,7 @@
* Netplay.h
*
* Alex Lee sep97.
*/
*/
#ifndef _netplay_h
#define _netplay_h
@ -45,7 +45,7 @@ typedef struct { //Available game storage... JUST FOR REFERENCE!
// Games Storage Structures
typedef struct {
char name[StringSize];
char name[StringSize];
SESSIONDESC desc;
} GAMESTRUCT;
@ -55,9 +55,9 @@ typedef struct {
#define NET_ALL_PLAYERS 255
typedef struct {
unsigned short size;
unsigned short size;
unsigned char paddedBytes; // numberofbytes appended for encryption
unsigned char type;
unsigned char type;
unsigned char destination;
char body[MaxMsgSize];
} NETMSG, *LPNETMSG;
@ -105,9 +105,9 @@ extern LPNETPLAY lpNetPlay;
// ////////////////////////////////////////////////////////////////////////
// functions available to you.
extern BOOL NETinit(BOOL bFirstCall); //init(guid can be NULL)
extern BOOL NETinit(BOOL bFirstCall); //init(guid can be NULL)
extern BOOL NETfindProtocol(BOOL Lob); //put connections in Protocols[] (Lobbies optional)
extern BOOL NETselectProtocol(LPVOID lpConnection); //choose one.
extern BOOL NETselectProtocol(void * lpConnection); //choose one.
extern BOOL NETsend(NETMSG *msg, DPID player, BOOL guarantee);// send to player, possibly guaranteed
extern BOOL NETbcast(NETMSG *msg,BOOL guarantee); // broadcast to everyone, possibly guaranteed
extern BOOL NETrecv(NETMSG *msg); // recv a message if possible
@ -115,36 +115,36 @@ extern BOOL NETrecv(NETMSG *msg); // recv a message if possible
extern UCHAR NETsendFile(BOOL newFile, CHAR *fileName, DPID player); // send file chunk.
extern UCHAR NETrecvFile(NETMSG *pMsg); // recv file chunk
extern HRESULT NETclose (VOID); // close current game
extern HRESULT NETshutdown(VOID); // leave the game in play.
extern HRESULT NETclose (void); // close current game
extern HRESULT NETshutdown(void); // leave the game in play.
extern UDWORD NETgetBytesSent(VOID); // return bytes sent/recv. call regularly for good results
extern UDWORD NETgetPacketsSent(VOID); // return packets sent/recv. call regularly for good results
extern UDWORD NETgetBytesRecvd(VOID); // return bytes sent/recv. call regularly for good results
extern UDWORD NETgetPacketsRecvd(VOID); // return packets sent/recv. call regularly for good results
extern UDWORD NETgetRecentBytesSent(VOID); // more immediate functions.
extern UDWORD NETgetRecentPacketsSent(VOID);
extern UDWORD NETgetRecentBytesRecvd(VOID);
extern UDWORD NETgetRecentPacketsRecvd(VOID);
extern UDWORD NETgetBytesSent(void); // return bytes sent/recv. call regularly for good results
extern UDWORD NETgetPacketsSent(void); // return packets sent/recv. call regularly for good results
extern UDWORD NETgetBytesRecvd(void); // return bytes sent/recv. call regularly for good results
extern UDWORD NETgetPacketsRecvd(void); // return packets sent/recv. call regularly for good results
extern UDWORD NETgetRecentBytesSent(void); // more immediate functions.
extern UDWORD NETgetRecentPacketsSent(void);
extern UDWORD NETgetRecentBytesRecvd(void);
extern UDWORD NETgetRecentPacketsRecvd(void);
// from netjoin.c
extern DWORD NETgetGameFlags(UDWORD flag); // return one of the four flags(dword) about the game.
extern DWORD NETgetGameFlagsUnjoined(UDWORD gameid,UDWORD flag); // return one of the four flags(dword) about the game.
extern BOOL NETsetGameFlags(UDWORD flag,DWORD value); // set game flag(1-4) to value.
extern BOOL NEThaltJoining(VOID); // stop new players joining this game
extern BOOL NETsetGameFlags(UDWORD flag,DWORD value); // set game flag(1-4) to value.
extern BOOL NEThaltJoining(void); // stop new players joining this game
extern BOOL NETfindGame(BOOL asynchronously); // find games being played(uses GAME_GUID);
extern BOOL NETjoinGame(UDWORD gameNumber, LPSTR playername); // join game given with playername
extern BOOL NEThostGame(LPSTR SessionName, LPSTR PlayerName,// host a game
extern BOOL NEThostGame(LPSTR SessionName, LPSTR PlayerName,// host a game
DWORD one, DWORD two, DWORD three, DWORD four, UDWORD plyrs);
//from netusers.c
extern BOOL NETuseNetwork(BOOL val); // TURN on/off networking.
extern UDWORD NETplayerInfo(); // count players in this game.
extern UDWORD NETplayerInfo(void); // count players in this game.
extern BOOL NETchangePlayerName(UDWORD dpid, char *newName);// change a players name.
extern BOOL NETgetLocalPlayerData(DPID dpid, VOID *pData, DWORD *pSize);
extern BOOL NETgetGlobalPlayerData(DPID dpid, VOID *pData, DWORD *pSize);
extern BOOL NETsetLocalPlayerData(DPID dpid, VOID *pData, DWORD size);
extern BOOL NETsetGlobalPlayerData(DPID dpid, VOID *pData, DWORD size);
extern BOOL NETgetLocalPlayerData(DPID dpid, void *pData, DWORD *pSize);
extern BOOL NETgetGlobalPlayerData(DPID dpid, void *pData, DWORD *pSize);
extern BOOL NETsetLocalPlayerData(DPID dpid, void *pData, DWORD size);
extern BOOL NETsetGlobalPlayerData(DPID dpid, void *pData, DWORD size);
extern WZ_DEPRECATED BOOL NETspectate(); // create a spectator
extern WZ_DEPRECATED BOOL NETisSpectator(DPID dpid); // check for spectator status.
@ -152,21 +152,21 @@ extern WZ_DEPRECATED BOOL NETisSpectator(DPID dpid); // check for spectator stat
#include "netlog.h"
// from net audio.
extern WZ_DEPRECATED BOOL NETprocessAudioCapture(VOID); //capture
extern WZ_DEPRECATED BOOL NETstopAudioCapture(VOID);
extern WZ_DEPRECATED BOOL NETstartAudioCapture(VOID);
extern WZ_DEPRECATED BOOL NETshutdownAudioCapture(VOID);
extern WZ_DEPRECATED BOOL NETinitAudioCapture(VOID);
extern WZ_DEPRECATED BOOL NETprocessAudioCapture(void); //capture
extern WZ_DEPRECATED BOOL NETstopAudioCapture(void);
extern WZ_DEPRECATED BOOL NETstartAudioCapture(void);
extern WZ_DEPRECATED BOOL NETshutdownAudioCapture(void);
extern WZ_DEPRECATED BOOL NETinitAudioCapture(void);
extern WZ_DEPRECATED BOOL NETinitPlaybackBuffer(void *pSoundBuffer); // playback
extern WZ_DEPRECATED VOID NETplayIncomingAudio(NETMSG *pMsg);
extern WZ_DEPRECATED void NETplayIncomingAudio(NETMSG *pMsg);
extern WZ_DEPRECATED BOOL NETqueueIncomingAudio(void *pSoundData, DWORD soundBytes,BOOL bStream);
extern WZ_DEPRECATED BOOL NETshutdownAudioPlayback(VOID);
extern WZ_DEPRECATED BOOL NETshutdownAudioPlayback(void);
// encryption
extern BOOL NETsetKey(UDWORD c1,UDWORD c2,UDWORD c3, UDWORD c4);
extern NETMSG* NETmanglePacket(NETMSG *msg);
extern VOID NETunmanglePacket(NETMSG *msg);
extern void NETunmanglePacket(NETMSG *msg);
extern BOOL NETmangleData(long *input, long *result, UDWORD dataSize);
extern BOOL NETunmangleData(long *input, long *result, UDWORD dataSize);
extern UDWORD NEThashFile(char *pFileName);
@ -174,26 +174,26 @@ extern UCHAR NEThashVal(UDWORD value);
extern UDWORD NEThashBuffer(char *pData, UDWORD size);
extern WZ_DEPRECATED BOOL NETcheckRegistryEntries (char *name,char *guid);
extern WZ_DEPRECATED BOOL NETsetRegistryEntries (char *name,char *guid,char *file,char *cline,char *path,char *cdir);
extern WZ_DEPRECATED BOOL NETsetRegistryEntries (char *name,char *guid,char *file,char *cline,char *path,char *cdir);
extern WZ_DEPRECATED BOOL NETconnectToLobby (LPNETPLAY lpNetPlay);
//#include "netlobby.h" // more functions to provide lobby facilities.
// Some shortcuts to help you along!
/* FIXME: This is _not_ portable! Bad, Pumpkin, bad! - Per */
#define NetAdd(m,pos,thing) \
memcpy(&(m.body[pos]),&(thing),sizeof(thing))
memcpy(&(m.body[pos]),&(thing),sizeof(thing))
#define NetAddUint8(m,pos,thing) \
*((Uint8*)(&((m).body[(pos)]))) = (thing)
*((Uint8*)(&((m).body[(pos)]))) = (thing)
#define NetAddUint16(m,pos,thing) \
*((Uint16*)(&((m).body[(pos)]))) = (thing)
*((Uint16*)(&((m).body[(pos)]))) = (thing)
#define NetAddUint32(m,pos,thing) \
*((Uint32*)(&((m).body[(pos)]))) = (thing)
*((Uint32*)(&((m).body[(pos)]))) = (thing)
#define NetAdd2(m,pos,thing) \
memcpy( &((*m).body[pos]), &(thing), sizeof(thing))
memcpy( &((*m).body[pos]), &(thing), sizeof(thing))
#define NetAddSt(m,pos,stri) \
strcpy(&(m.body[pos]),stri)
@ -204,13 +204,13 @@ extern WZ_DEPRECATED BOOL NETconnectToLobby (LPNETPLAY lpNetPlay);
memcpy(&(thing),&(m->body[pos]),sizeof(thing))
#define NetGetUint8(m,pos,thing) \
(thing) = *((Uint8*)(&((m)->body[(pos)])))
(thing) = *((Uint8*)(&((m)->body[(pos)])))
#define NetGetUint16(m,pos,thing) \
(thing) = *((Uint16*)(&((m)->body[(pos)])))
(thing) = *((Uint16*)(&((m)->body[(pos)])))
#define NetGetUint32(m,pos,thing) \
(thing) = *((Uint32*)(&((m)->body[(pos)])))
(thing) = *((Uint32*)(&((m)->body[(pos)])))
#endif

View File

@ -254,7 +254,7 @@ extern BOOL scriptInitParser(void);
extern int scr_parse(void);
/* Give an error message */
void scr_error(char *pMessage, ...);
void scr_error(const char *pMessage, ...);
extern void scriptGetErrorData(int *pLine, char **ppText);

View File

@ -63,9 +63,9 @@ extern void scriptSetTypeEquiv(TYPE_EQUIV *psTypeTab);
extern void retStackReset(void);
extern UDWORD RetStackRemember(UDWORD EvTrigIndex, UDWORD address);
extern BOOL IsRetStackEmpty();
extern BOOL IsRetStackEmpty(void);
extern BOOL PopRetStack(UDWORD *psVal);
extern SDWORD GetCallDepth();
extern SDWORD GetCallDepth(void);
/***********************************************************************************
*

View File

@ -286,7 +286,7 @@ pause return PAUSE;
/* Match to type key words */
void { scr_lval.tval = VAL_VOID; return TYPE; }
VOID { scr_lval.tval = VAL_VOID; return TYPE; }
void { scr_lval.tval = VAL_VOID; return TYPE; }
string { scr_lval.tval = VAL_STRING; return TYPE; }
STRING { scr_lval.tval = VAL_STRING; return TYPE; }
bool { scr_lval.tval = VAL_BOOL; return TYPE; }

View File

@ -4865,7 +4865,7 @@ BOOL scriptCompile(char *pData, UDWORD fileSize,
/* A simple error reporting routine */
void scr_error(char *pMessage, ...)
void scr_error(const char *pMessage, ...)
{
int line;
char *text;

View File

@ -27,8 +27,8 @@
#define TRUE 1
#endif
#define FAR
#define HUGE
#define FAR
#define HUGE
typedef unsigned int BOOL;
@ -43,9 +43,6 @@ typedef unsigned char * LPSTR;
typedef unsigned char UBYTE;
typedef unsigned char * LPUBYTE;
typedef void VOID;
typedef void * LPVOID;
typedef float FLOAT;
typedef unsigned int UINT;
@ -85,7 +82,7 @@ typedef enum
ESCAPEUNKNOWN,
ESCAPE124=124,
ESCAPE130=130
} CODECTYPE;
#define DFLAG_INVIEWPORT 1
@ -130,10 +127,10 @@ typedef enum
#define ALPHA_MIX (128+3)
#define ALPHA_MOSAIC (128+4)
#define ALPHA_MIX_PHASED (128+5)
#define RPL_VESA_MODE 0x110
#define RPL_VESA_MODE 0x110
#define DOS 1
#define DEFAULT_COLOUR_NONE 0
#define DEFAULT_COLOUR_NOT 1
#define DEFAULT_COLOUR_HALF 2
@ -171,7 +168,7 @@ typedef enum
#define STREAMER_TIMERFACTOR 1
#define STREAMER_READSIZE (1024<<3)
#define STREAMER_ACCURACY 100
#define STREAMER_ACCURACY 100
#define STREAMER_FRAMERATE 0
#define STREAMER_INTERRUPTFREQ 1000
#define STREAMER_DOUBLEBUFFERSIZE (1024<<4)
@ -237,85 +234,85 @@ extern "C"
{
#endif
LPSTR
LPSTR
Movie_GetAuthor( LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetColourDepth( LPMOVIEHANDLE mhandle );
LPSTR
LPSTR
Movie_GetCopyright( LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetCurrentAudioChunk( LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetCurrentFrame( LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetCurrentVideoChunk( LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetFormat( LPMOVIEHANDLE mhandle );
FLOAT
FLOAT
Movie_GetFrameRate( LPMOVIEHANDLE mhandle);
LONG
LONG
Movie_GetFramesInBuffer( LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetFramesPerChunk(LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetMovieChunks( LPMOVIEHANDLE mhandle );
LPSTR
LPSTR
Movie_GetName( LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetSoundChannels( LPMOVIEHANDLE mhandle );
LPSTR
LPSTR
Movie_GetSoundFormatString( LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetSoundPrecision( LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetSoundRate( LPMOVIEHANDLE mhandle);
LONG
Movie_GetSyncAdjust( LPSOUNDHANDLE shandle );
LONG
LONG
Movie_GetTotalFrames( LPMOVIEHANDLE mhandle );
FLOAT
FLOAT
Movie_GetTotalTime( LPMOVIEHANDLE mhandle );
LONG
LONG
Movie_GetXSize( LPMOVIEHANDLE mhandle);
LONG
LONG
Movie_GetYSize( LPMOVIEHANDLE mhandle);
VOID
void
Movie_SetFrameRate( LPMOVIEHANDLE mhandle, FLOAT framerate);
VOID
void
Movie_SetSyncAdjust( LPMOVIEHANDLE mhandle, LPSOUNDHANDLE shandle, LONG adjust );
STRESULT
STRESULT
Streamer_AlphaApply( LPVIDEOHANDLE vhandle,
LPALPHAHANDLE ahandle,
LPBYTE buffer);
STRESULT
STRESULT
Streamer_AlphaRemove( LPVIDEOHANDLE vhandle,
LPALPHAHANDLE ahandle,
LPBYTE buffer);
@ -328,25 +325,25 @@ STRESULT
Streamer_DoPreload( LPMOVIEHANDLE mhandle,
LPSOUNDHANDLE shandle);
unsigned char *
unsigned char *
Streamer_GetSoundBuffer( LPSOUNDHANDLE shandle,
LONG bufferno );
LONG
Streamer_GetSoundDecodeMode( LPSOUNDHANDLE shandle );
LONG
Streamer_GetSoundDecodeMode( LPSOUNDHANDLE shandle );
STRESULT
STRESULT
Streamer_GetVideoPitch( LPVIDEOHANDLE vhandle , LONG *xpitch, LONG *ydepth);
STRESULT
Streamer_InitMovie( LPMOVIEHANDLE *handle,
VOID (*ProgressCallback)(),
void (*ProgressCallback)(),
LONG progressDelta,
LPSTR pathname,
ULONG buffersize,
ULONG properties);
STRESULT
Streamer_InitSound( VOID (*SoundBufferCallback)(LPSOUNDHANDLE ),
STRESULT
Streamer_InitSound( void (*SoundBufferCallback)(LPSOUNDHANDLE ),
LPSOUNDHANDLE *handle,
UINT dbufsize,
UINT compressionfactor,
@ -374,12 +371,12 @@ Streamer_InitVideo( LPVIDEOHANDLE *handle,
LPLONG bufferPixelWidth,
LPLONG bufferPixelDepth);
STRESULT
STRESULT
Streamer_MapVideo( LPVIDEOHANDLE vhandle,
LPBYTE buffer,
LPBYTE buffer,
LONG defop);
STRESULT
STRESULT
Streamer_NoMalloc_InitMovie( LPMOVIEHANDLE *handle,
void (*ProgressCallback)(),
LONG progressDelta,
@ -388,7 +385,7 @@ Streamer_NoMalloc_InitMovie( LPMOVIEHANDLE *handle,
ULONG memoryBufferSize,
ULONG properties);
STRESULT
STRESULT
Streamer_NoMalloc_InitSound( void (*SoundBufferCallback)(LPSOUNDHANDLE ),
LPSOUNDHANDLE *handle,
UINT dbufsize,
@ -399,7 +396,7 @@ Streamer_NoMalloc_InitSound( void (*SoundBufferCallback)(LPSOUNDHANDLE ),
LPBYTE memoryBuffer,
LONG memoryBufferSize);
STRESULT
STRESULT
Streamer_NoMalloc_InitVideo( LPVIDEOHANDLE *handle,
LPMOVIEHANDLE mhandle,
UINT moviexsize,
@ -416,29 +413,29 @@ Streamer_NoMalloc_InitVideo( LPVIDEOHANDLE *handle,
LPBYTE memoryBuffer,
LONG memoryBufferSize);
LONG
LONG
Streamer_NoMalloc_MovieBufferRequired( void);
STRESULT
STRESULT
Streamer_NoMalloc_ShutDownMovie( LPMOVIEHANDLE * handle);
STRESULT
STRESULT
Streamer_NoMalloc_ShutDownSound(LPSOUNDHANDLE *handle);
STRESULT
STRESULT
Streamer_NoMalloc_ShutDownVideo(LPVIDEOHANDLE *handle);
LONG
LONG
Streamer_NoMalloc_SoundBufferRequired( );
LONG
Streamer_NoMalloc_VideoBufferRequired( UINT moviex,
UINT moviey,
LONG
Streamer_NoMalloc_VideoBufferRequired( UINT moviex,
UINT moviey,
LONG properties,
LPLONG bufferPixelWidth,
LPLONG bufferPixelDepth);
STRESULT
STRESULT
Streamer_SetPixelFormat( LPVIDEOHANDLE handle,
WORD flags,
BYTE ap,
@ -450,7 +447,7 @@ Streamer_SetPixelFormat( LPVIDEOHANDLE handle,
BYTE bp,
BYTE bc);
STRESULT
STRESULT
Streamer_SetPreloadAmount( LPMOVIEHANDLE mhandle,
ULONG amount);
@ -464,44 +461,44 @@ Streamer_SetVideoMappings( LPVIDEOHANDLE handle,
UINT viewportheight,
UINT properties);
STRESULT
STRESULT
Streamer_SetVideoPitch( LPVIDEOHANDLE vhandle, LONG xpitch, LONG ydepth);
STRESULT
STRESULT
Streamer_ShutDownMovie( LPMOVIEHANDLE * handle);
STRESULT
STRESULT
Streamer_ShutDownSound( LPSOUNDHANDLE *handle);
STRESULT
STRESULT
Streamer_ShutDownVideo( LPVIDEOHANDLE *handle);
STRESULT
STRESULT
Streamer_Stream( LPMOVIEHANDLE mhandle,
LPVIDEOHANDLE vhandle,
LPSOUNDHANDLE shandle,
LPALPHAHANDLE ahandle,
LONG framestoplay,
LPBYTE videoFrameBuffer,
LPBYTE dataFrameBuffer,
LPBYTE dataFrameBuffer,
LPBYTE ovlframe,
LONG ovlindex);
STRESULT
STRESULT
Streamer_SetSoundBuffer( LPSOUNDHANDLE shandle,
LONG bufferno,
unsigned char * soundbuffer);
STRESULT
Streamer_SetSoundDecodeMode( LPSOUNDHANDLE handle,
Streamer_SetSoundDecodeMode( LPSOUNDHANDLE handle,
LONG mode );
STRESULT
Streamer_SwitchToGraphicsMode( VOID );
STRESULT
Streamer_SwitchToGraphicsMode( void );
STRESULT
Streamer_SwitchToTextMode( VOID );
Streamer_SwitchToTextMode( void );
STRESULT
@ -518,17 +515,17 @@ Streamer_ResetMovie( LPMOVIEHANDLE mhandle,
LONG
Alpha_MapMemReq( LPALPHAHANDLE ahandle );
#if 0
LONG
LONG
Movie_GetVolume( LPSOUNDHANDLE shandle);
#endif
LPALPHAHANDLE
LPALPHAHANDLE
Alpha_CreateEffects( LONG Width, LONG Height );
VOID
void
Alpha_FreeEffects( LPALPHAHANDLE );
LPBYTE

View File

@ -12,8 +12,8 @@
/***************************************************************************/
extern BOOL audio_Init( AUDIO_CALLBACK pStopTrackCallback );
extern BOOL audio_Update();
extern BOOL audio_Shutdown();
extern BOOL audio_Update(void);
extern BOOL audio_Shutdown(void);
extern BOOL audio_Disabled( void );
extern BOOL audio_LoadTrackFromFile( char szFileName[] );

View File

@ -18,10 +18,10 @@ SDWORD mixer_GetWavVolume( void );
void mixer_SetWavVolume( SDWORD iVol );
SDWORD mixer_Get3dWavVolume( void );
void mixer_Set3dWavVolume( SDWORD iVol );
WZ_DEPRECATED void mixer_SaveWinVols();
WZ_DEPRECATED void mixer_RestoreWinVols();
WZ_DEPRECATED void mixer_SaveIngameVols();
WZ_DEPRECATED void mixer_RestoreIngameVols();
WZ_DEPRECATED void mixer_SaveWinVols(void);
WZ_DEPRECATED void mixer_RestoreWinVols(void);
WZ_DEPRECATED void mixer_SaveIngameVols(void);
WZ_DEPRECATED void mixer_RestoreIngameVols(void);
/***************************************************************************/

View File

@ -67,7 +67,7 @@ BOOL sound_Init( SDWORD iMaxSameSamples )
{
//~~~~~~~~~~~~~
#ifdef USE_COMPRESSED_SPEECH
LPVOID lpMsgBuf;
void * lpMsgBuf;
#endif
SDWORD i;
//~~~~~~~~~~~~~

View File

@ -96,7 +96,7 @@ typedef struct TRACK
*/
BOOL sound_Init( SDWORD iMaxSameSamples );
BOOL sound_Shutdown();
BOOL sound_Shutdown(void);
BOOL sound_LoadTrackFromFile(char szFileName[]);
void * sound_LoadTrackFromBuffer(char *pBuffer, UDWORD udwSize);

View File

@ -32,7 +32,7 @@
// For setting shadows and sound options
#include "lib/framework/configfile.h"
extern BOOL NETsetupTCPIP(LPVOID *addr, char * machine);
extern BOOL NETsetupTCPIP(void ** addr, char * machine);
extern BOOL scanGameSpyFlags(LPSTR gflag,LPSTR value);
extern char SaveGamePath[];
@ -358,7 +358,7 @@ BOOL scanGameSpyFlags(LPSTR gflag,LPSTR value)
{
static UBYTE count = 0;
// UDWORD val;
LPVOID finalconnection;
void * finalconnection;
#if 0
// check for gamespy flag...

View File

@ -4,6 +4,6 @@
*/
extern BOOL loadConfig (BOOL bResourceAvailable);
extern BOOL loadRenderMode (VOID);
extern BOOL saveConfig (VOID);
extern BOOL loadRenderMode (void);
extern BOOL saveConfig (void);
void closeConfig( void );

View File

@ -713,7 +713,7 @@ void setConsoleLineInfo(UDWORD vis)
}
/* get how many lines are allowed and how many are visible */
UDWORD getConsoleLineInfo(VOID)
UDWORD getConsoleLineInfo(void)
{
return consoleVisibleLines;
}
@ -776,7 +776,7 @@ void console(const char *pFormat, ...)
{
char aBuffer[500]; // Output string buffer
va_list pArgs; // Format arguments
/* Initialise the argument list */
va_start(pArgs, pFormat);

View File

@ -2037,7 +2037,7 @@ void setViewAngle(SDWORD angle)
}
UDWORD getViewDistance(VOID)
UDWORD getViewDistance(void)
{
return distance;
}

View File

@ -710,7 +710,7 @@ void removeDroidFX(DROID *psDel)
}
VOID destroyDroid(DROID *psDel)
void destroyDroid(DROID *psDel)
{
if(psDel->lastHitWeapon==WSC_LAS_SAT) // darken tile if lassat.

View File

@ -66,11 +66,11 @@
extern BOOL bSubtitles;
extern VOID intUpdateOptionText(struct _widget *psWidget, struct _w_context *psContext);
extern void intUpdateOptionText(struct _widget *psWidget, struct _w_context *psContext);
extern void set_active_data_directory(int);
extern CURSORSNAP InterfaceSnap;
extern VOID ProcessCursorSnap(VOID);
extern void ProcessCursorSnap(VOID);
int StartWithGame = 1; // New game starts in Cam 1.
@ -109,48 +109,48 @@ extern IMAGEFILE *FrontImages;
// ////////////////////////////////////////////////////////////////////////////
// Function Definitions
VOID processFrontendSnap (BOOL bHideCursor);
VOID changeTitleMode (tMode mode);
BOOL startTitleMenu (VOID);
BOOL runTitleMenu (VOID);
VOID startSinglePlayerMenu (VOID);
BOOL runSinglePlayerMenu (VOID);
//BOOL runDemoMenu (VOID);
//BOOL startDemoMenu (VOID);
BOOL startTutorialMenu (VOID);
BOOL runTutorialMenu (VOID);
BOOL startMultiPlayerMenu (VOID);
BOOL runMultiPlayerMenu (VOID);
BOOL startOptionsMenu (VOID);
BOOL runOptionsMenu (VOID);
BOOL startGameOptionsMenu (VOID);
BOOL runGameOptionsMenu (VOID);
BOOL startGameOptions2Menu (VOID);
BOOL runGameOptions2Menu (VOID);
BOOL startGameOptions3Menu (VOID);
BOOL runGameOptions3Menu (VOID);
//BOOL startVideoOptionsMenu (VOID);
//BOOL runVideoOptionsMenu (VOID);
//BOOL startGraphicsOptionsMenu(VOID);
//BOOL runGraphicsptionsMenu (VOID);
void processFrontendSnap (BOOL bHideCursor);
void changeTitleMode (tMode mode);
BOOL startTitleMenu (void);
BOOL runTitleMenu (void);
void startSinglePlayerMenu (void);
BOOL runSinglePlayerMenu (void);
//BOOL runDemoMenu (void);
//BOOL startDemoMenu (void);
BOOL startTutorialMenu (void);
BOOL runTutorialMenu (void);
BOOL startMultiPlayerMenu (void);
BOOL runMultiPlayerMenu (void);
BOOL startOptionsMenu (void);
BOOL runOptionsMenu (void);
BOOL startGameOptionsMenu (void);
BOOL runGameOptionsMenu (void);
BOOL startGameOptions2Menu (void);
BOOL runGameOptions2Menu (void);
BOOL startGameOptions3Menu (void);
BOOL runGameOptions3Menu (void);
//BOOL startVideoOptionsMenu (void);
//BOOL runVideoOptionsMenu (void);
//BOOL startGraphicsOptionsMenu(void);
//BOOL runGraphicsptionsMenu (void);
VOID addTopForm (VOID);
VOID removeTopForm (VOID);
VOID addBottomForm (VOID);
VOID removeBottomForm (VOID);
VOID addBackdrop (VOID);
VOID removeBackdrop (VOID);
void addTopForm (void);
void removeTopForm (void);
void addBottomForm (void);
void removeBottomForm (void);
void addBackdrop (void);
void removeBackdrop (void);
VOID addTextButton (UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt,BOOL bAlignLeft,BOOL bGrey);
VOID addText (int FontID,UDWORD FormID,UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt, UDWORD attachID,BOOL *State);
VOID addSideText (UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt);
VOID addFESlider (UDWORD id, UDWORD parent, UDWORD x,UDWORD y,UDWORD stops,UDWORD pos,UDWORD attachID);
void addTextButton (UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt,BOOL bAlignLeft,BOOL bGrey);
void addText (int FontID,UDWORD FormID,UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt, UDWORD attachID,BOOL *State);
void addSideText (UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt);
void addFESlider (UDWORD id, UDWORD parent, UDWORD x,UDWORD y,UDWORD stops,UDWORD pos,UDWORD attachID);
VOID displayLogo (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
VOID displayTitleBitmap (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
VOID displayTextOption (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
VOID displayTextAt270 (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
static VOID displayBigSlider (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayLogo (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayTitleBitmap (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayTextOption (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayTextAt270 (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
static void displayBigSlider (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
@ -158,7 +158,7 @@ static VOID displayBigSlider (struct _widget *psWidget, UDWORD xOffset, UDWORD
// Returns TRUE if escape key pressed on PC or close button pressed on Playstation.
//
BOOL CancelPressed(VOID)
BOOL CancelPressed(void)
{
if(keyPressed(KEY_ESC)) {
@ -171,7 +171,7 @@ BOOL CancelPressed(VOID)
// ////////////////////////////////////////////////////////////////////////////
// for cursorsnap stuff on pc
VOID processFrontendSnap(BOOL bHideCursor)
void processFrontendSnap(BOOL bHideCursor)
{
static POINT point,opoint;
@ -237,7 +237,7 @@ VOID processFrontendSnap(BOOL bHideCursor)
// ////////////////////////////////////////////////////////////////////////////
// Change Mode
VOID changeTitleMode(tMode mode)
void changeTitleMode(tMode mode)
{
tMode oldMode;
@ -342,7 +342,7 @@ VOID changeTitleMode(tMode mode)
// ////////////////////////////////////////////////////////////////////////////
// Title Screen
BOOL startTitleMenu(VOID)
BOOL startTitleMenu(void)
{
@ -377,7 +377,7 @@ BOOL startTitleMenu(VOID)
}
BOOL runTitleMenu(VOID)
BOOL runTitleMenu(void)
{
UDWORD id;
@ -418,7 +418,7 @@ BOOL runTitleMenu(VOID)
// ////////////////////////////////////////////////////////////////////////////
// Tutorial Menu
BOOL startTutorialMenu(VOID)
BOOL startTutorialMenu(void)
{
addBackdrop();
addTopForm();
@ -437,7 +437,7 @@ BOOL startTutorialMenu(VOID)
return TRUE;
}
BOOL runTutorialMenu(VOID)
BOOL runTutorialMenu(void)
{
UDWORD id;
@ -482,7 +482,7 @@ BOOL runTutorialMenu(VOID)
// ////////////////////////////////////////////////////////////////////////////
// Single Player Menu
VOID startSinglePlayerMenu(VOID)
void startSinglePlayerMenu(void)
{
addBackdrop();
addTopForm();
@ -539,7 +539,7 @@ void loadOK( void )
}
BOOL runSinglePlayerMenu(VOID)
BOOL runSinglePlayerMenu(void)
{
UDWORD id;
@ -646,7 +646,7 @@ BOOL runSinglePlayerMenu(VOID)
// ////////////////////////////////////////////////////////////////////////////
// Multi Player Menu
BOOL startMultiPlayerMenu(VOID)
BOOL startMultiPlayerMenu(void)
{
addBackdrop();
addTopForm();
@ -667,7 +667,7 @@ BOOL startMultiPlayerMenu(VOID)
return TRUE;
}
BOOL runMultiPlayerMenu(VOID)
BOOL runMultiPlayerMenu(void)
{
UDWORD id;
@ -748,7 +748,7 @@ BOOL runMultiPlayerMenu(VOID)
// ////////////////////////////////////////////////////////////////////////////
// Options Menu
BOOL startOptionsMenu(VOID)
BOOL startOptionsMenu(void)
{
addBackdrop();
addTopForm();
@ -771,7 +771,7 @@ BOOL startOptionsMenu(VOID)
BOOL runOptionsMenu(VOID)
BOOL runOptionsMenu(void)
{
UDWORD id;
@ -829,7 +829,7 @@ BOOL runOptionsMenu(VOID)
// ////////////////////////////////////////////////////////////////////////////
// Game Options Menu 2!
BOOL startGameOptions2Menu(VOID)
BOOL startGameOptions2Menu(void)
{
addBackdrop();
addTopForm();
@ -951,7 +951,7 @@ BOOL startGameOptions2Menu(VOID)
}
BOOL runGameOptions2Menu(VOID)
BOOL runGameOptions2Menu(void)
{
UDWORD id;
@ -1100,7 +1100,7 @@ BOOL runGameOptions2Menu(VOID)
// ////////////////////////////////////////////////////////////////////////////
// Game Options Menu
BOOL startGameOptions3Menu(VOID)
BOOL startGameOptions3Menu(void)
{
addBackdrop();
addTopForm();
@ -1128,7 +1128,7 @@ BOOL startGameOptions3Menu(VOID)
return TRUE;
}
BOOL runGameOptions3Menu(VOID)
BOOL runGameOptions3Menu(void)
{
UDWORD id;
@ -1181,7 +1181,7 @@ BOOL runGameOptions3Menu(VOID)
// ////////////////////////////////////////////////////////////////////////////
// Game Options Menu
BOOL startGameOptionsMenu(VOID)
BOOL startGameOptionsMenu(void)
{
UDWORD w,h;
@ -1237,7 +1237,7 @@ BOOL startGameOptionsMenu(VOID)
return TRUE;
}
BOOL runGameOptionsMenu(VOID)
BOOL runGameOptionsMenu(void)
{
UDWORD id;
@ -1381,7 +1381,7 @@ BOOL runGameOptionsMenu(VOID)
// ////////////////////////////////////////////////////////////////////////////
// common widgets.
VOID addBackdrop(VOID)
void addBackdrop(void)
{
W_FORMINIT sFormInit;
@ -1399,14 +1399,14 @@ VOID addBackdrop(VOID)
// ////////////////////////////////////////////////////////////////////////////
VOID removeBackdrop(VOID)
void removeBackdrop(void)
{
widgDelete( psWScreen, FRONTEND_BACKDROP );
}
// ////////////////////////////////////////////////////////////////////////////
VOID addBottomForm(VOID)
void addBottomForm(void)
{
W_FORMINIT sFormInit;
memset(&sFormInit, 0, sizeof(W_FORMINIT));
@ -1427,14 +1427,14 @@ VOID addBottomForm(VOID)
// ////////////////////////////////////////////////////////////////////////////
VOID removeBottomForm( VOID )
void removeBottomForm( void )
{
widgDelete( psWScreen, FRONTEND_BOTFORM );
}
// ////////////////////////////////////////////////////////////////////////////
VOID addTopForm(VOID)
void addTopForm(void)
{
W_FORMINIT sFormInit;
@ -1474,13 +1474,13 @@ VOID addTopForm(VOID)
// ////////////////////////////////////////////////////////////////////////////
VOID removeTopForm( VOID )
void removeTopForm( void )
{
widgDelete( psWScreen, FRONTEND_TOPFORM );
}
// ////////////////////////////////////////////////////////////////////////////
VOID addTextButton(UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt,BOOL bAlign,BOOL bGrey)
void addTextButton(UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt,BOOL bAlign,BOOL bGrey)
{
W_BUTINIT sButInit;
memset(&sButInit, 0, sizeof(W_BUTINIT));
@ -1505,7 +1505,7 @@ VOID addTextButton(UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt,BOOL bAlign
}
sButInit.pUserData = (VOID*)bGrey; // store disable state
sButInit.pUserData = (void*)bGrey; // store disable state
sButInit.height = FRONTEND_BUTHEIGHT;
sButInit.pDisplay = displayTextOption;
@ -1521,7 +1521,7 @@ VOID addTextButton(UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt,BOOL bAlign
}
// ////////////////////////////////////////////////////////////////////////////
VOID addFESlider(UDWORD id, UDWORD parent, UDWORD x,UDWORD y,UDWORD stops,UDWORD pos,UDWORD attachID )
void addFESlider(UDWORD id, UDWORD parent, UDWORD x,UDWORD y,UDWORD stops,UDWORD pos,UDWORD attachID )
{
W_SLDINIT sSldInit;
@ -1544,7 +1544,7 @@ VOID addFESlider(UDWORD id, UDWORD parent, UDWORD x,UDWORD y,UDWORD stops,UDWORD
}
// ////////////////////////////////////////////////////////////////////////////
VOID addSideText(UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt)
void addSideText(UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt)
{
#if !defined(PSX) || defined(ROTATEDTEXT)
W_LABINIT sLabInit;
@ -1567,7 +1567,7 @@ VOID addSideText(UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt)
}
VOID addText(int FontID,UDWORD FormID,UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt, UDWORD attachID,BOOL *State)
void addText(int FontID,UDWORD FormID,UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt, UDWORD attachID,BOOL *State)
{
W_LABINIT sLabInit;
@ -1597,7 +1597,7 @@ VOID addText(int FontID,UDWORD FormID,UDWORD id, UDWORD PosX, UDWORD PosY, STRI
// drawing functions
// show a background piccy
VOID displayTitleBitmap(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
void displayTitleBitmap(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
{
const size_t sTmpSize = 200;
@ -1617,7 +1617,7 @@ VOID displayTitleBitmap(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset
// ////////////////////////////////////////////////////////////////////////////
// show warzone logo
VOID displayLogo(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
void displayLogo(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
{
iV_DrawTransImage(FrontImages,IMAGE_FE_LOGO,xOffset+psWidget->x,yOffset+psWidget->y);
}
@ -1627,7 +1627,7 @@ VOID displayLogo(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWOR
// ////////////////////////////////////////////////////////////////////////////
// show a text option.
VOID displayTextOption(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
void displayTextOption(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
{
SDWORD fx,fy, fw;
W_BUTTON *psBut;
@ -1698,7 +1698,7 @@ VOID displayTextOption(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset,
#if !defined(PSX) || defined(ROTATEDTEXT)
// show text written on its side.
VOID displayTextAt270(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
void displayTextAt270(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
{
SDWORD fx,fy;
W_LABEL *psLab;
@ -1722,7 +1722,7 @@ VOID displayTextAt270(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset,
// ////////////////////////////////////////////////////////////////////////////
// show, well have a guess..
static VOID displayBigSlider(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
static void displayBigSlider(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
{
W_SLIDER *Slider = (W_SLIDER*)psWidget;
UDWORD x = xOffset+psWidget->x;

View File

@ -1,4 +1,4 @@
/*
/*
* Frontend.h
*/
#ifndef _frontend_h
@ -9,9 +9,9 @@ typedef enum _title_mode {
TITLE, // 0 intro mode
SINGLE, // 1 single player menu
MULTI, // 2 multiplayer menu
OPTIONS, // 3 options menu
OPTIONS, // 3 options menu
GAME, // 4
TUTORIAL, // 5 tutorial/fastplay
TUTORIAL, // 5 tutorial/fastplay
CREDITS, // 6 credits
PROTOCOL, // 7 MULTIPLAYER, select proto
MULTIOPTION, // 8 MULTIPLAYER, select game options
@ -51,23 +51,23 @@ extern BOOL bUsingSlider;
extern BOOL bForceEditorLoaded;
extern VOID changeTitleMode (tMode mode);
extern BOOL startTitleMenu (VOID);
extern BOOL runTitleMenu (VOID);
extern BOOL runSinglePlayerMenu (VOID);
extern BOOL runMultiPlayerMenu (VOID);
//extern BOOL runVideoOptionsMenu (VOID);
//extern BOOL runGraphicsOptionsMenu (VOID);
extern BOOL runGameOptionsMenu (VOID);
extern BOOL runDemoMenu (VOID);
extern BOOL runOptionsMenu (VOID);
extern BOOL runTutorialMenu (VOID);
extern void changeTitleMode (tMode mode);
extern BOOL startTitleMenu (void);
extern BOOL runTitleMenu (void);
extern BOOL runSinglePlayerMenu (void);
extern BOOL runMultiPlayerMenu (void);
//extern BOOL runVideoOptionsMenu (void);
//extern BOOL runGraphicsOptionsMenu (void);
extern BOOL runGameOptionsMenu (void);
extern BOOL runDemoMenu (void);
extern BOOL runOptionsMenu (void);
extern BOOL runTutorialMenu (void);
extern VOID processFrontendSnap (BOOL bHideCursor);
extern void processFrontendSnap (BOOL bHideCursor);
extern void addTopForm (VOID);
extern void addBottomForm (VOID);
extern void addBackdrop (VOID);
extern void addTopForm (void);
extern void addBottomForm (void);
extern void addBackdrop (void);
extern void addTextButton (UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt,BOOL bAlignLeft,BOOL bGrey);
extern void addSideText (UDWORD id, UDWORD PosX, UDWORD PosY, STRING *txt);
extern void addFESlider (UDWORD id, UDWORD parent, UDWORD x,UDWORD y,UDWORD stops,UDWORD pos,UDWORD attachID );
@ -77,10 +77,10 @@ extern void displayTitleBitmap (struct _widget *psWidget, UDWORD xOffset, UDWOR
extern void displayTextOption (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
extern void loadOK (void);
extern BOOL CancelPressed (VOID);
extern BOOL CancelPressed (void);
BOOL runGameOptions2Menu (VOID);
BOOL runGameOptions3Menu (VOID);
BOOL runGameOptions2Menu (void);
BOOL runGameOptions3Menu (void);
BOOL addIGTextButton(UDWORD id,UWORD y,UDWORD StringID,UDWORD Style);
@ -121,11 +121,11 @@ BOOL addIGTextButton(UDWORD id,UWORD y,UDWORD StringID,UDWORD Style);
#define FRONTEND_POS1Y 10
#define FRONTEND_POS1M 290
#define FRONTEND_POS2X 20
#define FRONTEND_POS2X 20
#define FRONTEND_POS2Y 50
#define FRONTEND_POS2M 290
#define FRONTEND_POS3X 20
#define FRONTEND_POS3X 20
#define FRONTEND_POS3Y 90
#define FRONTEND_POS3M 290
@ -151,7 +151,7 @@ BOOL addIGTextButton(UDWORD id,UWORD y,UDWORD StringID,UDWORD Style);
#define FRONTEND_MULTIPLAYER 20004
#define FRONTEND_QUIT 20005
#define FRONTEND_OPTIONS 20006
#define FRONTEND_HOST 20007 //multiplayer screen
#define FRONTEND_JOIN 20008
#define FRONTEND_FORCEEDIT 20009
@ -192,7 +192,7 @@ BOOL addIGTextButton(UDWORD id,UWORD y,UDWORD StringID,UDWORD Style);
#define FE_P1 20032
#define FE_P2 20033
#define FE_P3 20034
#define FE_P4 20035
#define FE_P4 20035
#define FE_P5 20036
#define FE_P6 20037
#define FE_P7 20038

View File

@ -958,7 +958,7 @@ static BOOL IntRefreshPending = FALSE;
// Set widget refresh pending flag.
//
VOID intRefreshScreen(VOID)
void intRefreshScreen(void)
{
IntRefreshPending = TRUE;
}

View File

@ -396,7 +396,7 @@ extern void intSetShadowPower(UDWORD quantity);
extern void intResetScreen(BOOL NoAnim);
/* Refresh icons on the interface, without disturbing the layout. i.e. smartreset*/
extern VOID intRefreshScreen(VOID);
extern void intRefreshScreen(void);
/* Add the options widgets to the widget screen */
extern BOOL intAddOptions(void);

View File

@ -58,7 +58,7 @@ void ResetMaxStringWidth(void);
static BOOL addQuitOptions(VOID)
static BOOL addQuitOptions(void)
{
W_FORMINIT sFormInit;
// UWORD WindowWidth;

View File

@ -62,7 +62,7 @@ static KEY_MAPPING *selectedKeyMap;
BOOL runKeyMapEditor (void);
static BOOL keyMapToString (STRING *pStr, KEY_MAPPING *psMapping);
VOID displayKeyMap (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayKeyMap (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
BOOL startKeyMapEditor (BOOL first);
BOOL saveKeyMap (void);
BOOL loadKeyMap (void);
@ -289,7 +289,7 @@ static BOOL keyMapToString(STRING *pStr, KEY_MAPPING *psMapping)
// ////////////////////////////////////////////////////////////////////////////
// display a keymap on the interface.
VOID displayKeyMap(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
void displayKeyMap(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
{
UDWORD x = xOffset+psWidget->x;
UDWORD y = yOffset+psWidget->y;
@ -424,7 +424,7 @@ BOOL startKeyMapEditor(BOOL first)
/* Add our first mapping to the form */
sButInit.pUserData= (VOID*)psPresent;
sButInit.pUserData= (void*)psPresent;
widgAddButton(psWScreen, &sButInit);
sButInit.id++;
sButInit.y += KM_ENTRYH +3;
@ -457,7 +457,7 @@ BOOL startKeyMapEditor(BOOL first)
{
psPresent = psNext;
bubbleCount++;
sButInit.pUserData= (VOID*)psNext;
sButInit.pUserData= (void*)psNext;
widgAddButton(psWScreen, &sButInit);
// move on..
sButInit.id++;

View File

@ -33,7 +33,7 @@ extern STRING *pLevToken;
extern SDWORD levVal;
// error report function for the level parser
extern void levError(STRING *pError);
extern void levError(const STRING *pError);
// the lexer function
extern int lev_lex(void);

View File

@ -118,7 +118,7 @@ void levShutDown(void)
// error report function for the level parser
void levError(STRING *pError)
void levError(const STRING *pError)
{
char *pText;
int line;

View File

@ -210,7 +210,7 @@ static BOOL _addLoadSave(BOOL bLoad,CHAR *sSearchPath,CHAR *sExtension, CHAR *ti
sFormInit.height = LOADSAVE_BANNER_DEPTH;
sFormInit.disableChildren = FALSE;
sFormInit.pDisplay = displayLoadBanner;
sFormInit.pUserData = (VOID *)bLoad;
sFormInit.pUserData = (void *)bLoad;
widgAddForm(psRequestScreen, &sFormInit);

View File

@ -1,5 +1,5 @@
/***************************************************************************/
/*
/*
* loadsave.h
*/
/***************************************************************************/
@ -33,7 +33,7 @@ SAVE_FORCE
extern BOOL bLoadSaveUp; // true when interface is up and should be run.
//the name of the save game to load from the front end
extern STRING saveGameName[256];
extern STRING sRequestResult[255];
extern STRING sRequestResult[255];
extern BOOL bRequestLoad;
/***************************************************************************/
@ -45,9 +45,9 @@ extern BOOL bRequestLoad;
extern void drawBlueBox (UDWORD x,UDWORD y, UDWORD w, UDWORD h);
extern BOOL addLoadSave (LOADSAVE_MODE mode, CHAR *defaultdir,CHAR *extension,CHAR *title);
extern BOOL closeLoadSave (VOID);
extern BOOL closeLoadSave (void);
extern BOOL runLoadSave (BOOL bResetMissionWidgets);
extern BOOL displayLoadSave (VOID);
extern BOOL displayLoadSave (void);
extern void removeWildcards (char *pStr);

View File

@ -59,7 +59,7 @@ BOOL SendGroupOrderSelected (UBYTE player, UDWORD x, UDWORD y, BASE_OBJECT *psO
BOOL SendGroupOrderGroup(DROID_GROUP *psGroup, DROID_ORDER order,UDWORD x,UDWORD y,BASE_OBJECT *psObj);
BOOL SendCmdGroup (DROID_GROUP *group, UWORD x, UWORD y, BASE_OBJECT *psObj);
BOOL recvGroupOrder (NETMSG *pMsg);
static VOID ProcessDroidOrder (DROID *psDroid, DROID_ORDER order, UDWORD x, UDWORD y, OBJECT_TYPE desttype,UDWORD destid);
static void ProcessDroidOrder (DROID *psDroid, DROID_ORDER order, UDWORD x, UDWORD y, OBJECT_TYPE desttype,UDWORD destid);
BOOL SendDestroyDroid (DROID *pD);
BOOL recvDestroyDroid (NETMSG *pMsg);
BOOL sendWholeDroid (DROID *pD, DPID dest);
@ -950,7 +950,7 @@ BOOL recvDroidInfo(NETMSG *pMsg)
// ////////////////////////////////////////////////////////////////////////////
// process droid order
static VOID ProcessDroidOrder(DROID *psDroid, DROID_ORDER order,UDWORD x, UDWORD y,
static void ProcessDroidOrder(DROID *psDroid, DROID_ORDER order,UDWORD x, UDWORD y,
OBJECT_TYPE desttype,UDWORD destid)
{
UDWORD i;

View File

@ -45,32 +45,32 @@
// prototypes
BOOL recvGift (NETMSG *pMsg);
BOOL sendGift (UDWORD type,UDWORD to);
VOID giftRadar (UDWORD from, UDWORD to,BOOL send);
//static VOID giftSingleDroid (DROID *psD,UDWORD from,UDWORD to);
static VOID recvGiftDroids (UDWORD from,UDWORD to,NETMSG *pMsg);
static VOID sendGiftDroids (UDWORD from,UDWORD to);
static VOID giftResearch (UDWORD from,UDWORD to,BOOL send);
VOID giftPower (UDWORD from,UDWORD to,BOOL send);
void giftRadar (UDWORD from, UDWORD to,BOOL send);
//static void giftSingleDroid (DROID *psD,UDWORD from,UDWORD to);
static void recvGiftDroids (UDWORD from,UDWORD to,NETMSG *pMsg);
static void sendGiftDroids (UDWORD from,UDWORD to);
static void giftResearch (UDWORD from,UDWORD to,BOOL send);
void giftPower (UDWORD from,UDWORD to,BOOL send);
VOID requestAlliance (UBYTE from ,UBYTE to,BOOL prop,BOOL allowAudio);
VOID breakAlliance (UBYTE p1, UBYTE p2,BOOL prop,BOOL allowAudio);
VOID formAlliance (UBYTE p1, UBYTE p2,BOOL prop,BOOL allowAudio);
VOID sendAlliance (UBYTE from, UBYTE to, UBYTE state,SDWORD value);
void requestAlliance (UBYTE from ,UBYTE to,BOOL prop,BOOL allowAudio);
void breakAlliance (UBYTE p1, UBYTE p2,BOOL prop,BOOL allowAudio);
void formAlliance (UBYTE p1, UBYTE p2,BOOL prop,BOOL allowAudio);
void sendAlliance (UBYTE from, UBYTE to, UBYTE state,SDWORD value);
BOOL recvAlliance (NETMSG *pMsg,BOOL allowAudio);
VOID technologyGiveAway (STRUCTURE *pS);
VOID addMultiPlayerRandomArtifacts (UDWORD quantity,SDWORD type);
VOID recvMultiPlayerRandomArtifacts (NETMSG *pMsg);
VOID giftArtifact (UDWORD owner,UDWORD x,UDWORD y);
VOID processMultiPlayerArtifacts (VOID);
void technologyGiveAway (STRUCTURE *pS);
void addMultiPlayerRandomArtifacts (UDWORD quantity,SDWORD type);
void recvMultiPlayerRandomArtifacts (NETMSG *pMsg);
void giftArtifact (UDWORD owner,UDWORD x,UDWORD y);
void processMultiPlayerArtifacts (void);
//DROID_TEMPLATE *pickDistribTempl (UDWORD player);
BOOL addOilDrum (UDWORD count);
//BOOL addDMatchDroid (UDWORD count);
//BOOL foundDMatchDroid (UDWORD player,UDWORD x,UDWORD y);
//BOOL deathmatchCheck (VOID);
//BOOL deathmatchCheck (void);
//static BOOL dMatchWinner (UDWORD winplayer,BOOL bcast);
//BOOL recvdMatchWinner (NETMSG *pMsg);
VOID addLoserGifts (VOID);
void addLoserGifts (void);
///////////////////////////////////////////////////////////////////////////////
@ -165,7 +165,7 @@ BOOL sendGift(UDWORD type,UDWORD to)
}
// ////////////////////////////////////////////////////////////////////////////
// give radar information
VOID giftRadar(UDWORD from, UDWORD to,BOOL send)
void giftRadar(UDWORD from, UDWORD to,BOOL send)
{
NETMSG m;
@ -323,7 +323,7 @@ static void giftResearch(UDWORD from,UDWORD to,BOOL send)
// ////////////////////////////////////////////////////////////////////////////
// give Power
VOID giftPower(UDWORD from,UDWORD to,BOOL send)
void giftPower(UDWORD from,UDWORD to,BOOL send)
{
UDWORD gifval;
NETMSG m;
@ -582,7 +582,7 @@ BOOL recvAlliance(NETMSG *pMsg,BOOL allowAudio)
// ////////////////////////////////////////////////////////////////////////////
// add an artifact on destruction if required.
VOID technologyGiveAway(STRUCTURE *pS)
void technologyGiveAway(STRUCTURE *pS)
{
UDWORD i;
UDWORD x,y;
@ -767,7 +767,7 @@ void addLoserGifts(void)
///////////////////////////////////////////////////////////////////////////////
// splatter artifact gifts randomly about.
VOID addMultiPlayerRandomArtifacts(UDWORD quantity,SDWORD type)
void addMultiPlayerRandomArtifacts(UDWORD quantity,SDWORD type)
{
NETMSG m;
FEATURE *pF;
@ -835,7 +835,7 @@ BOOL addOilDrum(UDWORD count)
// ///////////////////////////////////////////////////////////////
// receive splattered artifacts
VOID recvMultiPlayerRandomArtifacts(NETMSG *pMsg)
void recvMultiPlayerRandomArtifacts(NETMSG *pMsg)
{
UDWORD index,count,i,quantity,ref;
SDWORD type;
@ -903,7 +903,7 @@ void giftArtifact(UDWORD owner,UDWORD x,UDWORD y)
}
// ///////////////////////////////////////////////////////////////
VOID processMultiPlayerArtifacts(VOID)
void processMultiPlayerArtifacts(void)
{
static UDWORD lastCall;
FEATURE *pF,*pFN;

View File

@ -1,10 +1,10 @@
/*
/*
*multigifts. h
*
* multiplayer game, gifts and deathmatch relevant funcs.
*/
extern void requestAlliance (UBYTE from ,UBYTE to,BOOL prop,BOOL allowAudio);
extern void requestAlliance (UBYTE from ,UBYTE to,BOOL prop,BOOL allowAudio);
extern void breakAlliance (UBYTE p1, UBYTE p2,BOOL prop,BOOL allowAudio);
extern void formAlliance (UBYTE p1, UBYTE p2,BOOL prop,BOOL allowAudio);
extern void sendAlliance (UBYTE from, UBYTE to, UBYTE state,SDWORD value);
@ -13,17 +13,17 @@ extern BOOL recvAlliance (NETMSG *pMsg,BOOL allowAudio);
extern BOOL sendGift (UDWORD type,UDWORD to);
extern BOOL recvGift (NETMSG *pMsg);
extern VOID technologyGiveAway (STRUCTURE *pS);
extern VOID recvMultiPlayerRandomArtifacts (NETMSG *pMsg);
extern VOID addMultiPlayerRandomArtifacts (UDWORD quantity,SDWORD type);
extern VOID processMultiPlayerArtifacts (VOID);
extern void technologyGiveAway (STRUCTURE *pS);
extern void recvMultiPlayerRandomArtifacts (NETMSG *pMsg);
extern void addMultiPlayerRandomArtifacts (UDWORD quantity,SDWORD type);
extern void processMultiPlayerArtifacts (void);
extern VOID giftArtifact (UDWORD owner,UDWORD x,UDWORD y);
extern void giftArtifact (UDWORD owner,UDWORD x,UDWORD y);
// deathmatch stuff
extern BOOL addOilDrum (UDWORD count);
extern VOID giftPower (UDWORD from,UDWORD to,BOOL send);
extern VOID giftRadar (UDWORD from, UDWORD to,BOOL send);
extern void giftPower (UDWORD from,UDWORD to,BOOL send);
extern void giftRadar (UDWORD from, UDWORD to,BOOL send);
//extern BOOL addDMatchDroid (UDWORD count);
//extern BOOL foundDMatchDroid (UDWORD player,UDWORD x,UDWORD y);
//extern BOOL deathmatchCheck (VOID);

View File

@ -84,7 +84,7 @@ extern void intDisplayTemplateButton(struct _widget *psWidget, UDWORD xOffset, U
extern BOOL plotStructurePreview(iSprite *backDropSprite,UBYTE scale,UDWORD offX,UDWORD offY);
extern BOOL plotStructurePreview16(unsigned char *backDropSprite,UBYTE scale,UDWORD offX,UDWORD offY);
extern BOOL NETsetupTCPIP(LPVOID *addr, char * machine);
extern BOOL NETsetupTCPIP(void ** addr, char * machine);
BOOL bHosted = FALSE; //we have set up a game
char sPlayer[128]; // player name (to be used)
@ -126,60 +126,60 @@ extern int FEFont;
// widget functions
BOOL addMultiBut (W_SCREEN *screen, UDWORD formid,UDWORD id,UDWORD x, UDWORD y, UDWORD width, UDWORD height,UDWORD tipres,UDWORD norm, UDWORD hi,BOOL showmouseover);
BOOL addMultiEditBox (UDWORD formid,UDWORD id,UDWORD x, UDWORD y, UDWORD tip, STRING tipres[128],UDWORD icon,UDWORD iconid);
static VOID addBlueForm (UDWORD parent,UDWORD id,STRING *txt,UDWORD x,UDWORD y,UDWORD w,UDWORD h);
static void addBlueForm (UDWORD parent,UDWORD id,STRING *txt,UDWORD x,UDWORD y,UDWORD w,UDWORD h);
// Drawing Functions
VOID displayChatEdit (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
VOID displayMultiBut (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
VOID displayWhiteBoard (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
VOID intDisplayFeBox (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
VOID displayRemoteGame (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
VOID displayPlayer (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
VOID displayMultiEditBox (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
VOID displayForceDroid (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayChatEdit (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayMultiBut (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayWhiteBoard (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void intDisplayFeBox (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayRemoteGame (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayPlayer (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayMultiEditBox (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayForceDroid (struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void Show_Map(char *imagedata); //added to show map -Q
// find games
static VOID addGames (VOID);
VOID runGameFind (VOID);
VOID startGameFind (VOID);
static void addGames (void);
void runGameFind (void);
void startGameFind (void);
// Connection option functions
static BOOL OptionsInet (UDWORD);
static VOID addConnections (UDWORD);
VOID runConnectionScreen (VOID);
BOOL startConnectionScreen (VOID);
static void addConnections (UDWORD);
void runConnectionScreen (void);
BOOL startConnectionScreen (void);
// Game option functions
static VOID addOkBut (VOID);
static VOID addGameOptions (BOOL bRedo); // options (rhs) boxV
static void addOkBut (void);
static void addGameOptions (BOOL bRedo); // options (rhs) boxV
UDWORD addPlayerBox (BOOL); // players (mid) box
static VOID addChatBox (VOID);
static VOID disableMultiButs (VOID);
static VOID processMultiopWidgets(UDWORD);
static VOID SendFireUp (VOID);
VOID kickPlayer (DPID dpid);
VOID runMultiOptions (VOID);
static void addChatBox (void);
static void disableMultiButs (void);
static void processMultiopWidgets(UDWORD);
static void SendFireUp (void);
void kickPlayer (DPID dpid);
void runMultiOptions (void);
BOOL startMultiOptions (BOOL);
VOID frontendMultiMessages(VOID);
void frontendMultiMessages(void);
// whiteboard funcs
static BOOL removeWhiteBoard (VOID);
static BOOL addWhiteBoard (VOID);
static BOOL runWhiteBoard (VOID);
static BOOL removeWhiteBoard (void);
static BOOL addWhiteBoard (void);
static BOOL runWhiteBoard (void);
static UDWORD bestPlayer (UDWORD);
static VOID decideWRF (VOID);
static void decideWRF (void);
static VOID closeColourChooser (VOID);
static void closeColourChooser (void);
static BOOL SendColourRequest (UDWORD player, UBYTE col,UBYTE chosenPlayer);
static BOOL safeToUseColour (UDWORD player,UDWORD col);
BOOL chooseColour (UDWORD);
BOOL recvColourRequest (NETMSG *pMsg);
// Force selection functions
static VOID AvailableForces (VOID); // draw available templates
static VOID CurrentForce (VOID); // draw the current force
static void AvailableForces (void); // draw available templates
static void CurrentForce (void); // draw the current force
// ////////////////////////////////////////////////////////////////////////////
// map previews..
@ -474,7 +474,7 @@ static BOOL OptionsInet(UDWORD parentID) //internet options
// ////////////////////////////////////////////////////////////////////////////
// Draw the connections screen.
BOOL startConnectionScreen(VOID)
BOOL startConnectionScreen(void)
{
addBackdrop(); //background
addTopForm(); // logo
@ -503,12 +503,12 @@ static void addConnections(UDWORD begin)
addTextButton(CON_TYPESID_START+begin,FRONTEND_POS1X,pos, strresGetString(psStringRes,STR_CON_INTERNET),FALSE,FALSE);
}
VOID runConnectionScreen(void )
void runConnectionScreen(void )
{
UDWORD id;
static UDWORD chosenproto;
static char addr[128];
LPVOID finalconnection;
void * finalconnection;
processFrontendSnap(TRUE);
@ -1334,7 +1334,7 @@ BOOL chooseColour(UDWORD player)
// ////////////////////////////////////////////////////////////////////////////
// colour chooser.
static VOID addColourChooser(UDWORD player)
static void addColourChooser(UDWORD player)
{
UDWORD i;//,j;
@ -1385,7 +1385,7 @@ static VOID addColourChooser(UDWORD player)
bColourChooserUp = TRUE;
}
static VOID closeColourChooser(void)
static void closeColourChooser(void)
{
bColourChooserUp = FALSE;
@ -1576,7 +1576,7 @@ static void SendFireUp()
}
// host kick a player from a game.
VOID kickPlayer(DPID dpid)
void kickPlayer(DPID dpid)
{
NETMSG m;
// send a kick msg
@ -1588,7 +1588,7 @@ VOID kickPlayer(DPID dpid)
}
static VOID addOkBut(VOID)
static void addOkBut(void)
{
addMultiBut(psWScreen, MULTIOP_OPTIONS,CON_OK,
MULTIOP_OKX,MULTIOP_OKY,
@ -1597,7 +1597,7 @@ static VOID addOkBut(VOID)
STR_MUL_OK,IMAGE_BIGOK,IMAGE_BIGOK,FALSE);
}
static VOID addChatBox(VOID)
static void addChatBox(void)
{
W_FORMINIT sFormInit;
W_EDBINIT sEdInit;
@ -1720,7 +1720,7 @@ static void disableMultiButs(void)
////////////////////////////////////////////////////////////////////////////
VOID stopJoining(void)
void stopJoining(void)
{
dwSelectedGame = 0;
saveConfig();
@ -1794,7 +1794,7 @@ VOID stopJoining(void)
}
////////////////////////////////////////////////////////////////////////////
static VOID chooseSkirmishColours()
static void chooseSkirmishColours()
{
UDWORD col,i,k;
BOOL taken;
@ -2468,7 +2468,7 @@ void frontendMultiMessages(void)
}
}
void runMultiOptions(VOID)
void runMultiOptions(void)
{
static UDWORD lastrefresh=0;
UDWORD id,value;//,i;
@ -2806,7 +2806,7 @@ BOOL startMultiOptions(BOOL bReenter)
// ////////////////////////////////////////////////////////////////////////////
static VOID CurrentForce(VOID)
static void CurrentForce(void)
{
W_FORMINIT sFormInit;
UDWORD numButtons, butPerForm;
@ -2924,7 +2924,7 @@ static VOID CurrentForce(VOID)
//////////////////////////////////
static VOID AvailableForces(VOID)
static void AvailableForces(void)
{
W_FORMINIT sFormInit;
DROID_TEMPLATE *psTempl;
@ -3010,7 +3010,7 @@ static VOID AvailableForces(VOID)
// ////////////////////////////////////////////////////////////////////////////
VOID runForceSelect(VOID)
void runForceSelect(void)
{
UDWORD currID,id,i;
DROID_TEMPLATE *psTempl;
@ -3162,7 +3162,7 @@ VOID runForceSelect(VOID)
// ////////////////////////////////////////////////////////////////////////////
BOOL startForceSelect(VOID)
BOOL startForceSelect(void)
{
W_FORMINIT sFormInit;
W_BARINIT sBarInit;
@ -3338,7 +3338,7 @@ BOOL runWhiteBoard()
return TRUE;
}
VOID displayWhiteBoard(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
void displayWhiteBoard(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
{
UDWORD x = D_W+xOffset+psWidget->x;
UDWORD y = D_H+yOffset+psWidget->y;

View File

@ -4,19 +4,19 @@
* Alex Lee, pumpkin Studios.
*/
extern VOID runConnectionScreen (VOID);
extern BOOL startConnectionScreen (VOID);
extern VOID intProcessConnection (UDWORD id);
extern void runConnectionScreen (void);
extern BOOL startConnectionScreen (void);
extern void intProcessConnection (UDWORD id);
extern VOID runGameFind (VOID);
extern VOID startGameFind (VOID);
extern void runGameFind (void);
extern void startGameFind (void);
extern VOID runMultiOptions (VOID);
extern void runMultiOptions (void);
extern BOOL startMultiOptions (BOOL bReenter);
extern VOID frontendMultiMessages (VOID);
extern void frontendMultiMessages (void);
extern VOID runForceSelect (VOID);
extern BOOL startForceSelect (VOID);
extern void runForceSelect (void);
extern BOOL startForceSelect (void);
extern BOOL chooseColour (UDWORD);
@ -26,7 +26,7 @@ extern BOOL addMultiBut (W_SCREEN *screen, UDWORD formid,UDWORD id,UDWORD x,
extern char sForceName[256];
extern char sPlayer[128];
VOID kickPlayer (DPID dpid);
void kickPlayer (DPID dpid);
UDWORD addPlayerBox (BOOL); // players (mid) box
void loadMapPreview(void);
@ -60,16 +60,16 @@ void loadMapPreview(void);
#define FORCE_STATSHEIGHT 255
#define FORCE_DROID 10304
#define FORCE_DROIDX 70
#define FORCE_DROIDX 70
#define FORCE_DROIDY 220
//#define FORCE_LO 10304
//#define FORCE_LO 10304
//#define FORCE_LOX 7
//#define FORCE_LOY 220
//#define FORCE_MED 10305
//#define FORCE_MED 10305
//#define FORCE_MEDX 52
//#define FORCE_MEDY 220
//#define FORCE_HI 10306
//#define FORCE_HI 10306
//#define FORCE_HIX 97
//#define FORCE_HIY 220
@ -95,7 +95,7 @@ void loadMapPreview(void);
// CONNECTION SCREEN
#define CON_CONTYPES 10103
#define CON_CONTYPES 10103
#define CON_CONTYPESWIDTH 290
#define CON_CONTYPES_FORM 10104
#define CON_TYPESID_START 10105
@ -107,7 +107,7 @@ void loadMapPreview(void);
#define CON_SETTINGSX 220
#define CON_SETTINGSY 190
#define CON_SETTINGSWIDTH 200
#define CON_SETTINGSHEIGHT 100
#define CON_SETTINGSHEIGHT 100
#define CON_OK 10101
#define CON_OKX CON_SETTINGSWIDTH-MULTIOP_OKW-3
@ -229,7 +229,7 @@ void loadMapPreview(void);
#define MULTIOP_BASE 10268
#define MULTIOP_DEFENCE 10269
#define MULTIOP_ALLIANCE_N 10270
#define MULTIOP_ALLIANCE_N 10270
#define MULTIOP_ALLIANCE_Y 10271
#define MULTIOP_POWLEV_LOW 10272
@ -241,7 +241,7 @@ void loadMapPreview(void);
#define MULTIOP_REFRESHY 453
#define MULTIOP_HOST 10276
#define MULTIOP_HOSTX 5
#define MULTIOP_HOSTX 5
#define MULTIOP_HOSTY MROW3+3
#define MULTIOP_STRUCTLIMITS 10277
@ -260,10 +260,10 @@ void loadMapPreview(void);
#define MULTIOP_CHATBOXH 115
#define MULTIOP_CHATEDIT 10279
#define MULTIOP_CHATEDITX 4
#define MULTIOP_CHATEDITX 4
#define MULTIOP_CHATEDITY MULTIOP_CHATBOXH-14
#define MULTIOP_CHATEDITW MULTIOP_CHATBOXW-8
#define MULTIOP_CHATEDITH 9
#define MULTIOP_CHATEDITH 9
#define MULTIOP_COLCHOOSER_FORM 10280
#define MULTIOP_COLCHOOSER 10281
@ -275,7 +275,7 @@ void loadMapPreview(void);
#define MULTIOP_LIMIT 10292 // 2 for this (+label)
#define MULTIOP_GAMETYPE 10294
#define MULTIOP_GAMETYPE 10294
#define MULTIOP_POWER 10296
#define MULTIOP_ALLIANCES 10298
#define MULTIOP_BASETYPE 10300
@ -318,4 +318,4 @@ void loadMapPreview(void);
#define MULTIOP_OKH 24
#define MULTIOP_BUTW 35
#define MULTIOP_BUTH 24
#define MULTIOP_BUTH 24

View File

@ -58,16 +58,16 @@ extern BOOL multiRequestUp;
BOOL sendVersionCheck ();
BOOL recvVersionCheck (NETMSG *pMsg);
BOOL intDisplayMultiJoiningStatus (UBYTE joinCount);
VOID clearPlayer (UDWORD player,BOOL quietly,BOOL removeOil);// what to do when a arena player leaves.
void clearPlayer (UDWORD player,BOOL quietly,BOOL removeOil);// what to do when a arena player leaves.
BOOL MultiPlayerLeave (DPID dp); // remote player has left.
BOOL MultiPlayerJoin (DPID dp); // remote player has just joined.
VOID setupNewPlayer (DPID dpid,UDWORD player); // stuff to do when player joins.
void setupNewPlayer (DPID dpid,UDWORD player); // stuff to do when player joins.
//BOOL multiPlayerRequest (NETMSG *pMsg); // remote player has requested info
//BOOL UpdateClient (DPID dest, UDWORD playerToSend); // send information to a remote player
//BOOL ProcessDroidOrders (VOID); // ince setup, this player issues each droid order.
//BOOL SendFeatures (FEATURE *pFeature, DPID player);
//BOOL recvFeatures (NETMSG *pMsg);
VOID resetMultiVisibility(UDWORD player);
void resetMultiVisibility(UDWORD player);
// ////////////////////////////////////////////////////////////////////////////
// Version Check
@ -150,7 +150,7 @@ BOOL intDisplayMultiJoiningStatus(UBYTE joinCount)
// ////////////////////////////////////////////////////////////////////////////
// when a remote player leaves an arena game do this!
VOID clearPlayer(UDWORD player,BOOL quietly,BOOL removeOil)
void clearPlayer(UDWORD player,BOOL quietly,BOOL removeOil)
{
UDWORD i;
BOOL bTemp;
@ -216,7 +216,7 @@ VOID clearPlayer(UDWORD player,BOOL quietly,BOOL removeOil)
}
// Reset visibilty, so a new player can't see the old stuff!!
VOID resetMultiVisibility(UDWORD player)
void resetMultiVisibility(UDWORD player)
{
UDWORD owned;
DROID *pDroid;

View File

@ -12,16 +12,16 @@ extern BOOL recvVersionCheck (NETMSG *pMsg);
extern BOOL intDisplayMultiJoiningStatus(UBYTE joinCount);
extern BOOL MultiPlayerLeave (DPID dp); // A player has left the game.
extern BOOL MultiPlayerJoin (DPID dp); // A Player has joined the game.
extern VOID setupNewPlayer (DPID dpid,UDWORD player); // stuff to do when player joins.
extern void setupNewPlayer (DPID dpid,UDWORD player); // stuff to do when player joins.
//extern BOOL UpdateClient (DPID dest, UDWORD playerToSend);// send info about another player
extern VOID clearPlayer (UDWORD player,BOOL quietly,BOOL removeOil);// wipe a player off the face of the earth.
extern void clearPlayer (UDWORD player,BOOL quietly,BOOL removeOil);// wipe a player off the face of the earth.
//extern BOOL ProcessDroidOrders (VOID);
//extern BOOL recvFeatures (NETMSG *pMsg);
//extern UDWORD arenaPlayersReceived;
typedef struct {
DROID *psDroid;
VOID *psNext;
void *psNext;
}DROIDSTORE, *LPDROIDSTORE;
extern DROIDSTORE *tempDroidList;

View File

@ -62,12 +62,12 @@ extern void intDisplayPlainForm (struct _widget *psWidget, UDWORD xOffset,
#define BUTPERFORM 8
// ////////////////////////////////////////////////////////////////////////////
// protos.
BOOL startLimitScreen (VOID);
VOID runLimitScreen (VOID);
VOID applyLimitSet (VOID);
VOID createLimitSet (VOID);
BOOL startLimitScreen (void);
void runLimitScreen (void);
void applyLimitSet (void);
void createLimitSet (void);
VOID displayStructureBar(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
void displayStructureBar(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
// ////////////////////////////////////////////////////////////////////////////
@ -228,7 +228,7 @@ BOOL startLimitScreen(void)
if(useStruct(numButtons,i))
{
numButtons++;
sButInit.pUserData= (VOID*) i;
sButInit.pUserData= (void*) i;
widgAddForm(psWScreen, &sButInit);
sButInit.id ++;
@ -256,7 +256,7 @@ BOOL startLimitScreen(void)
// ////////////////////////////////////////////////////////////////////////////
VOID runLimitScreen(void)
void runLimitScreen(void)
{
UDWORD id,statid;
@ -319,10 +319,10 @@ VOID runLimitScreen(void)
}
// ////////////////////////////////////////////////////////////////////////////
VOID createLimitSet(VOID)
void createLimitSet(void)
{
UDWORD i,numchanges;
VOID *pChanges;
void *pChanges;
UBYTE *pEntry;
if(ingame.numStructureLimits) // free the old set if required.
@ -365,7 +365,7 @@ VOID createLimitSet(VOID)
}
// ////////////////////////////////////////////////////////////////////////////
VOID applyLimitSet(VOID)
void applyLimitSet(void)
{
UBYTE *pEntry;
UDWORD i;
@ -410,7 +410,7 @@ VOID applyLimitSet(VOID)
// ////////////////////////////////////////////////////////////////////////////
VOID displayStructureBar(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
void displayStructureBar(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours)
{
UDWORD x = xOffset+psWidget->x;
UDWORD y = yOffset+psWidget->y;

View File

@ -3,7 +3,7 @@
*/
extern BOOL startLimitScreen (VOID);
extern VOID runLimitScreen (VOID);
extern VOID applyLimitSet (VOID);
extern VOID createLimitSet (VOID);
extern BOOL startLimitScreen (void);
extern void runLimitScreen (void);
extern void applyLimitSet (void);
extern void createLimitSet (void);

View File

@ -318,7 +318,7 @@ unsigned int check_tip_index(unsigned int i) {
// ////////////////////////////////////////////////////////////////////////////
// FIXME: what is this, and why is there some code that only works in win32
// here? - Per
VOID addMultiRequest(STRING *ToFindb,UDWORD mode, UBYTE mapCam, UBYTE numPlayers)
void addMultiRequest(STRING *ToFindb,UDWORD mode, UBYTE mapCam, UBYTE numPlayers)
{
W_FORMINIT sFormInit;
W_BUTINIT sButInit;
@ -932,9 +932,9 @@ void displayAllianceState(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffs
break;
}
psWidget->pUserData = (VOID *)PACKDWORD_TRI(a,b,c);
psWidget->pUserData = (void *)PACKDWORD_TRI(a,b,c);
intDisplayImageHilight(psWidget, xOffset, yOffset, pColours);
psWidget->pUserData = (VOID *)player;
psWidget->pUserData = (void *)player;
}
@ -959,9 +959,9 @@ void displayChannelState(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffse
break;
}
psWidget->pUserData = (VOID *)PACKDWORD_TRI(a,b,c);
psWidget->pUserData = (void *)PACKDWORD_TRI(a,b,c);
intDisplayImageHilight(psWidget, xOffset, yOffset, pColours);
psWidget->pUserData = (VOID *)player;
psWidget->pUserData = (void *)player;
}
@ -985,7 +985,7 @@ void addMultiPlayer(UDWORD player,UDWORD pos)
sFormInit.width = MULTIMENU_FORM_W -4;
sFormInit.height = MULTIMENU_PLAYER_H;
sFormInit.pDisplay = displayMultiPlayer;
sFormInit.pUserData = (VOID *)player;
sFormInit.pUserData = (void *)player;
widgAddForm(psWScreen, &sFormInit);
//name,
@ -1008,7 +1008,7 @@ void addMultiPlayer(UDWORD player,UDWORD pos)
sButInit.id = MULTIMENU_CHANNEL + player;
sButInit.pTip = "channel";
sButInit.pDisplay = displayChannelState;
sButInit.pUserData = (VOID*)player;
sButInit.pUserData = (void*)player;
widgAddButton(psWScreen, &sButInit);
}
@ -1023,7 +1023,7 @@ void addMultiPlayer(UDWORD player,UDWORD pos)
sButInit.id = MULTIMENU_ALLIANCE_BASE + player;
sButInit.pTip = strresGetString(psStringRes,STR_ALLI_STATE);
sButInit.pDisplay = displayAllianceState;
sButInit.pUserData = (VOID*)player;
sButInit.pUserData = (void*)player;
widgAddButton(psWScreen, &sButInit);
@ -1066,7 +1066,7 @@ void addMultiPlayer(UDWORD player,UDWORD pos)
BOOL intAddMultiMenu(VOID)
BOOL intAddMultiMenu(void)
{
W_FORMINIT sFormInit;
W_BUTINIT sButInit;
@ -1147,7 +1147,7 @@ BOOL intAddMultiMenu(VOID)
}
// ////////////////////////////////////////////////////////////////////////////
VOID intCloseMultiMenuNoAnim(VOID)
void intCloseMultiMenuNoAnim(void)
{
widgDelete(psWScreen, MULTIMENU_CLOSE);
widgDelete(psWScreen, MULTIMENU_FORM);
@ -1157,7 +1157,7 @@ VOID intCloseMultiMenuNoAnim(VOID)
// ////////////////////////////////////////////////////////////////////////////
BOOL intCloseMultiMenu(VOID)
BOOL intCloseMultiMenu(void)
{
W_TABFORM *Form;
@ -1180,7 +1180,7 @@ BOOL intCloseMultiMenu(VOID)
// ////////////////////////////////////////////////////////////////////////////
// In Game Options house keeping stuff.
BOOL intRunMultiMenu(VOID)
BOOL intRunMultiMenu(void)
{
return TRUE;
}
@ -1240,7 +1240,7 @@ BOOL intCheckAllianceValid( UBYTE player1, UBYTE player2 )
// ////////////////////////////////////////////////////////////////////////////
// process clicks made by user.
VOID intProcessMultiMenu(UDWORD id)
void intProcessMultiMenu(UDWORD id)
{
UBYTE i;

View File

@ -3,23 +3,23 @@
*
* Definition for in game,multiplayer, interface.
*/
//
//
#ifndef __INCLUDED_MULTIMENU__
#define __INCLUDED_MULTIMENU__
// requester
extern VOID addMultiRequest(STRING *ToFind, UDWORD id,UBYTE mapCam, UBYTE numPlayers);
extern void addMultiRequest(STRING *ToFind, UDWORD id,UBYTE mapCam, UBYTE numPlayers);
extern BOOL multiRequestUp;
extern W_SCREEN *psRScreen; // requester stuff.
extern BOOL runMultiRequester(UDWORD id,UDWORD *contextmode, STRING *chosen,UDWORD *chosenValue);
extern void displayRequestOption(struct _widget *psWidget, UDWORD xOffset, UDWORD yOffset, UDWORD *pColours);
// multimenu
extern VOID intProcessMultiMenu (UDWORD id);
extern BOOL intRunMultiMenu (VOID);
extern BOOL intCloseMultiMenu (VOID);
extern VOID intCloseMultiMenuNoAnim (VOID);
extern BOOL intAddMultiMenu (VOID);
extern void intProcessMultiMenu (UDWORD id);
extern BOOL intRunMultiMenu (void);
extern BOOL intCloseMultiMenu (void);
extern void intCloseMultiMenuNoAnim (void);
extern BOOL intAddMultiMenu (void);
extern BOOL MultiMenuUp;
extern BOOL ClosingMultiMenu;

View File

@ -48,37 +48,37 @@ DEFINE_GUID(WARZONEGUID,0x48ab0b01,0xfec0,0x11d1,0x98,0xc,0x0,0xa0,0x24,0x38,0x7
extern char MultiForcesPath[255];
extern char buildTime[8];
extern VOID stopJoining(void);
extern void stopJoining(void);
// ////////////////////////////////////////////////////////////////////////////
// Local Functions
VOID sendOptions (DPID dest,UDWORD player);
VOID recvOptions (NETMSG *pMsg);
void sendOptions (DPID dest,UDWORD player);
void recvOptions (NETMSG *pMsg);
//static BOOL dMatchInit (VOID);
static BOOL campInit (VOID);
static BOOL campInit (void);
BOOL hostCampaign (STRING *sGame, STRING *sPlayer);
BOOL joinCampaign (UDWORD gameNumber, STRING *playername);
//BOOL hostArena (STRING *sGame, STRING *sPlayer);
//BOOL joinArena (UDWORD gameNumber, STRING *playername);
BOOL LobbyLaunched (VOID);
VOID playerResponding (VOID);
BOOL multiInitialise (VOID); //only once.
BOOL lobbyInitialise (VOID); //only once.
BOOL sendLeavingMsg (VOID);
BOOL multiShutdown (VOID);
BOOL LobbyLaunched (void);
void playerResponding (void);
BOOL multiInitialise (void); //only once.
BOOL lobbyInitialise (void); //only once.
BOOL sendLeavingMsg (void);
BOOL multiShutdown (void);
BOOL addTemplate (UDWORD player, DROID_TEMPLATE *psNew);
BOOL addTemplateSet (UDWORD from,UDWORD to);
BOOL copyTemplateSet (UDWORD from,UDWORD to);
BOOL multiGameInit (VOID); // every game
BOOL multiGameShutdown (VOID);
BOOL multiGameInit (void); // every game
BOOL multiGameShutdown (void);
// ////////////////////////////////////////////////////////////////////////////
// ////////////////////////////////////////////////////////////////////////////
// send complete game info set!
// dpid == 0 for no new players.
VOID sendOptions(DPID dest,UDWORD play)
void sendOptions(DPID dest,UDWORD play)
{
NETMSG m;
UBYTE checkval;
@ -447,7 +447,7 @@ BOOL joinArena(UDWORD gameNumber, STRING *playerName)
// ////////////////////////////////////////////////////////////////////////////
// Lobby launched. fires the correct routine when the game was lobby launched.
BOOL LobbyLaunched(VOID)
BOOL LobbyLaunched(void)
{
UDWORD i;
PLAYERSTATS pl={0};
@ -475,7 +475,7 @@ BOOL LobbyLaunched(VOID)
// ////////////////////////////////////////////////////////////////////////////
// Init and shutdown routines
BOOL lobbyInitialise(VOID)
BOOL lobbyInitialise(void)
{
if(!NETinit(TRUE)) // initialise, may change guid.
@ -502,7 +502,7 @@ BOOL lobbyInitialise(VOID)
return TRUE;
}
BOOL multiInitialise(VOID)
BOOL multiInitialise(void)
{
// NET AUDIO CAPTURE
NETinitAudioCapture();
@ -517,7 +517,7 @@ BOOL multiInitialise(VOID)
// ////////////////////////////////////////////////////////////////////////////
// say goodbye to everyone else
BOOL sendLeavingMsg(VOID)
BOOL sendLeavingMsg(void)
{
NETMSG m;
UBYTE bHost = (UBYTE)NetPlay.bHost;
@ -534,7 +534,7 @@ BOOL sendLeavingMsg(VOID)
// ////////////////////////////////////////////////////////////////////////////
// called in Init.c to shutdown the whole netgame gubbins.
BOOL multiShutdown(VOID)
BOOL multiShutdown(void)
{
FORCE_MEMBER *pF;
@ -1036,7 +1036,7 @@ static BOOL campInit()
// ////////////////////////////////////////////////////////////////////////////
// say hi to everyone else....
VOID playerResponding(VOID)
void playerResponding(void)
{
NETMSG msg;
UDWORD i;
@ -1062,7 +1062,7 @@ VOID playerResponding(VOID)
// ////////////////////////////////////////////////////////////////////////////
//called when the game finally gets fired up.
BOOL multiGameInit(VOID)
BOOL multiGameInit(void)
{
UDWORD player;
@ -1095,7 +1095,7 @@ BOOL multiGameInit(VOID)
////////////////////////////////
// at the end of every game.
BOOL multiGameShutdown(VOID)
BOOL multiGameShutdown(void)
{
PLAYERSTATS st;

View File

@ -95,7 +95,7 @@ extern PLAYER_RESEARCH* asPlayerResList[MAX_PLAYERS];
BOOL turnOffMultiMsg(BOOL bDoit);
BOOL multiPlayerLoop(VOID);
BOOL multiPlayerLoop(void);
BOOL IdToDroid (UDWORD id, UDWORD player, DROID **psDroid);
STRUCTURE *IdToStruct (UDWORD id,UDWORD player);
BASE_OBJECT *IdToPointer(UDWORD id,UDWORD player);
@ -109,8 +109,8 @@ BOOL myResponsibility (UDWORD player); // this pc has comms responsibility
BOOL responsibleFor (UDWORD player,UDWORD player2); // has player responsibility for player2
UDWORD whosResponsible (UDWORD player); // returns player responsible for 'player'
iVector cameraToHome (UDWORD player,BOOL scroll);
BOOL DirectPlaySystemMessageHandler(LPVOID msg); // interpret DP messages
BOOL recvMessage (VOID); // process an incoming message
BOOL DirectPlaySystemMessageHandler(void * msg); // interpret DP messages
BOOL recvMessage (void); // process an incoming message
BOOL SendResearch (UBYTE player,UDWORD index); // send/recv Research issues
BOOL recvResearch (NETMSG *pMsg);
BOOL sendTextMessage (char *pStr,BOOL bcast); // send/recv a text message
@ -235,7 +235,7 @@ BOOL multiplayerWinSequence(BOOL firstCall)
// ////////////////////////////////////////////////////////////////////////////
// ////////////////////////////////////////////////////////////////////////////
// MultiPlayer main game loop code.
BOOL multiPlayerLoop(VOID)
BOOL multiPlayerLoop(void)
{
UDWORD i;
UBYTE joinCount;
@ -646,7 +646,7 @@ iVector cameraToHome(UDWORD player,BOOL scroll)
// ////////////////////////////////////////////////////////////////////////////
// ////////////////////////////////////////////////////////////////////////////
// Required by the net library. It's the system message handler..
BOOL DirectPlaySystemMessageHandler(LPVOID mg)
BOOL DirectPlaySystemMessageHandler(void * mg)
{
return (TRUE);
@ -657,7 +657,7 @@ BOOL DirectPlaySystemMessageHandler(LPVOID mg)
// ////////////////////////////////////////////////////////////////////////////
// ////////////////////////////////////////////////////////////////////////////
// Recv Messages. Get a message and dispatch to relevant function.
BOOL recvMessage(VOID)
BOOL recvMessage(void)
{
NETMSG msg;
DPID dp;
@ -1921,7 +1921,7 @@ BOOL msgStackFireTop()
debug(LOG_SCRIPT, "msgStackFireTop: popped CALL_VIDEO_QUIT");
eventFireCallbackTrigger(CALL_VIDEO_QUIT);
break;
case CALL_BEACON:
if(!msgStackGetXY(&beaconX, &beaconY))
@ -1971,19 +1971,19 @@ BOOL msgStackFireTop()
BOOL recvBeacon(NETMSG *pMsg)
{
SDWORD sender, receiver,locX, locY;
STRING msg[MAX_CONSOLE_STRING_LENGTH];
NetGet(pMsg,0,sender);
NetGet(pMsg,4,receiver);
NetGet(pMsg,8,locX);
NetGet(pMsg,12,locY);
debug(LOG_WZ, "Received beacon for player: %d, from: %d",receiver, sender);
strcpy(msg, &(pMsg->body[16]));
strcat(msg, NetPlay.players[sender].name); // name
strcpy(beaconReceiveMsg[sender], msg);
return addHelpBlip(locX,locY,receiver,sender,beaconReceiveMsg[sender]);

View File

@ -5,7 +5,7 @@
*/
#include "group.h"
// Different Message Structures allowed to be sent between players.
// Different Message Structures allowed to be sent between players.
// Each message must have type = to one of these.
typedef enum _msgtype
{
@ -32,10 +32,10 @@ typedef enum _msgtype
// JOINING TYPES. these msgs are used when a player joins a game in progress.
NET_PLAYERCOMPLETE, //20 All Setup information about player x has been sent
NET_REQUESTPLAYER, //21 NOTUSED please send me info about a player
NET_REQUESTPLAYER, //21 NOTUSED please send me info about a player
NET_STRUCT, //22 a complete structure
NET_WHOLEDROID, //23 a complete droid
NET_FEATURES, //24 information regarding features.
NET_FEATURES, //24 information regarding features.
NET_PLAYERRESPONDING, //25 computer that sent this is now playing warzone!
// RECENT TYPES
@ -123,7 +123,7 @@ typedef struct {
// ////////////////////////////////////////////////////////////////////////////
// Game Options and stats.
// Game Options and stats.
extern MULTIPLAYERGAME game; // the game description.
extern MULTIPLAYERINGAME ingame; // the game description.
@ -140,13 +140,13 @@ extern UBYTE bDisplayMultiJoiningStatus; // draw load progress?
#define DEFAULTBYTESPERSEC 1000 // 1 Ks-1
#define DEFAULTPACKETS 5
#define MODEMBYTESPERSEC 1200
#define MODEMBYTESPERSEC 1200
#define MODEMPACKETS 8
#define INETBYTESPERSEC 1201
#define INETPACKETS 5
#define IPXBYTESPERSEC 2000
#define IPXBYTESPERSEC 2000
#define IPXPACKETS 10
#define CABLEBYTESPERSEC 1202
@ -198,10 +198,10 @@ extern UBYTE bDisplayMultiJoiningStatus; // draw load progress?
// macros For handling net messages, just copy things in & out of the msg buffer
/*
#define NetAdd(m,pos,thing) \
memcpy(&(m.body[pos]),&(thing),sizeof(thing))
memcpy(&(m.body[pos]),&(thing),sizeof(thing))
#define NetAdd2(m,pos,thing) \
memcpy( &((*m).body[pos]), &(thing), sizeof(thing))
memcpy( &((*m).body[pos]), &(thing), sizeof(thing))
#define NetAddSt(m,pos,stri) \
strcpy(&(m.body[pos]),stri)
@ -229,13 +229,13 @@ extern BOOL responsibleFor (UDWORD player, UDWORD playerinquestion);
extern UDWORD whosResponsible (UDWORD player);
extern iVector cameraToHome (UDWORD player,BOOL scroll);
extern BOOL multiPlayerLoop (VOID); // for loop.c
extern BOOL multiPlayerLoop (void); // for loop.c
extern BOOL recvMessage (VOID);
extern BOOL sendTemplate (DROID_TEMPLATE *t);
extern BOOL recvMessage (void);
extern BOOL sendTemplate (DROID_TEMPLATE *t);
extern BOOL SendDestroyTemplate (DROID_TEMPLATE *t);
extern BOOL SendResearch (UBYTE player,UDWORD index);
extern BOOL SendDestroyFeature (FEATURE *pF); // send a destruct feature message.
extern BOOL SendDestroyFeature (FEATURE *pF); // send a destruct feature message.
extern BOOL sendTextMessage (char *pStr,BOOL cast); // send a text message
extern BOOL sendAIMessage (char *pStr, SDWORD player, SDWORD to); //send AI message
@ -258,7 +258,7 @@ extern BOOL sendLasSat (UBYTE player,STRUCTURE *psStruct, BASE_OBJECT *psObj);
// droids . multibot
extern BOOL SendDroid (DROID_TEMPLATE *pTemplate, UDWORD x, UDWORD y, UBYTE player, UDWORD id);
extern BOOL SendDestroyDroid (DROID *d);
extern BOOL SendDemolishFinished(STRUCTURE *psS,DROID *psD);
extern BOOL SendDemolishFinished(STRUCTURE *psS,DROID *psD);
extern BOOL SendDroidInfo (DROID *psDroid, DROID_ORDER order, UDWORD x, UDWORD y, BASE_OBJECT *psObj);
extern BOOL SendDroidMove (DROID *psDroid, UDWORD x, UDWORD y,BOOL bFormation);
extern BOOL SendGroupOrderSelected (UBYTE player, UDWORD x, UDWORD y, BASE_OBJECT *psObj);
@ -278,32 +278,32 @@ extern BOOL sendHappyVtol (DROID *psDroid);
extern BOOL sendVtolRearm (DROID *psDroid,STRUCTURE *psStruct, UBYTE chosen);
// Startup. mulitopt
extern BOOL multiTemplateSetup (VOID);
extern BOOL multiInitialise (VOID); // for Init.c
extern BOOL lobbyInitialise (VOID); // for Init.c
extern BOOL multiShutdown (VOID);
extern BOOL sendLeavingMsg (VOID);
extern BOOL multiTemplateSetup (void);
extern BOOL multiInitialise (void); // for Init.c
extern BOOL lobbyInitialise (void); // for Init.c
extern BOOL multiShutdown (void);
extern BOOL sendLeavingMsg (void);
extern BOOL hostCampaign (STRING *sGame, STRING *sPlayer);
extern BOOL joinCampaign (UDWORD gameNumber, STRING *playername);
//extern BOOL hostArena (STRING *sGame, STRING *sPlayer);
//extern BOOL joinArena (UDWORD gameNumber, STRING *playername);
extern VOID playerResponding (VOID);
extern BOOL multiGameInit (VOID);
extern BOOL multiGameShutdown (VOID);
extern void playerResponding (void);
extern BOOL multiGameInit (void);
extern BOOL multiGameShutdown (void);
extern BOOL copyTemplateSet (UDWORD from,UDWORD to);
extern BOOL addTemplateSet (UDWORD from,UDWORD to);
extern BOOL addTemplate (UDWORD player,DROID_TEMPLATE *psNew);
// syncing.
extern BOOL sendCheck (VOID); //send/recv check info
extern BOOL sendScoreCheck (VOID); //score check only(frontend)
extern BOOL sendCheck (void); //send/recv check info
extern BOOL sendScoreCheck (void); //score check only(frontend)
extern BOOL sendPowerCheck (BOOL now);
extern BOOL sendPing (VOID); // allow game to request pings.
extern UDWORD averagePing (VOID);
extern BOOL sendPing (void); // allow game to request pings.
extern UDWORD averagePing (void);
// multijoin
extern VOID modifyResources (POWER_GEN_FUNCTION* psFunction);
extern void modifyResources (POWER_GEN_FUNCTION* psFunction);
extern BOOL sendReseachStatus (STRUCTURE *psBuilding ,UDWORD index, UBYTE player, BOOL bStart);

View File

@ -19,7 +19,7 @@ extern BOOL recvBuildStarted (NETMSG *pMsg);
extern BOOL recvBuildFinished (NETMSG *pMsg);
//extern BOOL receiveWholeStructure (NETMSG *pMsg);
extern BOOL recvTemplate (NETMSG *pMsg);
extern BOOL recvDestroyFeature (NETMSG *pMsg);
extern BOOL recvDestroyFeature (NETMSG *pMsg);
extern BOOL recvDemolishFinished (NETMSG *pMsg);
extern BOOL recvPing (NETMSG *pMsg);
extern BOOL recvRequestDroid (NETMSG *pMsg);
@ -39,7 +39,7 @@ extern BOOL recvColourRequest (NETMSG *pMsg);
extern BOOL sendWholeDroid (DROID *pD, DPID dest);
//extern BOOL sendWholeStructure (STRUCTURE *pS, DPID dest);
extern void recvOptions (NETMSG *pMsg);
extern VOID sendOptions (DPID dest,UDWORD play);
extern void sendOptions (DPID dest,UDWORD play);
extern BOOL recvScoreSubmission (NETMSG *pMsg);
extern BOOL recvDestroyExtra (NETMSG *pMsg);
extern BOOL recvAudioMsg (NETMSG *pMsg);

View File

@ -32,7 +32,7 @@ extern char MultiPlayersPath[255];
BOOL removeFromForce (UDWORD number); // remove a droid from force
BOOL addToForce (DROID_TEMPLATE *templ); // add a droid (templ) to force
VOID useTheForce (BOOL bAddTempl); // place the force in the game
void useTheForce (BOOL bAddTempl); // place the force in the game
BOOL saveForce (char *name,FORCE *pfForce);
BOOL loadForce (char *name);
@ -45,11 +45,11 @@ BOOL loadMultiStats (STRING *sPlayerName, PLAYERSTATS *plStats);
PLAYERSTATS getMultiStats (UDWORD player, BOOL bLocal);
BOOL setMultiStats (DWORD playerDPID, PLAYERSTATS plStats,BOOL bLocal);
VOID updateMultiStatsDamage (UDWORD attacker, UDWORD defender, UDWORD inflicted);
VOID updateMultiStatsGames (void);
VOID updateMultiStatsWins (void);
VOID updateMultiStatsLoses (void);
VOID updateMultiStatsKills (BASE_OBJECT *psKilled, UDWORD player);
void updateMultiStatsDamage (UDWORD attacker, UDWORD defender, UDWORD inflicted);
void updateMultiStatsGames (void);
void updateMultiStatsWins (void);
void updateMultiStatsLoses (void);
void updateMultiStatsKills (BASE_OBJECT *psKilled, UDWORD player);
// ////////////////////////////////////////////////////////////////////////////
@ -234,7 +234,7 @@ VOID chooseForceLoc(UDWORD *pX,UDWORD *pY)
// ////////////////////////////////////////////////////////////////////////////
// place the force on the map.
VOID useTheForce(BOOL bAddTempl)//Luke
void useTheForce(BOOL bAddTempl)//Luke
{
DROID *pDr;
DROID_TEMPLATE *pTempl;
@ -675,7 +675,7 @@ BOOL saveMultiStats(STRING *sFileName, STRING *sPlayerName,PLAYERSTATS *playerSt
// score update functions
// update players damage stats.
VOID updateMultiStatsDamage (UDWORD attacker, UDWORD defender, UDWORD inflicted)
void updateMultiStatsDamage (UDWORD attacker, UDWORD defender, UDWORD inflicted)
{
PLAYERSTATS st;
@ -718,7 +718,7 @@ VOID updateMultiStatsDamage (UDWORD attacker, UDWORD defender, UDWORD inflicted)
}
// update games played.
VOID updateMultiStatsGames(void)
void updateMultiStatsGames(void)
{
PLAYERSTATS st;
@ -728,7 +728,7 @@ VOID updateMultiStatsGames(void)
}
// games won
VOID updateMultiStatsWins(void)
void updateMultiStatsWins(void)
{
PLAYERSTATS st;
st = getMultiStats(selectedPlayer,TRUE);
@ -737,7 +737,7 @@ VOID updateMultiStatsWins(void)
}
//games lost.
VOID updateMultiStatsLoses(void)
void updateMultiStatsLoses(void)
{
PLAYERSTATS st;
st = getMultiStats(selectedPlayer,TRUE);
@ -746,7 +746,7 @@ VOID updateMultiStatsLoses(void)
}
// update kills
VOID updateMultiStatsKills(BASE_OBJECT *psKilled,UDWORD player)
void updateMultiStatsKills(BASE_OBJECT *psKilled,UDWORD player)
{
PLAYERSTATS st;

View File

@ -1,14 +1,14 @@
/*
* multistat.h
*
*
* Alex Lee
*
*
* Pumpkin Studios, Eidos PLC, Jan98.
* Definitions for multi player statistics and scores for league tables.
* Also Definitions for saved Arena Forces to enable teams to be saved to disk
*/
typedef struct{
typedef struct{
DWORD played; /// propogated stats.
DWORD wins;
DWORD loses;
@ -45,18 +45,18 @@ extern FORCE Force; // the selected force.
// Force defs.
extern BOOL removeFromForce (UDWORD number); // remove a droid from force
extern BOOL addToForce (DROID_TEMPLATE *templ); // add a droid (templ) to force
extern VOID useTheForce (BOOL bAddTempl); // place the force in the game
extern void useTheForce (BOOL bAddTempl); // place the force in the game
extern BOOL saveForce (char *name,FORCE *pfForce);
extern BOOL loadForce (char *name);
// stat defs
extern BOOL saveMultiStats (STRING *sFName, STRING *sPlayerName,PLAYERSTATS *playerStats); // to disk
extern BOOL saveMultiStats (STRING *sFName, STRING *sPlayerName,PLAYERSTATS *playerStats); // to disk
extern BOOL loadMultiStats (STRING *sPlayerName,PLAYERSTATS *playerStats); // form disk
extern PLAYERSTATS getMultiStats (UDWORD player,BOOL bLocal); // get from net
extern BOOL setMultiStats (DWORD playerDPID, PLAYERSTATS plStats,BOOL bLocal); // send to net.
extern VOID updateMultiStatsDamage (UDWORD attacker, UDWORD defender, UDWORD inflicted);
extern VOID updateMultiStatsGames (void);
extern VOID updateMultiStatsWins (void);
extern VOID updateMultiStatsLoses (void);
extern VOID updateMultiStatsKills (BASE_OBJECT *psKilled,UDWORD player);
extern void updateMultiStatsDamage (UDWORD attacker, UDWORD defender, UDWORD inflicted);
extern void updateMultiStatsGames (void);
extern void updateMultiStatsWins (void);
extern void updateMultiStatsLoses (void);
extern void updateMultiStatsKills (BASE_OBJECT *psKilled,UDWORD player);

View File

@ -31,20 +31,20 @@
#include "power.h" // for power checks
// ////////////////////////////////////////////////////////////////////////////
// function definitions
BOOL sendCheck (VOID); // send/recv check info
BOOL sendCheck (void); // send/recv check info
BOOL recvDroidCheck (NETMSG *pMsg);
BOOL recvStructureCheck (NETMSG *pMsg);
BOOL recvPowerCheck (NETMSG *pMsg);
BOOL recvPing (NETMSG *pMsg);
BOOL sendScoreCheck (VOID); //score
BOOL sendScoreCheck (void); //score
static BOOL sendStructureCheck (VOID); //Structure
static BOOL sendStructureCheck (void); //Structure
BOOL sendPowerCheck (BOOL now); //power
static void packageCheck (UDWORD i, NETMSG *pMsg, DROID *pD);
static BOOL sendDroidCheck (VOID); //droids
UDWORD averagePing (VOID);
BOOL sendPing (VOID); // send/recv Ping information
static BOOL sendDroidCheck (void); //droids
UDWORD averagePing (void);
BOOL sendPing (void); // send/recv Ping information
static void highLevelDroidUpdate(DROID *psDroid,
UDWORD x,
@ -102,7 +102,7 @@ static BOOL okToSend()
// ////////////////////////////////////////////////////////////////////////////
// Droid checking info. keep position and damage in sync.
BOOL sendCheck(VOID)
BOOL sendCheck(void)
{
UDWORD i;
@ -145,7 +145,7 @@ BOOL sendCheck(VOID)
// ////////////////////////////////////////////////////////////////////////////
// pick a droid to send, NULL otherwise.
static DROID* pickADroid(VOID)
static DROID* pickADroid(void)
{
DROID *pD=NULL; // current droid we're checking
UDWORD i;
@ -206,7 +206,7 @@ static DROID* pickADroid(VOID)
// ///////////////////////////////////////////////////////////////////////////
// send a droid info packet.
static BOOL sendDroidCheck(VOID)
static BOOL sendDroidCheck(void)
{
DROID *pD;
NETMSG msg;
@ -659,7 +659,7 @@ static STRUCTURE *pickAStructure(void)
// ////////////////////////////////////////////////////////////////////////
// Send structure information.
static BOOL sendStructureCheck(VOID)
static BOOL sendStructureCheck(void)
{
static UDWORD lastSent=0; // last time a struct was sent.
NETMSG m;
@ -947,7 +947,7 @@ BOOL recvPowerCheck(NETMSG *pMsg)
// ////////////////////////////////////////////////////////////////////////
// ////////////////////////////////////////////////////////////////////////
// Score
BOOL sendScoreCheck(VOID)
BOOL sendScoreCheck(void)
{
static UDWORD lastsent = 0;
UDWORD i;
@ -1055,7 +1055,7 @@ BOOL recvScoreSubmission(NETMSG *pMsg)
// ////////////////////////////////////////////////////////////////////////
// Pings
UDWORD averagePing(VOID)
UDWORD averagePing(void)
{
UDWORD i,count,total;
@ -1073,7 +1073,7 @@ UDWORD averagePing(VOID)
return total/count;
}
BOOL sendPing(VOID)
BOOL sendPing(void)
{
NETMSG ping;
UDWORD i;

View File

@ -40,7 +40,7 @@ extern void scrvGetErrorData(int *pLine, char **ppText);
/* A simple error reporting routine */
extern void scrv_error(char *pMessage,...);
extern void scrv_error(const char *pMessage,...);
// parse a value file

View File

@ -796,7 +796,7 @@ BOOL scrvLoad(char *pData, UDWORD size)
}
/* A simple error reporting routine */
void scrv_error(char *pMessage,...)
void scrv_error(const char *pMessage,...)
{
int line;
char *pText;

View File

@ -1886,7 +1886,7 @@ void setStructTileDraw(STRUCTURE *psStruct)
VOID buildFlatten(STRUCTURE_STATS *pStructureType, UDWORD atx, UDWORD aty,UDWORD h )
void buildFlatten(STRUCTURE_STATS *pStructureType, UDWORD atx, UDWORD aty,UDWORD h )
{
UDWORD x = atx >> TILE_SHIFT;
UDWORD y = aty >> TILE_SHIFT;