The player subsystem is the largest and most complex subsystem in Petari. It is split across roughly sixty headers underDocumentation 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.
include/Game/Player/ and covers everything from raw physics integration to animation blending, power-up transformations, wall climbing, swimming, tornado spinning, and camera interaction. The central class is MarioActor, which extends LiveActor and owns a Mario object that handles moment-to-moment physics and state transitions.
MarioActor is about 0xFD0 bytes in size and aggregates multiple sub-modules. When reading decompiled code, check Mario.hpp for low-level physics state and MarioActor.hpp for the top-level lifecycle and draw methods.Core classes
MarioActor — top-level player actor
MarioActor — top-level player actor
MarioActor inherits LiveActor and is the object registered with the scene graph. It manages health, player mode (normal, bee, ice, fire, etc.), model switching, effect playback, and the game-over state machine.Mario — physics and state machine core
Mario — physics and state machine core
Mario extends MarioModule and is the physics brain of the player. It holds position, velocity, movement direction vectors, all wall/ground collision state, and every movement sub-module as a pointer member. The MovementStates bitfield tracks boolean physics flags such as jumping and digitalJump.MarioState — base class for all movement states
MarioState — base class for all movement states
Every discrete movement mode (walk, swim, hang, slide, etc.) is a
MarioState. Each state reports whether it is active and can react to wall hits, polygon contacts, and ring passes.MarioMove — ground movement state
MarioMove — ground movement state
MarioMove specializes MarioState to handle running and walking on surfaces.Movement sub-modules
TheMario object aggregates a large set of specialized sub-modules, each responsible for one movement mode. All inherit MarioModule.
MarioSwim
Underwater swimming physics, water entry/exit detection, and water-damage timer.
MarioSlider
Slide mechanics activated on slope surfaces flagged with the slider floor code.
MarioHang
Hanging from ledges and ceiling grips, including back-hang and side-hang checks.
MarioClimb
Wall-climbing on climbable surfaces, vertical movement, and jump-off transitions.
MarioWall
Wall-stick detection, wall-run state, and position correction against wall geometry.
MarioDamage
Normal damage reaction: stagger animation, invincibility timer, and life decrement.
MarioFireDamage / MarioFireDance
Fire-based hazard reactions: catching fire, running in panic, and the fire dance anim.
MarioFreeze
Ice freeze encasement state with thaw animation and break-out timing.
Player sub-module list
The fullPlayer/ directory includes the following headers (selected):
| Header | Purpose |
|---|---|
MarioActor.hpp | Top-level player LiveActor |
Mario.hpp | Physics core and state dispatch |
MarioState.hpp | Abstract base for all movement states |
MarioMove.hpp | Ground movement |
MarioSwim.hpp | Swimming |
MarioHang.hpp | Hanging from ledges |
MarioClimb.hpp | Climbable wall movement |
MarioSlider.hpp | Slide on slopes |
MarioSkate.hpp | Ice skating |
MarioWall.hpp | Wall-stick and wall-run |
MarioDamage.hpp | Standard damage reaction |
MarioFireDamage.hpp | Fire hazard reaction |
MarioFireDance.hpp | On-fire animation state |
MarioFreeze.hpp | Ice encasement |
MarioCrush.hpp | Crush / press-down death |
MarioParalyze.hpp | Electric paralysis |
MarioStun.hpp | Stun reaction |
MarioBlown.hpp | Blow-back from explosion |
MarioFaint.hpp | Faint / flip reaction |
MarioAbyssDamage.hpp | Abyss / fall-out-of-bounds death |
MarioDarkDamage.hpp | Shadow / dark matter damage |
MarioWarp.hpp | Warp pipe and cube-warp transitions |
MarioRecovery.hpp | Recovery bubble warp-back |
MarioFlip.hpp | Flip / back-roll reaction |
MarioSideStep.hpp | Side-step dodge |
MarioFrontStep.hpp | Front-step reaction |
MarioStick.hpp | Star-pointer sticky bind |
MarioRabbit.hpp | Rabbit / Boo-ray mode |
MarioTeresa.hpp | Boo Mario transformation |
MarioFoo.hpp | Bee Mario state |
MarioSukekiyo.hpp | Special movement variant |
TornadoMario.hpp | Tornado spin move |
FireMarioBall.hpp | Fireball projectile owned by Mario |
MarioAnimator.hpp | Animation controller |
MarioEffect.hpp | Particle effect manager |
MarioConst.hpp | Tuning constants (speeds, timers) |
MarioMessenger.hpp | Cross-system message dispatch |
GhostPlayer.hpp | Luigi ghost playback |