script.c (3139B)
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/sa/header.h" 17 18 static const LevelScript script_func_local_1[] = { 19 OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -1000, 0, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM2(FISH_SPAWNER_BP_MANY_BLUE), /*bhv*/ bhvFishSpawner), 20 OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -1000, 0, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM2(FISH_SPAWNER_BP_MANY_CYAN), /*bhv*/ bhvFishSpawner), 21 RETURN(), 22 }; 23 24 static const LevelScript script_func_local_2[] = { 25 OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -4250, 0, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM1(STAR_INDEX_ACT_1), /*bhv*/ bhvHiddenRedCoinStar), 26 RETURN(), 27 }; 28 29 const LevelScript level_sa_entry[] = { 30 INIT_LEVEL(), 31 LOAD_MIO0 (/*seg*/ 0x07, _sa_segment_7SegmentRomStart, _sa_segment_7SegmentRomEnd), 32 LOAD_MIO0_TEXTURE(/*seg*/ 0x09, _inside_mio0SegmentRomStart, _inside_mio0SegmentRomEnd), 33 LOAD_MIO0 (/*seg*/ 0x0A, _cloud_floor_skybox_mio0SegmentRomStart, _cloud_floor_skybox_mio0SegmentRomEnd), 34 LOAD_MIO0 (/*seg*/ 0x0B, _effect_mio0SegmentRomStart, _effect_mio0SegmentRomEnd), 35 LOAD_MIO0 (/*seg*/ 0x05, _group4_mio0SegmentRomStart, _group4_mio0SegmentRomEnd), 36 LOAD_RAW (/*seg*/ 0x0C, _group4_geoSegmentRomStart, _group4_geoSegmentRomEnd), 37 LOAD_MIO0 (/*seg*/ 0x06, _group13_mio0SegmentRomStart, _group13_mio0SegmentRomEnd), 38 LOAD_RAW (/*seg*/ 0x0D, _group13_geoSegmentRomStart, _group13_geoSegmentRomEnd), 39 ALLOC_LEVEL_POOL(), 40 MARIO(/*model*/ MODEL_MARIO, /*bhvParam*/ BPARAM4(0x01), /*bhv*/ bhvMario), 41 JUMP_LINK(script_func_global_5), 42 JUMP_LINK(script_func_global_14), 43 44 AREA(/*index*/ 1, sa_geo_000170), 45 OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -1535, 0, /*angle*/ 0, 90, 0, /*bhvParam*/ BPARAM2(WARP_NODE_0A), /*bhv*/ bhvSwimmingWarp), 46 WARP_NODE(/*id*/ WARP_NODE_0A, /*destLevel*/ LEVEL_SA, /*destArea*/ 1, /*destNode*/ WARP_NODE_0A, /*flags*/ WARP_NO_CHECKPOINT), 47 WARP_NODE(/*id*/ WARP_NODE_SUCCESS, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 1, /*destNode*/ WARP_NODE_27, /*flags*/ WARP_NO_CHECKPOINT), 48 WARP_NODE(/*id*/ WARP_NODE_DEATH, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 1, /*destNode*/ WARP_NODE_28, /*flags*/ WARP_NO_CHECKPOINT), 49 JUMP_LINK(script_func_local_1), 50 JUMP_LINK(script_func_local_2), 51 TERRAIN(/*terrainData*/ sa_seg7_collision), 52 MACRO_OBJECTS(/*objList*/ sa_seg7_macro_objs), 53 SET_BACKGROUND_MUSIC(/*settingsPreset*/ 0x0003, /*seq*/ (SEQ_LEVEL_WATER | SEQ_VARIATION)), 54 TERRAIN_TYPE(/*terrainType*/ TERRAIN_WATER), 55 END_AREA(), 56 57 FREE_LEVEL_POOL(), 58 MARIO_POS(/*area*/ 1, /*yaw*/ 90, /*pos*/ 0, -1535, 0), 59 CALL(/*arg*/ 0, /*func*/ lvl_init_or_update), 60 CALL_LOOP(/*arg*/ 1, /*func*/ lvl_init_or_update), 61 CLEAR_LEVEL(), 62 SLEEP_BEFORE_EXIT(/*frames*/ 1), 63 EXIT(), 64 };