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

script_func_local_1:
object /*model*/ MODEL_TTM_ROLLING_LOG, /*pos*/ 4360, -1722, 4001, /*angle*/ 0, 48, 0, /*behParam*/ 0x00000000, /*beh*/ bhvTtmRollingLog
return
script_func_local_2:
object /*model*/ MODEL_NONE, /*pos*/ -1639, 1146, -1742, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvTtmBowlingBallSpawner
object /*model*/ MODEL_NONE, /*pos*/ 3295, -3692, 2928, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvWaterfallSoundLoop
object /*model*/ MODEL_NONE, /*pos*/ 2004, -1580, 1283, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvWaterfallSoundLoop
object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2077, -1023, -1969, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2500, -1023, -2157, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2048, -1023, -2307, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2351, -1023, -2416, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2400, -2559, -2185, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -1435, -2559, -3118, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -1677, -2559, -3507, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -1869, -2559, -2704, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
object /*model*/ MODEL_DL_MONTY_MOLE_HOLE, /*pos*/ -2525, -2559, -2626, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMoleHole
object /*model*/ MODEL_MONTY_MOLE, /*pos*/ 0, 0, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvMontyMole
object /*model*/ MODEL_MONTY_MOLE, /*pos*/ 0, 0, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvMontyMole
object /*model*/ MODEL_NONE, /*pos*/ 3625, 560, 165, /*angle*/ 0, 330, 0, /*behParam*/ 0x00000000, /*beh*/ bhvCloud
object /*model*/ MODEL_UKIKI, /*pos*/ 729, 2307, 335, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvUkiki, /*acts*/ ACT_2
object /*model*/ MODEL_UKIKI, /*pos*/ 1992, -1548, 2944, /*angle*/ 0, 0, 0, /*behParam*/ 0x00010000, /*beh*/ bhvUkiki, /*acts*/ ALL_ACTS
return
script_func_local_3:
object /*model*/ MODEL_STAR, /*pos*/ 1200, 2600, 150, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStar, /*acts*/ ACT_1
object /*model*/ MODEL_TTM_STAR_CAGE, /*pos*/ 2496, 1670, 1492, /*angle*/ 0, 0, 0, /*behParam*/ 0x01000000, /*beh*/ bhvLittleCage, /*acts*/ ACT_2
object /*model*/ MODEL_NONE, /*pos*/ -3250, -2500, -3700, /*angle*/ 0, 0, 0, /*behParam*/ 0x02000000, /*beh*/ bhvHiddenRedCoinStar, /*acts*/ ALL_ACTS
object /*model*/ MODEL_STAR, /*pos*/ -2900, -2700, 3650, /*angle*/ 0, 0, 0, /*behParam*/ 0x03000000, /*beh*/ bhvStar, /*acts*/ ALL_ACTS
object /*model*/ MODEL_STAR, /*pos*/ 1800, 1200, 1050, /*angle*/ 0, 0, 0, /*behParam*/ 0x04000000, /*beh*/ bhvStar, /*acts*/ ALL_ACTS
object /*model*/ MODEL_STAR, /*pos*/ 7300, -3100, 1300, /*angle*/ 0, 0, 0, /*behParam*/ 0x05000000, /*beh*/ bhvStar, /*acts*/ ALL_ACTS
return
script_func_local_4:
object /*model*/ MODEL_TTM_BLUE_SMILEY, /*pos*/ 4389, 3620, 624, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
object /*model*/ MODEL_TTM_YELLOW_SMILEY, /*pos*/ -1251, 2493, 2224, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
object /*model*/ MODEL_TTM_STAR_SMILEY, /*pos*/ -2547, 1365, -520, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
object /*model*/ MODEL_TTM_MOON_SMILEY, /*pos*/ -324, 989, -4090, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
return
script_func_local_5:
object /*model*/ MODEL_TTM_BLUE_SMILEY, /*pos*/ 7867, -959, -6085, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
object /*model*/ MODEL_TTM_BLUE_SMILEY, /*pos*/ -5241, 5329, 9466, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
object /*model*/ MODEL_TTM_YELLOW_SMILEY, /*pos*/ -1869, -5311, 7358, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
object /*model*/ MODEL_TTM_STAR_SMILEY, /*pos*/ -9095, 4262, 5348, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
object /*model*/ MODEL_TTM_MOON_SMILEY, /*pos*/ -8477, 730, -7122, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
object /*model*/ MODEL_TTM_MOON_SMILEY, /*pos*/ 6160, -6076, 7861, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
return
script_func_local_6:
object /*model*/ MODEL_TTM_YELLOW_SMILEY, /*pos*/ 5157, 1974, -8292, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
object /*model*/ MODEL_TTM_STAR_SMILEY, /*pos*/ 11106, 2588, 381, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
object /*model*/ MODEL_TTM_MOON_SMILEY, /*pos*/ 37, 1974, -1124, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject
return
script_func_local_7:
return
glabel level_ttm_entry
init_level
load_mio0 /*seg*/ 0x07, /*romStart*/ _ttm_segment_7SegmentRomStart, /*romEnd*/ _ttm_segment_7SegmentRomEnd
load_mio0_texture /*seg*/ 0x09, /*romStart*/ _mountain_mio0SegmentRomStart, /*romEnd*/ _mountain_mio0SegmentRomEnd
load_mio0 /*seg*/ 0x0A, /*romStart*/ _water_skybox_mio0SegmentRomStart, /*romEnd*/ _water_skybox_mio0SegmentRomEnd
load_mio0 /*seg*/ 0x05, /*romStart*/ _group6_mio0SegmentRomStart, /*romEnd*/ _group6_mio0SegmentRomEnd
load_raw /*seg*/ 0x0C, /*romStart*/ _group6_geoSegmentRomStart, /*romEnd*/ _group6_geoSegmentRomEnd
load_mio0 /*seg*/ 0x08, /*romStart*/ _common0_mio0SegmentRomStart, /*romEnd*/ _common0_mio0SegmentRomEnd
load_raw /*seg*/ 0x0F, /*romStart*/ _common0_geoSegmentRomStart, /*romEnd*/ _common0_geoSegmentRomEnd
alloc_level_pool
mario /*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario
jump_link /*target*/ script_func_global_1
jump_link /*target*/ script_func_global_7
load_model_from_geo /*model*/ MODEL_TTM_SLIDE_EXIT_PODIUM, /*geo*/ ttm_geo_000DF4
load_model_from_geo /*model*/ MODEL_TTM_ROLLING_LOG, /*geo*/ ttm_geo_000730
load_model_from_geo /*model*/ MODEL_TTM_STAR_CAGE, /*geo*/ ttm_geo_000710
load_model_from_geo /*model*/ MODEL_TTM_BLUE_SMILEY, /*geo*/ ttm_geo_000D14
load_model_from_geo /*model*/ MODEL_TTM_YELLOW_SMILEY, /*geo*/ ttm_geo_000D4C
load_model_from_geo /*model*/ MODEL_TTM_STAR_SMILEY, /*geo*/ ttm_geo_000D84
load_model_from_geo /*model*/ MODEL_TTM_MOON_SMILEY, /*geo*/ ttm_geo_000DBC
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_03, /*geo*/ ttm_geo_000748
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_04, /*geo*/ ttm_geo_000778
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_05, /*geo*/ ttm_geo_0007A8
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_06, /*geo*/ ttm_geo_0007D8
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_07, /*geo*/ ttm_geo_000808
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_08, /*geo*/ ttm_geo_000830
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_09, /*geo*/ ttm_geo_000858
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_0A, /*geo*/ ttm_geo_000880
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_0B, /*geo*/ ttm_geo_0008A8
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_0C, /*geo*/ ttm_geo_0008D0
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_0D, /*geo*/ ttm_geo_0008F8
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_0F, /*geo*/ ttm_geo_000920
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_10, /*geo*/ ttm_geo_000948
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_11, /*geo*/ ttm_geo_000970
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_12, /*geo*/ ttm_geo_000990
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_13, /*geo*/ ttm_geo_0009C0
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_14, /*geo*/ ttm_geo_0009F0
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_15, /*geo*/ ttm_geo_000A18
load_model_from_geo /*model*/ MODEL_LEVEL_GEOMETRY_16, /*geo*/ ttm_geo_000A40
area /*index*/ 1, /*geo*/ ttm_geo_000A70
object /*model*/ MODEL_NONE, /*pos*/ 102, -3332, 5734, /*angle*/ 0, 45, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps74
object /*model*/ MODEL_NONE, /*pos*/ -2447, -2457, 3952, /*angle*/ 0, -105, 0, /*behParam*/ 0x00140000, /*beh*/ bhvWarps64
object /*model*/ MODEL_NONE, /*pos*/ 2267, -3006, -3788, /*angle*/ 0, 148, 0, /*behParam*/ 0x00150000, /*beh*/ bhvFadingWarp
object /*model*/ MODEL_NONE, /*pos*/ -557, -3448, -4146, /*angle*/ 0, -168, 0, /*behParam*/ 0x00160000, /*beh*/ bhvFadingWarp
warp_node /*id*/ 0x0A, /*destLevel*/ 0x24, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*unk6*/ 0x0000
warp_node /*id*/ 0x14, /*destLevel*/ 0x24, /*destArea*/ 0x01, /*destNode*/ 0x14, /*unk6*/ 0x0000
warp_node /*id*/ 0x15, /*destLevel*/ 0x24, /*destArea*/ 0x01, /*destNode*/ 0x16, /*unk6*/ 0x0000
warp_node /*id*/ 0x16, /*destLevel*/ 0x24, /*destArea*/ 0x01, /*destNode*/ 0x15, /*unk6*/ 0x0000
painting_warp_node /*id*/ 0x00, /*destLevel*/ 0x24, /*destArea*/ 0x02, /*destNode*/ 0x0A, /*unk6*/ 0x8000
painting_warp_node /*id*/ 0x01, /*destLevel*/ 0x24, /*destArea*/ 0x02, /*destNode*/ 0x0A, /*unk6*/ 0x8000
painting_warp_node /*id*/ 0x02, /*destLevel*/ 0x24, /*destArea*/ 0x02, /*destNode*/ 0x0A, /*unk6*/ 0x8000
warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x34, /*unk6*/ 0x0000
warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x66, /*unk6*/ 0x0000
jump_link /*target*/ script_func_local_1
jump_link /*target*/ script_func_local_2
jump_link /*target*/ script_func_local_3
terrain /*terrainData*/ ttm_seg7_area_1_collision
macro_objects /*objList*/ ttm_seg7_area_1_macro_objs
set_music /*unk2*/ 0x0000, /*seq*/ SEQ_LEVEL_GRASS
terrain_type /*terrainType*/ 0x0001
end_area
area /*index*/ 2, /*geo*/ ttm_geo_000B5C
object /*model*/ MODEL_NONE, /*pos*/ 7000, 5381, 6750, /*angle*/ 0, 225, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvWarps64
warp_node /*id*/ 0x0A, /*destLevel*/ 0x24, /*destArea*/ 0x02, /*destNode*/ 0x0A, /*unk6*/ 0x0000
warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x34, /*unk6*/ 0x0000
warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x66, /*unk6*/ 0x0000
jump_link /*target*/ script_func_local_4
terrain /*terrainData*/ ttm_seg7_area_2_collision
macro_objects /*objList*/ ttm_seg7_area_2_macro_objs
instant_warp /*index*/ 2, /*destArea*/ 3, /*displace*/ 10240, 7168, 10240
set_music /*unk2*/ 0x0001, /*seq*/ SEQ_LEVEL_SLIDE
terrain_type /*terrainType*/ 0x0006
end_area
area /*index*/ 3, /*geo*/ ttm_geo_000BEC
warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x34, /*unk6*/ 0x0000
warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x66, /*unk6*/ 0x0000
jump_link /*target*/ script_func_local_5
terrain /*terrainData*/ ttm_seg7_area_3_collision
macro_objects /*objList*/ ttm_seg7_area_3_macro_objs
instant_warp /*index*/ 3, /*destArea*/ 4, /*displace*/ -11264, 13312, 3072
set_music /*unk2*/ 0x0001, /*seq*/ SEQ_LEVEL_SLIDE
terrain_type /*terrainType*/ 0x0006
end_area
area /*index*/ 4, /*geo*/ ttm_geo_000C84
object /*model*/ MODEL_TTM_SLIDE_EXIT_PODIUM, /*pos*/ -7285, -1866, -4812, /*angle*/ 0, 0, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvExitPodiumWarp
warp_node /*id*/ 0x0A, /*destLevel*/ 0x24, /*destArea*/ 0x01, /*destNode*/ 0x14, /*unk6*/ 0x0000
warp_node /*id*/ 0xF0, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x34, /*unk6*/ 0x0000
warp_node /*id*/ 0xF1, /*destLevel*/ 0x06, /*destArea*/ 0x02, /*destNode*/ 0x66, /*unk6*/ 0x0000
jump_link /*target*/ script_func_local_6
jump_link /*target*/ script_func_local_7
terrain /*terrainData*/ ttm_seg7_area_4_collision
macro_objects /*objList*/ ttm_seg7_area_4_macro_objs
set_music /*unk2*/ 0x0001, /*seq*/ SEQ_LEVEL_SLIDE
terrain_type /*terrainType*/ 0x0006
end_area
free_level_pool
mario_pos /*area*/ 1, /*yaw*/ 45, /*pos*/ 102, -4332, 5734
call /*arg*/ 0, /*func*/ lvl_init_or_update
call_loop /*arg*/ 1, /*func*/ lvl_init_or_update
clear_level
sleep_before_exit /*frames*/ 1
exit