script.c (4948B)
1 #include <ultra64.h> 2 #include "sm64.h" 3 #include "behavior_data.h" 4 #include "model_ids.h" 5 #include "seq_ids.h" 6 #include "segment_symbols.h" 7 #include "level_commands.h" 8 9 #include "game/level_update.h" 10 11 #include "levels/scripts.h" 12 13 #include "actors/common1.h" 14 15 #include "make_const_nonconst.h" 16 #include "levels/ttc/header.h" 17 18 static const LevelScript script_func_local_1[] = { 19 OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1080, -840, 1573, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM2(86), /*bhv*/ bhvPoleGrabbing), 20 OBJECT(/*model*/ MODEL_THWOMP, /*pos*/ 1919, 6191, 1919, /*angle*/ 0, 225, 0, /*bhvParam*/ BPARAM2(0), /*bhv*/ bhvThwomp), 21 RETURN(), 22 }; 23 24 static const LevelScript script_func_local_2[] = { 25 OBJECT_WITH_ACTS(/*model*/ MODEL_STAR, /*pos*/ -1450, -1130, -1050, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM1(STAR_INDEX_ACT_1), /*bhv*/ bhvStar, /*acts*/ ALL_ACTS), 26 OBJECT_WITH_ACTS(/*model*/ MODEL_STAR, /*pos*/ -1850, 300, -950, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM1(STAR_INDEX_ACT_2), /*bhv*/ bhvStar, /*acts*/ ALL_ACTS), 27 OBJECT_WITH_ACTS(/*model*/ MODEL_STAR, /*pos*/ -1300, -2250, -1300, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM1(STAR_INDEX_ACT_3), /*bhv*/ bhvStar, /*acts*/ ALL_ACTS), 28 OBJECT_WITH_ACTS(/*model*/ MODEL_STAR, /*pos*/ 2200, 7300, 2210, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM1(STAR_INDEX_ACT_4), /*bhv*/ bhvStar, /*acts*/ ALL_ACTS), 29 OBJECT_WITH_ACTS(/*model*/ MODEL_STAR, /*pos*/ -1050, 2400, -790, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM1(STAR_INDEX_ACT_5), /*bhv*/ bhvStar, /*acts*/ ALL_ACTS), 30 OBJECT_WITH_ACTS(/*model*/ MODEL_NONE, /*pos*/ 1815, -3200, 800, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM1(STAR_INDEX_ACT_6), /*bhv*/ bhvHiddenRedCoinStar, /*acts*/ ALL_ACTS), 31 RETURN(), 32 }; 33 34 const LevelScript level_ttc_entry[] = { 35 INIT_LEVEL(), 36 LOAD_MIO0 (/*seg*/ 0x07, _ttc_segment_7SegmentRomStart, _ttc_segment_7SegmentRomEnd), 37 LOAD_MIO0_TEXTURE(/*seg*/ 0x09, _machine_mio0SegmentRomStart, _machine_mio0SegmentRomEnd), 38 LOAD_MIO0 (/*seg*/ 0x05, _group1_mio0SegmentRomStart, _group1_mio0SegmentRomEnd), 39 LOAD_RAW (/*seg*/ 0x0C, _group1_geoSegmentRomStart, _group1_geoSegmentRomEnd), 40 LOAD_MIO0 (/*seg*/ 0x08, _common0_mio0SegmentRomStart, _common0_mio0SegmentRomEnd), 41 LOAD_RAW (/*seg*/ 0x0F, _common0_geoSegmentRomStart, _common0_geoSegmentRomEnd), 42 ALLOC_LEVEL_POOL(), 43 MARIO(/*model*/ MODEL_MARIO, /*bhvParam*/ BPARAM4(0x01), /*bhv*/ bhvMario), 44 JUMP_LINK(script_func_global_1), 45 JUMP_LINK(script_func_global_2), 46 LOAD_MODEL_FROM_GEO(MODEL_TTC_ROTATING_CUBE, ttc_geo_000240), 47 LOAD_MODEL_FROM_GEO(MODEL_TTC_ROTATING_PRISM, ttc_geo_000258), 48 LOAD_MODEL_FROM_GEO(MODEL_TTC_PENDULUM, ttc_geo_000270), 49 LOAD_MODEL_FROM_GEO(MODEL_TTC_LARGE_TREADMILL, ttc_geo_000288), 50 LOAD_MODEL_FROM_GEO(MODEL_TTC_SMALL_TREADMILL, ttc_geo_0002A8), 51 LOAD_MODEL_FROM_GEO(MODEL_TTC_PUSH_BLOCK, ttc_geo_0002C8), 52 LOAD_MODEL_FROM_GEO(MODEL_TTC_ROTATING_HEXAGON, ttc_geo_0002E0), 53 LOAD_MODEL_FROM_GEO(MODEL_TTC_ROTATING_TRIANGLE, ttc_geo_0002F8), 54 LOAD_MODEL_FROM_GEO(MODEL_TTC_PIT_BLOCK, ttc_geo_000310), 55 LOAD_MODEL_FROM_GEO(MODEL_TTC_PIT_BLOCK_UNUSED, ttc_geo_000328), 56 LOAD_MODEL_FROM_GEO(MODEL_TTC_ELEVATOR_PLATFORM, ttc_geo_000340), 57 LOAD_MODEL_FROM_GEO(MODEL_TTC_CLOCK_HAND, ttc_geo_000358), 58 LOAD_MODEL_FROM_GEO(MODEL_TTC_SPINNER, ttc_geo_000370), 59 LOAD_MODEL_FROM_GEO(MODEL_TTC_SMALL_GEAR, ttc_geo_000388), 60 LOAD_MODEL_FROM_GEO(MODEL_TTC_LARGE_GEAR, ttc_geo_0003A0), 61 62 AREA(/*index*/ 1, ttc_geo_0003B8), 63 OBJECT(/*model*/ MODEL_NONE, /*pos*/ 1417, -3822, -548, /*angle*/ 0, 316, 0, /*bhvParam*/ BPARAM2(WARP_NODE_0A), /*bhv*/ bhvSpinAirborneWarp), 64 WARP_NODE(/*id*/ WARP_NODE_0A, /*destLevel*/ LEVEL_TTC, /*destArea*/ 1, /*destNode*/ WARP_NODE_0A, /*flags*/ WARP_NO_CHECKPOINT), 65 WARP_NODE(/*id*/ WARP_NODE_SUCCESS, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 2, /*destNode*/ WARP_NODE_35, /*flags*/ WARP_NO_CHECKPOINT), 66 WARP_NODE(/*id*/ WARP_NODE_DEATH, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 2, /*destNode*/ WARP_NODE_67, /*flags*/ WARP_NO_CHECKPOINT), 67 JUMP_LINK(script_func_local_1), 68 JUMP_LINK(script_func_local_2), 69 TERRAIN(/*terrainData*/ ttc_seg7_collision_level), 70 MACRO_OBJECTS(/*objList*/ ttc_seg7_macro_objs), 71 SET_BACKGROUND_MUSIC(/*settingsPreset*/ 0x0001, /*seq*/ SEQ_LEVEL_SLIDE), 72 TERRAIN_TYPE(/*terrainType*/ TERRAIN_STONE), 73 END_AREA(), 74 75 FREE_LEVEL_POOL(), 76 MARIO_POS(/*area*/ 1, /*yaw*/ 316, /*pos*/ 1417, -4822, -548), 77 CALL(/*arg*/ 0, /*func*/ lvl_init_or_update), 78 CALL_LOOP(/*arg*/ 1, /*func*/ lvl_init_or_update), 79 CLEAR_LEVEL(), 80 SLEEP_BEFORE_EXIT(/*frames*/ 1), 81 EXIT(), 82 };