2 * This program is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 #ifndef _GAMEGLOBALS_H_
16 #define _GAMEGLOBALS_H_
28 extern ResFile resfile
;
30 extern SDL_Surface
*backs
[8]; //0: title
35 SDL_Surface
*spr
[256][2];
38 extern SpriteBank banks
[256];
53 typedef struct LabelInfo
{
54 struct LabelInfo
*next
;
61 //extern LabelInfo *labels;
63 extern void fatal (const char *fmt
, ...) __attribute__((__noreturn__
)) __attribute__((format(printf
, 1, 2)));
66 extern int loadVMCode (ResFile
*resfile
, int pc
);
68 extern void freeLabels (void);
69 extern void freeLabelsUntilMark (void);
71 extern void labelAddMark (void);
72 extern LabelInfo
*addLabel (const char *name
, int type
, int value
, int pub
);
74 extern LabelInfo
*findLabel (const char *name
);
76 extern int findPC (const char *name
);
77 extern int findVarIndex (const char *name
);
78 extern int findGVarIndex (const char *name
);
79 extern int findTVarIndex (const char *name
);
80 extern int findSVarIndex (const char *name
);
81 extern int findConst (const char *name
);
83 extern void initLabels (void);
86 #include "vm_gamelabels.h"