Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F627671
Game.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
Game.h
View Options
/***************************************************************************
Game.h - description
-------------------
begin : Mon Aug 27 2003
copyright : (C) 2003 by upi
email : upi@apocalypse.rulez.org
***************************************************************************/
#ifndef GAME_H
#define GAME_H
#include
<string>
#include
<vector>
struct
SDL_Surface
;
class
Background
;
class
Game
{
public
:
Game
(
bool
a_bIsReplay
,
bool
a_bDebug
);
~
Game
();
int
Run
();
std
::
string
&
GetReplay
();
void
DoReplay
(
const
char
*
a_pcReplayFile
);
protected
:
void
Draw
();
void
DrawHitPointDisplay
();
void
DrawBackground
();
void
DrawDoodads
();
void
DrawPoly
(
const
char
*
a_pcName
,
int
a_iColor
);
void
DoOneRound
();
void
Advance
(
int
a_iNumFrames
);
int
ProcessEvents
();
void
HandleKey
(
int
a_iPlayer
,
int
a_iKey
,
bool
a_bDown
);
void
HurryUp
();
void
TimeUp
();
void
InstantReplay
(
int
a_iKoAt
);
bool
IsNetworkGame
();
bool
IsMaster
();
protected
:
static
int
mg_iBackgroundNumber
;
bool
m_bIsReplay
;
bool
m_bDebug
;
Background
*
m_poBackground
;
SDL_Surface
*
m_poDoodads
;
int
m_aiRoundsWonByPlayer
[
2
];
int
m_iNumberOfRounds
;
int
m_iFrame
;
int
m_iGameTime
;
std
::
string
m_sReplayString
;
std
::
vector
<
int
>
m_aReplayOffsets
;
enum
TGamePhaseEnum
// This enum assumes its values during DoOneRound
{
Ph_START
,
// "Round X" displayed, fighters getting ready
Ph_NORMAL
,
// During the fight
Ph_TIMEUP
,
// Time is up, no KO, no replay.
Ph_KO
,
// There is a KO, forward until the guy is down
Ph_REWIND
,
// There was a KO, rewinding until before the KO
Ph_SLOWFORWARD
,
// Playing back the KO
Ph_REPLAY
,
// Replay mode
}
m_enGamePhase
;
SState
::
TGameMode
m_enInitialGameMode
;
// must make sure it's still the same.
};
#endif
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 15, 2:30 AM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
131759
Default Alt Text
Game.h (1 KB)
Attached To
Mode
R76 OpenMortal
Attached
Detach File
Event Timeline