Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F633064
Background.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
Background.h
View Options
/***************************************************************************
Background.h - description
-------------------
begin : Sun Jan 11 2004
copyright : (C) 2004 by upi
email : upi@feel
***************************************************************************/
#ifndef __BACKGROUND_H
#define __BACKGROUND_H
#include
<vector>
struct
SDL_Surface
;
/**
\class CBackground
\ingroup GameLogic
\brief The CBackground class draws the multi-layered background of each arena.
The backgrounds are identified by their number. Single-layer backgrounds do
not have description files. Multi-layer backgrounds have a description file
which has the following format:
\li First line: number of layers(int)
\li For each layer: First line: filename (relative to gfx directory)
\li For each layer: Second line: x-displacement(int) y-displacement(int) distance(double)
Extra layers can be added to the background. These are for dead fighters in
team game mode.
*/
class
CBackground
{
public
:
struct
SBackgroundLayer
{
SDL_Surface
*
m_poSurface
;
int
m_iXOffset
;
int
m_iYOffset
;
double
m_dDistance
;
};
private
:
typedef
std
::
vector
<
SBackgroundLayer
>
CLayerVector
;
typedef
CLayerVector
::
iterator
CLayerIterator
;
void
Clear
();
public
:
CBackground
();
~
CBackground
();
void
Load
(
int
a_iBackgroundNumber
);
void
AddExtraLayer
(
const
SBackgroundLayer
&
a_roLayer
);
void
DeleteExtraLayers
();
bool
IsOK
();
void
Draw
(
int
a_iXPosition
,
int
a_iYPosition
,
int
a_iYOffset
);
protected
:
int
m_iNumber
;
int
m_iFirstExtraLayer
;
bool
m_bOK
;
CLayerVector
m_aLayers
;
};
#endif
// __BACKGROUND_H
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 15, 3:58 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
130181
Default Alt Text
Background.h (1 KB)
Attached To
Mode
R76 OpenMortal
Attached
Detach File
Event Timeline