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.

117 lines
11 KiB

6 years ago
  1. script_func_local_1:
  2. warp_node /*id*/ 0x00, /*destLevel*/ 0x06, /*destArea*/ 0x01, /*destNode*/ 0x00, /*unk6*/ 0x0000
  3. warp_node /*id*/ 0x01, /*destLevel*/ 0x06, /*destArea*/ 0x01, /*destNode*/ 0x01, /*unk6*/ 0x0000
  4. warp_node /*id*/ 0x02, /*destLevel*/ 0x06, /*destArea*/ 0x03, /*destNode*/ 0x02, /*unk6*/ 0x0000
  5. object /*model*/ MODEL_NONE, /*pos*/ 0, 900, -1710, /*angle*/ 0, 180, 0, /*behParam*/ 0x00030000, /*beh*/ bhvWarps70
  6. warp_node /*id*/ 0x03, /*destLevel*/ 0x10, /*destArea*/ 0x01, /*destNode*/ 0x03, /*unk6*/ 0x0000
  7. object /*model*/ MODEL_NONE, /*pos*/ -1328, 260, 4664, /*angle*/ 0, 180, 0, /*behParam*/ 0x00040000, /*beh*/ bhvWarps6C
  8. warp_node /*id*/ 0x04, /*destLevel*/ 0x10, /*destArea*/ 0x01, /*destNode*/ 0x04, /*unk6*/ 0x0000
  9. object /*model*/ MODEL_NONE, /*pos*/ -3379, -815, -2025, /*angle*/ 0, 0, 0, /*behParam*/ 0x3C050000, /*beh*/ bhvWarp
  10. object /*model*/ MODEL_NONE, /*pos*/ -3379, -500, -2025, /*angle*/ 0, 180, 0, /*behParam*/ 0x00060000, /*beh*/ bhvWarps90
  11. object /*model*/ MODEL_NONE, /*pos*/ -3799, -1199, -5816, /*angle*/ 0, 0, 0, /*behParam*/ 0x00070000, /*beh*/ bhvWarps94
  12. object /*model*/ MODEL_NONE, /*pos*/ -3379, -500, -2025, /*angle*/ 0, 180, 0, /*behParam*/ 0x00080000, /*beh*/ bhvWarps8C
  13. warp_node /*id*/ 0x05, /*destLevel*/ 0x12, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*unk6*/ 0x0000
  14. warp_node /*id*/ 0x06, /*destLevel*/ 0x10, /*destArea*/ 0x01, /*destNode*/ 0x06, /*unk6*/ 0x0000
  15. warp_node /*id*/ 0x07, /*destLevel*/ 0x10, /*destArea*/ 0x01, /*destNode*/ 0x07, /*unk6*/ 0x0000
  16. warp_node /*id*/ 0x08, /*destLevel*/ 0x10, /*destArea*/ 0x01, /*destNode*/ 0x08, /*unk6*/ 0x0000
  17. object /*model*/ MODEL_NONE, /*pos*/ 5408, 4500, 3637, /*angle*/ 0, 225, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps64
  18. warp_node /*id*/ 0x0A, /*destLevel*/ 0x10, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*unk6*/ 0x0000
  19. object /*model*/ MODEL_NONE, /*pos*/ -6901, 2376, -6509, /*angle*/ 0, 230, 0, /*behParam*/ 0x00140000, /*beh*/ bhvWarps64
  20. warp_node /*id*/ 0x14, /*destLevel*/ 0x10, /*destArea*/ 0x01, /*destNode*/ 0x14, /*unk6*/ 0x0000
  21. object /*model*/ MODEL_NONE, /*pos*/ 4997, -1250, 2258, /*angle*/ 0, 210, 0, /*behParam*/ 0x001E0000, /*beh*/ bhvWarps94
  22. warp_node /*id*/ 0x1E, /*destLevel*/ 0x10, /*destArea*/ 0x01, /*destNode*/ 0x1E, /*unk6*/ 0x0000
  23. return
  24. script_func_local_2:
  25. object /*model*/ MODEL_NONE, /*pos*/ -5812, 100, -5937, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvWaterfallSoundLoop
  26. object /*model*/ MODEL_NONE, /*pos*/ -7430, 1500, 873, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvBirdsSoundLoop
  27. object /*model*/ MODEL_NONE, /*pos*/ -80, 1500, 5004, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvBirdsSoundLoop
  28. object /*model*/ MODEL_NONE, /*pos*/ 7131, 1500, -2989, /*angle*/ 0, 0, 0, /*behParam*/ 0x00020000, /*beh*/ bhvBirdsSoundLoop
  29. object /*model*/ MODEL_NONE, /*pos*/ -7430, 1500, -5937, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvAmbientSounds
  30. object /*model*/ MODEL_CASTLE_GROUNDS_VCUTM_GRILL, /*pos*/ 0, 0, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMoatGrills
  31. object /*model*/ MODEL_NONE, /*pos*/ 0, 0, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvInvisibleObjectsUnderBridge
  32. object /*model*/ MODEL_MIST, /*pos*/ -4878, -787, -5690, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvWaterMist2
  33. object /*model*/ MODEL_MIST, /*pos*/ -4996, -787, -5548, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvWaterMist2
  34. object /*model*/ MODEL_MIST, /*pos*/ -5114, -787, -5406, /*angle*/ 0, 0, 0, /*behParam*/ 0x00020000, /*beh*/ bhvWaterMist2
  35. object /*model*/ MODEL_MIST, /*pos*/ -5212, -787, -5219, /*angle*/ 0, 0, 0, /*behParam*/ 0x00030000, /*beh*/ bhvWaterMist2
  36. object /*model*/ MODEL_MIST, /*pos*/ -5311, -787, -5033, /*angle*/ 0, 0, 0, /*behParam*/ 0x00040000, /*beh*/ bhvWaterMist2
  37. object /*model*/ MODEL_MIST, /*pos*/ -5419, -787, -4895, /*angle*/ 0, 0, 0, /*behParam*/ 0x00050000, /*beh*/ bhvWaterMist2
  38. object /*model*/ MODEL_MIST, /*pos*/ -5527, -787, -4757, /*angle*/ 0, 0, 0, /*behParam*/ 0x00060000, /*beh*/ bhvWaterMist2
  39. object /*model*/ MODEL_MIST, /*pos*/ -5686, -787, -4733, /*angle*/ 0, 0, 0, /*behParam*/ 0x00070000, /*beh*/ bhvWaterMist2
  40. object /*model*/ MODEL_MIST, /*pos*/ -5845, -787, -4710, /*angle*/ 0, 0, 0, /*behParam*/ 0x00080000, /*beh*/ bhvWaterMist2
  41. object /*model*/ MODEL_NONE, /*pos*/ 5223, -975, 1667, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvFish2
  42. object /*model*/ MODEL_BIRDS, /*pos*/ -5069, 850, 3221, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bBird
  43. object /*model*/ MODEL_BIRDS, /*pos*/ -4711, 742, 433, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bBird
  44. object /*model*/ MODEL_BIRDS, /*pos*/ 5774, 913, -1114, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bBird
  45. object /*model*/ MODEL_NONE, /*pos*/ -1328, 260, 4664, /*angle*/ 0, 180, 0, /*behParam*/ 0x00280000, /*beh*/ bhvIntroScene
  46. object /*model*/ MODEL_CASTLE_GROUNDS_CANNON_GRILL, /*pos*/ 0, 0, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvHiddenAt120Stars
  47. object /*model*/ MODEL_LAKITU, /*pos*/ 11, 803, -3015, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvCameraLakitu
  48. return
  49. script_func_local_3:
  50. object /*model*/ MODEL_CASTLE_GROUNDS_FLAG, /*pos*/ -3213, 3348, -3011, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvCastleFlagWaving
  51. object /*model*/ MODEL_CASTLE_GROUNDS_FLAG, /*pos*/ 3213, 3348, -3011, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvCastleFlagWaving
  52. object /*model*/ MODEL_CASTLE_GROUNDS_FLAG, /*pos*/ -3835, 3348, -6647, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvCastleFlagWaving
  53. object /*model*/ MODEL_CASTLE_GROUNDS_FLAG, /*pos*/ 3835, 3348, -6647, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvCastleFlagWaving
  54. return
  55. script_func_local_4:
  56. object /*model*/ MODEL_BUTTERFLY, /*pos*/ -4508, 406, 4400, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  57. object /*model*/ MODEL_BUTTERFLY, /*pos*/ -4408, 406, 4500, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  58. object /*model*/ MODEL_BUTTERFLY, /*pos*/ -4708, 406, 4100, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  59. object /*model*/ MODEL_BUTTERFLY, /*pos*/ -6003, 473, -2621, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  60. object /*model*/ MODEL_BUTTERFLY, /*pos*/ -6003, 473, -2321, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  61. object /*model*/ MODEL_BUTTERFLY, /*pos*/ 6543, 461, -617, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  62. object /*model*/ MODEL_BUTTERFLY, /*pos*/ 6143, 461, -617, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  63. object /*model*/ MODEL_BUTTERFLY, /*pos*/ 5773, 775, -5722, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  64. object /*model*/ MODEL_BUTTERFLY, /*pos*/ 5873, 775, -5622, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  65. object /*model*/ MODEL_BUTTERFLY, /*pos*/ 5473, 775, -5322, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  66. object /*model*/ MODEL_BUTTERFLY, /*pos*/ -1504, 326, 3196, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  67. object /*model*/ MODEL_BUTTERFLY, /*pos*/ -1204, 326, 3296, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvButterfly
  68. object /*model*/ MODEL_YOSHI, /*pos*/ 0, 3174, -5625, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvYoshi
  69. return
  70. glabel level_castle_grounds_entry
  71. init_level
  72. load_mio0 /*seg*/ 0x07, /*romStart*/ _castle_grounds_segment_7SegmentRomStart, /*romEnd*/ _castle_grounds_segment_7SegmentRomEnd
  73. load_mio0 /*seg*/ 0x0A, /*romStart*/ _water_skybox_mio0SegmentRomStart, /*romEnd*/ _water_skybox_mio0SegmentRomEnd
  74. load_mio0_texture /*seg*/ 0x09, /*romStart*/ _outside_mio0SegmentRomStart, /*romEnd*/ _outside_mio0SegmentRomEnd
  75. load_mio0 /*seg*/ 0x05, /*romStart*/ _group10_mio0SegmentRomStart, /*romEnd*/ _group10_mio0SegmentRomEnd
  76. load_raw /*seg*/ 0x0C, /*romStart*/ _group10_geoSegmentRomStart, /*romEnd*/ _group10_geoSegmentRomEnd
  77. load_mio0 /*seg*/ 0x06, /*romStart*/ _group15_mio0SegmentRomStart, /*romEnd*/ _group15_mio0SegmentRomEnd
  78. load_raw /*seg*/ 0x0D, /*romStart*/ _group15_geoSegmentRomStart, /*romEnd*/ _group15_geoSegmentRomEnd
  79. load_mio0 /*seg*/ 0x08, /*romStart*/ _common0_mio0SegmentRomStart, /*romEnd*/ _common0_mio0SegmentRomEnd
  80. load_raw /*seg*/ 0x0F, /*romStart*/ _common0_geoSegmentRomStart, /*romEnd*/ _common0_geoSegmentRomEnd
  81. alloc_level_pool
  82. mario /*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario
  83. jump_link /*target*/ script_func_global_1
  84. jump_link /*target*/ script_func_global_11
  85. jump_link /*target*/ script_func_global_16
  86. load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_03, /*geo*/ castle_grounds_geo_0006F4
  87. load_model_from_geo /*model*/ MODEL_CASTLE_GROUNDS_BUBBLY_TREE, /*geo*/ bubbly_tree_geo
  88. load_model_from_geo /*model*/ MODEL_CASTLE_GROUNDS_WARP_PIPE, /*geo*/ warp_pipe_geo
  89. load_model_from_geo /*model*/ MODEL_CASTLE_GROUNDS_CASTLE_DOOR, /*geo*/ castle_door_geo
  90. load_model_from_geo /*model*/ MODEL_CASTLE_GROUNDS_METAL_DOOR, /*geo*/ metal_door_geo
  91. load_model_from_geo /*model*/ MODEL_CASTLE_GROUNDS_VCUTM_GRILL, /*geo*/ castle_grounds_geo_00070C
  92. load_model_from_geo /*model*/ MODEL_CASTLE_GROUNDS_FLAG, /*geo*/ castle_grounds_geo_000660
  93. load_model_from_geo /*model*/ MODEL_CASTLE_GROUNDS_CANNON_GRILL, /*geo*/ castle_grounds_geo_000724
  94. area /*index*/ 1, /*geo*/ castle_grounds_geo_00073C
  95. warp_node /*id*/ 0xF1, /*destLevel*/ 0x10, /*destArea*/ 0x01, /*destNode*/ 0x03, /*unk6*/ 0x0000
  96. jump_link /*target*/ script_func_local_1
  97. jump_link /*target*/ script_func_local_2
  98. jump_link /*target*/ script_func_local_3
  99. jump_link /*target*/ script_func_local_4
  100. terrain /*terrainData*/ castle_grounds_seg7_collision_level
  101. macro_objects /*objList*/ castle_grounds_seg7_macro_objs
  102. set_music /*unk2*/ 0x0000, /*seq*/ SEQ_NONE
  103. terrain_type /*terrainType*/ 0x0000
  104. end_area
  105. free_level_pool
  106. mario_pos /*area*/ 1, /*yaw*/ 180, /*pos*/ -1328, 260, 4664
  107. call /*arg*/ 0, /*func*/ lvl_init_or_update
  108. call_loop /*arg*/ 1, /*func*/ lvl_init_or_update
  109. clear_level
  110. sleep_before_exit /*frames*/ 1
  111. exit