Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

Tutorial01Sprite Class Reference

The class that holds all of the data related to the application. The main simply instances one of these classes and then executes it via the "go" method. More...

Inheritance diagram for Tutorial01Sprite:

Inheritance graph
[legend]
Collaboration diagram for Tutorial01Sprite:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void go (void)
 Gets everything on the screen, and then goes to sleep, letting the interrupt handler update things appropriately.

void updateDisplay (void)
 Updates the display.


Static Public Member Functions

Tutorial01SpritetheApp (void)
 Mechanism to get ahold of the application. This ensures that both main and the interrupt handler can gain access to the same application object without having to resort to global variables and other evilness.


Private Member Functions

 Tutorial01Sprite ()
 Constructor prepares the application to run. To access an object, use theApp() to gain a reference to the application.

 Tutorial01Sprite (const Tutorial01Sprite &)
 Copy constructor is disabled.

Tutorial01Spriteoperator= (const Tutorial01Sprite &)
 Operator= is disabled.

virtual ~Tutorial01Sprite ()
 Destructor never gets called because the application never ends.


Private Attributes

Sprite letA
 The sprite on the touch screen.

Sprite letASub
 The sprite on the top screen.


Detailed Description

The class that holds all of the data related to the application. The main simply instances one of these classes and then executes it via the "go" method.


Constructor & Destructor Documentation

Tutorial01Sprite::Tutorial01Sprite  )  [private]
 

Constructor prepares the application to run. To access an object, use theApp() to gain a reference to the application.

It does the following:

  • Initializes the internal class variables.
  • Initializes the palette to black. Not required, but makes viewing the palette in dualis easier.
  • Configures the various registers on the DS to initialize both displays in MODE_0_2D with sprites active.
  • Initializes our internal copy of the OAM.
  • Loads and configures the sprites related to their structure, OAM, their palettes, and the sprite graphics.
  • Finally, interrupts are enabled with the default


Member Function Documentation

Tutorial01Sprite & Tutorial01Sprite::theApp void   )  [static]
 

Mechanism to get ahold of the application. This ensures that both main and the interrupt handler can gain access to the same application object without having to resort to global variables and other evilness.

Return values:
A reference to the application object


The documentation for this class was generated from the following file:
Generated on Fri Apr 22 13:53:33 2005 for Sprite01 Example Application by doxygen 1.3.6