Various fixes to be able to compile (but not yet link) Warzone with g++

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6912 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2009-03-29 20:49:35 +00:00 committed by Git SVN Gateway
parent 1b4559cb98
commit 82a97e938e
5 changed files with 14 additions and 13 deletions

View File

@ -3,6 +3,12 @@
#include <physfs.h>
enum lexinput_type
{
LEXINPUT_PHYSFS,
LEXINPUT_BUFFER,
};
typedef struct
{
union
@ -14,12 +20,7 @@ typedef struct
const char* end;
} buffer;
} input;
enum
{
LEXINPUT_PHYSFS,
LEXINPUT_BUFFER,
} type;
enum lexinput_type type;
} lexerinput_t;
#ifdef YY_EXTRA_TYPE

View File

@ -67,7 +67,6 @@
#include "multiplay.h"
#include "environ.h"
#include "loop.h"
#include "levels.h"
#include "visibility.h"
#include "mapgrid.h"
#include "cluster.h"

View File

@ -26,6 +26,7 @@
#include "map.h"
#include "power.h"
#include "levels.h"
#include "missiondef.h"
#include "group.h"
@ -57,7 +58,7 @@ extern void releaseMission(void);
/** On the PC - sets the countdown played flag. */
extern void setMissionCountDown(void);
extern BOOL startMission(UDWORD missionType, char *pGame);
extern BOOL startMission(LEVEL_TYPE missionType, char *pGame);
extern void endMission(void);
/** Initialise the mission stuff for a save game. */

View File

@ -11506,7 +11506,7 @@ BOOL scrAssembleWeaponTemplate(void)
}
// return template to scripts
if (!stackPushResult(ST_TEMPLATE, &scrFunctionResult))
if (!stackPushResult((INTERP_TYPE)ST_TEMPLATE, &scrFunctionResult))
{
return false;
}
@ -11736,7 +11736,7 @@ BOOL scrGettext()
scrFunctionResult.v.sval = (char*)gettext(strParam1);
return stackPushResult(ST_TEXTSTRING, &scrFunctionResult);
return stackPushResult((INTERP_TYPE)ST_TEXTSTRING, &scrFunctionResult);
}
BOOL scrGettext_noop()
@ -11788,7 +11788,7 @@ BOOL scrPgettext()
scrFunctionResult.v.sval = translation;
}
return stackPushResult(ST_TEXTSTRING, &scrFunctionResult);
return stackPushResult((INTERP_TYPE)ST_TEXTSTRING, &scrFunctionResult);
}
BOOL scrPgettext_expr()
@ -11800,7 +11800,7 @@ BOOL scrPgettext_expr()
scrFunctionResult.v.sval = (char*)pgettext_expr(strParam1, strParam2);
return stackPushResult(ST_TEXTSTRING, &scrFunctionResult);
return stackPushResult((INTERP_TYPE)ST_TEXTSTRING, &scrFunctionResult);
}
BOOL scrPgettext_noop()

View File

@ -1427,7 +1427,7 @@ FUNC_SYMBOL asFuncTable[] =
3, { VAL_INT, VAL_INT, VAL_INT },
0, 0, NULL, 0, 0, NULL, NULL },
{ "assembleWeaponTemplate", scrAssembleWeaponTemplate, ST_TEMPLATE,
{ "assembleWeaponTemplate", scrAssembleWeaponTemplate, (INTERP_TYPE)ST_TEMPLATE,
4, { VAL_INT, (INTERP_TYPE)ST_BODY, (INTERP_TYPE)ST_PROPULSION, (INTERP_TYPE)ST_WEAPON },
0, 0, NULL, 0, 0, NULL, NULL },