ratcatcher/globals.h

106 lines
2.2 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 curlevelnum;
int maxlevid;
int want1up,want2up;
int swapplayers;
2008-11-22 11:21:22 +11:00
int globpowerup;
int gamemode; // easy or hard?
int showhelp; // show help text?
spriteinfo_t spriteinfo[MAXPTYPES];
char progname[MIDBUFLEN];
char *datadir;
int gotcard; // got a card yet this level?
int curcard;
int deck[DECKSIZE];
int forcegoodcard;
int nextforcegoodcard;
// pointer to function
void (*drawpixel)(SDL_Surface *s, int x, int y, SDL_Color c);
SDL_Surface *levelbg; // level background image
SDL_Surface *temps; // temporary surface
SDL_Surface *screen; // the actual video screen
2008-10-19 08:46:55 +11:00
SDL_Surface *head,*head5; // imgs in corner showing number of lives
SDL_Surface *grave;
SDL_Surface *head2,*head52; // imgs in corner showing number of lives
SDL_Surface *icecube; // overlaid on frozen monsters
SDL_Surface *greenbox; // for fly spray effect
2008-10-30 10:00:12 +11:00
SDL_Surface *redbox; // for gunner
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, *player2; // pointer to the player's sprite
sprite_t *boss; // point to current boss on level (normally NULL)
Mix_Music *music, *fastmusic, *normalmusic,*bossmusic,*hiscoremusic;
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;
2008-11-13 07:39:03 +11:00
SDL_Color purple;
SDL_Color yellow;
#endif