Code Walkthrough

If you haven't already, skim over the StepMania class hierarchies diagrams. The Actor and Screen hierarchies are of particular interest.

Contents

Actor

Actor.h/cpp

Actor is the base class for most elements you see on the screen. Actors have a position, rotation, color, and other properties. Update() and Draw() are called on them once per frame.

Sprite

Actor.h/cpp

Sprite is an Actor that draws a bitmap. The logo on the title screen and the scrolling arrows during gameplay are both examples.


BitmapText

BitmapText.h/cpp

BitmapText is an Actor that has a text property. It uses a bitmap font to draw characters to the screen every frame. The credits text at the bottom of the screen is an example of a BitmapText element.


ActorFrame

ActorFrame.h/cpp

An ActorFrame is an Actor that contains other Actors. First, Actors are added to an ActorFrame. Then, calling Update() or Draw() on an ActorFrame will recursively call Update() and Draw() on all children of the ActorFrame.


Screen

Screen*.h/cpp

A Screen is an ActorFrame that also handles input and contains game logic. To move Actors or make other things happen when the user presses a button, insert some logic in a Screen's Input() method.

ThemeManager

ThemeManager.h/cpp

ThemeManager is the global singleton object that is responsible for feeding graphics, sound, animation files, and screen order information to the game code.

All theme files reside in the Themes/ directory. metrics.ini is the central theme file and defines things like screen order and what choices are available on each screen. When Screens are loaded, they ask theme manager ThemeManager which menu choices, graphics, animations, and sounds to display to the user.


File access

StepMania abstracts file access. The most typical way to read or write a file is through RageFile class.

To perform other, less-common file operations like Move and Delete, see RageFileManager.cpp/h (the global singleton FILEMAN).

Another useful function is GetDirListing, which enumerates files in the supplied directory and also accepts wildcards.

Article -  Edit -  History - 
Hover for description
News
FAQ Tutorials Docs
Downloads
Songs
StepMix 1 Songs
StepMix 1 Songs (2)
StepMix 2 Songs
StepMix 2 Songs (2)
StepMix 3 Songs
StepMix 3 Songs (2)
User Songs
Song Download Sites
Themes
Announcers
Backgrounds
Other Downloads
ITG Downloads
Message Boards

Dance Pads

Dance Pad Info
Dance Pads
Other Controllers
USB Adapters

Cool Stuff

StepMix 3 Contest
StepMania CD-ROM
StepMania Scores
In The Groove
StepMania Online
Movies
Pictures
Products
Links
Other Simulators
Frappr,MySpace,Facebook
Dance Dance Revolution
Pump It Up

Other StepMania

Documentation
Help/Support
Create & Share
Video Cards
Video Drivers
Spread StepMania
Developers
RSS Feeds
Contact Us

Search

Thanks to

SourceForge.net Logo

Site Stats

64002.57 GB of free downloads served since July 28, 2006.

Translate

Random Pictures