Super Mario 64s source code (from a leak on 4chan so be careful)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
10 KiB

6 years ago
  1. script_func_local_1:
  2. return
  3. script_func_local_2:
  4. object /*model*/ MODEL_NONE, /*pos*/ 0, -700, -4500, /*angle*/ 0, 0, 0, /*behParam*/ 0x03000000, /*beh*/ bhvHiddenStar, /*acts*/ ALL_ACTS
  5. return
  6. script_func_local_3:
  7. object /*model*/ MODEL_NONE, /*pos*/ -1800, 800, -1500, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvHiddenRedCoinStar, /*acts*/ ALL_ACTS
  8. object /*model*/ MODEL_WIGGLER, /*pos*/ 17, 1843, -62, /*angle*/ 0, 0, 0, /*behParam*/ 0x05000000, /*beh*/ bhvWiggler
  9. return
  10. script_func_local_4:
  11. object /*model*/ MODEL_KOOPA_WITH_SHELL, /*pos*/ -1900, -511, 2400, /*angle*/ 0, -30, 0, /*behParam*/ 0x02030000, /*beh*/ bhvKoopa, /*acts*/ ACT_3
  12. object /*model*/ MODEL_NONE, /*pos*/ 7400, -1537, -6300, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvKoopaRaceEndpoint, /*acts*/ ACT_3
  13. object /*model*/ MODEL_NONE, /*pos*/ -6556, -2969, 6565, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvGoombaTripletSpawner
  14. object /*model*/ MODEL_GOOMBA, /*pos*/ 6517, -2559, 4327, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvGoomba
  15. object /*model*/ MODEL_PIRANHA_PLANT, /*pos*/ -6336, -2047, -3861, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvFirePiranhaPlant
  16. object /*model*/ MODEL_PIRANHA_PLANT, /*pos*/ -5740, -2047, -6578, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvFirePiranhaPlant
  17. object /*model*/ MODEL_PIRANHA_PLANT, /*pos*/ -6481, -2047, -5998, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvFirePiranhaPlant
  18. object /*model*/ MODEL_PIRANHA_PLANT, /*pos*/ -5577, -2047, -4961, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvFirePiranhaPlant
  19. object /*model*/ MODEL_PIRANHA_PLANT, /*pos*/ -6865, -2047, -4568, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvFirePiranhaPlant
  20. object /*model*/ MODEL_NONE, /*pos*/ -4413, 204, -2140, /*angle*/ 0, 0, 0, /*behParam*/ 0x00030000, /*beh*/ bhvThiBowlingBallSpawner
  21. object /*model*/ MODEL_BUBBA, /*pos*/ -6241, -3300, -716, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvBubba
  22. object /*model*/ MODEL_BUBBA, /*pos*/ 1624, -3300, 8142, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvBubba
  23. return
  24. script_func_local_5:
  25. object /*model*/ MODEL_THI_HUGE_ISLAND_TOP, /*pos*/ 0, 3891, -1533, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvThiHugeIslandTop
  26. return
  27. script_func_local_6:
  28. object /*model*/ MODEL_THI_TINY_ISLAND_TOP, /*pos*/ 0, 1167, -460, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvThiTinyIslandTop
  29. object /*model*/ MODEL_NONE, /*pos*/ -1382, 80, -649, /*angle*/ 0, 0, 0, /*behParam*/ 0x00040000, /*beh*/ bhvThiBowlingBallSpawner
  30. return
  31. script_func_local_7:
  32. object /*model*/ MODEL_THI_WARP_PIPE, /*pos*/ 6656, -1536, -5632, /*angle*/ 0, 0, 0, /*behParam*/ 0x00320000, /*beh*/ bhvWarpPipe
  33. object /*model*/ MODEL_THI_WARP_PIPE, /*pos*/ -5888, -2048, -5888, /*angle*/ 0, 0, 0, /*behParam*/ 0x00330000, /*beh*/ bhvWarpPipe
  34. object /*model*/ MODEL_THI_WARP_PIPE, /*pos*/ -3072, 512, -3840, /*angle*/ 0, 0, 0, /*behParam*/ 0x00340000, /*beh*/ bhvWarpPipe
  35. warp_node /*id*/ 0x32, /*destLevel*/ 0x0D, /*destArea*/ 0x02, /*destNode*/ 0x32, /*unk6*/ 0x0000
  36. warp_node /*id*/ 0x33, /*destLevel*/ 0x0D, /*destArea*/ 0x02, /*destNode*/ 0x33, /*unk6*/ 0x0000
  37. warp_node /*id*/ 0x34, /*destLevel*/ 0x0D, /*destArea*/ 0x02, /*destNode*/ 0x34, /*unk6*/ 0x0000
  38. return
  39. script_func_local_8:
  40. object /*model*/ MODEL_THI_WARP_PIPE, /*pos*/ 1997, -461, -1690, /*angle*/ 0, 0, 0, /*behParam*/ 0x00320000, /*beh*/ bhvWarpPipe
  41. object /*model*/ MODEL_THI_WARP_PIPE, /*pos*/ -1766, -614, -1766, /*angle*/ 0, 0, 0, /*behParam*/ 0x00330000, /*beh*/ bhvWarpPipe
  42. object /*model*/ MODEL_THI_WARP_PIPE, /*pos*/ -922, 154, -1152, /*angle*/ 0, 0, 0, /*behParam*/ 0x00340000, /*beh*/ bhvWarpPipe
  43. warp_node /*id*/ 0x32, /*destLevel*/ 0x0D, /*destArea*/ 0x01, /*destNode*/ 0x32, /*unk6*/ 0x0000
  44. warp_node /*id*/ 0x33, /*destLevel*/ 0x0D, /*destArea*/ 0x01, /*destNode*/ 0x33, /*unk6*/ 0x0000
  45. warp_node /*id*/ 0x34, /*destLevel*/ 0x0D, /*destArea*/ 0x01, /*destNode*/ 0x34, /*unk6*/ 0x0000
  46. return
  47. glabel level_thi_entry
  48. init_level
  49. load_mio0 /*seg*/ 0x07, /*romStart*/ _thi_segment_7SegmentRomStart, /*romEnd*/ _thi_segment_7SegmentRomEnd
  50. load_mio0_texture /*seg*/ 0x09, /*romStart*/ _grass_mio0SegmentRomStart, /*romEnd*/ _grass_mio0SegmentRomEnd
  51. load_mio0 /*seg*/ 0x0A, /*romStart*/ _water_skybox_mio0SegmentRomStart, /*romEnd*/ _water_skybox_mio0SegmentRomEnd
  52. load_mio0 /*seg*/ 0x05, /*romStart*/ _group11_mio0SegmentRomStart, /*romEnd*/ _group11_mio0SegmentRomEnd
  53. load_raw /*seg*/ 0x0C, /*romStart*/ _group11_geoSegmentRomStart, /*romEnd*/ _group11_geoSegmentRomEnd
  54. load_mio0 /*seg*/ 0x06, /*romStart*/ _group14_mio0SegmentRomStart, /*romEnd*/ _group14_mio0SegmentRomEnd
  55. load_raw /*seg*/ 0x0D, /*romStart*/ _group14_geoSegmentRomStart, /*romEnd*/ _group14_geoSegmentRomEnd
  56. load_mio0 /*seg*/ 0x08, /*romStart*/ _common0_mio0SegmentRomStart, /*romEnd*/ _common0_mio0SegmentRomEnd
  57. load_raw /*seg*/ 0x0F, /*romStart*/ _common0_geoSegmentRomStart, /*romEnd*/ _common0_geoSegmentRomEnd
  58. alloc_level_pool
  59. mario /*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario
  60. jump_link /*target*/ script_func_global_1
  61. jump_link /*target*/ script_func_global_12
  62. jump_link /*target*/ script_func_global_15
  63. load_model_from_geo /*model*/ MODEL_THI_BUBBLY_TREE, /*geo*/ bubbly_tree_geo
  64. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_03, /*geo*/ thi_geo_0005F0
  65. load_model_from_geo /*model*/ MODEL_THI_WARP_PIPE, /*geo*/ warp_pipe_geo
  66. load_model_from_geo /*model*/ MODEL_THI_HUGE_ISLAND_TOP, /*geo*/ thi_geo_0005B0
  67. load_model_from_geo /*model*/ MODEL_THI_TINY_ISLAND_TOP, /*geo*/ thi_geo_0005C8
  68. area /*index*/ 1, /*geo*/ thi_geo_000608
  69. object /*model*/ MODEL_NONE, /*pos*/ -7372, -1969, 7373, /*angle*/ 0, 149, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps74
  70. object /*model*/ MODEL_NONE, /*pos*/ 410, -512, 922, /*angle*/ 0, 0, 0, /*behParam*/ 0x000B0000, /*beh*/ bhvWarps60
  71. object /*model*/ MODEL_NONE, /*pos*/ 410, -512, 717, /*angle*/ 0, 0, 0, /*behParam*/ 0x050C0000, /*beh*/ bhvWarp
  72. object /*model*/ MODEL_NONE, /*pos*/ 0, 3170, -1570, /*angle*/ 0, 0, 0, /*behParam*/ 0x0A0D0000, /*beh*/ bhvWarp
  73. warp_node /*id*/ 0x0A, /*destLevel*/ 0x0D, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*unk6*/ 0x0000
  74. warp_node /*id*/ 0x0B, /*destLevel*/ 0x0D, /*destArea*/ 0x01, /*destNode*/ 0x0B, /*unk6*/ 0x0000
  75. warp_node /*id*/ 0x0C, /*destLevel*/ 0x0D, /*destArea*/ 0x03, /*destNode*/ 0x0A, /*unk6*/ 0x0000
  76. warp_node /*id*/ 0x0D, /*destLevel*/ 0x0D, /*destArea*/ 0x03, /*destNode*/ 0x0B, /*unk6*/ 0x0000
  77. warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x37, /*unk6*/ 0x0000
  78. warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x69, /*unk6*/ 0x0000
  79. jump_link /*target*/ script_func_local_7
  80. jump_link /*target*/ script_func_local_1
  81. jump_link /*target*/ script_func_local_5
  82. jump_link /*target*/ script_func_local_4
  83. terrain /*terrainData*/ thi_seg7_area_1_collision
  84. macro_objects /*objList*/ thi_seg7_area_1_macro_objs
  85. set_music /*unk2*/ 0x0000, /*seq*/ SEQ_LEVEL_GRASS
  86. terrain_type /*terrainType*/ 0x0000
  87. end_area
  88. area /*index*/ 2, /*geo*/ thi_geo_0006D4
  89. object /*model*/ MODEL_NONE, /*pos*/ -2211, 110, 2212, /*angle*/ 0, 149, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps74
  90. object /*model*/ MODEL_NONE, /*pos*/ 280, -767, -4180, /*angle*/ 0, 0, 0, /*behParam*/ 0x000B0000, /*beh*/ bhvFadingWarp
  91. object /*model*/ MODEL_NONE, /*pos*/ -1638, 0, -1988, /*angle*/ 0, -126, 0, /*behParam*/ 0x000C0000, /*beh*/ bhvFadingWarp
  92. warp_node /*id*/ 0x0A, /*destLevel*/ 0x0D, /*destArea*/ 0x02, /*destNode*/ 0x0A, /*unk6*/ 0x0000
  93. warp_node /*id*/ 0x0B, /*destLevel*/ 0x0D, /*destArea*/ 0x02, /*destNode*/ 0x0C, /*unk6*/ 0x0000
  94. warp_node /*id*/ 0x0C, /*destLevel*/ 0x0D, /*destArea*/ 0x02, /*destNode*/ 0x0B, /*unk6*/ 0x0000
  95. warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x33, /*unk6*/ 0x0000
  96. warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x65, /*unk6*/ 0x0000
  97. jump_link /*target*/ script_func_local_8
  98. jump_link /*target*/ script_func_local_2
  99. jump_link /*target*/ script_func_local_6
  100. terrain /*terrainData*/ thi_seg7_area_2_collision
  101. macro_objects /*objList*/ thi_seg7_area_2_macro_objs
  102. set_music /*unk2*/ 0x0000, /*seq*/ SEQ_LEVEL_GRASS
  103. terrain_type /*terrainType*/ 0x0000
  104. end_area
  105. area /*index*/ 3, /*geo*/ thi_geo_00079C
  106. object /*model*/ MODEL_NONE, /*pos*/ 512, 1024, 2150, /*angle*/ 0, 180, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps60
  107. object /*model*/ MODEL_NONE, /*pos*/ 0, 3277, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x000B0000, /*beh*/ bhvWarps64
  108. object /*model*/ MODEL_NONE, /*pos*/ 512, 1024, 2355, /*angle*/ 0, 0, 0, /*behParam*/ 0x050C0000, /*beh*/ bhvWarp
  109. warp_node /*id*/ 0x0A, /*destLevel*/ 0x0D, /*destArea*/ 0x03, /*destNode*/ 0x0A, /*unk6*/ 0x0000
  110. warp_node /*id*/ 0x0B, /*destLevel*/ 0x0D, /*destArea*/ 0x03, /*destNode*/ 0x0B, /*unk6*/ 0x0000
  111. warp_node /*id*/ 0x0C, /*destLevel*/ 0x0D, /*destArea*/ 0x01, /*destNode*/ 0x0B, /*unk6*/ 0x0000
  112. warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x37, /*unk6*/ 0x0000
  113. warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x69, /*unk6*/ 0x0000
  114. jump_link /*target*/ script_func_local_3
  115. terrain /*terrainData*/ thi_seg7_area_3_collision
  116. macro_objects /*objList*/ thi_seg7_area_3_macro_objs
  117. set_music /*unk2*/ 0x0004, /*seq*/ SEQ_LEVEL_UNDERGROUND
  118. terrain_type /*terrainType*/ 0x0000
  119. end_area
  120. free_level_pool
  121. mario_pos /*area*/ 1, /*yaw*/ 149, /*pos*/ -7372, -2969, 7373
  122. call /*arg*/ 0, /*func*/ lvl_init_or_update
  123. call_loop /*arg*/ 1, /*func*/ lvl_init_or_update
  124. clear_level
  125. sleep_before_exit /*frames*/ 1
  126. exit