Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

Background Class Reference

#include <background.h>

List of all members.

Public Methods

 Background (Graphics &)
 Background (string, Graphics &)
 ~Background ()
void SetStatic (string)
void SetStatic (Surface *)
bool Draw ()
bool Draw (Surface *)
void DrawRect (Rect &R)
void DrawRect (Surface *, Rect &R)
bool SetPosition (float, float)
float GetX () const
float GetY () const
int GetWidth () const
int GetHeight () const
float GetMaxX () const
float GetMaxY () const
int GetXint () const
int GetYint () const
int GetScreenWidth () const
int GetScreenHeight () const

Private Methods

void DrawRect (Surface *dest, Rect &R, Rect &S)

Private Attributes

GraphicsGD
bool staticBackground
SurfacestaticImage
bool needRedraw
float xOffset
float yOffset
float xMax
float yMax


Constructor & Destructor Documentation

Background::Background Graphics  
 

Definition at line 9 of file background.cpp.

References needRedraw, staticBackground, xOffset, and yOffset.

Background::Background string   ,
Graphics  
 

Definition at line 19 of file background.cpp.

References SetPosition(), and SetStatic().

Background::~Background  
 

Definition at line 26 of file background.cpp.

References Graphics::freeImage(), and staticImage.


Member Function Documentation

bool Background::Draw Surface  
 

Definition at line 80 of file background.cpp.

References DrawRect(), _Surface::h, needRedraw, Rect, staticBackground, Util_BuildRect(), and _Surface::w.

bool Background::Draw  
 

Definition at line 69 of file background.cpp.

References DrawRect(), GD, Graphics::getHeight(), Graphics::getMainSurface(), Graphics::getWidth(), _Surface::h, Rect, staticImage, Util_BuildRect(), _Surface::w, xOffset, and yOffset.

Referenced by Game::RenderScreen().

void Background::DrawRect Surface   dest,
Rect   R,
Rect   S
[private]
 

Definition at line 117 of file background.cpp.

References Graphics::blit(), Rect, and staticImage.

void Background::DrawRect Surface  ,
Rect   R
 

Definition at line 105 of file background.cpp.

References DrawRect(), Rect, xOffset, and yOffset.

void Background::DrawRect Rect   R
 

Definition at line 98 of file background.cpp.

References GD, Graphics::getMainSurface(), and Rect.

Referenced by Draw(), DrawRect(), and Game::RenderScreen().

int Background::GetHeight   const [inline]
 

Definition at line 44 of file background.h.

References staticImage, and _Surface::w.

Referenced by Game::Game().

float Background::GetMaxX   const [inline]
 

Definition at line 45 of file background.h.

References _Surface::h, and staticImage.

Referenced by Game::Game().

float Background::GetMaxY   const [inline]
 

Definition at line 46 of file background.h.

References xMax.

Referenced by Game::Game().

int Background::GetScreenHeight   const [inline]
 

Definition at line 50 of file background.h.

References GD, and Graphics::getWidth().

Referenced by MainChar::Recenter().

int Background::GetScreenWidth   const [inline]
 

Definition at line 49 of file background.h.

References yOffset.

Referenced by MainChar::Recenter().

int Background::GetWidth   const [inline]
 

Definition at line 43 of file background.h.

References yOffset.

Referenced by Game::Game().

float Background::GetX   const [inline]
 

Definition at line 41 of file background.h.

Referenced by SubWorld::ScreenToSubWorld(), and SubWorld::SubWorldToScreen().

int Background::GetXint   const [inline]
 

Definition at line 47 of file background.h.

References yMax.

float Background::GetY   const [inline]
 

Definition at line 42 of file background.h.

References xOffset.

Referenced by GameObject::Recenter(), SubWorld::ScreenToSubWorld(), and SubWorld::SubWorldToScreen().

int Background::GetYint   const [inline]
 

Definition at line 48 of file background.h.

References xOffset.

bool Background::SetPosition float   ,
float   
 

Definition at line 123 of file background.cpp.

References needRedraw, xMax, xOffset, yMax, and yOffset.

Referenced by Background(), and Game::GameLoop().

void Background::SetStatic Surface  
 

Definition at line 39 of file background.cpp.

References Graphics::blit(), Graphics::CreateSurfaceFrom(), GD, Graphics::getHeight(), Graphics::getWidth(), _Surface::h, needRedraw, staticBackground, staticImage, Graphics::TexturizeSurface(), _Surface::w, xMax, and yMax.

void Background::SetStatic string   
 

Definition at line 34 of file background.cpp.

References Graphics::loadImage().

Referenced by Background().


Member Data Documentation

Graphics& Background::GD [private]
 

Definition at line 54 of file background.h.

Referenced by Draw(), DrawRect(), GetScreenHeight(), and SetStatic().

bool Background::needRedraw [private]
 

Definition at line 64 of file background.h.

Referenced by Background(), Draw(), SetPosition(), and SetStatic().

bool Background::staticBackground [private]
 

Definition at line 60 of file background.h.

Referenced by Background(), Draw(), and SetStatic().

Surface* Background::staticImage [private]
 

Definition at line 61 of file background.h.

Referenced by Draw(), DrawRect(), GetHeight(), GetMaxX(), SetStatic(), and ~Background().

float Background::xMax [private]
 

Definition at line 69 of file background.h.

Referenced by GetMaxY(), SetPosition(), and SetStatic().

float Background::xOffset [private]
 

Definition at line 68 of file background.h.

Referenced by Background(), Draw(), DrawRect(), GetY(), GetYint(), and SetPosition().

float Background::yMax [private]
 

Definition at line 69 of file background.h.

Referenced by GetXint(), SetPosition(), and SetStatic().

float Background::yOffset [private]
 

Definition at line 68 of file background.h.

Referenced by Background(), Draw(), DrawRect(), GetScreenWidth(), GetWidth(), and SetPosition().


The documentation for this class was generated from the following files:
Generated on Sun Dec 8 12:02:21 2002 for nnc by doxygen1.3-rc1