1 line
29 KiB
C
1 line
29 KiB
C
|
#ifndef __WOLFDEF__
#define __WOLFDEF__
#define DEMO /* Define if this is the lame demo for dealers */
/* japversion has mission pics instead */
/* #define JAPVERSION */
/* If code is compiled on a IIgs, pass the compiler presets... */
#ifdef __ORCAC__
#pragma optimize 15 /* Normal optimization */
#pragma memorymodel 0 /* Force small memory model */
#pragma noroot /* No root files */
#pragma lint -1 /* Full error checking */
segment "Wolf3d"; /* Code segment */
#endif
/* an angle_t occupies an entire 16 bits so wraparound is automatically handled */
#define SHORTTOANGLESHIFT 7 /* 0x10000 to ANGLES */
#define SLOPEBITS 9 /* Used in AngleFromSlope2 */
typedef unsigned short angle_t; /* Must be short to allow wraparound */
typedef short fixed_t; /* 8.8 fixed point number */
typedef unsigned short ufixed_t; /* 8.8 unsigned fixed point number */
#include <burger.h> /* My standard system equates */
#include "States.h" /* Think state equates */
#include "Sounds.h" /* Sound equates */
#include "Sprites.h" /* Sprite indexs */
#include "Wolf.h" /* Resource maps */
/**********************************
Game constants and equates
The game uses a tile map of 64X64 tiles and uses a 16 bit fixed
point number to record the placement of any object in the game. The
upper 8 bits are the tile with the lower 8 bits being which fraction into the
tile the player is standing on.
To adjust the screen size, modify SCREENWIDTH,SCREENHEIGHT,VIEWHEIGHT,ScaleX,ScaleY
**********************************/
#define MAXVISSPRITES 64 /* Maximum number of sprites to display (Must be a power of 2!) */
#define MAXACTORS 128 /* max number of nazis, etc / map */
#define MAXSTATICS 200 /* max number of lamps, bonus, etc */
#define MAXMISSILES 32 /* max missiles, flames, smokes, etc */
#define MAXDOORS 64 /* max number of sliding doors (64<=) */
#define MAXAREAS 64 /* max number of bsp areas */
#define NUMBUTTONS 10 /* Number of control buttons */
#define WALLHEIGHT 128 /* Height,width of walls */
#define SPRITEHEIGHT 64 /* Height,width of a sprite */
#define MAXSCALER 960 /* Number of scalers to create */
#define PLAYERSIZE 88 /* radius of player in 8.8 fixed point */
#define PROJECTIONSCALE (SCREENWIDTH/2)*0x90l
#define FIELDOFVIEW 364*4 /* fineangles in the SCREENWIDTH wide window*/
#define MINZ 62 /* PLAYERSIZE/sqrt(2) rounded down*/
#define MAXZ (32*FRACUNIT) /* Farthest thing away */
#define FINEANGLES 0x2000 /* Power of 2 */
#define FINEMASK (FINEANGLES-1)
#define ANGLETOFINESHIFT 3 /* 0x10000 >> 0x2000*/
#define GAMEANGLETOFINE 4 /* 512 << 0x2000 */
#define ANGLE90 0x4000 /* Use a 0x10000 angle range */
#define ANGLE180 0x8000 /* Use a 0x10000 angle range */
#ifdef __MAC__
#define SCREENWIDTH MacWidth /* Size of the offscreen buffer */
#define SCREENHEIGHT MacHeight /* Height of the offscreen buffer */
#define VIEWHEIGHT MacViewHeight /* Height of the viewing area */
Word ScaleX(Word x); /* Scale factor for 320 mode points projected to SCREEN */
Word ScaleY(Word y);
extern Word MacWidth;
extern Word MacHeight;
extern Word MacViewHeight;
#else
#define SCREENWIDTH 320 /* Size of the offscreen buffer */
#define SCREENHEIGHT 200 /* Height of the offscreen buffer */
#define VIEWHEIGHT 160 /* Height of the viewing area */
#define ScaleX(x) x /* Scale factor for 320 mode points projected to SCREEN */
#define ScaleY(y) y
#endif
#define CENTERY (VIEWHEIGHT/2) /* Center of the viewing area */
#define CENTERX (SCREENWIDTH/2) /* Center of the viewing area */
#define ANGLES 512 /* Number of angles for camera */
#define FRACBITS 8 /* Number of bits of fraction */
#define FRACUNIT (1<<FRACBITS) /* Shift count for fraction conversion */
#define MAXFRAC 0x7fff /* Largest fraction constant */
#define MAXUFRAC 0xffff /* Largest unsigned fraction constant */
#define MAXDAMAGECOLOR 32 /* Number of shades of red to use for damage */
#define MAXBONUSCOLOR 8 /* Number of shades of gold to use for damage */
#define EXTRAPOINTS 20000 /* Points for a free man */
#define STARTAMMO 16 /* Ammo to begin the game w
|