Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

PosterScroller Class Reference

Inheritance diagram for PosterScroller:

Inheritance graph
[legend]
Collaboration diagram for PosterScroller:

Collaboration graph
[legend]

Detailed Description

Scroll very height picture.

Definition at line 12 of file PosterScroller.h.

Public Member Functions

 PosterScroller (const Path &picture)
virtual bool allowBg () const

Protected Member Functions

virtual void own_initState ()
virtual void own_updateState ()


Constructor & Destructor Documentation

PosterScroller::PosterScroller const Path picture  ) 
 

Definition at line 16 of file PosterScroller.cpp.

00017     : PosterState(picture)
00018 {
00019     m_shift = 0;
00020     m_screenH = 0;
00021 }


Member Function Documentation

virtual bool PosterScroller::allowBg  )  const [inline, virtual]
 

Reimplemented from GameState.

Definition at line 22 of file PosterScroller.h.

00022 { return true; }

void PosterScroller::own_initState  )  [protected, virtual]
 

Reimplemented from PosterState.

Definition at line 24 of file PosterScroller.cpp.

00025 {
00026     m_screenH = OptionAgent::agent()->getAsInt("screen_height");
00027     m_shift = -m_screenH + SHIFT_SPEED;
00028 }

void PosterScroller::own_updateState  )  [protected, virtual]
 

Reimplemented from PosterState.

Definition at line 31 of file PosterScroller.cpp.

00032 {
00033     int maxShift = min(m_shift, m_bg->getH() - m_screenH/3);
00034 
00035     m_bg->setLoc(V2(0, -maxShift));
00036     m_shift += SHIFT_SPEED;
00037     if (m_shift > m_bg->getH()) {
00038         quitState();
00039     }
00040 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:56:19 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2