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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.
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
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY 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 _rt_game_public
#define _rt_game_public
//***************************************************************************
//
// Public header for RT_GAME.C
//
//***************************************************************************
#include "rt_actor.h"
#include "lumpy.h"
#include "rt_cfg.h"
#include "rt_playr.h"
//***************************************************************************
//
// DEFINES
//
//***************************************************************************
#define MaxHighName 57
#define MaxScores 7
//***************************************************************************
//
// TYPEDEFS
//
//***************************************************************************
typedef struct
{
char message[30];
byte episode;
byte area;
byte version;
byte picture[16000];
word mapcrc;
AlternateInformation info;
} gamestorage_t;
typedef struct
{
char name[MaxHighName + 1];
long score;
word completed,episode;
} HighScore;
//***************************************************************************
//
// GLOBALS
//
//***************************************************************************
extern int PlayerSnds[5];
extern int SHAKETICS;
extern int damagecount;
extern HighScore Scores[MaxScores];
extern int SaveTime;
//***************************************************************************
//
// PROTOTYPES
//
//***************************************************************************
void SetupPlayScreen (void);
void SD_PreCache (void);
void GameMemToScreen( pic_t *source, int x, int y, int bufferofsonly );
void DrawPlayScreen (boolean bufferofsonly);
void DrawKills (boolean bufferofsonly);
void DrawPlayers ( void );
void DrawGameString (int x, int y, char * str, boolean bufferofsonly);
void DrawNumber (int x, int y, int width, int which, boolean bufferofsonly);
void TakeDamage (int points, objtype *attacker);
void HealPlayer (int points, objtype * ob);
void DrawLives (boolean bufferofsonly);
void GiveExtraMan (void);
void DrawScore (boolean bufferofsonly);
void GivePoints (long points);
void DrawKeys (boolean bufferofsonly);
void GiveKey (int key);
void GiveWeapon (objtype * ob, int weapon);
void GiveMissileWeapon(objtype * ob, int which);
void GiveLives (int newlives);
void UpdateScore (unsigned int num);
void UpdateLives (int num);
void DrawTimeXY( int x, int y, int sec, boolean bufferofsonly );
void DrawTime (boolean bufferofsonly);
boolean SaveTheGame (int num, gamestorage_t * game);
boolean LoadTheGame (int num, gamestorage_t * game);
void GetSavedMessage (int num, char * message);
void GetSavedHeader (int num, gamestorage_t * game);
void DrawHighScores (void);
void CheckHighScore (long score, word other, boolean INMENU);
void LevelCompleted ( exit_t playstate );
void BattleLevelCompleted ( int localplayer );
void Died (void);
void ScreenShake (void);
void UpdateTriads (objtype * ob, int num);
void DrawTriads (boolean bufferofsonly);
void DrawStats (void);
void DrawBarHealth (boolean bufferonly);
void DrawBarAmmo (boolean bufferonly);
void GM_DrawBonus (int which);
void DrawEpisodeLevel ( int x, int y );
void DoBorderShifts (void);
void GM_UpdateBonus (int time, int powerup);
void DoLoadGameAction (void);
int GetLevel (int episode, int mapon);
void DrawPause (void);
void DrawPauseXY (int x, int y);
void DrawColoredMPPic (int xpos, int ypos, int width, int height, int heightmod, byte *src, boolean bufferofsonly, int color);
void StatusDrawColoredPic (unsigned x, unsigned y, pic_t *nums, boolean bufferofsonly, int color);
void ClearTriads (playertype * pstate);
#endif
|