ratcatcher/globals.h

85 lines
1.8 KiB
C
Raw Normal View History

#ifndef __GLOBALS_H
#define __GLOBALS_H
/* global variables */
int musicplaying;
levelentry_t levelentry[MAXLEVELS]; // level filenames etc
int numlevels;
int maxlevid;
spriteinfo_t spriteinfo[MAXPTYPES];
char *datadir;
int curcard;
int deck[DECKSIZE];
SDL_Surface *levelbg; // level background image
SDL_Surface *temps; // temporary surface
SDL_Surface *screen; // the actual video screen
SDL_Surface *head; // img in corner showing number of lives
SDL_Surface *icecube; // overlaid on frozen monsters
SDL_Surface *greenbox; // for fly spray effect
SDL_Surface *healthbar[HEALTHFRAMES]; // for boss health
sprite_t *sprite; // head of sprite linked list
sprite_t *lastsprite; // tail of sprite linked list
sprite_t *player; // pointer to the player's sprite
sprite_t *boss; // point to current boss on level (normally NULL)
sprite_t *mask; // point to scuba mask
Mix_Music *music, *fastmusic, *normalmusic,*bossmusic;
Mix_Chunk *sfx[MAXFX];
text_t *text, *lasttext;
level_t *curlevel; // the current level's data
int levelcomplete; // has the levle been finished?
int nexthurryup; // next hurryuptime for the level
int cheat;
tiletype_t fakeblock; // used for returning tiletypes from a function
int oldexitdir; // exit direction of previous level
int vidargs; // arguments for SetVideo call
TTF_Font *font[MAXLETTERHEIGHT];
2008-10-15 06:36:51 +11:00
TTF_Font *cardfont;
/* timers */
int gtime; // game time - time elapsed on current level
int timer; // generic 1-100 timer for repeated events
int toggletimer; // used for toggling between fullscreen mode
char *deathtext[] = {
"Ouch!",
"Ow!",
"Argh!",
"Noooo!"
};
char *bifftext[] = {
"Biff!",
"Pow!",
"Wham!",
"Splat!"
};
/* colours */
SDL_Color red;
SDL_Color black;
SDL_Color blue;
SDL_Color white;
SDL_Color green;
SDL_Color yellow;
#endif