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.

165 lines
13 KiB

5 years ago
  1. script_func_local_1:
  2. object /*model*/ MODEL_TTM_ROLLING_LOG, /*pos*/ 4360, -1722, 4001, /*angle*/ 0, 48, 0, /*behParam*/ 0x00000000, /*beh*/ bhvTtmRollingLog
  3. return
  4. script_func_local_2:
  5. object /*model*/ MODEL_NONE, /*pos*/ -1639, 1146, -1742, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvTtmBowlingBallSpawner
  6. object /*model*/ MODEL_NONE, /*pos*/ 3295, -3692, 2928, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvWaterfallSoundLoop
  7. object /*model*/ MODEL_NONE, /*pos*/ 2004, -1580, 1283, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvWaterfallSoundLoop
  8. object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2077, -1023, -1969, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
  9. object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2500, -1023, -2157, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
  10. object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2048, -1023, -2307, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
  11. object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2351, -1023, -2416, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
  12. object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2400, -2559, -2185, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
  13. object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -1435, -2559, -3118, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
  14. object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -1677, -2559, -3507, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
  15. object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -1869, -2559, -2704, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
  16. object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2525, -2559, -2626, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
  17. object /*model*/ MODEL_MONTY_MOLE, /*pos*/ 0, 0, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMole
  18. object /*model*/ MODEL_MONTY_MOLE, /*pos*/ 0, 0, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvMontyMole
  19. object /*model*/ MODEL_NONE, /*pos*/ 3625, 560, 165, /*angle*/ 0, 330, 0, /*behParam*/ 0x00000000, /*beh*/ bhvCloud
  20. object /*model*/ MODEL_UKIKI, /*pos*/ 729, 2307, 335, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvUkiki, /*acts*/ ACT_2
  21. object /*model*/ MODEL_UKIKI, /*pos*/ 1992, -1548, 2944, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvUkiki, /*acts*/ ALL_ACTS
  22. return
  23. script_func_local_3:
  24. object /*model*/ MODEL_STAR, /*pos*/ 1200, 2600, 150, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStar, /*acts*/ ACT_1
  25. object /*model*/ MODEL_TTM_STAR_CAGE, /*pos*/ 2496, 1670, 1492, /*angle*/ 0, 0, 0, /*behParam*/ 0x01000000, /*beh*/ bhvLittleCage, /*acts*/ ACT_2
  26. object /*model*/ MODEL_NONE, /*pos*/ -3250, -2500, -3700, /*angle*/ 0, 0, 0, /*behParam*/ 0x02000000, /*beh*/ bhvHiddenRedCoinStar, /*acts*/ ALL_ACTS
  27. object /*model*/ MODEL_STAR, /*pos*/ -2900, -2700, 3650, /*angle*/ 0, 0, 0, /*behParam*/ 0x03000000, /*beh*/ bhvStar, /*acts*/ ALL_ACTS
  28. object /*model*/ MODEL_STAR, /*pos*/ 1800, 1200, 1050, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvStar, /*acts*/ ALL_ACTS
  29. object /*model*/ MODEL_STAR, /*pos*/ 7300, -3100, 1300, /*angle*/ 0, 0, 0, /*behParam*/ 0x05000000, /*beh*/ bhvStar, /*acts*/ ALL_ACTS
  30. return
  31. script_func_local_4:
  32. object /*model*/ MODEL_TTM_BLUE_SMILEY, /*pos*/ 4389, 3620, 624, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  33. object /*model*/ MODEL_TTM_YELLOW_SMILEY, /*pos*/ -1251, 2493, 2224, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  34. object /*model*/ MODEL_TTM_STAR_SMILEY, /*pos*/ -2547, 1365, -520, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  35. object /*model*/ MODEL_TTM_MOON_SMILEY, /*pos*/ -324, 989, -4090, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  36. return
  37. script_func_local_5:
  38. object /*model*/ MODEL_TTM_BLUE_SMILEY, /*pos*/ 7867, -959, -6085, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  39. object /*model*/ MODEL_TTM_BLUE_SMILEY, /*pos*/ -5241, 5329, 9466, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  40. object /*model*/ MODEL_TTM_YELLOW_SMILEY, /*pos*/ -1869, -5311, 7358, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  41. object /*model*/ MODEL_TTM_STAR_SMILEY, /*pos*/ -9095, 4262, 5348, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  42. object /*model*/ MODEL_TTM_MOON_SMILEY, /*pos*/ -8477, 730, -7122, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  43. object /*model*/ MODEL_TTM_MOON_SMILEY, /*pos*/ 6160, -6076, 7861, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  44. return
  45. script_func_local_6:
  46. object /*model*/ MODEL_TTM_YELLOW_SMILEY, /*pos*/ 5157, 1974, -8292, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  47. object /*model*/ MODEL_TTM_STAR_SMILEY, /*pos*/ 11106, 2588, 381, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  48. object /*model*/ MODEL_TTM_MOON_SMILEY, /*pos*/ 37, 1974, -1124, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
  49. return
  50. script_func_local_7:
  51. return
  52. glabel level_ttm_entry
  53. init_level
  54. load_mio0 /*seg*/ 0x07, /*romStart*/ _ttm_segment_7SegmentRomStart, /*romEnd*/ _ttm_segment_7SegmentRomEnd
  55. load_mio0_texture /*seg*/ 0x09, /*romStart*/ _mountain_mio0SegmentRomStart, /*romEnd*/ _mountain_mio0SegmentRomEnd
  56. load_mio0 /*seg*/ 0x0A, /*romStart*/ _water_skybox_mio0SegmentRomStart, /*romEnd*/ _water_skybox_mio0SegmentRomEnd
  57. load_mio0 /*seg*/ 0x05, /*romStart*/ _group6_mio0SegmentRomStart, /*romEnd*/ _group6_mio0SegmentRomEnd
  58. load_raw /*seg*/ 0x0C, /*romStart*/ _group6_geoSegmentRomStart, /*romEnd*/ _group6_geoSegmentRomEnd
  59. load_mio0 /*seg*/ 0x08, /*romStart*/ _common0_mio0SegmentRomStart, /*romEnd*/ _common0_mio0SegmentRomEnd
  60. load_raw /*seg*/ 0x0F, /*romStart*/ _common0_geoSegmentRomStart, /*romEnd*/ _common0_geoSegmentRomEnd
  61. alloc_level_pool
  62. mario /*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario
  63. jump_link /*target*/ script_func_global_1
  64. jump_link /*target*/ script_func_global_7
  65. load_model_from_geo /*model*/ MODEL_TTM_SLIDE_EXIT_PODIUM, /*geo*/ ttm_geo_000DF4
  66. load_model_from_geo /*model*/ MODEL_TTM_ROLLING_LOG, /*geo*/ ttm_geo_000730
  67. load_model_from_geo /*model*/ MODEL_TTM_STAR_CAGE, /*geo*/ ttm_geo_000710
  68. load_model_from_geo /*model*/ MODEL_TTM_BLUE_SMILEY, /*geo*/ ttm_geo_000D14
  69. load_model_from_geo /*model*/ MODEL_TTM_YELLOW_SMILEY, /*geo*/ ttm_geo_000D4C
  70. load_model_from_geo /*model*/ MODEL_TTM_STAR_SMILEY, /*geo*/ ttm_geo_000D84
  71. load_model_from_geo /*model*/ MODEL_TTM_MOON_SMILEY, /*geo*/ ttm_geo_000DBC
  72. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_03, /*geo*/ ttm_geo_000748
  73. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_04, /*geo*/ ttm_geo_000778
  74. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_05, /*geo*/ ttm_geo_0007A8
  75. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_06, /*geo*/ ttm_geo_0007D8
  76. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_07, /*geo*/ ttm_geo_000808
  77. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_08, /*geo*/ ttm_geo_000830
  78. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_09, /*geo*/ ttm_geo_000858
  79. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_0A, /*geo*/ ttm_geo_000880
  80. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_0B, /*geo*/ ttm_geo_0008A8
  81. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_0C, /*geo*/ ttm_geo_0008D0
  82. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_0D, /*geo*/ ttm_geo_0008F8
  83. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_0F, /*geo*/ ttm_geo_000920
  84. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_10, /*geo*/ ttm_geo_000948
  85. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_11, /*geo*/ ttm_geo_000970
  86. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_12, /*geo*/ ttm_geo_000990
  87. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_13, /*geo*/ ttm_geo_0009C0
  88. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_14, /*geo*/ ttm_geo_0009F0
  89. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_15, /*geo*/ ttm_geo_000A18
  90. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_16, /*geo*/ ttm_geo_000A40
  91. area /*index*/ 1, /*geo*/ ttm_geo_000A70
  92. object /*model*/ MODEL_NONE, /*pos*/ 102, -3332, 5734, /*angle*/ 0, 45, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps74
  93. object /*model*/ MODEL_NONE, /*pos*/ -2447, -2457, 3952, /*angle*/ 0, -105, 0, /*behParam*/ 0x00140000, /*beh*/ bhvWarps64
  94. object /*model*/ MODEL_NONE, /*pos*/ 2267, -3006, -3788, /*angle*/ 0, 148, 0, /*behParam*/ 0x00150000, /*beh*/ bhvFadingWarp
  95. object /*model*/ MODEL_NONE, /*pos*/ -557, -3448, -4146, /*angle*/ 0, -168, 0, /*behParam*/ 0x00160000, /*beh*/ bhvFadingWarp
  96. warp_node /*id*/ 0x0A, /*destLevel*/ 0x24, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*unk6*/ 0x0000
  97. warp_node /*id*/ 0x14, /*destLevel*/ 0x24, /*destArea*/ 0x01, /*destNode*/ 0x14, /*unk6*/ 0x0000
  98. warp_node /*id*/ 0x15, /*destLevel*/ 0x24, /*destArea*/ 0x01, /*destNode*/ 0x16, /*unk6*/ 0x0000
  99. warp_node /*id*/ 0x16, /*destLevel*/ 0x24, /*destArea*/ 0x01, /*destNode*/ 0x15, /*unk6*/ 0x0000
  100. painting_warp_node /*id*/ 0x00, /*destLevel*/ 0x24, /*destArea*/ 0x02, /*destNode*/ 0x0A, /*unk6*/ 0x8000
  101. painting_warp_node /*id*/ 0x01, /*destLevel*/ 0x24, /*destArea*/ 0x02, /*destNode*/ 0x0A, /*unk6*/ 0x8000
  102. painting_warp_node /*id*/ 0x02, /*destLevel*/ 0x24, /*destArea*/ 0x02, /*destNode*/ 0x0A, /*unk6*/ 0x8000
  103. warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x34, /*unk6*/ 0x0000
  104. warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x66, /*unk6*/ 0x0000
  105. jump_link /*target*/ script_func_local_1
  106. jump_link /*target*/ script_func_local_2
  107. jump_link /*target*/ script_func_local_3
  108. terrain /*terrainData*/ ttm_seg7_area_1_collision
  109. macro_objects /*objList*/ ttm_seg7_area_1_macro_objs
  110. set_music /*unk2*/ 0x0000, /*seq*/ SEQ_LEVEL_GRASS
  111. terrain_type /*terrainType*/ 0x0001
  112. end_area
  113. area /*index*/ 2, /*geo*/ ttm_geo_000B5C
  114. object /*model*/ MODEL_NONE, /*pos*/ 7000, 5381, 6750, /*angle*/ 0, 225, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps64
  115. warp_node /*id*/ 0x0A, /*destLevel*/ 0x24, /*destArea*/ 0x02, /*destNode*/ 0x0A, /*unk6*/ 0x0000
  116. warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x34, /*unk6*/ 0x0000
  117. warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x66, /*unk6*/ 0x0000
  118. jump_link /*target*/ script_func_local_4
  119. terrain /*terrainData*/ ttm_seg7_area_2_collision
  120. macro_objects /*objList*/ ttm_seg7_area_2_macro_objs
  121. instant_warp /*index*/ 2, /*destArea*/ 3, /*displace*/ 10240, 7168, 10240
  122. set_music /*unk2*/ 0x0001, /*seq*/ SEQ_LEVEL_SLIDE
  123. terrain_type /*terrainType*/ 0x0006
  124. end_area
  125. area /*index*/ 3, /*geo*/ ttm_geo_000BEC
  126. warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x34, /*unk6*/ 0x0000
  127. warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x66, /*unk6*/ 0x0000
  128. jump_link /*target*/ script_func_local_5
  129. terrain /*terrainData*/ ttm_seg7_area_3_collision
  130. macro_objects /*objList*/ ttm_seg7_area_3_macro_objs
  131. instant_warp /*index*/ 3, /*destArea*/ 4, /*displace*/ -11264, 13312, 3072
  132. set_music /*unk2*/ 0x0001, /*seq*/ SEQ_LEVEL_SLIDE
  133. terrain_type /*terrainType*/ 0x0006
  134. end_area
  135. area /*index*/ 4, /*geo*/ ttm_geo_000C84
  136. object /*model*/ MODEL_TTM_SLIDE_EXIT_PODIUM, /*pos*/ -7285, -1866, -4812, /*angle*/ 0, 0, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvExitPodiumWarp
  137. warp_node /*id*/ 0x0A, /*destLevel*/ 0x24, /*destArea*/ 0x01, /*destNode*/ 0x14, /*unk6*/ 0x0000
  138. warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x34, /*unk6*/ 0x0000
  139. warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x66, /*unk6*/ 0x0000
  140. jump_link /*target*/ script_func_local_6
  141. jump_link /*target*/ script_func_local_7
  142. terrain /*terrainData*/ ttm_seg7_area_4_collision
  143. macro_objects /*objList*/ ttm_seg7_area_4_macro_objs
  144. set_music /*unk2*/ 0x0001, /*seq*/ SEQ_LEVEL_SLIDE
  145. terrain_type /*terrainType*/ 0x0006
  146. end_area
  147. free_level_pool
  148. mario_pos /*area*/ 1, /*yaw*/ 45, /*pos*/ 102, -4332, 5734
  149. call /*arg*/ 0, /*func*/ lvl_init_or_update
  150. call_loop /*arg*/ 1, /*func*/ lvl_init_or_update
  151. clear_level
  152. sleep_before_exit /*frames*/ 1
  153. exit