Documentation Index
Fetch the complete documentation index at: https://mintlify.com/SMGCommunity/Petari/llms.txt
Use this file to discover all available pages before exploring further.
NameObj sits at the top of Petari’s object hierarchy. Every entity that participates in the scene’s update loop — from the simplest trigger volume to a fully animated boss — ultimately inherits from NameObj. The class provides a name string used by the object factory system, movement control flags, and an index that slots the object into the scene executor’s ordered lists.
Class definition
The vtable pointer occupies offset
0x0, so mName starts at 0x4. All
offsets in Petari headers are relative to the start of the object in memory,
not to the start of the vtable.The name string
mName is a pointer to a null-terminated C string that identifies the object’s type, not a display name. The factory system uses this string to instantiate the correct C++ class when the game loads a stage layout (JMapInfo). For example, an object with mName = "Koopa" is created by looking up "Koopa" in NameObjFactory.
You can change the name at runtime with setName, but this is rarely necessary outside of factory code.
Movement flags
mFlag is a bitmask of two movement-related bits managed by the scene executor. requestSuspend() and requestResume() queue flag changes that are applied by syncWithFlags() at the start of the next frame.
NameObjFunction provides static helpers that operate on any NameObj:
Executor index
mExecutorIdx is set by NameObjExecuteHolder when the object is registered. The executor iterates its internal array in order each frame, calling movement(), calcAnim(), calcViewAndEntry(), and draw() on each registered object. The index allows O(1) removal without shuffling the array.
Object groups
NameObjGroup is a NameObj subclass that holds an array of NameObj pointers, enabling batch operations across a set of objects.
AllLiveActorGroup (SceneObj_AllLiveActorGroup). Every LiveActor registers itself in its constructor, giving subsystems a single place to iterate all live actors for operations such as gravity application, debug rendering, or bulk invalidation.
SceneObjHolder and retrieved by their SceneObj enum ID, for example:
Inheritance chain
NameObj’s name, flags, and executor slot.