User Tools


Star Select Rendering

The star select screen is rendered using a combination of geo layout functions and behaviors for the stars. Much of the screen uses custom asm to generate the F3D display lists.

The main menu level script (2A6120-2A65B0) contains the level script for the act selector starting at 2A6238. This includes a check on course number (asm 8024BE14), a geo layout for the star select screen (seg 14000408, ROM 2A6528), and a behavior for the spinning stars (seg 13003048, ROM 21CE48).

Level Script

The level script for the star act selector starts at 0x2A6238.

2A6238 [118] AccumAsm1 11 08 0000 8024BE14
2A6240 [120] CondJump  0C 0C 0200 00000000 140001C0 
2A624C [12C] StartLoad 1B 04 0000
2A6250 [130] LoadASM   16 10 0000 8016F000 0021F4C0 00269EA0
2A6260 [140] MIO0->Seg 18 0C 0007 002A65B0 002ABCA0
2A626C [14C] EndLoad   1D 04 0000
2A6270 [150] StartArea 1F 08 0200 14000408
2A6278 [158] PlaceObj  24 18 1F00 24181F00 0000FF9C 00000000 00000000 04000000 13003048
2A6290 [170] Collision 2E 08 0000 0700DE30
2A6298 [178] EndArea   20 04 0000
2A629C [17C]           1E 04 0000
2A62A0 [180]           29 04 0200
2A62A4 [184] FadeColor 33 08 0010 FFFFFF00
2A62AC [18C] Delay03   03 04 0010
2A62B0 [190] Music37   37 04 000D
2A62B4 [194] AccumAsm1 11 08 0000 80177560
2A62BC [19C] AccumAsm2 12 08 0000 80177610
2A62C4 [1A4] GetPut    3C 04 0002
2A62C8 [1A8]           38 04 00BE
2A62CC [1AC] FadeColor 33 08 0110 FFFFFF00
2A62D4 [1B4] Delay03   03 04 0010
2A62D8 [1B8]           1C 04 0000
2A62DC [1BC] Delay04   04 04 0001
2A62E0 [1C0] EndLevel  02 04 0000

Geo Layout

The geo layout for the act selector is defined by the StartArea 0x1F level command above (seg 14000408, ROM 2A6528)

0x0800000A, 0x00A00078, 0x00A00078
0x04000000
  0x0C000000
  0x04000000
    0x09000064
    0x04000000
      0x1900FFFF, 0x00000000 // BG color (RGBA) = white
    0x05000000
  0x05000000
  0x0C010000
  0x04000000
    0x0A00002D, 0x006461A8
    0x04000000
      0x0F000000, 0x00000000, 0x03E80000, 0x00000000, 0x00000000
      0x04000000
        0x17000000
      0x05000000
    0x05000000
  0x05000000
  0x0C000000
  0x04000000
    0x18000000, Geo18_80177518 // renders 2D text and course texture
  0x05000000
0x05000000
0x01000000

Star Behavior Script

The rotating star behavior contains two ASM routines 80176B20 and 80176DF0 which generate the act selection stars and rotate the selected star.

00 08 00 00
11 01 00 01
0C 00 00 00 80176B20 // ROM: 0x226FE0, Creates menu stars
08 00 00 00
   0C 00 00 00 80176DF0 // ROM: 0x2272B0, Rotate stars/select act
09 00 00 00

References