script.c (3181B)
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 "dialog_ids.h" 7 #include "segment_symbols.h" 8 #include "level_commands.h" 9 10 #include "game/level_update.h" 11 12 #include "levels/scripts.h" 13 14 #include "actors/common1.h" 15 16 #include "make_const_nonconst.h" 17 #include "levels/totwc/header.h" 18 19 static const LevelScript script_func_local_1[] = { 20 OBJECT(/*model*/ MODEL_CAP_SWITCH, /*pos*/ 0, -2047, 10, /*angle*/ 0, 0, 0, /*bhvParam*/ 0, /*bhv*/ bhvCapSwitch), 21 RETURN(), 22 }; 23 24 static const LevelScript script_func_local_2[] = { 25 OBJECT(/*model*/ MODEL_NONE, /*pos*/ 800, -1700, 0, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM1(STAR_INDEX_ACT_1), /*bhv*/ bhvHiddenRedCoinStar), 26 RETURN(), 27 }; 28 29 const LevelScript level_totwc_entry[] = { 30 INIT_LEVEL(), 31 LOAD_MIO0 (/*seg*/ 0x07, _totwc_segment_7SegmentRomStart, _totwc_segment_7SegmentRomEnd), 32 LOAD_MIO0 (/*seg*/ 0x0A, _cloud_floor_skybox_mio0SegmentRomStart, _cloud_floor_skybox_mio0SegmentRomEnd), 33 LOAD_MIO0_TEXTURE(/*seg*/ 0x09, _sky_mio0SegmentRomStart, _sky_mio0SegmentRomEnd), 34 LOAD_MIO0 (/*seg*/ 0x05, _group8_mio0SegmentRomStart, _group8_mio0SegmentRomEnd), 35 LOAD_RAW (/*seg*/ 0x0C, _group8_geoSegmentRomStart, _group8_geoSegmentRomEnd), 36 LOAD_MIO0 (/*seg*/ 0x08, _common0_mio0SegmentRomStart, _common0_mio0SegmentRomEnd), 37 LOAD_RAW (/*seg*/ 0x0F, _common0_geoSegmentRomStart, _common0_geoSegmentRomEnd), 38 ALLOC_LEVEL_POOL(), 39 MARIO(/*model*/ MODEL_MARIO, /*bhvParam*/ BPARAM4(0x01), /*bhv*/ bhvMario), 40 JUMP_LINK(script_func_global_1), 41 JUMP_LINK(script_func_global_9), 42 LOAD_MODEL_FROM_GEO(MODEL_LEVEL_GEOMETRY_03, totwc_geo_000160), 43 44 AREA(/*index*/ 1, totwc_geo_000188), 45 OBJECT(/*model*/ MODEL_NONE, /*pos*/ -4095, 2935, 0, /*angle*/ 0, 90, 0, /*bhvParam*/ BPARAM2(WARP_NODE_0A), /*bhv*/ bhvFlyingWarp), 46 WARP_NODE(/*id*/ WARP_NODE_0A, /*destLevel*/ LEVEL_TOTWC, /*destArea*/ 1, /*destNode*/ WARP_NODE_0A, /*flags*/ WARP_NO_CHECKPOINT), 47 WARP_NODE(/*id*/ WARP_NODE_WARP_FLOOR, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 1, /*destNode*/ WARP_NODE_20, /*flags*/ WARP_NO_CHECKPOINT), 48 WARP_NODE(/*id*/ WARP_NODE_SUCCESS, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 1, /*destNode*/ WARP_NODE_26, /*flags*/ WARP_NO_CHECKPOINT), 49 WARP_NODE(/*id*/ WARP_NODE_DEATH, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 1, /*destNode*/ WARP_NODE_23, /*flags*/ WARP_NO_CHECKPOINT), 50 JUMP_LINK(script_func_local_2), 51 JUMP_LINK(script_func_local_1), 52 TERRAIN(/*terrainData*/ totwc_seg7_collision), 53 MACRO_OBJECTS(/*objList*/ totwc_seg7_macro_objs), 54 SHOW_DIALOG(/*index*/ 0x00, DIALOG_131), 55 SET_BACKGROUND_MUSIC(/*settingsPreset*/ 0x0000, /*seq*/ SEQ_LEVEL_SLIDE), 56 TERRAIN_TYPE(/*terrainType*/ TERRAIN_STONE), 57 END_AREA(), 58 59 FREE_LEVEL_POOL(), 60 MARIO_POS(/*area*/ 1, /*yaw*/ 90, /*pos*/ -4095, 2935, 0), 61 CALL(/*arg*/ 0, /*func*/ lvl_init_or_update), 62 CALL_LOOP(/*arg*/ 1, /*func*/ lvl_init_or_update), 63 CLEAR_LEVEL(), 64 SLEEP_BEFORE_EXIT(/*frames*/ 1), 65 EXIT(), 66 };