NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
Framework

Description

Manages processes across the game, forming the core of the game engine.

Introduction

In New Super Mario Bros. Wii, almost all game logic exists within individual processes. Each process represents a distinct unit of game behavior and encapsulates specific functionalities.

Nintendo refers to these processes as bases. Each type of base is defined by a profile, which determines its behaviour (is it a Goomba, Mario, the HUD, or the abstract concept of a world map?) and establishes its priority relative to other base types. More details about profiles can be found here.

Processes follow a hierarchical tree structure:

Base Implementation

All bases are derived from the fBase_c class, which defines the core elements of a process to provide common behaviour across all bases (for more detailed information, please refer to the fBase_c documentation). Numerous subclasses supply additional features on top, allowing bases to implement complex behaviour relatively easily whilst avoiding duplicate code.

Hint:
When creating a base, consider researching the existing subclasses to avoid unnecessary reimplementations.

The lifecycle of a base consists of multiple operations, whose behaviour can be overridden at any point in the class hierarchy. Each operation has an associated linked list, containing all bases for which said operation is scheduled for the current frame.

fBase_c defines four core operations:

The fManager_c class is responsible for managing the execution cycle of each base. It also offers various utilities for searching for bases meeting specific criteria.

Sub-categories

 fProfile
 A profile is a basic set of information needed to construct a base.
 

Classes

class  fBase_c
 The base class for all scenes, actors and various other processes. More...
 
class  fBaHelper_c
 [Unused]. [A helper class for fBase_c with unknown purpose]. More...
 
class  fLiMgBa_c
 A base list, made of fLiNdBa_c nodes. More...
 
class  fLiMgPTMF_c
 A base list made of fLiNdPrio_c nodes, with a reference to a process function. More...
 
class  fLiNdBa_c
 A base list node. More...
 
class  fLiNdPrio_c
 A base list node, with priority fields for reordering. More...
 
class  fManager_c
 Manages the execution of base operations. More...
 
class  fTrMgBa_c
 A base tree, made of fTrNdBa_c nodes. More...
 
class  fTrMgPTMF_c
 A base tree made of fTrNdBa_c nodes, with a reference to a process function. More...
 
class  fTrNdBa_c
 A base tree node. More...
 

Enumerations

enum  fBaseID_e {
  BASE_ID_NULL ,
  BASE_ID_FIRST ,
  BASE_ID_MAX = -1
}
 A unique identifier for each base. More...
 

Enumeration Type Documentation

◆ fBaseID_e

enum fBaseID_e

A unique identifier for each base.

Enumerator
BASE_ID_NULL 

Represents the null base.

BASE_ID_FIRST 

The starting identifier value.

BASE_ID_MAX 

The maximum identifier value.

Definition at line 6 of file f_base_id.hpp.