- Fix more compiler warnings.
- For that, removed lots of unused code, mainly from the lex/yacc generated files. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@204 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
6fdc00e9c3
commit
6170f498a7
|
@ -9,3 +9,4 @@ 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 char UnixRegFilePath[255];
|
||||
|
|
|
@ -10,17 +10,14 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning (disable : 4201 4214 4115 4514)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include <windows.h>
|
||||
#pragma warning (default : 4201 4214 4115)
|
||||
#endif
|
||||
|
||||
#include "frame.h"
|
||||
#include "frameint.h"
|
||||
|
||||
|
||||
#define DEBUG_STR_MAX 1000 // Maximum length of a debugging output string
|
||||
|
||||
static FILE *pDebugFile = NULL;
|
||||
|
@ -38,7 +35,6 @@ void dbg_SetMessageBoxCallback(DB_MBCALLBACK callback)
|
|||
mbCallback = callback;
|
||||
}
|
||||
|
||||
|
||||
// set the error box callback
|
||||
void dbg_SetErrorBoxCallback(DB_MBCALLBACK callback)
|
||||
{
|
||||
|
|
|
@ -12,13 +12,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#ifndef __GNUC__
|
||||
#pragma warning (disable : 4201 4214 4115 4514)
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifndef __GNUC__
|
||||
#pragma warning (default : 4201 4214 4115)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Linux specific stuff */
|
||||
|
@ -37,13 +31,11 @@ FILE* unix_fopen(char* filename, char* mode);
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
#define InitializeCriticalSection(x)
|
||||
#define DeleteCriticalSection(x)
|
||||
#define EnterCriticalSection(x)
|
||||
#define LeaveCriticalSection(x)
|
||||
|
||||
|
||||
#include "types.h"
|
||||
#include "debug.h"
|
||||
#include "mem.h"
|
||||
|
|
|
@ -5,13 +5,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#pragma warning (disable : 4201 4214 4115 4514)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include <windows.h>
|
||||
#include <ddraw.h>
|
||||
#pragma warning (default : 4201 4214 4115)
|
||||
|
||||
/* Allow frame header files to be singly included */
|
||||
#define FRAME_LIB_INCLUDE
|
||||
|
@ -24,7 +21,6 @@
|
|||
// Define this if you want to generate pictures (for tools ?)
|
||||
#define WRITEIMAGES
|
||||
|
||||
|
||||
/* The byte value after which the byte represents a run length in a PCX file */
|
||||
#define RLE_START 192
|
||||
|
||||
|
@ -50,8 +46,6 @@ typedef struct _pcxheader {
|
|||
UBYTE aPadding[58];
|
||||
} PCXHEADER;
|
||||
|
||||
|
||||
|
||||
/* Take a memory buffer that contains a PCX file and convert it
|
||||
* to an image buffer and a palette buffer.
|
||||
* If the returned palette pointer is NULL a true colour PCX has
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -17,9 +15,6 @@
|
|||
#include "mono.h"
|
||||
#include "types.h"
|
||||
|
||||
/* Turn off some warnings as I can't be bothered sorting it out properly */
|
||||
//#pragma warning (disable : 4244 4057)
|
||||
|
||||
#define MONO_SCREEN_ADDR 0xB0000
|
||||
|
||||
#define SLASH_T 0x09 /* tab */
|
||||
|
@ -29,7 +24,6 @@ static void DBug_DumpString(SDWORD, SDWORD, UBYTE *, UBYTE);
|
|||
static UBYTE DBug_ExpandString(UBYTE *, UBYTE *, UBYTE, va_list, UBYTE);
|
||||
static UBYTE DBug_CheckFormatChar(UBYTE);
|
||||
|
||||
|
||||
/*
|
||||
* NAME
|
||||
* Debug_MONO_ClearRectangle -- clear a rectangular area
|
||||
|
|
|
@ -236,17 +236,13 @@ extern int yt_getc YY_ARGS((void));
|
|||
#define YY_INTERACTIVE 1 /* save micro-seconds if 0 */
|
||||
|
||||
#define BEGIN res__start =
|
||||
#define REJECT goto res__reject
|
||||
#define NLSTATE (res__lastc = YYNEWLINE)
|
||||
#define YY_INIT \
|
||||
(res__start = res_leng = res__end = 0, res__lastc = YYNEWLINE)
|
||||
#define res_more() goto res__more
|
||||
#define res_less(n) if ((n) < 0 || (n) > res__end) ; \
|
||||
else { YY_SCANNER; res_leng = (n); YY_USER; }
|
||||
|
||||
YY_DECL void res__reset YY_ARGS((void));
|
||||
YY_DECL int input YY_ARGS((void));
|
||||
YY_DECL int unput YY_ARGS((int c));
|
||||
|
||||
/* functions defined in libl.lib */
|
||||
extern int res_wrap YY_ARGS((void));
|
||||
|
@ -275,9 +271,6 @@ extern int res_mapch YY_ARGS((int delim, int escape));
|
|||
/* Get the Yacc definitions */
|
||||
#include "resource_y.h"
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
/* Maximum length for any TEXT value */
|
||||
#define YYLMAX 255
|
||||
|
||||
|
@ -305,8 +298,6 @@ static UBYTE *pEndBuffer = NULL;
|
|||
*/
|
||||
YY_DECL char res_text[YYLMAX+1];
|
||||
|
||||
|
||||
|
||||
#ifdef YY_DEBUG
|
||||
#undef YY_DEBUG
|
||||
#define YY_DEBUG(fmt, a1, a2) fprintf(stderr, fmt, a1, a2)
|
||||
|
@ -551,7 +542,6 @@ YYDECL {
|
|||
memmove(res_text, res_text+res_leng, (size_t) res__end);
|
||||
i = 0;
|
||||
|
||||
res__contin:
|
||||
res_oldi = i;
|
||||
|
||||
/* run the state machine until it jams */
|
||||
|
@ -598,12 +588,11 @@ YYDECL {
|
|||
res_st = res__next[res_base];
|
||||
res__jammed: ;
|
||||
res__sbuf[++i] = (res__state_t) res_st;
|
||||
} while (!(res_st == res__endst || YY_INTERACTIVE && res__base[res_st] > res__nxtmax && res__default[res_st] == res__endst));
|
||||
} while (!(res_st == res__endst || (YY_INTERACTIVE && res__base[res_st] > res__nxtmax && res__default[res_st] == res__endst)));
|
||||
YY_DEBUG(m_textmsg(1550, "<stopped %d, i = %d>\n", "I num1 num2"), res_st, i);
|
||||
if (res_st != res__endst)
|
||||
++i;
|
||||
|
||||
res__search:
|
||||
/* search backward for a final state */
|
||||
while (--i > res_oldi) {
|
||||
res_st = res__sbuf[i];
|
||||
|
@ -707,27 +696,12 @@ YYDECL {
|
|||
return res_text[0];
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
YY_SCANNER;
|
||||
i = res_leng;
|
||||
goto res__again; /* action fell though */
|
||||
|
||||
res__reject:
|
||||
YY_SCANNER;
|
||||
i = res_oleng; /* restore original res_text */
|
||||
if (++res_fmin < res_fmax)
|
||||
goto res__found; /* another final state, same length */
|
||||
else
|
||||
goto res__search; /* try shorter res_text */
|
||||
|
||||
res__more:
|
||||
YY_SCANNER;
|
||||
i = res_leng;
|
||||
if (i > 0)
|
||||
res__lastc = res_text[i-1];
|
||||
goto res__contin;
|
||||
}
|
||||
|
||||
/*
|
||||
* Safely switch input stream underneath LEX
|
||||
*/
|
||||
|
@ -795,62 +769,6 @@ res__reset()
|
|||
YY_INIT;
|
||||
res_lineno = 1; /* line number */
|
||||
}
|
||||
/* get input char with pushback */
|
||||
YY_DECL int
|
||||
input()
|
||||
{
|
||||
int c;
|
||||
#ifndef YY_PRESERVE
|
||||
if (res__end > res_leng) {
|
||||
res__end--;
|
||||
memmove(res_text+res_leng, res_text+res_leng+1,
|
||||
(size_t) (res__end-res_leng));
|
||||
c = res__save;
|
||||
YY_USER;
|
||||
#else
|
||||
if (res__push < res__save+YYLMAX) {
|
||||
c = *res__push++;
|
||||
#endif
|
||||
} else
|
||||
c = res_getc();
|
||||
res__lastc = c;
|
||||
if (c == YYNEWLINE)
|
||||
res_lineno++;
|
||||
if (c == EOF) /* res_getc() can set c=EOF vsc4 wants c==EOF to return 0 */
|
||||
return 0;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
|
||||
/*f
|
||||
* pushback char
|
||||
*/
|
||||
YY_DECL int
|
||||
unput(int c)
|
||||
{
|
||||
#ifndef YY_PRESERVE
|
||||
if (res__end >= YYLMAX) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
if (res__end > res_leng) {
|
||||
res_text[res_leng] = res__save;
|
||||
memmove(res_text+res_leng+1, res_text+res_leng,
|
||||
(size_t) (res__end-res_leng));
|
||||
res_text[res_leng] = 0;
|
||||
}
|
||||
res__end++;
|
||||
res__save = (char) c;
|
||||
#else
|
||||
if (res__push <= res__save) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
*--res__push = c;
|
||||
#endif
|
||||
if (c == YYNEWLINE)
|
||||
res_lineno--;
|
||||
} /* endif */
|
||||
return c;
|
||||
}
|
||||
|
||||
/* Set the current input buffer for the lexer */
|
||||
void resSetInputBuffer(UBYTE *pBuffer, UDWORD size)
|
||||
|
|
|
@ -33,9 +33,6 @@ static int fprintf(FILE* f,char* c,...)
|
|||
/* Get the Yacc definitions */
|
||||
#include "resource_y.h"
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
/* Store for any string values */
|
||||
STRING aText[TEXT_BUFFERS][YYLMAX]; // No longer static ... lets use this area globally
|
||||
static UDWORD currText=0;
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
#include "resly.h"
|
||||
#include "frameresource.h"
|
||||
|
||||
/* Turn off a couple of warnings that the yacc generated code gives */
|
||||
#pragma warning ( disable : 4305 4102)
|
||||
|
||||
/*
|
||||
* A simple error reporting routine
|
||||
*/
|
||||
|
|
|
@ -79,9 +79,6 @@ static int printf(char* c, ...)
|
|||
#include "resly.h"
|
||||
#include "frameresource.h"
|
||||
|
||||
/* Turn off a couple of warnings that the yacc generated code gives */
|
||||
#pragma warning ( disable : 4305 4102)
|
||||
|
||||
typedef union {
|
||||
STRING *sval;
|
||||
} YYSTYPE;
|
||||
|
@ -296,7 +293,6 @@ int yysinc = -1; /* stack size increment, <0 = double, 0 = none, >0 = fixed */
|
|||
int yyssize = YYSSIZE;
|
||||
#endif
|
||||
|
||||
#define YYERROR goto yyerrlabel
|
||||
#define yyerrok yyerrflag = 0
|
||||
#if YYDEBUG
|
||||
#define yyclearin { if (res_debug) yyShowRead(-1); res_char = -1; }
|
||||
|
@ -385,10 +381,6 @@ void res_error(char *pMessage,...)
|
|||
pMessage, line, res_char, pText));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef YACC_WINDOWS
|
||||
|
||||
/*
|
||||
|
@ -499,7 +491,7 @@ static int win_yyparse()
|
|||
* standard way.
|
||||
*/
|
||||
|
||||
res_parse()
|
||||
int res_parse()
|
||||
|
||||
#endif /* YACC_WINDOWS */
|
||||
|
||||
|
@ -803,10 +795,6 @@ case YYr6: { /* file_line : FILETOKEN TEXT QTEXT */
|
|||
#endif
|
||||
goto yyStack;
|
||||
|
||||
yyerrlabel: ; /* come here from YYERROR */
|
||||
/*
|
||||
#pragma used yyerrlabel
|
||||
*/
|
||||
yyerrflag = 1;
|
||||
if (yyi == YYrERROR) {
|
||||
yyps--;
|
||||
|
|
|
@ -305,8 +305,6 @@ extern int yt_getc YY_ARGS((void));
|
|||
else { YY_SCANNER; strres_leng = (n); YY_USER; }
|
||||
|
||||
YY_DECL void strres__reset YY_ARGS((void));
|
||||
YY_DECL int input YY_ARGS((void));
|
||||
YY_DECL int unput YY_ARGS((int c));
|
||||
|
||||
/* functions defined in libl.lib */
|
||||
extern int strres_wrap YY_ARGS((void));
|
||||
|
@ -320,10 +318,8 @@ extern int strres_mapch YY_ARGS((int delim, int escape));
|
|||
* Lex file for parsing string resource files
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
/* Allow frame header files to be singly included */
|
||||
#define FRAME_LIB_INCLUDE
|
||||
|
||||
|
@ -339,9 +335,6 @@ extern int strres_mapch YY_ARGS((int delim, int escape));
|
|||
/* Get the Yacc definitions */
|
||||
#include "strres_y.h"
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
/* Maximum length for any TEXT value */
|
||||
#define YYLMAX 255
|
||||
|
||||
|
@ -369,8 +362,6 @@ static UBYTE *pEndBuffer = NULL;
|
|||
*/
|
||||
YY_DECL char strres_text[YYLMAX+1];
|
||||
|
||||
|
||||
|
||||
#ifdef YY_DEBUG
|
||||
#undef YY_DEBUG
|
||||
#define YY_DEBUG(fmt, a1, a2) fprintf(stderr, fmt, a1, a2)
|
||||
|
@ -614,7 +605,6 @@ YYDECL {
|
|||
memmove(strres_text, strres_text+strres_leng, (size_t) strres__end);
|
||||
i = 0;
|
||||
|
||||
strres__contin:
|
||||
strres_oldi = i;
|
||||
|
||||
/* run the state machine until it jams */
|
||||
|
@ -661,12 +651,11 @@ YYDECL {
|
|||
strres_st = strres__next[strres_base];
|
||||
strres__jammed: ;
|
||||
strres__sbuf[++i] = (strres__state_t) strres_st;
|
||||
} while (!(strres_st == strres__endst || YY_INTERACTIVE && strres__base[strres_st] > strres__nxtmax && strres__default[strres_st] == strres__endst));
|
||||
} while (!(strres_st == strres__endst || (YY_INTERACTIVE && strres__base[strres_st] > strres__nxtmax && strres__default[strres_st] == strres__endst)));
|
||||
YY_DEBUG(m_textmsg(1550, "<stopped %d, i = %d>\n", "I num1 num2"), strres_st, i);
|
||||
if (strres_st != strres__endst)
|
||||
++i;
|
||||
|
||||
strres__search:
|
||||
/* search backward for a final state */
|
||||
while (--i > strres_oldi) {
|
||||
strres_st = strres__sbuf[i];
|
||||
|
@ -758,22 +747,8 @@ YYDECL {
|
|||
YY_SCANNER;
|
||||
i = strres_leng;
|
||||
goto strres__again; /* action fell though */
|
||||
|
||||
strres__reject:
|
||||
YY_SCANNER;
|
||||
i = strres_oleng; /* restore original strres_text */
|
||||
if (++strres_fmin < strres_fmax)
|
||||
goto strres__found; /* another final state, same length */
|
||||
else
|
||||
goto strres__search; /* try shorter strres_text */
|
||||
|
||||
strres__more:
|
||||
YY_SCANNER;
|
||||
i = strres_leng;
|
||||
if (i > 0)
|
||||
strres__lastc = strres_text[i-1];
|
||||
goto strres__contin;
|
||||
}
|
||||
|
||||
/*
|
||||
* Safely switch input stream underneath LEX
|
||||
*/
|
||||
|
@ -841,62 +816,6 @@ strres__reset()
|
|||
YY_INIT;
|
||||
strres_lineno = 1; /* line number */
|
||||
}
|
||||
/* get input char with pushback */
|
||||
YY_DECL int
|
||||
input()
|
||||
{
|
||||
int c;
|
||||
#ifndef YY_PRESERVE
|
||||
if (strres__end > strres_leng) {
|
||||
strres__end--;
|
||||
memmove(strres_text+strres_leng, strres_text+strres_leng+1,
|
||||
(size_t) (strres__end-strres_leng));
|
||||
c = strres__save;
|
||||
YY_USER;
|
||||
#else
|
||||
if (strres__push < strres__save+YYLMAX) {
|
||||
c = *strres__push++;
|
||||
#endif
|
||||
} else
|
||||
c = strres_getc();
|
||||
strres__lastc = c;
|
||||
if (c == YYNEWLINE)
|
||||
strres_lineno++;
|
||||
if (c == EOF) /* strres_getc() can set c=EOF vsc4 wants c==EOF to return 0 */
|
||||
return 0;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
|
||||
/*f
|
||||
* pushback char
|
||||
*/
|
||||
YY_DECL int
|
||||
unput(int c)
|
||||
{
|
||||
#ifndef YY_PRESERVE
|
||||
if (strres__end >= YYLMAX) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
if (strres__end > strres_leng) {
|
||||
strres_text[strres_leng] = strres__save;
|
||||
memmove(strres_text+strres_leng+1, strres_text+strres_leng,
|
||||
(size_t) (strres__end-strres_leng));
|
||||
strres_text[strres_leng] = 0;
|
||||
}
|
||||
strres__end++;
|
||||
strres__save = (char) c;
|
||||
#else
|
||||
if (strres__push <= strres__save) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
*--strres__push = c;
|
||||
#endif
|
||||
if (c == YYNEWLINE)
|
||||
strres_lineno--;
|
||||
} /* endif */
|
||||
return c;
|
||||
}
|
||||
|
||||
/* Set the current input buffer for the lexer */
|
||||
void strresSetInputBuffer(UBYTE *pBuffer, UDWORD size)
|
||||
|
|
|
@ -37,9 +37,6 @@ static int fprintf(FILE* f,char* c,...)
|
|||
/* Get the Yacc definitions */
|
||||
#include "strres_y.h"
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
/* Maximum length for any TEXT value */
|
||||
#define YYLMAX 255
|
||||
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
#include "strres.h"
|
||||
#include "strresly.h"
|
||||
|
||||
/* Turn off a couple of warnings that the yacc generated code gives */
|
||||
#pragma warning ( disable : 4305 4102)
|
||||
|
||||
/*
|
||||
* A simple error reporting routine
|
||||
*/
|
||||
|
@ -61,6 +58,3 @@ line: TEXT QTEXT
|
|||
|
||||
%%
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -48,25 +48,12 @@ typedef struct yyTypedRules_tag { /* Typed rule table */
|
|||
|
||||
#endif
|
||||
|
||||
#line 1 "StrRes.y"
|
||||
|
||||
/*
|
||||
* StrRes.y
|
||||
*
|
||||
* Yacc file for parsing String Resource files
|
||||
*/
|
||||
|
||||
#ifdef PSX
|
||||
/* A few definitions so the yacc generated code will compile on the PSX.
|
||||
* These shouldn't actually be used by any code that is run on the PSX, it
|
||||
* just keeps the compiler happy.
|
||||
*/
|
||||
static int printf(char* c, ...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Allow frame header files to be singly included */
|
||||
#define FRAME_LIB_INCLUDE
|
||||
|
||||
|
@ -78,9 +65,6 @@ static int printf(char* c, ...)
|
|||
#include "strres.h"
|
||||
#include "strresly.h"
|
||||
|
||||
/* Turn off a couple of warnings that the yacc generated code gives */
|
||||
#pragma warning ( disable : 4305 4102)
|
||||
|
||||
typedef union {
|
||||
STRING *sval;
|
||||
} YYSTYPE;
|
||||
|
@ -183,8 +167,6 @@ typedef struct yyTraceItems_tag {
|
|||
} yyTraceItems;
|
||||
#endif
|
||||
|
||||
#line 2 "d:/usr/mks-ly/etc/yyparse.c"
|
||||
|
||||
/*
|
||||
* Copyright 1985, 1990 by Mortice Kern Systems Inc. All rights reserved.
|
||||
*
|
||||
|
@ -287,7 +269,6 @@ int yysinc = -1; /* stack size increment, <0 = double, 0 = none, >0 = fixed */
|
|||
int yyssize = YYSSIZE;
|
||||
#endif
|
||||
|
||||
#define YYERROR goto yyerrlabel
|
||||
#define yyerrok yyerrflag = 0
|
||||
#if YYDEBUG
|
||||
#define yyclearin { if (strres_debug) yyShowRead(-1); strres_char = -1; }
|
||||
|
@ -362,7 +343,6 @@ static char * yygetState YY_ARGS((int));
|
|||
#define yyassert(condition, msg, arg)
|
||||
#endif
|
||||
|
||||
#line 62 "StrRes.y"
|
||||
/*
|
||||
* A simple error reporting routine
|
||||
*/
|
||||
|
@ -377,10 +357,6 @@ void strres_error(char *pMessage,...)
|
|||
pMessage, line, strres_char, pText));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef YACC_WINDOWS
|
||||
|
||||
/*
|
||||
|
@ -491,7 +467,7 @@ static int win_yyparse()
|
|||
* standard way.
|
||||
*/
|
||||
|
||||
strres_parse()
|
||||
int strres_parse()
|
||||
|
||||
#endif /* YACC_WINDOWS */
|
||||
|
||||
|
@ -543,7 +519,6 @@ strres_parse()
|
|||
char *envp;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef YYDYNAMIC
|
||||
if ((envp = getenv("YYSTACKSIZE")) != (char *)0) {
|
||||
yyssize = atoi(envp);
|
||||
|
@ -734,7 +709,6 @@ yyEncore:
|
|||
switch (yyi) { /* perform semantic action */
|
||||
|
||||
case YYr3: { /* line : TEXT QTEXT */
|
||||
#line 50 "StrRes.y"
|
||||
|
||||
|
||||
if (!strresStoreString(psCurrRes, yypvt[-1].sval, yypvt[0].sval))
|
||||
|
@ -743,7 +717,6 @@ case YYr3: { /* line : TEXT QTEXT */
|
|||
}
|
||||
|
||||
} break;
|
||||
#line 314 "d:/usr/mks-ly/etc/yyparse.c"
|
||||
case YYrACCEPT:
|
||||
YYACCEPT;
|
||||
case YYrERROR:
|
||||
|
@ -767,7 +740,6 @@ case YYr3: { /* line : TEXT QTEXT */
|
|||
#endif
|
||||
goto yyStack;
|
||||
|
||||
yyerrlabel: ; /* come here from YYERROR */
|
||||
/*
|
||||
#pragma used yyerrlabel
|
||||
*/
|
||||
|
|
|
@ -135,8 +135,6 @@ static int audp__base[] = {
|
|||
589, 589, 578, 589, 589, 589
|
||||
};
|
||||
|
||||
|
||||
//#line 1 "d:\mks-ly/etc/yylex.c"
|
||||
/*
|
||||
* Copyright 1988, 1992 by Mortice Kern Systems Inc. All rights reserved.
|
||||
* All rights reserved.
|
||||
|
@ -254,8 +252,6 @@ extern int yt_getc YY_ARGS((void));
|
|||
else { YY_SCANNER; audp_leng = (n); YY_USER; }
|
||||
|
||||
YY_DECL void audp__reset YY_ARGS((void));
|
||||
YY_DECL int input YY_ARGS((void));
|
||||
YY_DECL int unput YY_ARGS((int c));
|
||||
|
||||
/* functions defined in libl.lib */
|
||||
extern int audp_wrap YY_ARGS((void));
|
||||
|
@ -263,16 +259,8 @@ extern void audp_error YY_ARGS((char *fmt, ...));
|
|||
extern void audp_comment YY_ARGS((char *term));
|
||||
extern int audp_mapch YY_ARGS((int delim, int escape));
|
||||
|
||||
//#line 1 ".\parser.l"
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4129 4305 )
|
||||
|
||||
/* include framework */
|
||||
#include "frame.h"
|
||||
|
||||
|
@ -295,14 +283,9 @@ static FILE *g_fpOld;
|
|||
static UBYTE *pInputBuffer = NULL;
|
||||
static UBYTE *pEndBuffer = NULL;
|
||||
|
||||
static int audp_GetChar( void );
|
||||
|
||||
#undef audp_getc
|
||||
#define audp_getc() ( pInputBuffer != pEndBuffer ? *(pInputBuffer++) : EOF )
|
||||
|
||||
//#line 127 "d:\mks-ly/etc/yylex.c"
|
||||
|
||||
|
||||
#ifndef YYLMAX
|
||||
#define YYLMAX 100 /* token and pushback buffer size */
|
||||
#endif /* YYLMAX */
|
||||
|
@ -313,8 +296,6 @@ static int audp_GetChar( void );
|
|||
*/
|
||||
YY_DECL char audp_text[YYLMAX+1];
|
||||
|
||||
|
||||
|
||||
#ifdef YY_DEBUG
|
||||
#undef YY_DEBUG
|
||||
#define YY_DEBUG(fmt, a1, a2) fprintf(stderr, fmt, a1, a2)
|
||||
|
@ -403,7 +384,6 @@ static char *audp__push = audp__save+YYLMAX;
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LEX_WINDOWS
|
||||
|
||||
/*
|
||||
|
@ -528,10 +508,6 @@ YYDECL {
|
|||
int audp_oldi, audp_oleng; /* base i, audp_leng before look-ahead */
|
||||
int audp_eof; /* 1 if eof has already been read */
|
||||
|
||||
//#line 350 "d:\mks-ly/etc/yylex.c"
|
||||
|
||||
|
||||
|
||||
#if !YY_STATIC_STDIO
|
||||
if (audp_in == (FILE *)0)
|
||||
audp_in = stdin;
|
||||
|
@ -562,7 +538,6 @@ YYDECL {
|
|||
memmove(audp_text, audp_text+audp_leng, (size_t) audp__end);
|
||||
i = 0;
|
||||
|
||||
audp__contin:
|
||||
audp_oldi = i;
|
||||
|
||||
/* run the state machine until it jams */
|
||||
|
@ -609,12 +584,11 @@ YYDECL {
|
|||
audp_st = audp__next[audp_base];
|
||||
audp__jammed: ;
|
||||
audp__sbuf[++i] = (audp__state_t) audp_st;
|
||||
} while (!(audp_st == audp__endst || YY_INTERACTIVE && audp__base[audp_st] > audp__nxtmax && audp__default[audp_st] == audp__endst));
|
||||
} while (!(audp_st == audp__endst || (YY_INTERACTIVE && audp__base[audp_st] > audp__nxtmax && audp__default[audp_st] == audp__endst)));
|
||||
YY_DEBUG(m_textmsg(1550, "<stopped %d, i = %d>\n", "I num1 num2"), audp_st, i);
|
||||
if (audp_st != audp__endst)
|
||||
++i;
|
||||
|
||||
audp__search:
|
||||
/* search backward for a final state */
|
||||
while (--i > audp_oldi) {
|
||||
audp_st = audp__sbuf[i];
|
||||
|
@ -652,49 +626,38 @@ YYDECL {
|
|||
YY_USER;
|
||||
switch (audp__la_act[audp_fmin] & 0777) {
|
||||
case 0:
|
||||
//#line 60 ".\parser.l"
|
||||
{ return ONESHOT; }
|
||||
break;
|
||||
case 1:
|
||||
//#line 61 ".\parser.l"
|
||||
{ return LOOP; }
|
||||
break;
|
||||
case 2:
|
||||
//#line 62 ".\parser.l"
|
||||
{ return AUDIO; }
|
||||
break;
|
||||
case 3:
|
||||
//#line 63 ".\parser.l"
|
||||
{ return ANIM3DFILE; }
|
||||
break;
|
||||
case 4:
|
||||
//#line 64 ".\parser.l"
|
||||
{ return AUDIO_MODULE; }
|
||||
break;
|
||||
case 5:
|
||||
//#line 65 ".\parser.l"
|
||||
{ return ANIM_MODULE; }
|
||||
break;
|
||||
case 6:
|
||||
//#line 66 ".\parser.l"
|
||||
{ return ANIM3DFRAMES; }
|
||||
break;
|
||||
case 7:
|
||||
//#line 67 ".\parser.l"
|
||||
{ return ANIM3DTRANS; }
|
||||
break;
|
||||
case 8:
|
||||
//#line 68 ".\parser.l"
|
||||
{ return ANIMOBJECT; }
|
||||
break;
|
||||
case 9:
|
||||
//#line 78 ".\parser.l"
|
||||
{ audp_lval.ival = atoi(audp_text);
|
||||
return INTEGER;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
//#line 83 ".\parser.l"
|
||||
{
|
||||
/* skip opening quote */
|
||||
strcpy( audp_lval.sval, audp_text+1 );
|
||||
|
@ -714,55 +677,32 @@ YYDECL {
|
|||
}
|
||||
break;
|
||||
case 11:
|
||||
//#line 102 ".\parser.l"
|
||||
{ strcpy( audp_lval.sval, audp_text );
|
||||
return TEXT;
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
//#line 107 ".\parser.l"
|
||||
;
|
||||
break;
|
||||
case 13:
|
||||
//#line 110 ".\parser.l"
|
||||
{ BEGIN COMMENT; }
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
//#line 112 ".\parser.l"
|
||||
{ BEGIN 0; }
|
||||
break;
|
||||
case 16:
|
||||
case 17:
|
||||
//#line 114 ".\parser.l"
|
||||
;
|
||||
break;
|
||||
case 18:
|
||||
//#line 117 ".\parser.l"
|
||||
return audp_text[0];
|
||||
break;
|
||||
|
||||
//#line 472 "d:\mks-ly/etc/yylex.c"
|
||||
|
||||
}
|
||||
YY_SCANNER;
|
||||
i = audp_leng;
|
||||
goto audp__again; /* action fell though */
|
||||
|
||||
audp__reject:
|
||||
YY_SCANNER;
|
||||
i = audp_oleng; /* restore original audp_text */
|
||||
if (++audp_fmin < audp_fmax)
|
||||
goto audp__found; /* another final state, same length */
|
||||
else
|
||||
goto audp__search; /* try shorter audp_text */
|
||||
|
||||
audp__more:
|
||||
YY_SCANNER;
|
||||
i = audp_leng;
|
||||
if (i > 0)
|
||||
audp__lastc = audp_text[i-1];
|
||||
goto audp__contin;
|
||||
}
|
||||
/*
|
||||
* Safely switch input stream underneath LEX
|
||||
|
@ -831,64 +771,6 @@ audp__reset()
|
|||
YY_INIT;
|
||||
audp_lineno = 1; /* line number */
|
||||
}
|
||||
/* get input char with pushback */
|
||||
YY_DECL int
|
||||
input()
|
||||
{
|
||||
int c;
|
||||
#ifndef YY_PRESERVE
|
||||
if (audp__end > audp_leng) {
|
||||
audp__end--;
|
||||
memmove(audp_text+audp_leng, audp_text+audp_leng+1,
|
||||
(size_t) (audp__end-audp_leng));
|
||||
c = audp__save;
|
||||
YY_USER;
|
||||
#else
|
||||
if (audp__push < audp__save+YYLMAX) {
|
||||
c = *audp__push++;
|
||||
#endif
|
||||
} else
|
||||
c = audp_getc();
|
||||
audp__lastc = c;
|
||||
if (c == YYNEWLINE)
|
||||
audp_lineno++;
|
||||
if (c == EOF) /* audp_getc() can set c=EOF vsc4 wants c==EOF to return 0 */
|
||||
return 0;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
|
||||
/*f
|
||||
* pushback char
|
||||
*/
|
||||
YY_DECL int
|
||||
unput(int c)
|
||||
{
|
||||
#ifndef YY_PRESERVE
|
||||
if (audp__end >= YYLMAX) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
if (audp__end > audp_leng) {
|
||||
audp_text[audp_leng] = audp__save;
|
||||
memmove(audp_text+audp_leng+1, audp_text+audp_leng,
|
||||
(size_t) (audp__end-audp_leng));
|
||||
audp_text[audp_leng] = 0;
|
||||
}
|
||||
audp__end++;
|
||||
audp__save = (char) c;
|
||||
#else
|
||||
if (audp__push <= audp__save) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
*--audp__push = c;
|
||||
#endif
|
||||
if (c == YYNEWLINE)
|
||||
audp_lineno--;
|
||||
} /* endif */
|
||||
return c;
|
||||
}
|
||||
|
||||
//#line 121 ".\parser.l"
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
|
|
|
@ -48,12 +48,6 @@ typedef struct yyTypedRules_tag { /* Typed rule table */
|
|||
|
||||
#endif
|
||||
|
||||
//#line 1 ".\parser.y"
|
||||
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "frame.h"
|
||||
|
@ -305,8 +299,6 @@ typedef struct yyTraceItems_tag {
|
|||
} yyTraceItems;
|
||||
#endif
|
||||
|
||||
//#line 2 "d:\mks-ly/etc/yyparse.c"
|
||||
|
||||
/*
|
||||
* Copyright 1985, 1990 by Mortice Kern Systems Inc. All rights reserved.
|
||||
*
|
||||
|
@ -409,7 +401,6 @@ int yysinc = -1; /* stack size increment, <0 = double, 0 = none, >0 = fixed */
|
|||
int yyssize = YYSSIZE;
|
||||
#endif
|
||||
|
||||
#define YYERROR goto yyerrlabel
|
||||
#define yyerrok yyerrflag = 0
|
||||
#if YYDEBUG
|
||||
#define yyclearin { if (audp_debug) yyShowRead(-1); audp_char = -1; }
|
||||
|
@ -484,7 +475,6 @@ static char * yygetState YY_ARGS((int));
|
|||
#define yyassert(condition, msg, arg)
|
||||
#endif
|
||||
|
||||
//#line 192 ".\parser.y"
|
||||
/***************************************************************************/
|
||||
/* A simple error reporting routine */
|
||||
|
||||
|
@ -507,7 +497,6 @@ void audp_error(char *pMessage,...)
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
#ifdef YACC_WINDOWS
|
||||
|
||||
/*
|
||||
|
@ -861,86 +850,51 @@ yyEncore:
|
|||
switch (yyi) { /* perform semantic action */
|
||||
|
||||
case YYr12: { /* audio_track : AUDIO QTEXT LOOP INTEGER INTEGER INTEGER */
|
||||
//#line 78 ".\parser.y"
|
||||
|
||||
audio_SetTrackVals( yypvt[-4].sval, TRUE, &g_iDummy, yypvt[-2].ival, yypvt[-1].ival, yypvt[0].ival, 0 );
|
||||
|
||||
} break;
|
||||
|
||||
case YYr13: { /* audio_track : AUDIO QTEXT ONESHOT INTEGER INTEGER INTEGER */
|
||||
//#line 82 ".\parser.y"
|
||||
|
||||
audio_SetTrackVals( yypvt[-4].sval, FALSE, &g_iDummy, yypvt[-2].ival, yypvt[-1].ival, yypvt[0].ival, 0 );
|
||||
|
||||
} break;
|
||||
|
||||
case YYr14: { /* anim_module_header : ANIM_MODULE "{" */
|
||||
//#line 88 ".\parser.y"
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case YYr26: { /* anim_config : QTEXT INTEGER */
|
||||
//#line 121 ".\parser.y"
|
||||
|
||||
g_iCurAnimID = yypvt[0].ival;
|
||||
anim_SetVals( yypvt[-1].sval, yypvt[0].ival );
|
||||
|
||||
} break;
|
||||
|
||||
case YYr27: { /* anim_trans : ANIM3DTRANS QTEXT INTEGER INTEGER INTEGER */
|
||||
//#line 133 ".\parser.y"
|
||||
|
||||
anim_Create3D( yypvt[-3].sval, yypvt[-2].ival, yypvt[-1].ival, yypvt[0].ival, ANIM_3D_TRANS, g_iCurAnimID );
|
||||
|
||||
} break;
|
||||
|
||||
case YYr28: { /* anim_trans : ANIM3DTRANS QTEXT INTEGER INTEGER INTEGER $27 "{" anim_obj_list "}" */
|
||||
//#line 137 ".\parser.y"
|
||||
|
||||
g_iCurAnimID++;
|
||||
|
||||
} break;
|
||||
|
||||
case YYr29: { /* anim_frames : ANIM3DFRAMES QTEXT INTEGER INTEGER */
|
||||
//#line 143 ".\parser.y"
|
||||
|
||||
anim_Create3D( yypvt[-2].sval, yypvt[-1].ival, yypvt[0].ival, 1, ANIM_3D_FRAMES, g_iCurAnimID );
|
||||
|
||||
} break;
|
||||
|
||||
case YYr30: { /* anim_frames : ANIM3DFRAMES QTEXT INTEGER INTEGER $29 "{" */
|
||||
//#line 147 ".\parser.y"
|
||||
|
||||
anim_BeginScript();
|
||||
|
||||
} break;
|
||||
|
||||
case YYr31: { /* anim_frames : ANIM3DFRAMES QTEXT INTEGER INTEGER $29 "{" $30 anim_script "}" */
|
||||
//#line 151 ".\parser.y"
|
||||
|
||||
anim_EndScript();
|
||||
g_iCurAnimID++;
|
||||
|
||||
} break;
|
||||
|
||||
case YYr34: { /* anim_obj : ANIMOBJECT INTEGER QTEXT "{" */
|
||||
//#line 162 ".\parser.y"
|
||||
|
||||
anim_BeginScript();
|
||||
|
||||
} break;
|
||||
|
||||
case YYr35: { /* anim_obj : ANIMOBJECT INTEGER QTEXT "{" $34 anim_script "}" */
|
||||
//#line 166 ".\parser.y"
|
||||
|
||||
anim_EndScript();
|
||||
|
||||
} break;
|
||||
|
||||
case YYr38: { /* anim_state : INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER */
|
||||
//#line 176 ".\parser.y"
|
||||
|
||||
vecPos.x = yypvt[-8].ival;
|
||||
vecPos.y = yypvt[-7].ival;
|
||||
vecPos.z = yypvt[-6].ival;
|
||||
|
@ -951,9 +905,7 @@ case YYr38: { /* anim_state : INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER I
|
|||
vecScale.y = yypvt[-1].ival;
|
||||
vecScale.z = yypvt[0].ival;
|
||||
anim_AddFrameToAnim( yypvt[-9].ival, vecPos, vecRot, vecScale );
|
||||
|
||||
} break;
|
||||
//#line 314 "d:\mks-ly/etc/yyparse.c"
|
||||
case YYrACCEPT:
|
||||
YYACCEPT;
|
||||
case YYrERROR:
|
||||
|
@ -977,7 +929,6 @@ case YYr38: { /* anim_state : INTEGER INTEGER INTEGER INTEGER INTEGER INTEGER I
|
|||
#endif
|
||||
goto yyStack;
|
||||
|
||||
yyerrlabel: ; /* come here from YYERROR */
|
||||
/*
|
||||
#pragma used yyerrlabel
|
||||
*/
|
||||
|
|
|
@ -1,28 +1,5 @@
|
|||
%{
|
||||
|
||||
#ifndef PSX
|
||||
#include <stdio.h>
|
||||
#else
|
||||
/* A few definitions so the lex generated code will compile on the PSX.
|
||||
* These shouldn't actually be used by any code that is run on the PSX, it
|
||||
* just keeps the compiler happy.
|
||||
*/
|
||||
#ifndef _FILE_
|
||||
typedef signed int FILE;
|
||||
#define _FILE_
|
||||
#endif
|
||||
#define stderr 0
|
||||
#define stdin 0
|
||||
#define stdout 0
|
||||
static int fprintf(FILE* f,char* c,...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4129 4305 )
|
||||
|
||||
/* include framework */
|
||||
#include "frame.h"
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
%{
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "frame.h"
|
||||
|
|
|
@ -15,16 +15,10 @@
|
|||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#ifndef __GNUC__
|
||||
#pragma warning (disable : 4201 4214 4115 4514)
|
||||
#endif
|
||||
#define INIT_GUID
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include <windows.h>
|
||||
#ifndef __GNUC__
|
||||
#pragma warning (default : 4201 4214 4115)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
|
@ -33,7 +27,6 @@
|
|||
#undef RELEASE
|
||||
#define RELEASE(x) if ((x) != NULL) {(void)(x)->lpVtbl->Release(x); (x) = NULL;}
|
||||
|
||||
|
||||
/* Return a pointer to the Direct Draw objects */
|
||||
extern LPDIRECTDRAW4 screenGetDDObject(void);
|
||||
|
||||
|
|
|
@ -15,16 +15,10 @@
|
|||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#ifndef __GNUC__
|
||||
#pragma warning (disable : 4201 4214 4115 4514)
|
||||
#endif
|
||||
#define INIT_GUID
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_EXTRA_LEAN
|
||||
#include <windows.h>
|
||||
#ifndef __GNUC__
|
||||
#pragma warning (default : 4201 4214 4115)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
|
@ -33,7 +27,6 @@
|
|||
#undef RELEASE
|
||||
#define RELEASE(x) if ((x) != NULL) {(void)(x)->lpVtbl->Release(x); (x) = NULL;}
|
||||
|
||||
|
||||
/* Return a pointer to the Direct Draw objects */
|
||||
extern LPDIRECTDRAW4 screenGetDDObject(void);
|
||||
|
||||
|
|
|
@ -163,8 +163,6 @@ static int scr__base[] = {
|
|||
246, 681, 681, 413, 681, 424, 681, 542, 553, 681, 529, 681
|
||||
};
|
||||
|
||||
|
||||
//#line 1 "d:/usr/mks-ly/etc/yylex.c"
|
||||
/*
|
||||
* Copyright 1988, 1992 by Mortice Kern Systems Inc. All rights reserved.
|
||||
* All rights reserved.
|
||||
|
@ -246,7 +244,6 @@ extern char* m_textmsg YY_ARGS((int id, const char* str, char* cls));
|
|||
#define YY_DECL
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* You can redefine scr_getc. For YACC Tracing, compile this code
|
||||
* with -DYYTRACE to get input from yt_getc
|
||||
|
@ -283,8 +280,6 @@ extern int yt_getc YY_ARGS((void));
|
|||
else { YY_SCANNER; scr_leng = (n); YY_USER; }
|
||||
|
||||
YY_DECL void scr__reset YY_ARGS((void));
|
||||
YY_DECL int input YY_ARGS((void));
|
||||
YY_DECL int unput YY_ARGS((int c));
|
||||
|
||||
/* functions defined in libl.lib */
|
||||
extern int scr_wrap YY_ARGS((void));
|
||||
|
@ -292,8 +287,6 @@ extern void scr_error YY_ARGS((char *fmt, ...));
|
|||
extern void scr_comment YY_ARGS((char *term));
|
||||
extern int scr_mapch YY_ARGS((int delim, int escape));
|
||||
|
||||
//#line 1 "Script.l"
|
||||
|
||||
/*
|
||||
* script.l
|
||||
*
|
||||
|
@ -325,9 +318,6 @@ static int fprintf(FILE* f,char* c,...)
|
|||
/* Get the Yacc definitions */
|
||||
#include "script_y.h"
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
/* Maximum length for any TEXT value */
|
||||
#define YYLMAX 255
|
||||
|
||||
|
@ -504,11 +494,6 @@ SDWORD scriptGetFuncToken(FUNC_SYMBOL *psFunc)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//#line 127 "d:/usr/mks-ly/etc/yylex.c"
|
||||
|
||||
|
||||
#ifndef YYLMAX
|
||||
#define YYLMAX 100 /* token and pushback buffer size */
|
||||
#endif /* YYLMAX */
|
||||
|
@ -519,8 +504,6 @@ SDWORD scriptGetFuncToken(FUNC_SYMBOL *psFunc)
|
|||
*/
|
||||
YY_DECL char scr_text[YYLMAX+1];
|
||||
|
||||
|
||||
|
||||
#ifdef YY_DEBUG
|
||||
#undef YY_DEBUG
|
||||
#define YY_DEBUG(fmt, a1, a2) fprintf(stderr, fmt, a1, a2)
|
||||
|
@ -609,7 +592,6 @@ static char *scr__push = scr__save+YYLMAX;
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LEX_WINDOWS
|
||||
|
||||
/*
|
||||
|
@ -734,10 +716,6 @@ YYDECL {
|
|||
int scr_oldi, scr_oleng; /* base i, scr_leng before look-ahead */
|
||||
int scr_eof; /* 1 if eof has already been read */
|
||||
|
||||
//#line 350 "d:/usr/mks-ly/etc/yylex.c"
|
||||
|
||||
|
||||
|
||||
#if !YY_STATIC_STDIO
|
||||
if (scr_in == (FILE *)0)
|
||||
scr_in = stdin;
|
||||
|
@ -768,7 +746,6 @@ YYDECL {
|
|||
memmove(scr_text, scr_text+scr_leng, (size_t) scr__end);
|
||||
i = 0;
|
||||
|
||||
scr__contin:
|
||||
scr_oldi = i;
|
||||
|
||||
/* run the state machine until it jams */
|
||||
|
@ -815,12 +792,11 @@ YYDECL {
|
|||
scr_st = scr__next[scr_base];
|
||||
scr__jammed: ;
|
||||
scr__sbuf[++i] = (scr__state_t) scr_st;
|
||||
} while (!(scr_st == scr__endst || YY_INTERACTIVE && scr__base[scr_st] > scr__nxtmax && scr__default[scr_st] == scr__endst));
|
||||
} while (!(scr_st == scr__endst || (YY_INTERACTIVE && scr__base[scr_st] > scr__nxtmax && scr__default[scr_st] == scr__endst)));
|
||||
YY_DEBUG(m_textmsg(1550, "<stopped %d, i = %d>\n", "I num1 num2"), scr_st, i);
|
||||
if (scr_st != scr__endst)
|
||||
++i;
|
||||
|
||||
scr__search:
|
||||
/* search backward for a final state */
|
||||
while (--i > scr_oldi) {
|
||||
scr_st = scr__sbuf[i];
|
||||
|
@ -858,79 +834,60 @@ YYDECL {
|
|||
YY_USER;
|
||||
switch (scr__la_act[scr_fmin] & 0777) {
|
||||
case 0:
|
||||
//#line 224 "Script.l"
|
||||
return WAIT;
|
||||
break;
|
||||
case 1:
|
||||
//#line 225 "Script.l"
|
||||
return EVERY;
|
||||
break;
|
||||
case 2:
|
||||
//#line 226 "Script.l"
|
||||
return TRIGGER;
|
||||
break;
|
||||
case 3:
|
||||
//#line 227 "Script.l"
|
||||
return EVENT;
|
||||
break;
|
||||
case 4:
|
||||
//#line 228 "Script.l"
|
||||
return INACTIVE;
|
||||
break;
|
||||
case 5:
|
||||
//#line 229 "Script.l"
|
||||
return INITIALISE;
|
||||
break;
|
||||
case 6:
|
||||
//#line 230 "Script.l"
|
||||
return LINK;
|
||||
break;
|
||||
case 7:
|
||||
//#line 231 "Script.l"
|
||||
return REF;
|
||||
break;
|
||||
case 8:
|
||||
//#line 236 "Script.l"
|
||||
{ scr_lval.stype = ST_PUBLIC; return STORAGE; }
|
||||
break;
|
||||
case 9:
|
||||
//#line 237 "Script.l"
|
||||
{ scr_lval.stype = ST_PRIVATE; return STORAGE; }
|
||||
break;
|
||||
case 10:
|
||||
//#line 238 "Script.l"
|
||||
return WHILE;
|
||||
break;
|
||||
case 11:
|
||||
//#line 239 "Script.l"
|
||||
return IF;
|
||||
break;
|
||||
case 12:
|
||||
//#line 240 "Script.l"
|
||||
return ELSE;
|
||||
break;
|
||||
case 13:
|
||||
//#line 241 "Script.l"
|
||||
return EXIT;
|
||||
break;
|
||||
case 14:
|
||||
//#line 242 "Script.l"
|
||||
return PAUSE;
|
||||
break;
|
||||
case 15:
|
||||
//#line 245 "Script.l"
|
||||
{ scr_lval.tval = VAL_BOOL; return TYPE; }
|
||||
break;
|
||||
case 16:
|
||||
//#line 246 "Script.l"
|
||||
{ scr_lval.tval = VAL_BOOL; return TYPE; }
|
||||
break;
|
||||
case 17:
|
||||
//#line 247 "Script.l"
|
||||
{ scr_lval.tval = VAL_INT; return TYPE; }
|
||||
break;
|
||||
case 18:
|
||||
//#line 248 "Script.l"
|
||||
{ scr_lval.tval = VAL_INT; return TYPE; }
|
||||
/*float { ais_lval.tval = VAL_FLOAT; return TYPE; }*/
|
||||
/* string type isn't implemented yet */
|
||||
|
@ -938,75 +895,57 @@ YYDECL {
|
|||
/* object { scr_lval.tval = VAL_OBJECT; return TYPE; } */
|
||||
break;
|
||||
case 19:
|
||||
//#line 255 "Script.l"
|
||||
{ scr_lval.bval = TRUE; return BOOLEAN; }
|
||||
break;
|
||||
case 20:
|
||||
//#line 256 "Script.l"
|
||||
{ scr_lval.bval = TRUE; return BOOLEAN; }
|
||||
break;
|
||||
case 21:
|
||||
//#line 257 "Script.l"
|
||||
{ scr_lval.bval = FALSE; return BOOLEAN; }
|
||||
break;
|
||||
case 22:
|
||||
//#line 258 "Script.l"
|
||||
{ scr_lval.bval = FALSE; return BOOLEAN; }
|
||||
break;
|
||||
case 23:
|
||||
//#line 261 "Script.l"
|
||||
return BOOLEQUAL;
|
||||
break;
|
||||
case 24:
|
||||
//#line 262 "Script.l"
|
||||
return NOTEQUAL;
|
||||
break;
|
||||
case 25:
|
||||
//#line 263 "Script.l"
|
||||
return GREATEQUAL;
|
||||
break;
|
||||
case 26:
|
||||
//#line 264 "Script.l"
|
||||
return LESSEQUAL;
|
||||
break;
|
||||
case 27:
|
||||
//#line 265 "Script.l"
|
||||
return GREATER;
|
||||
break;
|
||||
case 28:
|
||||
//#line 266 "Script.l"
|
||||
return LESS;
|
||||
break;
|
||||
case 29:
|
||||
//#line 267 "Script.l"
|
||||
return _AND;
|
||||
break;
|
||||
case 30:
|
||||
//#line 268 "Script.l"
|
||||
return _AND;
|
||||
break;
|
||||
case 31:
|
||||
//#line 269 "Script.l"
|
||||
return _OR;
|
||||
break;
|
||||
case 32:
|
||||
//#line 270 "Script.l"
|
||||
return _OR;
|
||||
break;
|
||||
case 33:
|
||||
//#line 271 "Script.l"
|
||||
return _NOT;
|
||||
break;
|
||||
case 34:
|
||||
//#line 272 "Script.l"
|
||||
return _NOT;
|
||||
break;
|
||||
case 35:
|
||||
//#line 278 "Script.l"
|
||||
{ scr_lval.ival = atol(scr_text); return INTEGER; }
|
||||
break;
|
||||
case 36:
|
||||
//#line 281 "Script.l"
|
||||
{
|
||||
/* See if this identifier has been defined as a type */
|
||||
if (scriptLookUpType(scr_text, &scr_lval.tval))
|
||||
|
@ -1058,15 +997,12 @@ YYDECL {
|
|||
}
|
||||
break;
|
||||
case 37:
|
||||
//#line 332 "Script.l"
|
||||
{ BEGIN QUOTE; }
|
||||
break;
|
||||
case 38:
|
||||
//#line 333 "Script.l"
|
||||
{ BEGIN 0; }
|
||||
break;
|
||||
case 39:
|
||||
//#line 334 "Script.l"
|
||||
{
|
||||
strcpy(aText[currText], scr_text);
|
||||
scr_lval.sval = aText[currText];
|
||||
|
@ -1075,61 +1011,36 @@ YYDECL {
|
|||
}
|
||||
break;
|
||||
case 40:
|
||||
//#line 342 "Script.l"
|
||||
;
|
||||
break;
|
||||
case 41:
|
||||
//#line 345 "Script.l"
|
||||
{ inComment=TRUE; BEGIN COMMENT; }
|
||||
break;
|
||||
case 42:
|
||||
case 43:
|
||||
//#line 347 "Script.l"
|
||||
{ inComment=FALSE; BEGIN 0; }
|
||||
break;
|
||||
case 44:
|
||||
case 45:
|
||||
//#line 349 "Script.l"
|
||||
;
|
||||
break;
|
||||
case 46:
|
||||
//#line 352 "Script.l"
|
||||
{ BEGIN SLCOMMENT; }
|
||||
break;
|
||||
case 47:
|
||||
//#line 353 "Script.l"
|
||||
{ BEGIN 0; }
|
||||
break;
|
||||
case 48:
|
||||
//#line 354 "Script.l"
|
||||
;
|
||||
break;
|
||||
case 49:
|
||||
//#line 357 "Script.l"
|
||||
return scr_text[0];
|
||||
break;
|
||||
|
||||
//#line 472 "d:/usr/mks-ly/etc/yylex.c"
|
||||
|
||||
}
|
||||
YY_SCANNER;
|
||||
i = scr_leng;
|
||||
goto scr__again; /* action fell though */
|
||||
|
||||
scr__reject:
|
||||
YY_SCANNER;
|
||||
i = scr_oleng; /* restore original scr_text */
|
||||
if (++scr_fmin < scr_fmax)
|
||||
goto scr__found; /* another final state, same length */
|
||||
else
|
||||
goto scr__search; /* try shorter scr_text */
|
||||
|
||||
scr__more:
|
||||
YY_SCANNER;
|
||||
i = scr_leng;
|
||||
if (i > 0)
|
||||
scr__lastc = scr_text[i-1];
|
||||
goto scr__contin;
|
||||
}
|
||||
/*
|
||||
* Safely switch input stream underneath LEX
|
||||
|
@ -1198,64 +1109,6 @@ scr__reset()
|
|||
YY_INIT;
|
||||
scr_lineno = 1; /* line number */
|
||||
}
|
||||
/* get input char with pushback */
|
||||
YY_DECL int
|
||||
input()
|
||||
{
|
||||
int c;
|
||||
#ifndef YY_PRESERVE
|
||||
if (scr__end > scr_leng) {
|
||||
scr__end--;
|
||||
memmove(scr_text+scr_leng, scr_text+scr_leng+1,
|
||||
(size_t) (scr__end-scr_leng));
|
||||
c = scr__save;
|
||||
YY_USER;
|
||||
#else
|
||||
if (scr__push < scr__save+YYLMAX) {
|
||||
c = *scr__push++;
|
||||
#endif
|
||||
} else
|
||||
c = scr_getc();
|
||||
scr__lastc = c;
|
||||
if (c == YYNEWLINE)
|
||||
scr_lineno++;
|
||||
if (c == EOF) /* scr_getc() can set c=EOF vsc4 wants c==EOF to return 0 */
|
||||
return 0;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
|
||||
/*f
|
||||
* pushback char
|
||||
*/
|
||||
YY_DECL int
|
||||
unput(int c)
|
||||
{
|
||||
#ifndef YY_PRESERVE
|
||||
if (scr__end >= YYLMAX) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
if (scr__end > scr_leng) {
|
||||
scr_text[scr_leng] = scr__save;
|
||||
memmove(scr_text+scr_leng+1, scr_text+scr_leng,
|
||||
(size_t) (scr__end-scr_leng));
|
||||
scr_text[scr_leng] = 0;
|
||||
}
|
||||
scr__end++;
|
||||
scr__save = (char) c;
|
||||
#else
|
||||
if (scr__push <= scr__save) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
*--scr__push = c;
|
||||
#endif
|
||||
if (c == YYNEWLINE)
|
||||
scr_lineno--;
|
||||
} /* endif */
|
||||
return c;
|
||||
}
|
||||
|
||||
//#line 360 "Script.l"
|
||||
|
||||
/* Set the current input buffer for the lexer */
|
||||
void scriptSetInputBuffer(UBYTE *pBuffer, UDWORD size)
|
||||
|
|
|
@ -4,23 +4,6 @@
|
|||
*
|
||||
* Script file lexer.
|
||||
*/
|
||||
#ifdef PSX
|
||||
/* A few definitions so the lex generated code will compile on the PSX.
|
||||
* These shouldn't actually be used by any code that is run on the PSX, it
|
||||
* just keeps the compiler happy.
|
||||
*/
|
||||
#ifndef _FILE_
|
||||
#define _FILE_
|
||||
typedef int FILE;
|
||||
#endif
|
||||
#define stderr 0
|
||||
#define stdin 0
|
||||
#define stdout 0
|
||||
static int fprintf(FILE* f,char* c,...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "frame.h"
|
||||
#include "interp.h"
|
||||
|
@ -30,9 +13,6 @@ static int fprintf(FILE* f,char* c,...)
|
|||
/* Get the Yacc definitions */
|
||||
#include "script_y.h"
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
/* Maximum length for any TEXT value */
|
||||
#define YYLMAX 255
|
||||
|
||||
|
|
|
@ -5,17 +5,6 @@
|
|||
* The yacc grammar for the scipt files.
|
||||
*/
|
||||
|
||||
#ifdef PSX
|
||||
/* A few definitions so the yacc generated code will compile on the PSX.
|
||||
* These shouldn't actually be used by any code that is run on the PSX, it
|
||||
* just keeps the compiler happy.
|
||||
*/
|
||||
//static int printf(char* c, ...)
|
||||
//{
|
||||
// return 0;
|
||||
//}
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
@ -33,9 +22,6 @@ typedef enum _code_error
|
|||
CE_PARSE // A parse error occured
|
||||
} CODE_ERROR;
|
||||
|
||||
/* Turn off a couple of warnings that the yacc generated code gives */
|
||||
#pragma warning ( disable : 4305 4102)
|
||||
|
||||
/* Pointer to the compiled code */
|
||||
static SCRIPT_CODE *psFinalProg=NULL;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,9 +1,7 @@
|
|||
//*
|
||||
//
|
||||
#ifdef WIN32
|
||||
#pragma warning( disable : 4201 4214 4115 4514 )
|
||||
#include <windows.h>
|
||||
#pragma warning( default : 4201 4214 4115 )
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include "frame.h"
|
||||
#include "tracklib.h"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "objectdef.h"
|
||||
|
||||
/* The active bullets */
|
||||
PROJ_OBJECT *psActiveBullets;
|
||||
extern PROJ_OBJECT *psActiveBullets;
|
||||
|
||||
//used for passing data to the checkBurnDamage function
|
||||
typedef struct _fire_box
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
*/
|
||||
#ifdef DISP2D
|
||||
|
||||
|
||||
#pragma warning (disable : 4201 4214 4115 4514)
|
||||
#include <windows.h>
|
||||
#pragma warning (default : 4201 4214 4115)
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ BASE_OBJECT *mouseTarget( void );
|
|||
OBJECT_POSITION * checkMouseLoc(void);
|
||||
|
||||
/* Mouse x and y - no point checking them more than once per frame */
|
||||
SDWORD mX = OFF_SCREEN,mY= OFF_SCREEN;
|
||||
SDWORD mX = OFF_SCREEN, mY = OFF_SCREEN;
|
||||
|
||||
BOOL bInstantRadarJump = FALSE;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
/* Initialise the display system */
|
||||
extern BOOL dispInitialise(void);
|
||||
|
||||
|
||||
extern SDWORD mX, mY;
|
||||
|
||||
extern void shakeStart(void);
|
||||
|
||||
|
|
|
@ -274,8 +274,6 @@ int32 playerXTile, playerZTile, rx, rz;
|
|||
BOOL gouraudShading = TRUE;
|
||||
/* Have we located the mouse? */
|
||||
BOOL mouseLocated = TRUE;
|
||||
/* Mouse x and y - saves reading them every time we want to use them */
|
||||
SDWORD mX,mY;
|
||||
/* Index so we know how to find the tile BEHIND the one currently being processed for any view angle */
|
||||
UDWORD stepIndex;
|
||||
/* The box used for multiple selection - present screen coordinates */
|
||||
|
|
|
@ -154,4 +154,9 @@ extern UDWORD barMode;
|
|||
|
||||
extern UDWORD geoOffset;
|
||||
extern UDWORD texPage;
|
||||
|
||||
/* Points for flipping the texture around if the tile is flipped or rotated */
|
||||
extern POINT sP1,sP2,sP3,sP4;
|
||||
extern POINT *psP1,*psP2,*psP3,*psP4,*psPTemp;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -85,7 +85,7 @@ char OffString[]={"Off"};
|
|||
STRING strFog[MAX_STR_LENGTH];
|
||||
STRING strTrans[MAX_STR_LENGTH];
|
||||
|
||||
|
||||
tMode titleMode; // the global case
|
||||
|
||||
|
||||
// ////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -32,7 +32,7 @@ typedef enum _title_mode {
|
|||
// This dos'nt compile on the PSX.
|
||||
//typedef enum _titlemode tMode; // define the type
|
||||
|
||||
tMode titleMode; // the global case
|
||||
extern tMode titleMode; // the global case
|
||||
|
||||
#define DEFAULT_LEVEL "CAM_1A"
|
||||
//#define DEFAULT_LEVEL "CAM_2A"
|
||||
|
|
|
@ -158,8 +158,6 @@ static int lev__base[] = {
|
|||
|
||||
};
|
||||
|
||||
|
||||
//#line 1 "d:/usr/mks-ly/etc/yylex.c"
|
||||
/*
|
||||
* Copyright 1988, 1992 by Mortice Kern Systems Inc. All rights reserved.
|
||||
* All rights reserved.
|
||||
|
@ -241,7 +239,6 @@ extern char* m_textmsg YY_ARGS((int id, const char* str, char* cls));
|
|||
#define YY_DECL
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* You can redefine lev_getc. For YACC Tracing, compile this code
|
||||
* with -DYYTRACE to get input from yt_getc
|
||||
|
@ -278,8 +275,6 @@ extern int yt_getc YY_ARGS((void));
|
|||
else { YY_SCANNER; lev_leng = (n); YY_USER; }
|
||||
|
||||
YY_DECL void lev__reset YY_ARGS((void));
|
||||
YY_DECL int input YY_ARGS((void));
|
||||
YY_DECL int unput YY_ARGS((int c));
|
||||
|
||||
/* functions defined in libl.lib */
|
||||
extern int lev_wrap YY_ARGS((void));
|
||||
|
@ -287,8 +282,6 @@ extern void lev_error YY_ARGS((char *fmt, ...));
|
|||
extern void lev_comment YY_ARGS((char *term));
|
||||
extern int lev_mapch YY_ARGS((int delim, int escape));
|
||||
|
||||
//#line 1 "Level.l"
|
||||
|
||||
/*
|
||||
* Level.l
|
||||
*
|
||||
|
@ -296,18 +289,13 @@ extern int lev_mapch YY_ARGS((int delim, int escape));
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#include "frame.h"
|
||||
|
||||
#include "levels.h"
|
||||
#include "levelint.h"
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
/* Maximum length for any TEXT value */
|
||||
#define YYLMAX 255
|
||||
|
||||
|
@ -324,9 +312,6 @@ static UBYTE *pEndBuffer = NULL;
|
|||
#undef lev_getc
|
||||
#define lev_getc() (pInputBuffer != pEndBuffer ? *(pInputBuffer++) : EOF)
|
||||
|
||||
//#line 127 "d:/usr/mks-ly/etc/yylex.c"
|
||||
|
||||
|
||||
#ifndef YYLMAX
|
||||
#define YYLMAX 100 /* token and pushback buffer size */
|
||||
#endif /* YYLMAX */
|
||||
|
@ -337,8 +322,6 @@ static UBYTE *pEndBuffer = NULL;
|
|||
*/
|
||||
YY_DECL char lev_text[YYLMAX+1];
|
||||
|
||||
|
||||
|
||||
#ifdef YY_DEBUG
|
||||
#undef YY_DEBUG
|
||||
#define YY_DEBUG(fmt, a1, a2) fprintf(stderr, fmt, a1, a2)
|
||||
|
@ -427,7 +410,6 @@ static char *lev__push = lev__save+YYLMAX;
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LEX_WINDOWS
|
||||
|
||||
/*
|
||||
|
@ -552,10 +534,6 @@ YYDECL {
|
|||
int lev_oldi, lev_oleng; /* base i, lev_leng before look-ahead */
|
||||
int lev_eof; /* 1 if eof has already been read */
|
||||
|
||||
//#line 350 "d:/usr/mks-ly/etc/yylex.c"
|
||||
|
||||
|
||||
|
||||
#if !YY_STATIC_STDIO
|
||||
if (lev_in == (FILE *)0)
|
||||
lev_in = stdin;
|
||||
|
@ -586,7 +564,6 @@ YYDECL {
|
|||
memmove(lev_text, lev_text+lev_leng, (size_t) lev__end);
|
||||
i = 0;
|
||||
|
||||
lev__contin:
|
||||
lev_oldi = i;
|
||||
|
||||
/* run the state machine until it jams */
|
||||
|
@ -633,12 +610,11 @@ YYDECL {
|
|||
lev_st = lev__next[lev_base];
|
||||
lev__jammed: ;
|
||||
lev__sbuf[++i] = (lev__state_t) lev_st;
|
||||
} while (!(lev_st == lev__endst || YY_INTERACTIVE && lev__base[lev_st] > lev__nxtmax && lev__default[lev_st] == lev__endst));
|
||||
} while (!(lev_st == lev__endst || (YY_INTERACTIVE && lev__base[lev_st] > lev__nxtmax && lev__default[lev_st] == lev__endst)));
|
||||
YY_DEBUG(m_textmsg(1550, "<stopped %d, i = %d>\n", "I num1 num2"), lev_st, i);
|
||||
if (lev_st != lev__endst)
|
||||
++i;
|
||||
|
||||
lev__search:
|
||||
/* search backward for a final state */
|
||||
while (--i > lev_oldi) {
|
||||
lev_st = lev__sbuf[i];
|
||||
|
@ -676,67 +652,51 @@ YYDECL {
|
|||
YY_USER;
|
||||
switch (lev__la_act[lev_fmin] & 0777) {
|
||||
case 0:
|
||||
//#line 58 "Level.l"
|
||||
return LTK_LEVEL;
|
||||
break;
|
||||
case 1:
|
||||
//#line 59 "Level.l"
|
||||
return LTK_PLAYERS;
|
||||
break;
|
||||
case 2:
|
||||
//#line 60 "Level.l"
|
||||
return LTK_TYPE;
|
||||
break;
|
||||
case 3:
|
||||
//#line 61 "Level.l"
|
||||
return LTK_DATA;
|
||||
break;
|
||||
case 4:
|
||||
//#line 62 "Level.l"
|
||||
return LTK_GAME;
|
||||
break;
|
||||
case 5:
|
||||
//#line 63 "Level.l"
|
||||
return LTK_CAMPAIGN;
|
||||
break;
|
||||
case 6:
|
||||
//#line 64 "Level.l"
|
||||
return LTK_CAMSTART;
|
||||
break;
|
||||
case 7:
|
||||
//#line 65 "Level.l"
|
||||
return LTK_CAMCHANGE;
|
||||
break;
|
||||
case 8:
|
||||
//#line 66 "Level.l"
|
||||
return LTK_DATASET;
|
||||
break;
|
||||
case 9:
|
||||
//#line 67 "Level.l"
|
||||
return LTK_EXPAND;
|
||||
break;
|
||||
case 10:
|
||||
//#line 68 "Level.l"
|
||||
return LTK_EXPAND_LIMBO;
|
||||
break;
|
||||
case 11:
|
||||
//#line 69 "Level.l"
|
||||
return LTK_BETWEEN;
|
||||
break;
|
||||
case 12:
|
||||
//#line 70 "Level.l"
|
||||
return LTK_MKEEP;
|
||||
break;
|
||||
case 13:
|
||||
//#line 71 "Level.l"
|
||||
return LTK_MKEEP_LIMBO;
|
||||
break;
|
||||
case 14:
|
||||
//#line 72 "Level.l"
|
||||
return LTK_MCLEAR;
|
||||
break;
|
||||
case 15:
|
||||
//#line 75 "Level.l"
|
||||
{
|
||||
strcpy(aText, lev_text);
|
||||
pLevToken = aText;
|
||||
|
@ -744,19 +704,15 @@ YYDECL {
|
|||
}
|
||||
break;
|
||||
case 16:
|
||||
//#line 82 "Level.l"
|
||||
{ BEGIN QUOTE; }
|
||||
break;
|
||||
case 17:
|
||||
//#line 83 "Level.l"
|
||||
{ BEGIN 0; }
|
||||
break;
|
||||
case 18:
|
||||
//#line 84 "Level.l"
|
||||
{ levError("Unexpected end of line in string"); }
|
||||
break;
|
||||
case 19:
|
||||
//#line 85 "Level.l"
|
||||
{
|
||||
strcpy(aText, lev_text);
|
||||
pLevToken = aText;
|
||||
|
@ -764,66 +720,41 @@ YYDECL {
|
|||
}
|
||||
break;
|
||||
case 20:
|
||||
//#line 92 "Level.l"
|
||||
{ levVal = atol(lev_text); return LTK_INTEGER; }
|
||||
break;
|
||||
case 21:
|
||||
//#line 95 "Level.l"
|
||||
;
|
||||
break;
|
||||
case 22:
|
||||
//#line 98 "Level.l"
|
||||
{ inComment=TRUE; BEGIN COMMENT; }
|
||||
break;
|
||||
case 23:
|
||||
case 24:
|
||||
//#line 100 "Level.l"
|
||||
{ inComment=FALSE; BEGIN 0; }
|
||||
break;
|
||||
case 25:
|
||||
case 26:
|
||||
//#line 102 "Level.l"
|
||||
;
|
||||
break;
|
||||
case 27:
|
||||
//#line 105 "Level.l"
|
||||
{ BEGIN SLCOMMENT; }
|
||||
break;
|
||||
case 28:
|
||||
//#line 106 "Level.l"
|
||||
{ BEGIN 0; }
|
||||
break;
|
||||
case 29:
|
||||
//#line 107 "Level.l"
|
||||
;
|
||||
break;
|
||||
case 30:
|
||||
//#line 110 "Level.l"
|
||||
return lev_text[0];
|
||||
break;
|
||||
|
||||
//#line 472 "d:/usr/mks-ly/etc/yylex.c"
|
||||
|
||||
}
|
||||
YY_SCANNER;
|
||||
i = lev_leng;
|
||||
goto lev__again; /* action fell though */
|
||||
|
||||
lev__reject:
|
||||
YY_SCANNER;
|
||||
i = lev_oleng; /* restore original lev_text */
|
||||
if (++lev_fmin < lev_fmax)
|
||||
goto lev__found; /* another final state, same length */
|
||||
else
|
||||
goto lev__search; /* try shorter lev_text */
|
||||
|
||||
lev__more:
|
||||
YY_SCANNER;
|
||||
i = lev_leng;
|
||||
if (i > 0)
|
||||
lev__lastc = lev_text[i-1];
|
||||
goto lev__contin;
|
||||
}
|
||||
|
||||
/*
|
||||
* Safely switch input stream underneath LEX
|
||||
*/
|
||||
|
@ -891,64 +822,6 @@ lev__reset()
|
|||
YY_INIT;
|
||||
lev_lineno = 1; /* line number */
|
||||
}
|
||||
/* get input char with pushback */
|
||||
YY_DECL int
|
||||
input()
|
||||
{
|
||||
int c;
|
||||
#ifndef YY_PRESERVE
|
||||
if (lev__end > lev_leng) {
|
||||
lev__end--;
|
||||
memmove(lev_text+lev_leng, lev_text+lev_leng+1,
|
||||
(size_t) (lev__end-lev_leng));
|
||||
c = lev__save;
|
||||
YY_USER;
|
||||
#else
|
||||
if (lev__push < lev__save+YYLMAX) {
|
||||
c = *lev__push++;
|
||||
#endif
|
||||
} else
|
||||
c = lev_getc();
|
||||
lev__lastc = c;
|
||||
if (c == YYNEWLINE)
|
||||
lev_lineno++;
|
||||
if (c == EOF) /* lev_getc() can set c=EOF vsc4 wants c==EOF to return 0 */
|
||||
return 0;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
|
||||
/*f
|
||||
* pushback char
|
||||
*/
|
||||
YY_DECL int
|
||||
unput(int c)
|
||||
{
|
||||
#ifndef YY_PRESERVE
|
||||
if (lev__end >= YYLMAX) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
if (lev__end > lev_leng) {
|
||||
lev_text[lev_leng] = lev__save;
|
||||
memmove(lev_text+lev_leng+1, lev_text+lev_leng,
|
||||
(size_t) (lev__end-lev_leng));
|
||||
lev_text[lev_leng] = 0;
|
||||
}
|
||||
lev__end++;
|
||||
lev__save = (char) c;
|
||||
#else
|
||||
if (lev__push <= lev__save) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
*--lev__push = c;
|
||||
#endif
|
||||
if (c == YYNEWLINE)
|
||||
lev_lineno--;
|
||||
} /* endif */
|
||||
return c;
|
||||
}
|
||||
|
||||
//#line 113 "Level.l"
|
||||
|
||||
/* Set the current input buffer for the lexer */
|
||||
void levSetInputBuffer(UBYTE *pBuffer, UDWORD size)
|
||||
|
|
|
@ -6,30 +6,13 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef PSX
|
||||
#include <stdio.h>
|
||||
#else
|
||||
/* A few definitions so the lex generated code will compile on the PSX.
|
||||
* These shouldn't actually be used by any code that is run on the PSX, it
|
||||
* just keeps the compiler happy.
|
||||
*/
|
||||
#ifndef _FILE_
|
||||
#define _FILE_
|
||||
typedef int FILE; // in stdio.h ?
|
||||
#endif
|
||||
#define stderr 0
|
||||
#define stdin 0
|
||||
#define stdout 0
|
||||
#endif
|
||||
|
||||
#include "frame.h"
|
||||
|
||||
#include "levels.h"
|
||||
#include "levelint.h"
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
/* Maximum length for any TEXT value */
|
||||
#define YYLMAX 255
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define _levelint_h
|
||||
|
||||
// return values from the lexer
|
||||
enum _token_type
|
||||
typedef enum _token_type
|
||||
{
|
||||
LTK_LEVEL = 0x100, // level key word
|
||||
LTK_PLAYERS, // players key word
|
||||
|
@ -26,7 +26,9 @@ enum _token_type
|
|||
LTK_IDENT, // an identifier
|
||||
LTK_STRING, // a quoted string
|
||||
LTK_INTEGER, // a number
|
||||
} LTOKEN_TYPE;
|
||||
} _ltoken_type;
|
||||
|
||||
extern _ltoken_type LTOKEN_TYPE;
|
||||
|
||||
// return values from the lexer
|
||||
extern STRING *pLevToken;
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
// block ID number start for the current level data (as opposed to a dataset)
|
||||
#define CURRENT_DATAID LEVEL_MAXFILES
|
||||
|
||||
_ltoken_type LTOKEN_TYPE;
|
||||
|
||||
static UBYTE currentLevelName[32];
|
||||
|
||||
// the current level descriptions
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "piemode.h"
|
||||
#include "levels.h"
|
||||
#include "research.h"
|
||||
#include "configfile.h"
|
||||
#include "warzoneconfig.h"
|
||||
#include "clparse.h"
|
||||
#include "cdspan.h"
|
||||
|
@ -58,7 +59,6 @@ char* UserMusicPath;
|
|||
|
||||
#ifndef WIN32
|
||||
|
||||
char UnixRegFilePath[255];
|
||||
char __UserMusicPath[255];
|
||||
|
||||
#endif
|
||||
|
|
|
@ -104,8 +104,6 @@ static SDWORD mapGridWidth, mapGridHeight, mapGridMidX, mapGridMidY;
|
|||
static SDWORD mapGridX, mapGridZ;
|
||||
static SDWORD gridDivX, gridDivZ;
|
||||
static iVector tileScreenCoords[MAX_MAP_GRID][MAX_MAP_GRID];
|
||||
POINT sP1,sP2,sP3,sP4;
|
||||
POINT *psP1,*psP2,*psP3,*psP4,*psPTemp;
|
||||
|
||||
/*Flag to switch code for bucket sorting in renderFeatures etc
|
||||
for the renderMapToBuffer code */
|
||||
|
|
|
@ -22,12 +22,10 @@
|
|||
Coptyright 1996-97. Mpath Interactive, Inc.
|
||||
|
||||
----------------------------------------------------------------------------*/
|
||||
#pragma warning (disable : 4201 4214 4514 4115)
|
||||
|
||||
#include "frame.h"
|
||||
#include "mpdpxtra.h"
|
||||
|
||||
|
||||
/******** DEFINITIONS ********/
|
||||
|
||||
#define MPDPXTRA_DLL_NAME "DPMPLAY.DLL"
|
||||
|
|
|
@ -140,8 +140,6 @@ static int scrv__base[] = {
|
|||
369, 651, 487, 498, 651, 651, 616, 651
|
||||
};
|
||||
|
||||
|
||||
//#line 1 "d:/usr/mks-ly/etc/yylex.c"
|
||||
/*
|
||||
* Copyright 1988, 1992 by Mortice Kern Systems Inc. All rights reserved.
|
||||
* All rights reserved.
|
||||
|
@ -223,7 +221,6 @@ extern char* m_textmsg YY_ARGS((int id, const char* str, char* cls));
|
|||
#define YY_DECL
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* You can redefine scrv_getc. For YACC Tracing, compile this code
|
||||
* with -DYYTRACE to get input from yt_getc
|
||||
|
@ -260,8 +257,6 @@ extern int yt_getc YY_ARGS((void));
|
|||
else { YY_SCANNER; scrv_leng = (n); YY_USER; }
|
||||
|
||||
YY_DECL void scrv__reset YY_ARGS((void));
|
||||
YY_DECL int input YY_ARGS((void));
|
||||
YY_DECL int unput YY_ARGS((int c));
|
||||
|
||||
/* functions defined in libl.lib */
|
||||
extern int scrv_wrap YY_ARGS((void));
|
||||
|
@ -269,8 +264,6 @@ extern void scrv_error YY_ARGS((char *fmt, ...));
|
|||
extern void scrv_comment YY_ARGS((char *term));
|
||||
extern int scrv_mapch YY_ARGS((int delim, int escape));
|
||||
|
||||
//#line 1 "ScriptVals.l"
|
||||
|
||||
/*
|
||||
* ScriptVals.l
|
||||
*
|
||||
|
@ -278,10 +271,8 @@ extern int scrv_mapch YY_ARGS((int delim, int escape));
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#include "frame.h"
|
||||
#include "script.h"
|
||||
#include "scriptvals.h"
|
||||
|
@ -289,9 +280,6 @@ extern int scrv_mapch YY_ARGS((int delim, int escape));
|
|||
/* Get the Yacc definitions */
|
||||
#include "scriptvals_y.h"
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
/* Maximum length for any TEXT value */
|
||||
#define YYLMAX 255
|
||||
|
||||
|
@ -309,9 +297,6 @@ static UBYTE *pEndBuffer = NULL;
|
|||
#undef scrv_getc
|
||||
#define scrv_getc() (pInputBuffer != pEndBuffer ? *(pInputBuffer++) : EOF)
|
||||
|
||||
//#line 127 "d:/usr/mks-ly/etc/yylex.c"
|
||||
|
||||
|
||||
#ifndef YYLMAX
|
||||
#define YYLMAX 100 /* token and pushback buffer size */
|
||||
#endif /* YYLMAX */
|
||||
|
@ -322,8 +307,6 @@ static UBYTE *pEndBuffer = NULL;
|
|||
*/
|
||||
YY_DECL char scrv_text[YYLMAX+1];
|
||||
|
||||
|
||||
|
||||
#ifdef YY_DEBUG
|
||||
#undef YY_DEBUG
|
||||
#define YY_DEBUG(fmt, a1, a2) fprintf(stderr, fmt, a1, a2)
|
||||
|
@ -412,7 +395,6 @@ static char *scrv__push = scrv__save+YYLMAX;
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LEX_WINDOWS
|
||||
|
||||
/*
|
||||
|
@ -537,10 +519,6 @@ YYDECL {
|
|||
int scrv_oldi, scrv_oleng; /* base i, scrv_leng before look-ahead */
|
||||
int scrv_eof; /* 1 if eof has already been read */
|
||||
|
||||
//#line 350 "d:/usr/mks-ly/etc/yylex.c"
|
||||
|
||||
|
||||
|
||||
#if !YY_STATIC_STDIO
|
||||
if (scrv_in == (FILE *)0)
|
||||
scrv_in = stdin;
|
||||
|
@ -571,7 +549,6 @@ YYDECL {
|
|||
memmove(scrv_text, scrv_text+scrv_leng, (size_t) scrv__end);
|
||||
i = 0;
|
||||
|
||||
scrv__contin:
|
||||
scrv_oldi = i;
|
||||
|
||||
/* run the state machine until it jams */
|
||||
|
@ -618,12 +595,11 @@ YYDECL {
|
|||
scrv_st = scrv__next[scrv_base];
|
||||
scrv__jammed: ;
|
||||
scrv__sbuf[++i] = (scrv__state_t) scrv_st;
|
||||
} while (!(scrv_st == scrv__endst || YY_INTERACTIVE && scrv__base[scrv_st] > scrv__nxtmax && scrv__default[scrv_st] == scrv__endst));
|
||||
} while (!(scrv_st == scrv__endst || (YY_INTERACTIVE && scrv__base[scrv_st] > scrv__nxtmax && scrv__default[scrv_st] == scrv__endst)));
|
||||
YY_DEBUG(m_textmsg(1550, "<stopped %d, i = %d>\n", "I num1 num2"), scrv_st, i);
|
||||
if (scrv_st != scrv__endst)
|
||||
++i;
|
||||
|
||||
scrv__search:
|
||||
/* search backward for a final state */
|
||||
while (--i > scrv_oldi) {
|
||||
scrv_st = scrv__sbuf[i];
|
||||
|
@ -661,51 +637,39 @@ YYDECL {
|
|||
YY_USER;
|
||||
switch (scrv__la_act[scrv_fmin] & 0777) {
|
||||
case 0:
|
||||
//#line 65 "ScriptVals.l"
|
||||
{ scrv_lval.tval = VAL_INT; return TYPE; }
|
||||
break;
|
||||
case 1:
|
||||
//#line 66 "ScriptVals.l"
|
||||
{ scrv_lval.tval = VAL_INT; return TYPE; }
|
||||
break;
|
||||
case 2:
|
||||
//#line 67 "ScriptVals.l"
|
||||
{ scrv_lval.tval = VAL_BOOL; return TYPE; }
|
||||
break;
|
||||
case 3:
|
||||
//#line 68 "ScriptVals.l"
|
||||
{ scrv_lval.tval = VAL_BOOL; return TYPE; }
|
||||
break;
|
||||
case 4:
|
||||
//#line 69 "ScriptVals.l"
|
||||
return SCRIPT;
|
||||
break;
|
||||
case 5:
|
||||
//#line 70 "ScriptVals.l"
|
||||
return STORE;
|
||||
break;
|
||||
case 6:
|
||||
//#line 71 "ScriptVals.l"
|
||||
return RUN;
|
||||
break;
|
||||
case 7:
|
||||
//#line 73 "ScriptVals.l"
|
||||
{ scrv_lval.bval = TRUE; return BOOLEAN; }
|
||||
break;
|
||||
case 8:
|
||||
//#line 74 "ScriptVals.l"
|
||||
{ scrv_lval.bval = TRUE; return BOOLEAN; }
|
||||
break;
|
||||
case 9:
|
||||
//#line 75 "ScriptVals.l"
|
||||
{ scrv_lval.bval = FALSE; return BOOLEAN; }
|
||||
break;
|
||||
case 10:
|
||||
//#line 76 "ScriptVals.l"
|
||||
{ scrv_lval.bval = FALSE; return BOOLEAN; }
|
||||
break;
|
||||
case 11:
|
||||
//#line 79 "ScriptVals.l"
|
||||
{
|
||||
INTERP_TYPE type;
|
||||
UDWORD index;
|
||||
|
@ -736,23 +700,18 @@ YYDECL {
|
|||
}
|
||||
break;
|
||||
case 12:
|
||||
//#line 109 "ScriptVals.l"
|
||||
{ scrv_lval.ival = atol(scrv_text); return INTEGER; }
|
||||
break;
|
||||
case 13:
|
||||
//#line 112 "ScriptVals.l"
|
||||
{ BEGIN QUOTE; }
|
||||
break;
|
||||
case 14:
|
||||
//#line 113 "ScriptVals.l"
|
||||
{ BEGIN 0; }
|
||||
break;
|
||||
case 15:
|
||||
//#line 114 "ScriptVals.l"
|
||||
{ scrv_error("Unexpected end of line in string"); }
|
||||
break;
|
||||
case 16:
|
||||
//#line 115 "ScriptVals.l"
|
||||
{
|
||||
strcpy(aText[currText], scrv_text);
|
||||
scrv_lval.sval = aText[currText];
|
||||
|
@ -761,62 +720,38 @@ YYDECL {
|
|||
}
|
||||
break;
|
||||
case 17:
|
||||
//#line 123 "ScriptVals.l"
|
||||
;
|
||||
break;
|
||||
case 18:
|
||||
//#line 126 "ScriptVals.l"
|
||||
{ inComment=TRUE; BEGIN COMMENT; }
|
||||
break;
|
||||
case 19:
|
||||
case 20:
|
||||
//#line 128 "ScriptVals.l"
|
||||
{ inComment=FALSE; BEGIN 0; }
|
||||
break;
|
||||
case 21:
|
||||
case 22:
|
||||
//#line 130 "ScriptVals.l"
|
||||
;
|
||||
break;
|
||||
case 23:
|
||||
//#line 133 "ScriptVals.l"
|
||||
{ BEGIN SLCOMMENT; }
|
||||
break;
|
||||
case 24:
|
||||
//#line 134 "ScriptVals.l"
|
||||
{ BEGIN 0; }
|
||||
break;
|
||||
case 25:
|
||||
//#line 135 "ScriptVals.l"
|
||||
;
|
||||
break;
|
||||
case 26:
|
||||
//#line 138 "ScriptVals.l"
|
||||
return scrv_text[0];
|
||||
break;
|
||||
|
||||
//#line 472 "d:/usr/mks-ly/etc/yylex.c"
|
||||
|
||||
}
|
||||
YY_SCANNER;
|
||||
i = scrv_leng;
|
||||
goto scrv__again; /* action fell though */
|
||||
|
||||
scrv__reject:
|
||||
YY_SCANNER;
|
||||
i = scrv_oleng; /* restore original scrv_text */
|
||||
if (++scrv_fmin < scrv_fmax)
|
||||
goto scrv__found; /* another final state, same length */
|
||||
else
|
||||
goto scrv__search; /* try shorter scrv_text */
|
||||
|
||||
scrv__more:
|
||||
YY_SCANNER;
|
||||
i = scrv_leng;
|
||||
if (i > 0)
|
||||
scrv__lastc = scrv_text[i-1];
|
||||
goto scrv__contin;
|
||||
}
|
||||
|
||||
/*
|
||||
* Safely switch input stream underneath LEX
|
||||
*/
|
||||
|
@ -884,64 +819,6 @@ scrv__reset()
|
|||
YY_INIT;
|
||||
scrv_lineno = 1; /* line number */
|
||||
}
|
||||
/* get input char with pushback */
|
||||
YY_DECL int
|
||||
input()
|
||||
{
|
||||
int c;
|
||||
#ifndef YY_PRESERVE
|
||||
if (scrv__end > scrv_leng) {
|
||||
scrv__end--;
|
||||
memmove(scrv_text+scrv_leng, scrv_text+scrv_leng+1,
|
||||
(size_t) (scrv__end-scrv_leng));
|
||||
c = scrv__save;
|
||||
YY_USER;
|
||||
#else
|
||||
if (scrv__push < scrv__save+YYLMAX) {
|
||||
c = *scrv__push++;
|
||||
#endif
|
||||
} else
|
||||
c = scrv_getc();
|
||||
scrv__lastc = c;
|
||||
if (c == YYNEWLINE)
|
||||
scrv_lineno++;
|
||||
if (c == EOF) /* scrv_getc() can set c=EOF vsc4 wants c==EOF to return 0 */
|
||||
return 0;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
|
||||
/*f
|
||||
* pushback char
|
||||
*/
|
||||
YY_DECL int
|
||||
unput(int c)
|
||||
{
|
||||
#ifndef YY_PRESERVE
|
||||
if (scrv__end >= YYLMAX) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
if (scrv__end > scrv_leng) {
|
||||
scrv_text[scrv_leng] = scrv__save;
|
||||
memmove(scrv_text+scrv_leng+1, scrv_text+scrv_leng,
|
||||
(size_t) (scrv__end-scrv_leng));
|
||||
scrv_text[scrv_leng] = 0;
|
||||
}
|
||||
scrv__end++;
|
||||
scrv__save = (char) c;
|
||||
#else
|
||||
if (scrv__push <= scrv__save) {
|
||||
YY_FATAL(m_textmsg(1552, "Push-back buffer overflow", "E"));
|
||||
} else {
|
||||
*--scrv__push = c;
|
||||
#endif
|
||||
if (c == YYNEWLINE)
|
||||
scrv_lineno--;
|
||||
} /* endif */
|
||||
return c;
|
||||
}
|
||||
|
||||
//#line 141 "ScriptVals.l"
|
||||
|
||||
/* Set the current input buffer for the lexer */
|
||||
void scrvSetInputBuffer(UBYTE *pBuffer, UDWORD size)
|
||||
|
|
|
@ -6,25 +6,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef PSX
|
||||
#include <stdio.h>
|
||||
#else
|
||||
/* A few definitions so the lex generated code will compile on the PSX.
|
||||
* These shouldn't actually be used by any code that is run on the PSX, it
|
||||
* just keeps the compiler happy.
|
||||
*/
|
||||
#ifndef _FILE_
|
||||
#define _FILE_
|
||||
typedef int FILE; // in stdio.h ?
|
||||
#endif
|
||||
#define stderr 0
|
||||
#define stdin 0
|
||||
#define stdout 0
|
||||
static int fprintf(FILE* f,char* c,...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "frame.h"
|
||||
#include "script.h"
|
||||
|
@ -33,9 +15,6 @@ static int fprintf(FILE* f,char* c,...)
|
|||
/* Get the Yacc definitions */
|
||||
#include "scriptvals_y.h"
|
||||
|
||||
/* Turn off a couple of warnings that the lex generated code gives */
|
||||
#pragma warning ( disable : 4102 4305 )
|
||||
|
||||
/* Maximum length for any TEXT value */
|
||||
#define YYLMAX 255
|
||||
|
||||
|
|
|
@ -6,20 +6,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifdef PSX
|
||||
/* A few definitions so the yacc generated code will compile on the PSX.
|
||||
* These shouldn't actually be used by any code that is run on the PSX, it
|
||||
* just keeps the compiler happy.
|
||||
*/
|
||||
|
||||
//static int printf(char* c, ...)
|
||||
//{
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "frame.h"
|
||||
|
@ -44,9 +30,6 @@ static SCRIPT_CONTEXT *psCurrContext;
|
|||
// the current array indexes
|
||||
static ARRAY_INDEXES sCurrArrayIndexes;
|
||||
|
||||
/* Turn off a couple of warnings that the yacc generated code gives */
|
||||
#pragma warning ( disable : 4305 4102)
|
||||
|
||||
// check that an array index is valid
|
||||
BOOL scrvCheckArrayIndex(SDWORD base, ARRAY_INDEXES *psIndexes, UDWORD *pIndex)
|
||||
{
|
||||
|
|
|
@ -48,8 +48,6 @@ typedef struct yyTypedRules_tag { /* Typed rule table */
|
|||
|
||||
#endif
|
||||
|
||||
#line 1 ".\\ScriptVals.y"
|
||||
|
||||
/*
|
||||
* ScriptVals.y
|
||||
*
|
||||
|
@ -57,9 +55,6 @@ typedef struct yyTypedRules_tag { /* Typed rule table */
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "frame.h"
|
||||
|
@ -84,9 +79,6 @@ static SCRIPT_CONTEXT *psCurrContext;
|
|||
// the current array indexes
|
||||
static ARRAY_INDEXES sCurrArrayIndexes;
|
||||
|
||||
/* Turn off a couple of warnings that the yacc generated code gives */
|
||||
#pragma warning ( disable : 4305 4102)
|
||||
|
||||
// check that an array index is valid
|
||||
BOOL scrvCheckArrayIndex(SDWORD base, ARRAY_INDEXES *psIndexes, UDWORD *pIndex)
|
||||
{
|
||||
|
@ -314,8 +306,6 @@ typedef struct yyTraceItems_tag {
|
|||
} yyTraceItems;
|
||||
#endif
|
||||
|
||||
#line 2 "d:\mks-ly/etc/yyparse.c"
|
||||
|
||||
/*
|
||||
* Copyright 1985, 1990 by Mortice Kern Systems Inc. All rights reserved.
|
||||
*
|
||||
|
@ -418,7 +408,6 @@ int yysinc = -1; /* stack size increment, <0 = double, 0 = none, >0 = fixed */
|
|||
int yyssize = YYSSIZE;
|
||||
#endif
|
||||
|
||||
#define YYERROR goto yyerrlabel
|
||||
#define yyerrok yyerrflag = 0
|
||||
#if YYDEBUG
|
||||
#define yyclearin { if (scrv_debug) yyShowRead(-1); scrv_char = -1; }
|
||||
|
@ -493,7 +482,6 @@ static char * yygetState YY_ARGS((int));
|
|||
#define yyassert(condition, msg, arg)
|
||||
#endif
|
||||
|
||||
#line 753 ".\\ScriptVals.y"
|
||||
// Lookup a type
|
||||
BOOL scrvLookUpType(STRING *pIdent, INTERP_TYPE *pType)
|
||||
{
|
||||
|
@ -511,7 +499,6 @@ BOOL scrvLookUpType(STRING *pIdent, INTERP_TYPE *pType)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
// Lookup a variable identifier
|
||||
BOOL scrvLookUpVar(STRING *pIdent, UDWORD *pIndex)
|
||||
{
|
||||
|
@ -535,7 +522,6 @@ BOOL scrvLookUpVar(STRING *pIdent, UDWORD *pIndex)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
// Lookup an array identifier
|
||||
BOOL scrvLookUpArray(STRING *pIdent, UDWORD *pIndex)
|
||||
{
|
||||
|
@ -559,7 +545,6 @@ BOOL scrvLookUpArray(STRING *pIdent, UDWORD *pIndex)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
// Load a script value file
|
||||
BOOL scrvLoad(UBYTE *pData, UDWORD size)
|
||||
{
|
||||
|
@ -593,9 +578,6 @@ void scrv_error(char *pMessage,...)
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef YACC_WINDOWS
|
||||
|
||||
/*
|
||||
|
@ -706,7 +688,7 @@ static int win_yyparse()
|
|||
* standard way.
|
||||
*/
|
||||
|
||||
scrv_parse()
|
||||
int scrv_parse()
|
||||
|
||||
#endif /* YACC_WINDOWS */
|
||||
|
||||
|
@ -758,7 +740,6 @@ scrv_parse()
|
|||
char *envp;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef YYDYNAMIC
|
||||
if ((envp = getenv("YYSTACKSIZE")) != (char *)0) {
|
||||
yyssize = atoi(envp);
|
||||
|
@ -949,7 +930,6 @@ yyEncore:
|
|||
switch (yyi) { /* perform semantic action */
|
||||
|
||||
case YYr3: { /* script_entry : script_name RUN */
|
||||
#line 135 ".\\ScriptVals.y"
|
||||
|
||||
if (!eventNewContext(psCurrScript, CR_RELEASE, &psCurrContext))
|
||||
{
|
||||
|
@ -965,7 +945,6 @@ case YYr3: { /* script_entry : script_name RUN */
|
|||
} break;
|
||||
|
||||
case YYr4: { /* script_entry : script_name RUN $3 '{' var_init_list '}' */
|
||||
#line 148 ".\\ScriptVals.y"
|
||||
|
||||
if (!eventRunContext(psCurrContext, gameTime/SCR_TICKRATE))
|
||||
{
|
||||
|
@ -975,7 +954,6 @@ case YYr4: { /* script_entry : script_name RUN $3 '{' var_init_list '}' */
|
|||
} break;
|
||||
|
||||
case YYr5: { /* script_entry : script_name STORE QTEXT */
|
||||
#line 155 ".\\ScriptVals.y"
|
||||
|
||||
if (!eventNewContext(psCurrScript, CR_NORELEASE, &psCurrContext))
|
||||
{
|
||||
|
@ -991,8 +969,6 @@ case YYr5: { /* script_entry : script_name STORE QTEXT */
|
|||
} break;
|
||||
|
||||
case YYr7: { /* script_name : SCRIPT QTEXT */
|
||||
#line 171 ".\\ScriptVals.y"
|
||||
|
||||
|
||||
int namelen,extpos;
|
||||
char *stringname;
|
||||
|
@ -1034,7 +1010,6 @@ case YYr7: { /* script_name : SCRIPT QTEXT */
|
|||
} break;
|
||||
|
||||
case YYr11: { /* var_init : var_entry TYPE var_value */
|
||||
#line 223 ".\\ScriptVals.y"
|
||||
|
||||
BASE_OBJECT *psObj;
|
||||
SDWORD compIndex;
|
||||
|
@ -1444,7 +1419,6 @@ case YYr11: { /* var_init : var_entry TYPE var_value */
|
|||
break;
|
||||
case ST_SOUND:
|
||||
|
||||
|
||||
if (yypvt[0].sInit.type != IT_STRING)
|
||||
{
|
||||
scrv_error("Typemismatch for variable %d", yypvt[-2].vindex);
|
||||
|
@ -1492,7 +1466,6 @@ case YYr11: { /* var_init : var_entry TYPE var_value */
|
|||
} break;
|
||||
|
||||
case YYr12: { /* array_index : '[' INTEGER ']' */
|
||||
#line 692 ".\\ScriptVals.y"
|
||||
|
||||
sCurrArrayIndexes.dimensions = 1;
|
||||
sCurrArrayIndexes.elements[0] = yypvt[-1].ival;
|
||||
|
@ -1502,14 +1475,12 @@ case YYr12: { /* array_index : '[' INTEGER ']' */
|
|||
} break;
|
||||
|
||||
case YYr13: { /* array_index_list : array_index */
|
||||
#line 701 ".\\ScriptVals.y"
|
||||
|
||||
yyval.arrayIndex = yypvt[0].arrayIndex;
|
||||
|
||||
} break;
|
||||
|
||||
case YYr14: { /* array_index_list : array_index_list '[' INTEGER ']' */
|
||||
#line 705 ".\\ScriptVals.y"
|
||||
|
||||
if (yypvt[-3].arrayIndex->dimensions >= VAR_MAX_DIMENSIONS)
|
||||
{
|
||||
|
@ -1522,14 +1493,12 @@ case YYr14: { /* array_index_list : array_index_list '[' INTEGER ']' */
|
|||
} break;
|
||||
|
||||
case YYr15: { /* var_entry : VAR */
|
||||
#line 718 ".\\ScriptVals.y"
|
||||
|
||||
yyval.vindex = yypvt[0].vindex;
|
||||
|
||||
} break;
|
||||
|
||||
case YYr16: { /* var_entry : ARRAY array_index_list */
|
||||
#line 722 ".\\ScriptVals.y"
|
||||
|
||||
UDWORD index;
|
||||
|
||||
|
@ -1543,7 +1512,6 @@ case YYr16: { /* var_entry : ARRAY array_index_list */
|
|||
} break;
|
||||
|
||||
case YYr17: { /* var_value : BOOLEAN */
|
||||
#line 735 ".\\ScriptVals.y"
|
||||
|
||||
yyval.sInit.type = IT_BOOL;
|
||||
yyval.sInit.index = yypvt[0].bval;
|
||||
|
@ -1551,7 +1519,6 @@ case YYr17: { /* var_value : BOOLEAN */
|
|||
} break;
|
||||
|
||||
case YYr18: { /* var_value : INTEGER */
|
||||
#line 740 ".\\ScriptVals.y"
|
||||
|
||||
yyval.sInit.type = IT_INDEX;
|
||||
yyval.sInit.index = yypvt[0].ival;
|
||||
|
@ -1559,13 +1526,11 @@ case YYr18: { /* var_value : INTEGER */
|
|||
} break;
|
||||
|
||||
case YYr19: { /* var_value : QTEXT */
|
||||
#line 745 ".\\ScriptVals.y"
|
||||
|
||||
yyval.sInit.type = IT_STRING;
|
||||
yyval.sInit.pString = yypvt[0].sval;
|
||||
|
||||
} break;
|
||||
#line 314 "d:\mks-ly/etc/yyparse.c"
|
||||
case YYrACCEPT:
|
||||
YYACCEPT;
|
||||
case YYrERROR:
|
||||
|
@ -1589,10 +1554,6 @@ case YYr19: { /* var_value : QTEXT */
|
|||
#endif
|
||||
goto yyStack;
|
||||
|
||||
yyerrlabel: ; /* come here from YYERROR */
|
||||
/*
|
||||
#pragma used yyerrlabel
|
||||
*/
|
||||
yyerrflag = 1;
|
||||
if (yyi == YYrERROR) {
|
||||
yyps--;
|
||||
|
|
Loading…
Reference in New Issue