2008-09-17 12:34:39 +10:00
|
|
|
#ifndef __DEFS_H
|
|
|
|
#define __DEFS_H
|
|
|
|
|
2008-09-26 19:51:17 +10:00
|
|
|
#include <SDL_mixer.h>
|
|
|
|
|
2008-11-19 09:30:43 +11:00
|
|
|
|
|
|
|
/* files */
|
|
|
|
#define FILE_LEVELMAP "map.dat"
|
2008-11-19 09:56:55 +11:00
|
|
|
#define FILE_TILEDEFS "tiledefs.dat"
|
|
|
|
#define DIR_LEVELS "levels"
|
2008-11-19 09:30:43 +11:00
|
|
|
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
/* Macros */
|
2008-10-01 22:42:59 +10:00
|
|
|
//#define OPENGL
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-12-25 17:58:26 +11:00
|
|
|
// joysticks
|
|
|
|
#define J_PLAYSTATION 1
|
|
|
|
#define J_WII 2
|
|
|
|
#define J_OTHER 3
|
|
|
|
|
2008-09-28 15:02:30 +10:00
|
|
|
// sound channel numbers
|
2008-09-27 16:02:42 +10:00
|
|
|
#define CH_LASTCHANNEL 21
|
|
|
|
#define CH_HURRYUP 20
|
|
|
|
|
2009-03-05 12:53:20 +11:00
|
|
|
// max number of regrowing tiles
|
|
|
|
#define MAXREGROW 200
|
|
|
|
|
|
|
|
// time a tile takes to regrow
|
2009-03-06 07:59:20 +11:00
|
|
|
#define REGROWTIMER_SHORT 350
|
|
|
|
#define REGROWTIMER_LONG 500
|
2008-09-27 16:02:42 +10:00
|
|
|
|
2008-11-21 12:36:52 +11:00
|
|
|
#define MAXCREDITS 5
|
|
|
|
|
2008-10-01 17:27:44 +10:00
|
|
|
#define MAXDEATHTEXT 4
|
|
|
|
#define MAXBIFFTEXT 4
|
|
|
|
|
2008-09-28 15:02:30 +10:00
|
|
|
|
|
|
|
|
2008-09-27 16:02:42 +10:00
|
|
|
// size of flower straem when getting last flower
|
|
|
|
// (number of gems on each side)
|
2008-09-30 17:42:09 +10:00
|
|
|
#define STREAMWID 5
|
2008-09-27 16:02:42 +10:00
|
|
|
|
|
|
|
|
|
|
|
// puff of smoke
|
|
|
|
#define PUFFFRAMES 6
|
|
|
|
#define PUFFSPEED 4 // how fast it animates (smaller = faster)
|
|
|
|
#define PUFFAPPEAR 4 // frame at which puff will turn into a gem
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-11-17 08:24:00 +11:00
|
|
|
// explosion
|
|
|
|
#define EXPFRAMES 7
|
|
|
|
|
2008-10-10 13:46:56 +11:00
|
|
|
// shuriken
|
|
|
|
#define STARFRAMES 5
|
|
|
|
#define STARSPEED 3
|
|
|
|
|
2008-10-10 14:53:59 +11:00
|
|
|
// meteor
|
|
|
|
#define METEORMAXSPEED 3
|
|
|
|
|
2008-10-03 17:37:05 +10:00
|
|
|
// sparkles
|
|
|
|
#define SPARKLEFRAMES 7
|
|
|
|
//#define SPARKLESPEED 3 // how fast it animates (smaller = faster)
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
// text sizes
|
|
|
|
#define TEXTSIZE_POINTS 10
|
2008-10-31 08:55:26 +11:00
|
|
|
#define TEXTSIZE_VER 13
|
2008-10-01 22:42:59 +10:00
|
|
|
#define TEXTSIZE_SCORE 14
|
2008-09-27 16:02:42 +10:00
|
|
|
#define TEXTSIZE_BONUS 20
|
2008-10-01 22:42:59 +10:00
|
|
|
#define TEXTSIZE_HELP 20
|
2008-10-18 14:18:24 +11:00
|
|
|
#define TEXTSIZE_CLOVER 20
|
2008-10-01 22:42:59 +10:00
|
|
|
#define TEXTSIZE_DEATH 20
|
2008-10-16 14:47:16 +11:00
|
|
|
#define TEXTSIZE_TITLE 20
|
2008-10-20 09:58:54 +11:00
|
|
|
#define TEXTSIZE_TITLE2 16
|
2008-10-21 08:40:00 +11:00
|
|
|
#define TEXTSIZE_CREDIT 14
|
2008-10-01 22:42:59 +10:00
|
|
|
#define TEXTSIZE_LEVEL2 22
|
2008-11-21 11:14:26 +11:00
|
|
|
#define TEXTSIZE_YUM 24
|
2008-10-01 17:27:44 +10:00
|
|
|
#define TEXTSIZE_BIFF 26
|
2008-10-10 12:30:40 +11:00
|
|
|
#define TEXTSIZE_MULTI 26
|
2008-10-01 17:27:44 +10:00
|
|
|
#define TEXTSIZE_LEVEL 32
|
2008-10-01 22:42:59 +10:00
|
|
|
#define TEXTSIZE_LIFE 36
|
|
|
|
#define TEXTSIZE_BOMB 36
|
2008-10-15 14:20:10 +11:00
|
|
|
#define TEXTSIZE_POKER 40
|
2008-10-01 22:42:59 +10:00
|
|
|
#define TEXTSIZE_HURRY 50
|
2008-10-03 17:37:05 +10:00
|
|
|
#define TEXTSIZE_PAUSED 50
|
2008-10-01 22:42:59 +10:00
|
|
|
#define TEXTSIZE_GAMEOVER 50
|
2008-10-22 11:51:09 +11:00
|
|
|
#define TEXTSIZE_HISCORE 16
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-10-17 22:15:27 +11:00
|
|
|
|
|
|
|
// text tuypes
|
|
|
|
#define TT_NORM 0
|
|
|
|
#define TT_HELP 1
|
|
|
|
#define TT_HELPSHADOW 2
|
2008-11-21 11:14:26 +11:00
|
|
|
#define TT_INTROTEXT 3
|
|
|
|
#define TT_GAMEOVER 4
|
|
|
|
|
|
|
|
|
|
|
|
// intro states
|
|
|
|
#define IS_START 0
|
|
|
|
#define IS_YUM 1
|
|
|
|
#define IS_YUMWAIT 2
|
|
|
|
#define IS_JUMP 3
|
|
|
|
#define IS_RATS 4
|
|
|
|
#define IS_RATS2 5
|
|
|
|
#define IS_FINISH 6
|
|
|
|
|
|
|
|
// intro variables
|
|
|
|
#define INTRO_RATSPEED 12
|
|
|
|
#define INTRO_LEVELNUM 101
|
2009-03-27 10:46:40 +11:00
|
|
|
#define TEST_LEVELNUM 102
|
2008-11-21 11:14:26 +11:00
|
|
|
|
2008-10-18 14:18:24 +11:00
|
|
|
|
2008-10-23 06:40:10 +11:00
|
|
|
#define GAMEOVERWAIT 3 // # of seconds to wait before going back to title
|
2008-10-17 22:15:27 +11:00
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
// text delays
|
|
|
|
#define TEXTSPEED 2 // how fast text zooms in
|
|
|
|
|
|
|
|
// how long to keep various text on the screen
|
|
|
|
#define POINTSDELAY 40
|
2008-09-27 16:02:42 +10:00
|
|
|
#define BONUSDELAY 50
|
2008-10-10 12:30:40 +11:00
|
|
|
#define MULTIDELAY 50
|
2008-09-17 12:34:39 +10:00
|
|
|
#define HURRYDELAY 50
|
2008-10-01 22:42:59 +10:00
|
|
|
#define LIFEDELAY 50
|
2008-10-18 14:18:24 +11:00
|
|
|
#define CLOVERDELAY 50
|
2008-11-21 11:14:26 +11:00
|
|
|
#define YUMDELAY 80
|
2008-10-15 14:20:10 +11:00
|
|
|
#define POKERMSGDELAY 80
|
2008-10-01 17:27:44 +10:00
|
|
|
#define LEVELWINDELAY 80
|
|
|
|
#define DIEDELAY 80
|
2008-09-17 12:34:39 +10:00
|
|
|
#define HELPDELAY 80
|
2008-10-01 22:42:59 +10:00
|
|
|
#define LEVELDELAY 100
|
2008-10-23 06:40:10 +11:00
|
|
|
// TODO: put back!
|
|
|
|
#define GAMEOVERDELAY 200
|
|
|
|
//#define GAMEOVERDELAY 20
|
2008-10-16 16:51:30 +11:00
|
|
|
#define POKERDELAY 170
|
2008-09-28 15:02:30 +10:00
|
|
|
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
// Sizes
|
|
|
|
#define TILEH 16 // tile width (in pixels)
|
|
|
|
#define TILEW 16 // tile height (in pixels)
|
|
|
|
|
|
|
|
#define LEVELW 40 // level width (in tiles)
|
|
|
|
#define LEVELH 30 // level height (in tiles)
|
|
|
|
|
|
|
|
|
2008-11-23 16:50:02 +11:00
|
|
|
// keys
|
|
|
|
#define KEY_RIGHT SDLK_j
|
|
|
|
#define KEY_LEFT SDLK_g
|
|
|
|
#define KEY_UP SDLK_y
|
|
|
|
#define KEY_DOWN SDLK_h
|
|
|
|
#define KEY_SHOOT SDLK_z
|
|
|
|
#define KEY_JUMP SDLK_x
|
|
|
|
#define KEY_SLAM SDLK_c
|
|
|
|
#define KEY2_RIGHT SDLK_RIGHT
|
|
|
|
#define KEY2_LEFT SDLK_LEFT
|
|
|
|
#define KEY2_UP SDLK_UP
|
|
|
|
#define KEY2_DOWN SDLK_DOWN
|
|
|
|
#define KEY2_SHOOT SDLK_m
|
|
|
|
#define KEY2_JUMP SDLK_COMMA
|
|
|
|
#define KEY2_SLAM SDLK_PERIOD
|
|
|
|
|
|
|
|
|
2008-10-03 21:11:07 +10:00
|
|
|
// ice effect
|
|
|
|
#define ICE_NONE 0
|
|
|
|
#define ICE_INPROGRESS 1
|
|
|
|
#define ICE_COMPLETE 2
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-10-13 11:43:01 +11:00
|
|
|
#define WATER_NONE 0
|
|
|
|
#define WATER_INPROGRESS 3
|
|
|
|
#define WATER_COMPLETE 4
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
|
|
|
|
// Game mechanics
|
|
|
|
#define INVULNTIME 200 // how long player stays invulnerable for
|
2008-10-09 14:32:15 +11:00
|
|
|
#define SLUGINVULNTIME 50 // how long a new slug stays invulnerable for
|
2008-11-25 15:05:53 +11:00
|
|
|
#define FLYINVULNTIME 15 // how long a new fly from kingfly stays invulnerable
|
2008-11-10 18:51:15 +11:00
|
|
|
#define SHIELDTIME 600 // how long a shield lasts
|
2008-09-17 12:34:39 +10:00
|
|
|
#define FALLSPEED 4 // terminal velocity of falling sprites
|
2008-11-25 12:00:57 +11:00
|
|
|
#define UMBFALLSPEED 1 // terminal velocity of falling sprites with umbrella
|
2008-11-25 08:47:52 +11:00
|
|
|
#define SMALLNETSPEED 6 // how fast the player's net moves with skull
|
2008-09-17 12:34:39 +10:00
|
|
|
#define NETSPEED 9 // how fast the player's net moves
|
2008-10-18 15:16:06 +11:00
|
|
|
#define BIGNETSPEED 12 // how fast the player's net moves with bignet
|
|
|
|
#define ACCNETSPEED 28 // how fast the player's net moves with accordion
|
2008-09-28 15:19:23 +10:00
|
|
|
#define POWERUPTIME 15 // # secs before a powerup appears
|
2008-11-23 18:54:06 +11:00
|
|
|
#define POWERUPTIME2 10 // # secs before a powerup appears
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-10-07 18:58:36 +11:00
|
|
|
#define PLAYERFAST 2 // how fast player goes with speed powerup
|
2008-12-18 11:46:54 +11:00
|
|
|
#define PLAYERPILL 4 // how fast player goes with pill powerup
|
2008-10-07 18:58:36 +11:00
|
|
|
|
2008-10-09 14:32:15 +11:00
|
|
|
#define BUBBLETIME 200 // how oftem bubbles appear
|
|
|
|
|
2008-10-13 11:43:01 +11:00
|
|
|
#define FLOODSPEED 4 // how fast flood effect acts
|
|
|
|
|
2008-10-18 14:18:24 +11:00
|
|
|
#define LUCKYFLASH 10 // how fast score flashes during lucky mode
|
|
|
|
|
2008-12-18 11:46:54 +11:00
|
|
|
|
2008-10-13 11:43:01 +11:00
|
|
|
#define MASKOFFSETX 8
|
|
|
|
#define MASKOFFSETY -12
|
|
|
|
|
|
|
|
#define MASKOFFSETSLAMX 1
|
|
|
|
#define MASKOFFSETSLAMY -17
|
|
|
|
|
2008-10-15 14:20:10 +11:00
|
|
|
#define POKERWAITTIME 150 // how long to display poker msg
|
|
|
|
|
2008-10-07 16:53:06 +11:00
|
|
|
|
|
|
|
#define CANNONSIZE 10
|
|
|
|
|
2008-10-03 21:11:07 +10:00
|
|
|
#define ICESPEED 2 // how fast a level turns to ice
|
|
|
|
|
2008-10-07 16:53:06 +11:00
|
|
|
#define MONJUMPSPEED 5 // how high monsters jump
|
2008-12-22 14:03:48 +11:00
|
|
|
#define FROGJUMPSPEED1 3 // how high frogs jump
|
|
|
|
#define FROGJUMPSPEED2 6 // how high frogs jump
|
|
|
|
|
|
|
|
#define FROGPAUSE 20 // how long frog waits in between jumps
|
2008-10-07 16:53:06 +11:00
|
|
|
|
|
|
|
#define BOMBSHAKETIME 100 // time for screen will shake after a bomb
|
|
|
|
#define RATSHAKETIME 50 // shake time when king rat is stunned
|
2008-11-05 07:54:52 +11:00
|
|
|
#define SNAILSHAKETIME 35 // shake time when king snail jumps
|
2008-10-07 16:53:06 +11:00
|
|
|
|
|
|
|
#define BOSSFLASHTIME 15 // how long bosses flash white for when hit
|
|
|
|
#define BOSSDIETIME 150 // how long bosses flash when dead
|
|
|
|
|
2008-10-03 21:11:07 +10:00
|
|
|
|
2008-10-03 17:37:05 +10:00
|
|
|
#define BELLTIME 20 // how long the bell flash lasts
|
|
|
|
#define CLOCKTIME 10 // how many seconds a clock lasts
|
|
|
|
|
2008-11-26 14:24:03 +11:00
|
|
|
|
2008-12-19 12:10:11 +11:00
|
|
|
#define RAYGUNSPEED 9 // how fast ray gun bullet travels
|
|
|
|
|
2008-11-26 14:24:03 +11:00
|
|
|
// ice
|
|
|
|
#define ICEACCEL 0.1
|
2008-11-27 10:53:37 +11:00
|
|
|
#define ICEDECCEL 0.03
|
2008-11-26 14:24:03 +11:00
|
|
|
|
2008-10-10 10:12:51 +11:00
|
|
|
// blackcloud
|
|
|
|
#define CLOUDGROWSPEED 25 // lower is faster
|
|
|
|
#define CLOUDGROWAMT 0.01 // lower is faster
|
|
|
|
|
2008-10-03 17:37:05 +10:00
|
|
|
|
2008-10-07 16:53:06 +11:00
|
|
|
// king rat
|
|
|
|
#define KR_WALKTIME 100
|
|
|
|
#define KR_STUNTIME 150
|
|
|
|
#define KR_MAXJUMP 15 // max initial jumpspeed
|
|
|
|
#define KR_NUMJUMPS 5
|
|
|
|
#define KR_CHARGESPEED 8
|
|
|
|
// king rat states
|
|
|
|
#define KRS_WALK 0
|
|
|
|
#define KRS_JUMP 1
|
|
|
|
#define KRS_WAITFORTOP 2
|
|
|
|
#define KRS_FALL 3
|
|
|
|
#define KRS_CHARGEWAIT 4
|
|
|
|
#define KRS_CHARGE 5
|
|
|
|
#define KRS_STUN 6
|
|
|
|
|
2008-11-03 17:06:37 +11:00
|
|
|
// king snail
|
|
|
|
#define KS_WALKTIME 300
|
|
|
|
#define KS_SHOOTWAIT 80 // how long to pause between shooting
|
|
|
|
#define KS_JUMPWAIT 30 // how long to pause before jumping
|
|
|
|
#define KS_RELOADWAIT 100 // how long to pause after jumping
|
|
|
|
// king snail states
|
|
|
|
#define KSS_WALK1 0 // walk back & forth
|
|
|
|
#define KSS_PAUSE1 1 // smoke comes out of shell
|
|
|
|
#define KSS_SHOOT 2 // shell cracks, shoot out snails
|
|
|
|
#define KSS_REGEN 3 // shell coming back
|
|
|
|
#define KSS_WALK2 4 // walks again
|
|
|
|
#define KSS_PAUSE2 5 // delay before jumping
|
|
|
|
#define KSS_JUMPING 6 // jumping, snails turn to slugs
|
|
|
|
#define KSS_PAUSE3 7 // pause after jumping
|
|
|
|
|
2008-11-25 12:41:15 +11:00
|
|
|
// king fly
|
|
|
|
#define KF_FLYTIME 300
|
2008-11-25 15:05:53 +11:00
|
|
|
#define KF_HOVERTIME 75
|
2008-11-25 12:41:15 +11:00
|
|
|
// king fly states
|
|
|
|
#define KFS_FLY1 0
|
2008-11-25 15:05:53 +11:00
|
|
|
#define KFS_HORZWAIT 1
|
|
|
|
#define KFS_HORZPUSH 2
|
|
|
|
#define KFS_HORZ 3
|
|
|
|
#define KFS_FLY2 5
|
|
|
|
#define KFS_VERTWAIT 6
|
|
|
|
#define KFS_VERTPUSH 7
|
|
|
|
#define KFS_VERT 8
|
2008-10-07 16:53:06 +11:00
|
|
|
|
2009-03-05 08:22:28 +11:00
|
|
|
// king ant
|
2009-03-05 12:53:20 +11:00
|
|
|
#define KA_WALKTIME 400
|
2009-03-06 07:59:20 +11:00
|
|
|
#define KA_SHOOTTIME 50
|
2009-03-05 08:22:28 +11:00
|
|
|
// king ant stats
|
|
|
|
#define KAS_WALK1 0
|
2009-03-05 12:53:20 +11:00
|
|
|
#define KAS_JUMP1 1
|
|
|
|
#define KAS_WAITFORTOP1 2
|
|
|
|
#define KAS_WAITFORTOP2 3
|
|
|
|
#define KAS_FALL1 4
|
|
|
|
#define KAS_FALL2 5
|
|
|
|
#define KAS_WALK2 6
|
|
|
|
#define KAS_JUMP2 7
|
2009-03-05 08:22:28 +11:00
|
|
|
|
2009-03-20 12:35:13 +11:00
|
|
|
// moth
|
2009-03-22 08:42:38 +11:00
|
|
|
#define BAT_PAUSE 20
|
|
|
|
#define BAT_FIRESPACE 3 // space between shots
|
2009-03-20 12:35:13 +11:00
|
|
|
// moth states
|
2009-03-22 08:42:38 +11:00
|
|
|
#define BS_FLY 0
|
|
|
|
#define BS_PAUSE1 1
|
|
|
|
#define BS_PAUSE2 2
|
2009-03-20 12:35:13 +11:00
|
|
|
|
|
|
|
|
2008-10-03 17:37:05 +10:00
|
|
|
// bell states
|
|
|
|
#define BELL_DONESOUND 1
|
|
|
|
#define BELL_DONEFLASH 2
|
|
|
|
|
|
|
|
#define MACEEXPX 2 // X size of mace explosion
|
2008-09-30 17:42:09 +10:00
|
|
|
#define MACEEXPY 2 // Y size of mace explosion
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
|
|
|
|
// Limits
|
2008-11-21 11:14:26 +11:00
|
|
|
#define MAXLEVELS 102
|
2008-09-17 12:34:39 +10:00
|
|
|
#define MAXMAPPINGS 50
|
2008-12-28 13:15:55 +11:00
|
|
|
#define MAXMONSTERSPERLEVEL 150
|
2008-09-17 12:34:39 +10:00
|
|
|
#define MAXLETTERHEIGHT 100
|
2008-10-03 17:37:05 +10:00
|
|
|
#define MAXFRAMES 18 // max number of frames for sprites
|
2008-09-17 12:34:39 +10:00
|
|
|
#define MAXHELP 5
|
2008-09-26 19:51:17 +10:00
|
|
|
#define MAXTILEFRAMES 10 // max number of frames for animated tiles
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-10-15 14:20:10 +11:00
|
|
|
#define MAXCARDS 5 // how many cards a player can have
|
|
|
|
|
2008-10-16 16:37:57 +11:00
|
|
|
#define MAXJOYBUTTONS 20
|
|
|
|
|
2008-11-08 12:06:18 +11:00
|
|
|
#define JOYTHRESH_ANA 30000 // how far you have to move the analogue stick
|
|
|
|
#define JOYTHRESH_DIG 6000 // how far you have to move the analogue stick
|
|
|
|
|
2008-10-22 11:51:09 +11:00
|
|
|
#define MAXHISCORES 10
|
2008-10-23 19:05:04 +11:00
|
|
|
#define MAXHISCORENAME 12
|
2008-10-22 11:51:09 +11:00
|
|
|
|
2008-11-08 10:29:22 +11:00
|
|
|
#define MAXWAYPOINTS 30
|
2008-11-06 20:15:09 +11:00
|
|
|
|
2008-10-23 14:21:15 +11:00
|
|
|
#define HISCORE_DISPLAYTIME 10 // how many secs to display hiscores for
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
// Fixed text buffer sizes
|
|
|
|
#define BUFLEN 512
|
|
|
|
#define MIDBUFLEN 64
|
|
|
|
#define SMALLBUFLEN 32
|
|
|
|
|
|
|
|
|
|
|
|
// Boolean values
|
|
|
|
#define B_TRUE -1
|
|
|
|
#define B_FALSE 0
|
|
|
|
|
2008-12-22 14:03:48 +11:00
|
|
|
// reasons for not being able to move
|
|
|
|
#define NM_SIDE -1
|
|
|
|
#define NM_BELOW -2
|
|
|
|
|
2008-10-07 20:18:42 +11:00
|
|
|
// fruit types
|
|
|
|
#define FT_FRUIT 1
|
|
|
|
#define FT_PERM 2
|
|
|
|
#define FT_TEMP 3
|
2008-10-10 12:30:40 +11:00
|
|
|
#define FT_GEM 4
|
2008-10-15 14:20:10 +11:00
|
|
|
#define FT_CARD 5
|
2008-11-05 08:13:44 +11:00
|
|
|
#define FT_SUPER 6
|
|
|
|
#define FT_OTHER 10
|
2008-10-07 20:18:42 +11:00
|
|
|
|
|
|
|
// monster types
|
|
|
|
#define MT_MONSTER 1
|
|
|
|
#define MT_BOSS 2
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
// Other
|
2008-10-01 22:42:59 +10:00
|
|
|
#define WANTFPS 60 // try to run at this many frames per sec
|
2008-09-17 12:34:39 +10:00
|
|
|
|
|
|
|
|
|
|
|
/* enums */
|
|
|
|
|
2008-09-26 19:51:17 +10:00
|
|
|
/* sounds */
|
2009-03-20 12:56:12 +11:00
|
|
|
#define MAXFX 65
|
2008-09-26 19:51:17 +10:00
|
|
|
#define FX_SHOOT 0
|
|
|
|
#define FX_SLAM 1
|
|
|
|
#define FX_KILL 2
|
|
|
|
#define FX_MULTIKILL 3
|
|
|
|
#define FX_JUMP 4
|
|
|
|
#define FX_FRUIT 5
|
|
|
|
#define FX_POWERUP 6
|
|
|
|
#define FX_DIE 7
|
|
|
|
#define FX_WINLEVEL 8
|
2008-09-27 16:02:42 +10:00
|
|
|
#define FX_HURRYUP 9
|
|
|
|
#define FX_TOOSLOW 10
|
|
|
|
#define FX_BONUS 11
|
2008-09-28 14:09:12 +10:00
|
|
|
#define FX_MORPH 12
|
2008-09-28 14:42:09 +10:00
|
|
|
#define FX_BOOM 13
|
2008-09-29 18:32:56 +10:00
|
|
|
#define FX_SPRING 14
|
2008-09-30 17:42:09 +10:00
|
|
|
#define FX_TELEPORT 15
|
|
|
|
#define FX_SPLASH 16
|
|
|
|
#define FX_MACE 17
|
2008-10-21 08:40:00 +11:00
|
|
|
#define FX_COIN 18
|
2008-10-01 22:42:59 +10:00
|
|
|
#define FX_GAMEOVER 19
|
2008-10-03 17:37:05 +10:00
|
|
|
#define FX_OW 20
|
|
|
|
#define FX_BELL 21
|
|
|
|
#define FX_CLOCK 22
|
|
|
|
#define FX_ARMOR 23
|
2008-10-03 21:11:07 +10:00
|
|
|
#define FX_FREEZE 24
|
|
|
|
#define FX_ICEBREAK 25
|
2008-10-07 16:53:06 +11:00
|
|
|
#define FX_BOSSWINDUP 26
|
|
|
|
#define FX_BOSSCHARGE 27
|
|
|
|
#define FX_BOSSDIE 28
|
|
|
|
#define FX_BOSSHIT 29
|
|
|
|
#define FX_BOSSWALL 30
|
|
|
|
#define FX_SPRAY 31
|
|
|
|
#define FX_CANNON 32
|
2008-10-09 14:32:15 +11:00
|
|
|
#define FX_CRACK 33
|
2008-10-10 10:49:43 +11:00
|
|
|
#define FX_PHONE 34
|
2008-10-10 13:46:56 +11:00
|
|
|
#define FX_STAR 35
|
|
|
|
#define FX_STARHIT 36
|
2008-10-10 14:53:59 +11:00
|
|
|
#define FX_METEOR 37
|
2008-10-10 20:11:53 +11:00
|
|
|
#define FX_ENGAGED 38
|
2008-10-13 11:43:01 +11:00
|
|
|
#define FX_FLOOD 39
|
2008-10-15 14:24:24 +11:00
|
|
|
#define FX_CARD 40
|
2008-10-15 14:34:13 +11:00
|
|
|
#define FX_POKER 41
|
2008-10-18 16:10:10 +11:00
|
|
|
#define FX_SKULL 42
|
2008-11-21 12:36:52 +11:00
|
|
|
#define FX_KEYPRESS 43
|
2008-10-29 13:31:56 +11:00
|
|
|
#define FX_CATCH 44
|
2008-10-30 10:00:12 +11:00
|
|
|
#define FX_GUN 45
|
|
|
|
#define FX_ALARM 46
|
2008-10-30 12:06:25 +11:00
|
|
|
#define FX_ZAP 47
|
2008-11-05 07:54:52 +11:00
|
|
|
#define FX_SNAILPREPARE 48
|
|
|
|
#define FX_WHOOSH 49
|
2008-11-17 08:24:00 +11:00
|
|
|
#define FX_BOOM2 50
|
2008-11-17 10:01:10 +11:00
|
|
|
#define FX_WAND 51
|
2008-11-17 13:44:44 +11:00
|
|
|
#define FX_WHISTLE 52
|
|
|
|
#define FX_EVILLAUGH 53
|
2008-11-21 12:07:41 +11:00
|
|
|
#define FX_BIRDS 54
|
2008-11-21 12:36:52 +11:00
|
|
|
#define FX_EXTRALIFE 55
|
2008-11-22 21:11:33 +11:00
|
|
|
#define FX_WARP 56
|
2008-11-25 07:43:46 +11:00
|
|
|
#define FX_JETPACK 57
|
2008-11-25 08:35:46 +11:00
|
|
|
#define FX_CAMERA 58
|
2008-12-19 12:10:11 +11:00
|
|
|
#define FX_LASER 59
|
2008-12-21 12:04:54 +11:00
|
|
|
#define FX_HISS 60
|
2008-12-23 10:48:04 +11:00
|
|
|
#define FX_CHOMP 61
|
|
|
|
#define FX_GROWL 62
|
2009-03-06 09:40:02 +11:00
|
|
|
#define FX_LAMP 63
|
2009-03-22 08:42:38 +11:00
|
|
|
#define FX_SONAR 64
|
2008-09-26 19:51:17 +10:00
|
|
|
|
2008-10-15 14:20:10 +11:00
|
|
|
// card suits
|
|
|
|
#define CS_HEART 1
|
|
|
|
#define CS_DIAMOND 2
|
|
|
|
#define CS_SPADE 3
|
|
|
|
#define CS_CLUB 4
|
|
|
|
|
|
|
|
// poker effects
|
|
|
|
#define PE_HIGHCARD 1
|
|
|
|
#define PE_PAIR 2
|
|
|
|
#define PE_TWOPAIR 3
|
|
|
|
#define PE_TRIPLE 4
|
|
|
|
#define PE_STRAIGHT 5
|
|
|
|
#define PE_FLUSH 6
|
|
|
|
#define PE_FULLHOUSE 7
|
|
|
|
#define PE_FOUR 8
|
|
|
|
#define PE_STRAIGHTFLUSH 9
|
|
|
|
#define PE_ROYALFLUSH 10
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
// Slope types
|
|
|
|
#define S_NOTSOLID 0
|
|
|
|
#define S_SOLID 1
|
|
|
|
#define S_SLOPE 2
|
|
|
|
|
|
|
|
// Sprite types
|
2009-03-20 12:35:13 +11:00
|
|
|
#define MAXPTYPES 174
|
2008-09-17 12:34:39 +10:00
|
|
|
#define P_PLAYER 0
|
|
|
|
#define P_RAT 1
|
|
|
|
#define P_CHEESE 2
|
|
|
|
#define P_SPEED 3
|
|
|
|
#define P_NUMNETS 4
|
|
|
|
#define P_BIGNET 5
|
|
|
|
#define P_BEE 6
|
|
|
|
#define P_SPIDER 7
|
2008-10-07 16:53:06 +11:00
|
|
|
#define P_BLACKCLOUD 8
|
2008-09-17 12:34:39 +10:00
|
|
|
#define P_ICECREAM 9
|
|
|
|
#define P_CHIPS 10
|
|
|
|
#define P_BURGER 11
|
|
|
|
#define P_SNAKE 12
|
|
|
|
#define P_SPIT 13
|
|
|
|
#define P_HELP 14
|
2008-09-26 19:51:17 +10:00
|
|
|
#define P_FLOWERYELLOW 15
|
|
|
|
#define P_FLOWERRED 16
|
|
|
|
#define P_FLOWERPURPLE 17
|
2008-10-13 11:43:01 +11:00
|
|
|
#define P_TICK 18
|
2008-09-27 16:02:42 +10:00
|
|
|
#define P_GEMRED 19
|
2008-10-07 16:53:06 +11:00
|
|
|
#define P_PUFF 20
|
2008-09-27 16:02:42 +10:00
|
|
|
#define P_GEMYELLOW 21
|
|
|
|
#define P_GEMPURPLE 22
|
2008-09-28 13:18:36 +10:00
|
|
|
#define P_POWERUPPOS 23
|
|
|
|
#define P_BOXING 24 // this is the powerup
|
|
|
|
#define P_GLOVE 25 // this is the glove on the end of the net
|
|
|
|
#define P_DIAMOND 26
|
2008-09-28 14:09:12 +10:00
|
|
|
#define P_FTODIAMOND 27
|
|
|
|
#define P_FTOGEM 28
|
2008-09-28 14:42:09 +10:00
|
|
|
#define P_BOMB 29
|
2008-09-28 15:19:23 +10:00
|
|
|
#define P_SHIELD 30
|
2008-09-30 17:42:09 +10:00
|
|
|
#define P_MACEPOWERUP 31
|
|
|
|
#define P_MACE 32
|
2008-10-03 17:37:05 +10:00
|
|
|
#define P_SMASH 33 // explosion from a mace smash
|
|
|
|
#define P_HELMET 34 // helmet powerup
|
|
|
|
#define P_ARMOUR 35 // player wearing armour
|
|
|
|
#define P_GEMBOOST 36
|
|
|
|
#define P_TROPHY 37
|
|
|
|
#define P_RINGSILVER 38
|
|
|
|
#define P_RINGGOLD 39
|
|
|
|
#define P_SPARKLE 40
|
|
|
|
#define P_BELL 41
|
|
|
|
#define P_CLOCK 42
|
2008-10-03 21:11:07 +10:00
|
|
|
#define P_SNOWMAN 43
|
2008-10-07 16:53:06 +11:00
|
|
|
#define P_PINKCLOUD 44
|
|
|
|
#define P_KINGRAT 45
|
|
|
|
#define P_SPRAY 46
|
|
|
|
#define P_CANNONPOWERUP 47
|
|
|
|
#define P_CANNON 48
|
2008-10-09 14:32:15 +11:00
|
|
|
#define P_SNAIL 49
|
|
|
|
#define P_SLUG 50
|
|
|
|
#define P_BUBBLE 51
|
2008-10-10 10:49:43 +11:00
|
|
|
#define P_PHONE 52
|
2008-10-10 11:51:40 +11:00
|
|
|
#define P_HONEY 53
|
|
|
|
#define P_LIFE 54
|
2008-10-10 13:46:56 +11:00
|
|
|
#define P_STARPOWERUP 55
|
|
|
|
#define P_STAR 56
|
2008-10-10 14:53:59 +11:00
|
|
|
#define P_UFO 57
|
|
|
|
#define P_METEOR 58
|
2008-10-10 16:29:35 +11:00
|
|
|
#define P_BIGSPEED 59
|
2008-10-10 21:06:40 +11:00
|
|
|
#define P_FISH 60
|
2008-10-13 11:43:01 +11:00
|
|
|
#define P_TAP 61
|
|
|
|
#define P_MASK 62
|
|
|
|
#define P_MASKPOWERUP 63
|
2008-10-15 06:36:51 +11:00
|
|
|
#define P_FIRSTCARD 64 // IMPORTANT!
|
|
|
|
#define P_FIRSTHEART 64 // IMPORTANT!
|
|
|
|
#define P_CARDH1 64
|
|
|
|
#define P_CARDH2 65
|
|
|
|
#define P_CARDH3 66
|
|
|
|
#define P_CARDH4 67
|
|
|
|
#define P_CARDH5 68
|
|
|
|
#define P_CARDH6 69
|
|
|
|
#define P_CARDH7 70
|
|
|
|
#define P_CARDH8 71
|
|
|
|
#define P_CARDH9 72
|
|
|
|
#define P_CARDH10 73
|
|
|
|
#define P_CARDHJ 74
|
|
|
|
#define P_CARDHQ 75
|
|
|
|
#define P_CARDHK 76
|
|
|
|
#define P_FIRSTDIAMOND 77 // IMPORTANT!
|
|
|
|
#define P_CARDD1 77
|
|
|
|
#define P_CARDD2 78
|
|
|
|
#define P_CARDD3 79
|
|
|
|
#define P_CARDD4 80
|
|
|
|
#define P_CARDD5 81
|
|
|
|
#define P_CARDD6 82
|
|
|
|
#define P_CARDD7 83
|
|
|
|
#define P_CARDD8 84
|
|
|
|
#define P_CARDD9 85
|
|
|
|
#define P_CARDD10 86
|
|
|
|
#define P_CARDDJ 87
|
|
|
|
#define P_CARDDQ 88
|
|
|
|
#define P_CARDDK 89
|
|
|
|
#define P_FIRSTSPADE 90 // IMPORTANT!
|
|
|
|
#define P_CARDS1 90
|
|
|
|
#define P_CARDS2 91
|
|
|
|
#define P_CARDS3 92
|
|
|
|
#define P_CARDS4 93
|
|
|
|
#define P_CARDS5 94
|
|
|
|
#define P_CARDS6 95
|
|
|
|
#define P_CARDS7 96
|
|
|
|
#define P_CARDS8 97
|
|
|
|
#define P_CARDS9 98
|
|
|
|
#define P_CARDS10 99
|
|
|
|
#define P_CARDSJ 100
|
|
|
|
#define P_CARDSQ 101
|
|
|
|
#define P_CARDSK 102
|
|
|
|
#define P_FIRSTCLUB 103 // IMPORTANT!
|
|
|
|
#define P_CARDC1 103
|
|
|
|
#define P_CARDC2 104
|
|
|
|
#define P_CARDC3 105
|
|
|
|
#define P_CARDC4 106
|
|
|
|
#define P_CARDC5 107
|
|
|
|
#define P_CARDC6 108
|
|
|
|
#define P_CARDC7 109
|
|
|
|
#define P_CARDC8 110
|
|
|
|
#define P_CARDC9 111
|
|
|
|
#define P_CARDC10 112
|
|
|
|
#define P_CARDCJ 113
|
|
|
|
#define P_CARDCQ 114
|
|
|
|
#define P_CARDCK 115
|
2008-10-15 14:20:10 +11:00
|
|
|
#define P_MOVINGCARD 116
|
|
|
|
#define P_FIVECARDS 117
|
2008-10-18 14:18:24 +11:00
|
|
|
#define P_CLOVER 118
|
2008-10-18 15:16:06 +11:00
|
|
|
#define P_ACCORDION 119
|
2008-11-25 12:07:40 +11:00
|
|
|
#define P_UMBRELLA 120
|
2008-10-18 16:10:10 +11:00
|
|
|
#define P_SKULL 121
|
2008-10-20 07:45:38 +11:00
|
|
|
#define P_WINGLEFT 122
|
|
|
|
#define P_WINGRIGHT 123
|
2008-10-30 10:00:12 +11:00
|
|
|
#define P_PLANT 124
|
|
|
|
#define P_GUN 125
|
2008-10-30 12:06:25 +11:00
|
|
|
#define P_ZAPPOWERUP 126
|
|
|
|
#define P_ZAPPER 127
|
2008-11-01 08:13:27 +11:00
|
|
|
#define P_KINGSNAIL 128
|
2008-11-03 17:06:37 +11:00
|
|
|
#define P_KSSHELL 129
|
2008-11-10 08:28:46 +11:00
|
|
|
#define P_BIGSCUBA 130
|
2008-11-06 13:15:49 +11:00
|
|
|
#define P_RANDOM 131
|
2008-11-06 20:15:09 +11:00
|
|
|
#define P_PLATFORM 132
|
2008-11-09 16:24:07 +11:00
|
|
|
#define P_FLY 133
|
2008-11-12 14:25:48 +11:00
|
|
|
#define P_PLAYER2 134
|
2008-11-12 16:06:32 +11:00
|
|
|
#define P_ARMOUR2 135 // player 2 wearing armour
|
2008-11-17 08:24:00 +11:00
|
|
|
#define P_GNOME 136
|
2008-11-17 10:01:10 +11:00
|
|
|
#define P_WAND 137
|
2008-11-17 13:44:44 +11:00
|
|
|
#define P_WHISTLE 138
|
2008-11-18 13:16:15 +11:00
|
|
|
#define P_CANDLE 139
|
2008-11-19 12:20:46 +11:00
|
|
|
#define P_PIZZA 140
|
|
|
|
#define P_SUNDAE 141
|
2008-11-19 12:42:40 +11:00
|
|
|
#define P_CAKE 142
|
2008-11-19 12:20:46 +11:00
|
|
|
#define P_CHOCOLATE 143
|
2008-11-22 11:21:22 +11:00
|
|
|
#define P_ANCHOR 144
|
|
|
|
#define P_SMALLANCHOR 145
|
2008-11-22 11:55:20 +11:00
|
|
|
#define P_MAGNET 146
|
|
|
|
#define P_BADMAGNET 147
|
2008-11-25 07:02:39 +11:00
|
|
|
#define P_JETPACK 148
|
2008-11-25 08:35:46 +11:00
|
|
|
#define P_CAMERA 149
|
2008-11-25 12:07:40 +11:00
|
|
|
#define P_WINGBOOTS 150
|
2008-11-25 12:00:57 +11:00
|
|
|
#define P_BIGUMBRELLA 151
|
2008-11-25 12:41:15 +11:00
|
|
|
#define P_KINGFLY 152
|
2008-11-26 09:23:18 +11:00
|
|
|
#define P_SUPERUMBRELLA 153
|
2008-12-18 11:46:54 +11:00
|
|
|
#define P_PILL 154
|
2008-12-19 12:10:11 +11:00
|
|
|
#define P_RAYGUN 155
|
|
|
|
#define P_RAYGUNBULLET 156
|
2008-12-22 14:03:48 +11:00
|
|
|
#define P_FROG 157
|
2008-12-23 10:48:04 +11:00
|
|
|
#define P_ANT1 158
|
|
|
|
#define P_ANT2 159
|
|
|
|
#define P_ANT3 160
|
|
|
|
#define P_FIREBALL 161
|
2009-01-30 14:30:38 +11:00
|
|
|
#define P_TOPHAT 162
|
2009-03-05 08:22:28 +11:00
|
|
|
#define P_KINGANT 163
|
|
|
|
#define P_FLAME 164 // like mace smash but harmless
|
2009-03-05 12:53:20 +11:00
|
|
|
#define P_BIGFIREBALL 165
|
2009-03-06 07:59:20 +11:00
|
|
|
#define P_EGG 166
|
|
|
|
#define P_BIGHELMET 167
|
2009-03-06 09:40:02 +11:00
|
|
|
#define P_GOLDCOIN 168
|
|
|
|
#define P_LAMP 169
|
|
|
|
#define P_GOLDBAR 170
|
2009-03-11 10:16:08 +11:00
|
|
|
#define P_WSPIDER 171
|
2009-03-22 08:42:38 +11:00
|
|
|
#define P_BAT 172
|
|
|
|
#define P_SONAR 173
|
2008-10-15 06:36:51 +11:00
|
|
|
|
2008-11-09 08:14:10 +11:00
|
|
|
|
2008-11-09 16:24:07 +11:00
|
|
|
#define FLY_FLYTIME 150
|
|
|
|
#define FLY_WALKTIME 300
|
|
|
|
|
|
|
|
#define F_WALK 0
|
|
|
|
#define F_FLYHORZ 1
|
|
|
|
#define F_FLYVERT 2
|
|
|
|
|
|
|
|
|
2008-11-11 10:52:27 +11:00
|
|
|
#define PLATFORMPAUSE 30
|
2008-11-09 08:14:10 +11:00
|
|
|
#define PLATFORMDELAY 4
|
|
|
|
#define PLATFORM_ACCEL 0.5 // how fast platforms accelerate/decellerate
|
|
|
|
#define PLATFORM_MINSPEED 0.3
|
|
|
|
#define PLATFORM_MAXSPEED 3
|
|
|
|
|
2008-10-15 06:36:51 +11:00
|
|
|
// cards
|
|
|
|
#define CARDFONTX 4
|
|
|
|
#define CARDFONTY 6
|
|
|
|
#define CARDFONTSIZE 10
|
2008-09-28 13:18:36 +10:00
|
|
|
|
2008-11-12 14:25:48 +11:00
|
|
|
|
|
|
|
// score display
|
|
|
|
#define P1SCOREX 20
|
|
|
|
#define P1LIVESX 20
|
|
|
|
|
|
|
|
#define SCOREY 7
|
|
|
|
#define LIVESY 25
|
|
|
|
|
2008-10-15 14:20:10 +11:00
|
|
|
// card display (in top left of main screen)
|
|
|
|
#define CARDX 20
|
|
|
|
#define CARDY 55
|
|
|
|
|
|
|
|
// how fast cards move towards the corner
|
|
|
|
#define CARDSPEED 8
|
|
|
|
#define FIVECARDSPEED 8
|
|
|
|
|
|
|
|
// how many cards in a deck
|
|
|
|
#define DECKSIZE 52
|
|
|
|
|
|
|
|
#define SHUFFLEQUALITY 100
|
|
|
|
|
2008-09-28 13:18:36 +10:00
|
|
|
// powerups
|
|
|
|
#define PW_NONE 0
|
|
|
|
#define PW_BOXING 1 // boxing glove
|
2008-09-28 14:42:09 +10:00
|
|
|
#define PW_BOMB 2 // bomb
|
2008-10-03 17:37:05 +10:00
|
|
|
#define PW_MACE 3 // mace
|
|
|
|
#define PW_RINGWALK 4 // points for walking
|
|
|
|
#define PW_RINGJUMP 5 // points for jumping
|
|
|
|
#define PW_CLOCK 6 // freeze time
|
2008-10-07 16:53:06 +11:00
|
|
|
#define PW_SPRAYUP 7 // fly spray
|
|
|
|
#define PW_SPRAYDOWN 8 // fly spray
|
|
|
|
#define PW_CANNON 9 // fusion cannon
|
|
|
|
#define PW_CANNONFIRE 10 // fusion cannon firing
|
2008-10-10 10:49:43 +11:00
|
|
|
#define PW_PHONE 11 // skip level
|
2008-10-18 15:16:06 +11:00
|
|
|
#define PW_ACCORDION 12 // super long net
|
2008-10-30 10:00:12 +11:00
|
|
|
#define PW_GUNNER 13 // machine gunner
|
2008-11-17 13:44:44 +11:00
|
|
|
#define PW_WHISTLE 14 // whistle
|
2008-11-18 13:16:15 +11:00
|
|
|
#define PW_CANDLE 15 // candle
|
2008-11-22 11:21:22 +11:00
|
|
|
#define PW_ANCHOR 16 // anchor
|
2008-11-22 11:55:20 +11:00
|
|
|
#define PW_MAGNET 17 // magnet
|
|
|
|
#define PW_BADMAGNET 18 // badmagnet
|
2008-11-25 07:02:39 +11:00
|
|
|
#define PW_JETPACK 19 // kangaroo
|
2008-11-25 08:35:46 +11:00
|
|
|
#define PW_CAMERA 20 // camera
|
2008-11-25 08:47:52 +11:00
|
|
|
#define PW_SMALLNET 21 // skull
|
2008-12-18 11:46:54 +11:00
|
|
|
#define PW_PILL 22 // pill
|
2009-01-30 14:30:38 +11:00
|
|
|
#define PW_RAYGUN 23 // ray gun
|
|
|
|
#define PW_TOPHAT 24 // top hat
|
2009-03-06 09:40:02 +11:00
|
|
|
#define PW_LAMP 25 // magic lamp
|
2008-10-07 16:53:06 +11:00
|
|
|
// "virtual" powerup for bosses
|
2008-11-25 08:35:46 +11:00
|
|
|
#define PW_RATSHAKE 50 // shake screen horizontally
|
|
|
|
#define PW_SNAILSHAKE 51 // shake screen vertically
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-10-30 10:00:12 +11:00
|
|
|
#define GUNNERSPEED 2.5 // speed crosshair moves in gunner mode
|
|
|
|
#define GUNNERDELAY 10 // how fast gunner powerup shoots
|
|
|
|
|
2008-10-30 12:06:25 +11:00
|
|
|
#define ZAPPERDELAY 10 // animation speed for zapper
|
|
|
|
#define ZAPPERTIME 15 // how long the zap lasts
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
// Frame names
|
|
|
|
#define F_WALK1 0
|
|
|
|
#define F_JUMP 1
|
|
|
|
#define F_FALL 2
|
|
|
|
#define F_CAUGHT 3
|
|
|
|
#define F_DEAD 4
|
|
|
|
#define F_DEAD2 5
|
|
|
|
#define F_DEAD3 6
|
|
|
|
#define F_DEAD4 7
|
|
|
|
#define F_CLIMB1 8
|
|
|
|
#define F_CLIMB2 9
|
2008-09-26 19:51:17 +10:00
|
|
|
#define F_SHOOT 10
|
2008-09-27 20:50:19 +10:00
|
|
|
#define F_SLAM1 11
|
|
|
|
#define F_SLAM2 12
|
|
|
|
#define F_SLAM3 13
|
|
|
|
#define F_SLAM4 14
|
|
|
|
#define F_SLAM5 15
|
2008-10-03 17:37:05 +10:00
|
|
|
#define F_SWIM1 16
|
|
|
|
#define F_SWIM2 17
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-09-28 13:18:36 +10:00
|
|
|
|
2008-10-20 09:58:54 +11:00
|
|
|
// Title screen states
|
2008-10-21 08:40:00 +11:00
|
|
|
#define TS_INSERTCOIN 0
|
|
|
|
#define TS_WAIT1UP 1
|
|
|
|
#define TS_SELECTMODE 2
|
2008-10-23 14:21:15 +11:00
|
|
|
#define TS_HISCORES 3
|
|
|
|
|
|
|
|
#define TTIME 10 // time between state switches in title screen
|
2008-10-20 09:58:54 +11:00
|
|
|
|
2008-11-21 12:36:52 +11:00
|
|
|
#define INITPLAYERLIVES 3
|
|
|
|
|
2008-10-20 09:58:54 +11:00
|
|
|
// Game modes
|
|
|
|
#define GM_EASY 0
|
|
|
|
#define GM_NORM 1
|
|
|
|
|
2008-09-28 13:18:36 +10:00
|
|
|
// Level states
|
|
|
|
#define LV_INIT 5 // just loaded, waiting for monsters to appear
|
|
|
|
#define LV_INPROGRESS 0 // regular game play
|
|
|
|
#define LV_CLEAR 1 // all monsters dead
|
|
|
|
#define LV_WAIT 2 // LEVEL COMPLETE displayed, delay to collect fruits
|
|
|
|
#define LV_FINAL 3 // delay 5 seconds more...
|
2008-10-07 18:58:36 +11:00
|
|
|
#define LV_CLOUD 4 // cloud appearing and tracking player
|
2008-10-07 16:53:06 +11:00
|
|
|
#define LV_CLOUDLOOP 6 // cloud looping
|
|
|
|
#define LV_NEXTLEV 7 // cloud done , nextlevel() in 5 seconds
|
|
|
|
#define LV_GAMEOVER 8 // No lives left.
|
2008-10-15 14:20:10 +11:00
|
|
|
#define LV_DOPOKER 9 // Got a full set of cards!
|
2008-10-17 22:15:27 +11:00
|
|
|
#define LV_HELPFREEZE 10 // Freeze after help text
|
2008-10-01 22:42:59 +10:00
|
|
|
|
2008-10-03 21:11:07 +10:00
|
|
|
// movement types
|
|
|
|
#define MV_NONE 0 // didn't move
|
|
|
|
#define MV_WALK 1 // walked/climbed on purpose
|
|
|
|
#define MV_ICE 3 // slid on ice
|
2008-11-09 16:24:07 +11:00
|
|
|
#define MV_FLY 4 // flying
|
2009-03-27 08:51:12 +11:00
|
|
|
#define MV_CONVEY 5 // moved by conveyorbelt
|
2009-03-03 13:18:10 +11:00
|
|
|
#define MV_SWIM 64 // swum somewhere - OR this
|
2008-10-03 21:11:07 +10:00
|
|
|
|
2008-09-28 13:18:36 +10:00
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
// Tile types
|
|
|
|
#define T_BLANK 0
|
|
|
|
#define T_LAND 1
|
|
|
|
#define T_SLOPEUP 2
|
|
|
|
#define T_SLOPEDOWN 3
|
|
|
|
#define T_FULL 4
|
|
|
|
#define T_SKY 5
|
|
|
|
#define T_LADDER 6
|
|
|
|
#define T_LADDERTOP 7
|
|
|
|
#define T_RIGHT 8
|
|
|
|
#define T_LEFT 9
|
|
|
|
#define T_SPIKES 10
|
|
|
|
#define T_TELEPORT 11
|
|
|
|
#define T_TELEPORT2 12
|
|
|
|
#define T_TELEPORTDEST 13
|
|
|
|
#define T_WATER 14
|
|
|
|
#define T_WATERTOP 15
|
|
|
|
#define T_WATERSPIKES 16
|
2008-09-26 19:51:17 +10:00
|
|
|
#define T_BRIDGE 17 // like land but you can drop down through it
|
2008-09-29 18:32:56 +10:00
|
|
|
#define T_TRAMPUP 18
|
|
|
|
#define T_TRAMPDOWN 19
|
2008-10-03 21:11:07 +10:00
|
|
|
#define T_ICETOP 20 // slippery
|
|
|
|
#define T_ICE 21 // slippery
|
2008-11-09 17:02:15 +11:00
|
|
|
#define T_WATERRIGHT 22
|
2008-11-10 07:19:53 +11:00
|
|
|
#define T_WATERLEFT 23
|
|
|
|
#define T_WATERDOWN 24
|
2008-11-22 21:11:33 +11:00
|
|
|
#define T_WARP 25 // hidden warp point - jump to reveal
|
2009-03-11 08:10:17 +11:00
|
|
|
#define T_ICEBRIDGE 26 // like land but you can drop down through it
|
2008-09-17 12:34:39 +10:00
|
|
|
|
|
|
|
// death states
|
|
|
|
#define D_INITIAL (1) // Need to trigger death sequence
|
|
|
|
#define D_BOUNCING (2) // Corpse is bouncing around the screen
|
|
|
|
#define D_LASTBOUNCE (3) // Final descent, about to turn to fruit(or respawn for player)
|
|
|
|
#define D_FINAL (4) // ACTUALLY dead, remove the sprite
|
|
|
|
|
|
|
|
|
2008-10-07 16:53:06 +11:00
|
|
|
/// pink cloud
|
|
|
|
#define PCGROWSPEED (0.02) // how much to grow each turn (0.1 - 0.999)
|
|
|
|
#define PCSHRINKSPEED (0.06) // how much to shrink each turn (0.1 - 0.999)
|
|
|
|
#define PCTURN (5) // turn speed while looping
|
|
|
|
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
// teleporting states
|
|
|
|
#define TP_SHRINKING (1) // entering teleporter
|
|
|
|
|
|
|
|
// caught by net states
|
|
|
|
#define C_NETTING (1) // being pulled in to player
|
|
|
|
#define C_NETTED (2) // being held by player
|
|
|
|
|
|
|
|
// directions
|
|
|
|
#define D_RIGHT (1)
|
|
|
|
#define D_LEFT (-1)
|
2008-09-28 13:18:36 +10:00
|
|
|
#define D_UP (-2)
|
|
|
|
#define D_DOWN (2)
|
2009-03-20 12:35:13 +11:00
|
|
|
#define D_NONE (0)
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-10-07 16:53:06 +11:00
|
|
|
// boss health bar
|
|
|
|
#define HEALTHBARY 480-100 // y position of health bar
|
|
|
|
#define HEALTHBARGAP 2 // gap between health bars
|
|
|
|
// frames of the bar
|
|
|
|
#define HEALTHFRAMES 3
|
|
|
|
#define HF_GREEN 0
|
|
|
|
#define HF_YELLOW 1
|
|
|
|
#define HF_RED 2
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2009-03-11 13:26:19 +11:00
|
|
|
// white spider timers
|
|
|
|
#define WS_DROPDELAY 40 // how long whitetail pauses before dropping
|
|
|
|
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
/* data structures */
|
|
|
|
typedef struct mapping_s {
|
|
|
|
char ch;
|
|
|
|
int tnum;
|
|
|
|
} mapping_t;
|
|
|
|
|
|
|
|
typedef struct tiletype_s {
|
|
|
|
int uniqid;
|
|
|
|
int id;
|
|
|
|
char name[SMALLBUFLEN];
|
|
|
|
int lowness[TILEW];
|
|
|
|
int solid;
|
|
|
|
int water;
|
|
|
|
int spikes;
|
2008-09-17 21:16:19 +10:00
|
|
|
SDL_Surface *img[MAXTILEFRAMES];
|
|
|
|
int numframes;
|
|
|
|
int animspeed;
|
2008-11-19 14:57:07 +11:00
|
|
|
int animsync;
|
2008-09-17 12:34:39 +10:00
|
|
|
struct tiletype_s *next;
|
|
|
|
struct tiletype_s *prev;
|
|
|
|
} tiletype_t;
|
|
|
|
tiletype_t *tiletype;
|
|
|
|
|
|
|
|
typedef struct initialmonster_s {
|
|
|
|
int startx;
|
|
|
|
int starty;
|
|
|
|
int id;
|
2008-11-06 20:15:09 +11:00
|
|
|
int wayx[MAXWAYPOINTS];
|
|
|
|
int wayy[MAXWAYPOINTS];
|
|
|
|
int numwaypoints;
|
2008-09-17 12:34:39 +10:00
|
|
|
char *help;
|
|
|
|
} initialmonster_t;
|
|
|
|
|
|
|
|
typedef struct text_s {
|
|
|
|
int x,y;
|
|
|
|
int size;
|
|
|
|
int maxsize;
|
|
|
|
int state;
|
2008-10-17 22:15:27 +11:00
|
|
|
int type;
|
2008-09-17 12:34:39 +10:00
|
|
|
int delay; // how long to stay on screen
|
|
|
|
char txt[BUFLEN];
|
|
|
|
SDL_Rect bgarea;
|
|
|
|
SDL_Surface *bg;
|
|
|
|
SDL_Surface *img;
|
|
|
|
SDL_Color *c;
|
|
|
|
struct text_s *next;
|
|
|
|
struct text_s *prev;
|
|
|
|
} text_t;
|
|
|
|
|
|
|
|
typedef struct level_s {
|
|
|
|
int id;
|
|
|
|
int bgtileid;
|
2008-10-10 10:12:51 +11:00
|
|
|
char bgfile[BUFLEN];
|
|
|
|
char name[BUFLEN];
|
|
|
|
char filename[BUFLEN];
|
2008-09-17 12:34:39 +10:00
|
|
|
int map[LEVELW*LEVELH];
|
2008-09-29 18:32:56 +10:00
|
|
|
int map2[LEVELW*LEVELH]; // second map layer
|
2009-01-23 13:13:51 +11:00
|
|
|
int map3[LEVELW*LEVELH]; // third map layer
|
2008-09-17 21:16:19 +10:00
|
|
|
int tileframe[LEVELW*LEVELH]; // tracks frame numbers for tiles
|
|
|
|
int *animtiles; // array of offsets to map positions which are animated
|
2009-01-23 13:13:51 +11:00
|
|
|
int *l3tiles; // array of layer 3 tiles
|
2008-09-17 12:34:39 +10:00
|
|
|
struct level_s *next;
|
|
|
|
struct level_s *prev;
|
2008-11-19 09:25:54 +11:00
|
|
|
int bottomopen; // can you fall through the bottom of the level?
|
2008-09-17 12:34:39 +10:00
|
|
|
int p1x; /* player 1 start pos */
|
|
|
|
int p1y;
|
2008-11-12 14:25:48 +11:00
|
|
|
int p2x; /* player 2 start pos */
|
|
|
|
int p2y;
|
2008-09-28 13:18:36 +10:00
|
|
|
int powerupx; /* powerup position */
|
|
|
|
int powerupy; /* powerup position */
|
|
|
|
int gotpowerup; /* has the random powerup appeared yet? */
|
2008-10-03 17:37:05 +10:00
|
|
|
int poweruptype;/* what kind of powerup will appear? */
|
2008-09-28 13:18:36 +10:00
|
|
|
int exitdir; /* which way to scroll on level completion */
|
2008-09-17 12:34:39 +10:00
|
|
|
int nummonsters;
|
|
|
|
initialmonster_t initm[MAXMONSTERSPERLEVEL];
|
|
|
|
int hurryuptime;
|
2008-09-28 13:18:36 +10:00
|
|
|
int poweruptime;
|
2008-10-03 21:11:07 +10:00
|
|
|
int icey,iced; // for ice powerups
|
2008-09-17 12:34:39 +10:00
|
|
|
} level_t;
|
|
|
|
level_t *level;
|
|
|
|
|
2008-09-30 17:42:09 +10:00
|
|
|
typedef struct levelentry_s {
|
2008-10-01 17:27:44 +10:00
|
|
|
int id;
|
2008-10-07 16:53:06 +11:00
|
|
|
char filename[MIDBUFLEN];
|
|
|
|
char desc[MIDBUFLEN];
|
2008-09-30 17:42:09 +10:00
|
|
|
} levelentry_t;
|
|
|
|
|
2008-10-22 11:51:09 +11:00
|
|
|
typedef struct hiscore_s {
|
|
|
|
char name[MIDBUFLEN];
|
|
|
|
int level;
|
2008-11-22 22:01:17 +11:00
|
|
|
long score;
|
2008-10-22 11:51:09 +11:00
|
|
|
} hiscore_t;
|
|
|
|
|
2008-10-07 20:18:42 +11:00
|
|
|
typedef struct spriteinfo_s {
|
|
|
|
char *name;
|
|
|
|
char *desc;
|
|
|
|
char *file;
|
|
|
|
} spriteinfo_t;
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
typedef struct sprite_s {
|
|
|
|
int id; // what kind of sprite? (eg. player, cheese, rat)
|
2008-11-22 22:01:17 +11:00
|
|
|
long score; // player's score, for monsters how much they are worth
|
2008-09-17 12:34:39 +10:00
|
|
|
|
|
|
|
// ATTRIBUTES
|
|
|
|
double speed; // how fast this sprite moves
|
|
|
|
|
|
|
|
|
|
|
|
// CURRENT STATE
|
|
|
|
|
|
|
|
// player only
|
2008-10-03 17:37:05 +10:00
|
|
|
int recoiling; // this happens after you get hit while wearing armour
|
2008-09-17 12:34:39 +10:00
|
|
|
int slamming; // are we slamming our net (player only)
|
|
|
|
double slamangle;// are what point around is our net?
|
|
|
|
int netting; // are we shooting our net out?
|
|
|
|
int climbing; // are we climbing a laddder
|
|
|
|
int invuln; // are we invulnerable (ie. just after player respawning)
|
2008-11-23 16:54:17 +11:00
|
|
|
|
|
|
|
int lostlife; // lost any lives?
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
int netcaught; // how many monsters are in our net?
|
|
|
|
int netmax; // how many monsters can our net hold?
|
|
|
|
int netspeed; // how fast does our net shoot out?
|
|
|
|
int netdir; // which way is our net going (left/right)
|
|
|
|
int netlen; // how far our is our net?
|
|
|
|
int nety; // y position of end of net (used when shooting >1 net)
|
|
|
|
int netxstart; // x position of start of net
|
2008-10-23 08:38:56 +11:00
|
|
|
int netystart; // y position of start of net when netting/slamming
|
2008-10-10 11:51:40 +11:00
|
|
|
int netsticky; // can net pick up powerups?
|
2008-09-28 13:18:36 +10:00
|
|
|
int powerup; // what temp powerup does the player have?
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-11-25 15:05:53 +11:00
|
|
|
int umbrellaup; // umbrella being held up?
|
2008-11-25 12:00:57 +11:00
|
|
|
|
2008-11-12 17:17:10 +11:00
|
|
|
int oncloud; // on cloud at end of level?
|
|
|
|
|
2008-10-10 16:29:35 +11:00
|
|
|
int permspeed; // got the permenant speed powerup?
|
2008-10-15 14:20:10 +11:00
|
|
|
int permnumnets; // got the permenant numnets powerup?
|
|
|
|
int permbignet; // got the permenant bignets powerup?
|
|
|
|
int permsticky; // got the permenant sticky net powerup?
|
2008-10-19 19:00:34 +11:00
|
|
|
int permdoublejump;// got the permenant dbljump powerup?
|
2008-10-22 06:42:50 +11:00
|
|
|
int permarmour;// got the permenant armour powerup?
|
2008-11-25 12:00:57 +11:00
|
|
|
int permumbrella;// got the permenant umbrella powerup?
|
2008-11-10 08:28:46 +11:00
|
|
|
int permmask; // got the permenant scuba mask powerup?
|
2008-10-10 16:29:35 +11:00
|
|
|
|
2008-09-29 18:32:56 +10:00
|
|
|
int ontramp; // on a trampoline?
|
|
|
|
int trampx; // x,y coords for trampoline we are/were on
|
|
|
|
int trampy; //
|
2008-11-03 17:06:37 +11:00
|
|
|
int tramplayer; // which layer was the trampoline on? 1 or 2.
|
2008-10-15 14:20:10 +11:00
|
|
|
|
2008-10-03 17:37:05 +10:00
|
|
|
// player permenant powerups
|
|
|
|
int armour; // does the player have armour?
|
2008-11-25 12:00:57 +11:00
|
|
|
int umbrella; // does the player have umbrella?
|
2008-10-03 17:37:05 +10:00
|
|
|
int gemboost; // how many extra gems do you get in a bonus
|
|
|
|
int netbig; // have we collected a BIG NET powerup?
|
|
|
|
int hasbell; // got a bell ?
|
2008-10-13 11:43:01 +11:00
|
|
|
int hasmask; // got scuba mask?
|
2008-10-18 15:49:08 +11:00
|
|
|
int doublejump; // have we collected a doublejump powerup?
|
|
|
|
|
|
|
|
int useddoublejump;
|
2008-10-19 08:52:08 +11:00
|
|
|
int doublejumpready;
|
2008-09-29 18:32:56 +10:00
|
|
|
|
2008-10-15 14:20:10 +11:00
|
|
|
// player cards
|
|
|
|
int numcards;
|
|
|
|
int card[MAXCARDS];
|
|
|
|
int usedcard[MAXCARDS];
|
|
|
|
|
2008-11-06 20:15:09 +11:00
|
|
|
// for moving platforms
|
|
|
|
double wayx[MAXWAYPOINTS];
|
|
|
|
double wayy[MAXWAYPOINTS];
|
|
|
|
int numwaypoints;
|
|
|
|
int curwaypoint;
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
// monster only
|
2008-10-03 21:11:07 +10:00
|
|
|
int iced; // turned to ice?
|
|
|
|
SDL_Surface *iceimg; // Image to blit for ice
|
2008-09-17 12:34:39 +10:00
|
|
|
int willbecome; // what fruit this will become when dead
|
|
|
|
int angry; // is this sprite in ANGRY mode for its AI?
|
2008-10-07 16:53:06 +11:00
|
|
|
// normally this is a bool, but for monsters we
|
|
|
|
// it for flashing them when they are hit. in this
|
|
|
|
// case it will be a number.
|
2008-09-17 12:34:39 +10:00
|
|
|
struct sprite_s *caughtby; // who has us in their net? NULL if nobody
|
2008-10-30 12:06:25 +11:00
|
|
|
struct sprite_s *zapping; // who we are zapping
|
2008-09-28 13:18:36 +10:00
|
|
|
int quickdie; // die without bouncing?
|
2008-09-17 12:34:39 +10:00
|
|
|
int caughtstate; // are we caught by a net? being pulled in or caught?
|
|
|
|
int jumptimer; // delay before we will jump
|
2008-10-07 16:53:06 +11:00
|
|
|
int willjumpspeed; // how fast we'll jump when jumptimer expires
|
2008-09-17 12:34:39 +10:00
|
|
|
int flies; // can we fly?
|
|
|
|
double xs,ys; // bounce direction after death
|
|
|
|
struct sprite_s *bullet; // pointer to our bullet
|
|
|
|
struct sprite_s *owner; // if we ARE a bullet, pointer to the sprite who made us
|
|
|
|
char name[MIDBUFLEN]; // Help text for help icons, otherwise not really used outside of debugging
|
|
|
|
|
2008-10-07 16:53:06 +11:00
|
|
|
// pinkcloud only
|
|
|
|
double rotated;
|
|
|
|
double angle;
|
|
|
|
|
2008-10-10 10:12:51 +11:00
|
|
|
// pink/black cloud only
|
|
|
|
double size;
|
|
|
|
|
2008-12-21 11:14:16 +11:00
|
|
|
// both player and monster
|
2008-11-06 20:15:09 +11:00
|
|
|
struct sprite_s *onplatform;// are we on platform?
|
2008-12-21 11:14:16 +11:00
|
|
|
|
2008-11-21 11:14:26 +11:00
|
|
|
int antigrav; // don't fall
|
2008-10-07 16:53:06 +11:00
|
|
|
int lives; // only for player and bosses
|
2008-09-30 17:42:09 +10:00
|
|
|
int swimming; // are we in the water?
|
2008-09-17 12:34:39 +10:00
|
|
|
int falling; // are we falling?
|
2008-09-26 19:51:17 +10:00
|
|
|
int dropping; // are we purposely dropping through solid ground?
|
|
|
|
int dropx,dropy;// coords of tile we dropped from
|
2008-11-25 12:00:57 +11:00
|
|
|
double fallspeed; // how fast are we falling?
|
2008-09-17 12:34:39 +10:00
|
|
|
int jumping; // are we jumping?
|
2008-11-03 17:06:37 +11:00
|
|
|
double jumpdir; //which way are we jumping?
|
2008-09-17 12:34:39 +10:00
|
|
|
int jumpspeed; // how fast we are moving upwards
|
|
|
|
int teleporting;// are we inside a teleporter? >0 is entering, <0 is exitting
|
|
|
|
int dead; // is this sprite dead? if so, what dying state?
|
|
|
|
int bounces; // how many time have we bounced after dying
|
|
|
|
int doomcount; // sprites dies when this reaches zero
|
|
|
|
int moved; // did we move this loop cycle?
|
2008-09-27 16:02:42 +10:00
|
|
|
int timer1; //
|
|
|
|
int timer2; //
|
|
|
|
int timer3; //
|
2008-10-30 12:06:25 +11:00
|
|
|
int timer4; //
|
2008-10-09 14:32:15 +11:00
|
|
|
int watertimer; //
|
2008-11-09 08:14:10 +11:00
|
|
|
double dbltimer;
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-10-15 06:36:51 +11:00
|
|
|
int frame;
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
|
|
|
|
// GAME MECHANICS
|
|
|
|
double x,y; // current position
|
|
|
|
int dir; // which way we are facing (1=right,-1=left)
|
|
|
|
SDL_Surface *img; // current graphic image
|
|
|
|
SDL_Surface *netbg; // temp storage for area behind net
|
2008-10-26 14:31:16 +11:00
|
|
|
int allocimg; // have we allocated a special image?
|
2008-09-17 12:34:39 +10:00
|
|
|
|
|
|
|
// LINKED LIST STUFF
|
|
|
|
struct sprite_s *next;
|
|
|
|
struct sprite_s *prev;
|
|
|
|
} sprite_t;
|
|
|
|
|
2009-03-05 12:53:20 +11:00
|
|
|
typedef struct regrow_s {
|
|
|
|
int tx;
|
|
|
|
int ty;
|
|
|
|
int origid;
|
|
|
|
int timer;
|
|
|
|
} regrow_t;
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
typedef struct imageset_s {
|
|
|
|
SDL_Surface *img[MAXFRAMES*4];
|
|
|
|
int numimages;
|
|
|
|
} imageset_t;
|
|
|
|
imageset_t imageset[MAXPTYPES];
|
|
|
|
|
|
|
|
/* external globals */
|
2008-10-31 08:55:26 +11:00
|
|
|
extern char progname[];
|
2008-09-17 12:34:39 +10:00
|
|
|
extern SDL_Color black;
|
2008-10-19 08:46:55 +11:00
|
|
|
extern SDL_Surface *screen, *temps, *levelbg, *head, *head5, *icecube;
|
2008-11-12 16:06:32 +11:00
|
|
|
extern SDL_Surface *head2,*head52;
|
2008-11-12 18:23:10 +11:00
|
|
|
extern SDL_Surface *grave;
|
2008-10-07 16:53:06 +11:00
|
|
|
extern SDL_Surface *healthbar[];
|
2008-10-30 10:00:12 +11:00
|
|
|
extern SDL_Surface *greenbox, *redbox;
|
2008-11-12 14:25:48 +11:00
|
|
|
extern sprite_t *sprite, *lastsprite, *player, *player2, *boss;
|
2008-09-17 12:34:39 +10:00
|
|
|
extern level_t *curlevel;
|
|
|
|
extern tiletype_t fakeblock;
|
|
|
|
extern int gtime;
|
|
|
|
extern int timer;
|
2008-10-20 09:58:54 +11:00
|
|
|
extern int gamemode;
|
2008-10-31 11:41:33 +11:00
|
|
|
extern int showhelp;
|
2008-09-17 12:34:39 +10:00
|
|
|
extern SDL_Color red;
|
|
|
|
extern SDL_Color black;
|
2008-09-30 17:42:09 +10:00
|
|
|
extern SDL_Color blue;
|
2008-09-17 12:34:39 +10:00
|
|
|
extern SDL_Color white;
|
|
|
|
extern SDL_Color green;
|
2008-11-13 07:39:03 +11:00
|
|
|
extern SDL_Color purple;
|
2008-09-17 12:34:39 +10:00
|
|
|
extern SDL_Color yellow;
|
|
|
|
extern int vidargs;
|
|
|
|
extern int toggletimer;
|
|
|
|
extern TTF_Font *font[];
|
2008-10-15 06:36:51 +11:00
|
|
|
extern TTF_Font *cardfont;
|
2008-09-27 16:02:42 +10:00
|
|
|
extern int musicplaying;
|
2008-10-23 06:40:10 +11:00
|
|
|
extern Mix_Music *music, *normalmusic, *fastmusic, *bossmusic,*hiscoremusic;
|
2008-09-26 19:51:17 +10:00
|
|
|
extern Mix_Chunk *sfx[];
|
2008-09-28 13:18:36 +10:00
|
|
|
extern int oldexitdir;
|
|
|
|
extern int levelcomplete;
|
|
|
|
extern text_t *text, *lasttext;
|
2008-09-28 15:19:23 +10:00
|
|
|
extern int cheat;
|
2008-09-30 17:42:09 +10:00
|
|
|
extern int nexthurryup;
|
|
|
|
extern levelentry_t levelentry[];
|
2008-10-01 17:27:44 +10:00
|
|
|
extern int numlevels;
|
2008-10-07 16:53:06 +11:00
|
|
|
extern int maxlevid;
|
2008-10-01 17:27:44 +10:00
|
|
|
extern char *deathtext[];
|
|
|
|
extern char *bifftext[];
|
2008-10-07 20:18:42 +11:00
|
|
|
extern spriteinfo_t spriteinfo[];
|
2008-09-17 12:34:39 +10:00
|
|
|
|
2008-11-12 14:25:48 +11:00
|
|
|
extern int want1up,want2up;
|
2008-10-31 08:55:26 +11:00
|
|
|
|
2008-10-30 13:24:24 +11:00
|
|
|
extern int gotcard;
|
2008-10-15 14:20:10 +11:00
|
|
|
extern int curcard;
|
|
|
|
extern int deck[];
|
2008-10-18 05:39:22 +11:00
|
|
|
extern int forcegoodcard;
|
|
|
|
extern int nextforcegoodcard;
|
2008-10-15 14:20:10 +11:00
|
|
|
|
2008-11-22 11:21:22 +11:00
|
|
|
extern int globpowerup;
|
|
|
|
|
2008-11-26 09:28:10 +11:00
|
|
|
extern int curlevelnum;
|
|
|
|
|
2008-10-10 08:04:41 +11:00
|
|
|
extern char *datadir;
|
2008-10-10 07:51:09 +11:00
|
|
|
|
2008-12-25 13:18:08 +11:00
|
|
|
// pointer to drawpixel function
|
|
|
|
extern void (*drawpixel)(SDL_Surface *s, int x, int y, SDL_Color c);
|
|
|
|
|
2008-09-17 12:34:39 +10:00
|
|
|
#endif
|