|
|
@ -1,4 +1,4 @@
|
|
|
|
/* $Id: basic.h,v 1.31 2005/04/09 18:22:40 stpohle Exp $ */
|
|
|
|
/* $Id: basic.h,v 1.32 2005/04/10 00:22:16 stpohle Exp $ */
|
|
|
|
/* basic types which we need everywhere */
|
|
|
|
/* basic types which we need everywhere */
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _BC_BASIC_H_
|
|
|
|
#ifndef _BC_BASIC_H_
|
|
|
@ -14,21 +14,21 @@
|
|
|
|
#define GAME_SPECIAL_ITEMSROW 3
|
|
|
|
#define GAME_SPECIAL_ITEMSROW 3
|
|
|
|
#define GAME_SPECIAL_ITEMSPUSH 3
|
|
|
|
#define GAME_SPECIAL_ITEMSPUSH 3
|
|
|
|
#define GAME_SPECIAL_ITEMSKICK 3
|
|
|
|
#define GAME_SPECIAL_ITEMSKICK 3
|
|
|
|
#define GAME_MAX_TUNNELS 4 // number of tunnel entrys
|
|
|
|
#define GAME_MAX_TUNNELS 4 // number of tunnel entrys
|
|
|
|
#define GAME_TIMEOUT 600.0 // game timeout 10min)
|
|
|
|
#define GAME_TIMEOUT 600.0 // game timeout 10min)
|
|
|
|
#define GAME_OVERTIMEOUT 5.0 // second of remaining the last player
|
|
|
|
#define GAME_OVERTIMEOUT 5.0 // second of remaining the last player
|
|
|
|
#define GAME_TUNNEL_TO 0.5 // wait 0.5 seconds
|
|
|
|
#define GAME_TUNNEL_TO 0.5 // wait 0.5 seconds
|
|
|
|
#define HURRYWARN_TO_BLINKING 0.10
|
|
|
|
#define HURRYWARN_TO_BLINKING 0.10
|
|
|
|
|
|
|
|
|
|
|
|
#define EXPLOSION_SAVE_DISTANCE 0.25
|
|
|
|
#define EXPLOSION_SAVE_DISTANCE 0.25
|
|
|
|
#define EXPLOSION_GROW_SPEED 0.75f
|
|
|
|
#define EXPLOSION_GROW_SPEED 0.75f
|
|
|
|
#define SPECIAL_TRIGGER_TIMEOUT 15
|
|
|
|
#define SPECIAL_TRIGGER_TIMEOUT 15
|
|
|
|
#define SPECIAL_TRIGGER_NUMUSE 5 // 0=unlimited
|
|
|
|
#define SPECIAL_TRIGGER_NUMUSE 5 // 0=unlimited
|
|
|
|
#define SPECIAL_TRIGGER_TIME 25
|
|
|
|
#define SPECIAL_TRIGGER_TIME 25
|
|
|
|
#define SPECIAL_ROW_TIME 30
|
|
|
|
#define SPECIAL_ROW_TIME 30
|
|
|
|
#define SPECIAL_PUSH_TIME 50
|
|
|
|
#define SPECIAL_PUSH_TIME 50
|
|
|
|
#define SPECIAL_KICK_TIME 30
|
|
|
|
#define SPECIAL_KICK_TIME 30
|
|
|
|
#define SPECIAL_KICK_MAXDIST 8 // maximum distance allowed
|
|
|
|
#define SPECIAL_KICK_MAXDIST 8 // maximum distance allowed
|
|
|
|
|
|
|
|
|
|
|
|
#define START_BOMBS 1
|
|
|
|
#define START_BOMBS 1
|
|
|
|
#define START_RANGE 2
|
|
|
|
#define START_RANGE 2
|
|
|
@ -47,8 +47,8 @@
|
|
|
|
#define MAX_FIELDSIZE_Y 31
|
|
|
|
#define MAX_FIELDSIZE_Y 31
|
|
|
|
#define MIN_FIELDSIZE_X 15
|
|
|
|
#define MIN_FIELDSIZE_X 15
|
|
|
|
#define MIN_FIELDSIZE_Y 9
|
|
|
|
#define MIN_FIELDSIZE_Y 9
|
|
|
|
#define MAX_FIELDANIMATION 2048 /* number of points on the field to be animated exploding
|
|
|
|
#define MAX_FIELDANIMATION 2048 /* number of points on the field to be animated exploding
|
|
|
|
stoned or powerups*/
|
|
|
|
stoned or powerups */
|
|
|
|
|
|
|
|
|
|
|
|
#define EXPLOSIONTIMEOUT 0.5
|
|
|
|
#define EXPLOSIONTIMEOUT 0.5
|
|
|
|
#define ANI_FIRETIMEOUT 2
|
|
|
|
#define ANI_FIRETIMEOUT 2
|
|
|
@ -80,129 +80,129 @@
|
|
|
|
#define UDP_TIMEOUT 15000
|
|
|
|
#define UDP_TIMEOUT 15000
|
|
|
|
#define BUF_SIZE 1024
|
|
|
|
#define BUF_SIZE 1024
|
|
|
|
|
|
|
|
|
|
|
|
#define AUTOSTART 20 /* dedicated server autostart */
|
|
|
|
#define AUTOSTART 20 /* dedicated server autostart */
|
|
|
|
|
|
|
|
|
|
|
|
#define MW_IS_GFX_SELECT(__gfx_nr,__result) for (__result = (MAX_PLAYERS-1); (__result >= 0) && (players[__result].gfx_nr != __gfx_nr); __result--);
|
|
|
|
#define MW_IS_GFX_SELECT(__gfx_nr,__result) for (__result = (MAX_PLAYERS-1); (__result >= 0) && (players[__result].gfx_nr != __gfx_nr); __result--);
|
|
|
|
|
|
|
|
|
|
|
|
#define CUTINT(__x) (__x-floorf(__x)) // cut the integer part off
|
|
|
|
#define CUTINT(__x) (__x-floorf(__x)) // cut the integer part off
|
|
|
|
#define postofield(__x) ((int)(rintf(__x))) // position to int with rounding
|
|
|
|
#define postofield(__x) ((int)(rintf(__x))) // position to int with rounding
|
|
|
|
|
|
|
|
|
|
|
|
#define UINT16_HALF 32767
|
|
|
|
#define UINT16_HALF 32767
|
|
|
|
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
#include <SDL.h>
|
|
|
|
|
|
|
|
|
|
|
|
enum _backgound { // to load some diffrent logos..
|
|
|
|
enum _backgound { // to load some diffrent logos..
|
|
|
|
BG_start = 0,
|
|
|
|
BG_start = 0,
|
|
|
|
BG_net,
|
|
|
|
BG_net,
|
|
|
|
BG_conf
|
|
|
|
BG_conf
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum _gametype {
|
|
|
|
enum _gametype {
|
|
|
|
GT_bomberman = 0,
|
|
|
|
GT_bomberman = 0,
|
|
|
|
GT_deathmatch,
|
|
|
|
GT_deathmatch,
|
|
|
|
GT_team
|
|
|
|
GT_team
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum _gamestate {
|
|
|
|
enum _gamestate {
|
|
|
|
GS_startup = 0,
|
|
|
|
GS_startup = 0,
|
|
|
|
GS_quit,
|
|
|
|
GS_quit,
|
|
|
|
GS_wait, // waiting for players to join
|
|
|
|
GS_wait, // waiting for players to join
|
|
|
|
GS_update,
|
|
|
|
GS_update,
|
|
|
|
GS_ready,
|
|
|
|
GS_ready,
|
|
|
|
GS_running
|
|
|
|
GS_running
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum _maptype {
|
|
|
|
enum _maptype {
|
|
|
|
MAPT_random = -1, // random map
|
|
|
|
MAPT_random = -1, // random map
|
|
|
|
MAPT_normal = 0, // a normal map
|
|
|
|
MAPT_normal = 0, // a normal map
|
|
|
|
MAPT_tunnel, // a map with tunnels
|
|
|
|
MAPT_tunnel, // a map with tunnels
|
|
|
|
|
|
|
|
|
|
|
|
MAPT_max
|
|
|
|
MAPT_max
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum _fieldtype {
|
|
|
|
enum _fieldtype {
|
|
|
|
FT_nothing = 0, // Nothing in here
|
|
|
|
FT_nothing = 0, // Nothing in here
|
|
|
|
FT_stone, // Stones you can bomb away
|
|
|
|
FT_stone, // Stones you can bomb away
|
|
|
|
FT_block, // Stones which can't bomb away
|
|
|
|
FT_block, // Stones which can't bomb away
|
|
|
|
FT_tunnel, // the tunnel item
|
|
|
|
FT_tunnel, // the tunnel item
|
|
|
|
FT_death, // The bad Powerup
|
|
|
|
FT_death, // The bad Powerup
|
|
|
|
FT_fire, // The fire Powerup
|
|
|
|
FT_fire, // The fire Powerup
|
|
|
|
FT_bomb, // The bomb Powerup
|
|
|
|
FT_bomb, // The bomb Powerup
|
|
|
|
FT_shoe, // The shoe Powerup
|
|
|
|
FT_shoe, // The shoe Powerup
|
|
|
|
FT_mixed, // The mixed Powerup
|
|
|
|
FT_mixed, // The mixed Powerup
|
|
|
|
FT_sp_trigger, // The Triggered bomb Special
|
|
|
|
FT_sp_trigger, // The Triggered bomb Special
|
|
|
|
FT_sp_row, // The bomb-row special
|
|
|
|
FT_sp_row, // The bomb-row special
|
|
|
|
FT_sp_push, // The push-boms special
|
|
|
|
FT_sp_push, // The push-boms special
|
|
|
|
FT_sp_moved, // The moved-boms special
|
|
|
|
FT_sp_moved, // The moved-boms special
|
|
|
|
FT_sp_liquid, // The liquid-bomb special
|
|
|
|
FT_sp_liquid, // The liquid-bomb special
|
|
|
|
FT_sp_kick, // The kick-bomb special
|
|
|
|
FT_sp_kick, // The kick-bomb special
|
|
|
|
FT_max // just to know how many types there are
|
|
|
|
FT_max // just to know how many types there are
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern const char *ft_filenames[]; // declared in tileset.c
|
|
|
|
extern const char *ft_filenames[]; // declared in tileset.c
|
|
|
|
|
|
|
|
|
|
|
|
enum _poweruptypes {
|
|
|
|
enum _poweruptypes {
|
|
|
|
PWUP_good = 0,
|
|
|
|
PWUP_good = 0,
|
|
|
|
PWUP_bad,
|
|
|
|
PWUP_bad,
|
|
|
|
PWUP_special,
|
|
|
|
PWUP_special,
|
|
|
|
PWUP_max
|
|
|
|
PWUP_max
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum _direction { // to handle directions better
|
|
|
|
enum _direction { // to handle directions better
|
|
|
|
left = 0,
|
|
|
|
left = 0,
|
|
|
|
right,
|
|
|
|
right,
|
|
|
|
up,
|
|
|
|
up,
|
|
|
|
down
|
|
|
|
down
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum _mapselection {
|
|
|
|
enum _mapselection {
|
|
|
|
MAPS_select = 0,
|
|
|
|
MAPS_select = 0,
|
|
|
|
MAPS_randmap,
|
|
|
|
MAPS_randmap,
|
|
|
|
MAPS_randgen
|
|
|
|
MAPS_randgen
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum _mstatus {
|
|
|
|
enum _mstatus {
|
|
|
|
MS_normal = 0,
|
|
|
|
MS_normal = 0,
|
|
|
|
MS_hurrywarn,
|
|
|
|
MS_hurrywarn,
|
|
|
|
MS_hurry, // mapsize will go down
|
|
|
|
MS_hurry, // mapsize will go down
|
|
|
|
MS_dropitems, // alot of items will be droppen randomly into the game
|
|
|
|
MS_dropitems, // alot of items will be droppen randomly into the game
|
|
|
|
|
|
|
|
|
|
|
|
MS_max
|
|
|
|
MS_max
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
enum _help_page {
|
|
|
|
enum _help_page {
|
|
|
|
HP_howto0 = 0,
|
|
|
|
HP_howto0 = 0,
|
|
|
|
HP_powerup0,
|
|
|
|
HP_powerup0,
|
|
|
|
HP_powerup1,
|
|
|
|
HP_powerup1,
|
|
|
|
HP_powerup2,
|
|
|
|
HP_powerup2,
|
|
|
|
HP_keyboard0,
|
|
|
|
HP_keyboard0,
|
|
|
|
HP_credit0,
|
|
|
|
HP_credit0,
|
|
|
|
HP_credit1,
|
|
|
|
HP_credit1,
|
|
|
|
HP_max
|
|
|
|
HP_max
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct {
|
|
|
|
struct {
|
|
|
|
Sint16 x;
|
|
|
|
Sint16 x;
|
|
|
|
Sint16 y;
|
|
|
|
Sint16 y;
|
|
|
|
} typedef _point;
|
|
|
|
} typedef _point;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct {
|
|
|
|
struct {
|
|
|
|
float x;
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float y;
|
|
|
|
} typedef _pointf;
|
|
|
|
} typedef _pointf;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct __charlist {
|
|
|
|
struct __charlist {
|
|
|
|
char text[LEN_CHARENTRY];
|
|
|
|
char text[LEN_CHARENTRY];
|
|
|
|
struct __charlist *next;
|
|
|
|
struct __charlist *next;
|
|
|
|
} typedef _charlist;
|
|
|
|
} typedef _charlist;
|
|
|
|
|
|
|
|
|
|
|
|
extern _point dir_change[];
|
|
|
|
extern _point dir_change[];
|
|
|
|