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
;
29 extern ResFile sndfile
;
31 extern SDL_Surface
*backs
[8]; //0: title
36 SDL_Surface
*spr
[256][2];
39 extern SpriteBank banks
[257];
41 //extern int mouseX, mouseY, mouseButtons, mouseVisible;
44 extern void fatal (const char *fmt
, ...) __attribute__((__noreturn__
)) __attribute__((format(printf
, 1, 2)));
46 extern void initLabels (void);
49 extern Uint32
getSeedH (void);
50 extern Uint32
getSeedL (void);
51 extern Uint32
getSeed (void);
53 extern void setSeedHL (Uint32 h
, Uint32 l
);
54 extern void setSeedH (Uint32 u
);
55 extern void setSeedL (Uint32 u
);
56 extern void setSeed (Uint32 u
);
58 extern Uint32
randUInt32 (void);
61 extern int loadCodeFile (ResFile
*resfile
, int pc
, int idx
, int asmodule
);
64 extern int loadSound (int idx
); // !0: error
65 extern int unloadSound (int idx
); // !0: error (not loaded)
66 extern int isSoundLoaded (int idx
); // bool
67 extern int playSound (int idx
, int chan
); // returns channel or -1
68 extern int stopChannel (int chan
); // -1: all
69 extern int isChannelPlaying (int chan
); // bool (-1: how many channels are playing?)
71 extern void unloadAllSounds (void);
74 #include "vm_gamelabels.h"