Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 1 | pmbaty | 1 | /* | 
| 2 |  * src/game.h | ||
| 3 |  * | ||
| 4 |  * Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net). All rights reserved. | ||
| 5 |  * | ||
| 6 |  * The use and distribution terms for this software are contained in the file | ||
| 7 |  * named README, which can be found in the root of this distribution. By | ||
| 8 |  * using this software in any fashion, you are agreeing to be bound by the | ||
| 9 |  * terms of this license. | ||
| 10 |  * | ||
| 11 |  * You must not remove this notice, or any other, from this software. | ||
| 12 |  */ | ||
| 13 | |||
| 14 | #ifndef _GAME_H | ||
| 15 | #define _GAME_H | ||
| 16 | |||
| 17 | #include <stddef.h> /* NULL */ | ||
| 18 | |||
| 19 | #include "system.h" | ||
| 20 | |||
| 21 | #include "rects.h" | ||
| 22 | |||
| 23 | #define LEFT 1 | ||
| 24 | #define RIGHT 0 | ||
| 25 | |||
| 26 | #define TRUE 1 | ||
| 27 | #define FALSE 0 | ||
| 28 | |||
| 29 | #define GAME_PERIOD 60 | ||
| 30 | |||
| 31 | #define GAME_BOMBS_INIT 6 | ||
| 32 | #define GAME_BULLETS_INIT 6 | ||
| 33 | |||
| 34 | typedef struct | ||
| 35 | { | ||
| 36 |    U32 score; | ||
| 37 | U8 name[10]; | ||
| 38 | } hscore_t; | ||
| 39 | |||
| 40 | extern U8 game_lives; /* lives counter */ | ||
| 41 | extern U8 game_bombs; /* bombs counter */ | ||
| 42 | extern U8 game_bullets; /* bullets counter */ | ||
| 43 | |||
| 44 | extern U32 game_score; /* score */ | ||
| 45 | |||
| 46 | extern hscore_t game_hscores[8]; /* highest scores (hall of fame) */ | ||
| 47 | |||
| 48 | extern U16 game_map; /* current map */ | ||
| 49 | extern U16 game_submap; /* current submap */ | ||
| 50 | |||
| 51 | extern U8 game_dir; /* direction (LEFT, RIGHT) */ | ||
| 52 | extern U8 game_chsm; /* change submap request (TRUE, FALSE) */ | ||
| 53 | |||
| 54 | extern U8 game_waitevt; /* wait for events (TRUE, FALSE) */ | ||
| 55 | extern U8 game_period; /* time between each frame, in millisecond */ | ||
| 56 | |||
| 57 | extern rect_t *game_rects; /* rectangles to redraw at each frame */ | ||
| 58 | |||
| 59 | extern void game_run (void); | ||
| 60 | extern void game_setmusic (char *name, U8 loop); | ||
| 61 | extern void game_stopmusic (void); | ||
| 62 | |||
| 63 | |||
| 64 | extern sound_t *WAV_GAMEOVER; | ||
| 65 | extern sound_t *WAV_SBONUS2; | ||
| 66 | extern sound_t *WAV_BULLET; | ||
| 67 | extern sound_t *WAV_BOMBSHHT; | ||
| 68 | extern sound_t *WAV_EXPLODE; | ||
| 69 | extern sound_t *WAV_STICK; | ||
| 70 | extern sound_t *WAV_WALK; | ||
| 71 | extern sound_t *WAV_CRAWL; | ||
| 72 | extern sound_t *WAV_JUMP; | ||
| 73 | extern sound_t *WAV_PAD; | ||
| 74 | extern sound_t *WAV_BOX; | ||
| 75 | extern sound_t *WAV_BONUS; | ||
| 76 | extern sound_t *WAV_SBONUS1; | ||
| 77 | extern sound_t *WAV_DIE; | ||
| 78 | extern sound_t *WAV_ENTITY[]; | ||
| 79 | |||
| 80 | #endif |