Platz Type mutableClass

From Uzebox Wiki
Jump to navigation Jump to search

Mutable classes are re-used across many mutable bgs that have common attributes in order to save flash. An example would be the rings that Sonic collects - they are always the same dimensions; always have the same animation; and always add one to your count.

typedef struct mutableClass {
   u8 id;          // Mutable bg id
   u8 tile;        // Tile/map/animation index
   u8 hgt;         // We only store height and use top left pt from inner bg to know where to draw. The tile attribute of the inner bg
} mutableClass;    // becomes an index into the mutableClasses table. The r.btm attribute of the inner bg becomes the mutable bitmap index.