Hardcoded Behaviour

From Sunshine Wiki
Jump to navigation Jump to search

This page documents examples of hardcoded behaviour in the game, that is, behaviour or settings that affect the game substantially but cannot be modified through the files of a scene and instead are set inside the game's executable.

Stage-Dependent Particle Limit[edit]

In TMarDirector::loadResource (located at address 0x802b5458 in the US version) the game defines the maximum number of particles it can spawn for stages. The default maximum limit is 1000, the exceptions are listed in the table below.

Stage ID Sub ID Stage Name Limit
4 2 Gelato Beach 3000
5 1 Pinna Ep. 2 (Beach) 1500
9 0 Noki Bay Ep. 1 1500
33 - Gelato Beach Sand Bird stage 3000
52 - King Boo Boss Fight 3000
56 - Noki Bay Eel Fight 3000
57 - Corona 3000
58 - Pinna Park Rollercoaster 4000
60 - Bowser Fight 5000

Special Stage (ExMap) Classification[edit]

System::SMS_isExMap (located at 0x802a8b58 in the US version) tells the game whether the current stage is an Ex map or not. Stage IDs with 21 <= stage ID <= 52 count as an Ex map. Ex maps have the following properties:

  1. The camera retains its rotation instead of automatically moving behind Mario when he runs in a direction. The camera only rotates by itself when geometry is blocking the line of sight towards Mario. The player can still adjust the camera in any desired way.

Next Action after Cutscene End[edit]

TMovieDirector::decideNextMode (located at 0x802b63c8 in the US version) tells the game the next action to do after a cutscene ends. This includes playing specific cutscenes back to back but it also gives the player Shine 119 (Corona) at the end of cutscene 14 (End cutscene right before the scredits).

Movement Plane Restriction in Option Map[edit]

System::SMS_isOptionMap (located at 0x802a8ae0 in the US version) tells the game whether the current stage is the Option Map, that is, the screen where you select the file to play and where you can set various options. By default stage 15 is the Option Map. Option Maps have the following properties:

  1. Mario's movement is restricted along a Z plane. The location of the Z plane is a paramter stored in params.szs, in mario/option.prm.

Hinokuri2 Mask on/Mask off[edit]

THinokuri2::init (located at 0x8005d18c in the US version) initializes the unused Hinokuri2 enemy which only exists in the test11 stage that remained in releases outside of Japan. For the Airport and the Delfino Plaza stage (ID 0 and 1 respectively) Hinokuri is initialized into a normal state with a face. For the episode 5 of Delfino Plaza and episode 8 of the Airport (sub stage id 4 and 7 respectively) Hinokuri is specifically programmed to wear a mask. For all other stages Hinokuri is in an exposed state which is why in test11 Hinokuri looks like a huge walking pear with an eye on top.