1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
/*
* file map.h - managing the level tile map
*
* $Id: map.h,v 1.12 2006/02/09 21:21:24 fzago Exp $
*
* Program XBLAST
* (C) by Oliver Vogel (e-mail: m.vogel@ndh.net)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2; or (at your option)
* any later version
*
* This program is distributed in the hope that it will be entertaining,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILTY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef XBLAST_MAP_H
#define XBLAST_MAP_H
/*
* type definitions
*/
/* tiles used in game */
typedef enum
{
BTEvil = -2, /* virtual tile: free space with bomb */
BTBackground = -1, /* virtual tile: don't draw this block */
BTFree = 0, /* free tile */
BTBurned, /* burned, free tile */
BTBlock, /* solid wall */
BTBlockRise, /* solid wall (rising) */
BTExtra, /* extra block */
BTExtraOpen, /* extras block (cracked/opening) */
BTBomb, /* bomb extra */
BTRange, /* range extra */
BTSick, /* illness extra */
BTSpecial, /* special extra */
BTVoid, /* empty space for decoration */
BTNUM
} BMMapTile;
/* graphics definition for single tile */
typedef struct
{
const char *name;
XBColor fg;
XBColor bg;
XBColor add;
} BMBlockTile;
/* graphics definition for tile */
typedef BMBlockTile XBScoreGraphics[MAX_BLOCK];
/* layout for score board */
typedef BMMapTile XBScoreMap[MAZE_W][MAZE_H];
/*
* prototypes
*/
extern XBBool ParseLevelGraphics (const DBSection * section, DBSection * warn);
extern void ConfigLevelGraphics (const DBSection * section);
extern XBBool ParseLevelMap (const DBSection * section, DBSection * warn);
extern void ConfigLevelMap (const DBSection * section);
extern void ConfigScoreGraphics (const XBScoreGraphics data);
extern void ConfigScoreMap (const XBScoreMap data);
extern void FinishLevelGraphics (void);
extern void DrawMaze (void);
extern void SetRedrawRectangles (void);
extern void MarkMaze (int x1, int y1, int x2, int y2);
extern void MarkMazeTile (int x, int y);
extern void MarkMazeRect (int x, int y, int w, int h);
extern XBBool SpriteMarked (const Sprite * spr);
extern void ClearRedrawMap (void);
extern void UpdateMaze (void);
extern void UpdateExpl (void);
extern XBBool CheckMaze (int x, int y);
extern XBBool CheckMazeFree (int x, int y);
extern XBBool CheckMazeFree2 (int x, int y);
extern XBBool CheckMazeOpen (int x, int y);
extern XBBool CheckMazeWall (int x, int y);
extern XBBool CheckMazeSolid (int x, int y);
extern XBBool CheckMazeExtra (int x, int y);
extern XBBool CheckExplosion (int x, int y);
extern void SetBlockExtra (int x, int y, BMMapTile extra);
extern void SetMazeBlock (int x, int y, BMMapTile block);
extern void SetExplBlock (int x, int y, int value);
extern int GetExtra (int invincible, int x, int y);
extern XBBool DistribSpecial (void);
extern void DistributeExtras (int bombs, int range, int extras, int specials);
extern void BlastExtraBlock (int x, int y);
extern void CopyExplBlock (int x, int y, const int block[CHARH][CHARW]);
extern BMMapTile GetBlockExtra (int x, int y);
extern BMMapTile CheckBonuses (int x, int y);
extern BMMapTile CheckBonuses2 (int x, int y);
extern int CheckMazePhantomWall (int x, int y);
extern int CheckMazeGhost (int ghost, int x, int y);
extern BMMapTile GetMazeBlock (int x, int y);
extern void DeleteAllBombSprites (void);
extern void DeleteAllMapBombSprites (void);
extern void SetXBMapMode (XBBool mode);
extern XBBool GetXBMapMode (void);
#endif
/*
* end of file map.h
*/
|