sm64/levels/sa/script.c
2023-08-17 08:56:02 -04:00

65 lines
3.1 KiB
C

#include <ultra64.h>
#include "sm64.h"
#include "behavior_data.h"
#include "model_ids.h"
#include "seq_ids.h"
#include "segment_symbols.h"
#include "level_commands.h"
#include "game/level_update.h"
#include "levels/scripts.h"
#include "actors/common1.h"
#include "make_const_nonconst.h"
#include "levels/sa/header.h"
static const LevelScript script_func_local_1[] = {
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -1000, 0, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM2(FISH_SPAWNER_BP_MANY_BLUE), /*bhv*/ bhvFishSpawner),
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -1000, 0, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM2(FISH_SPAWNER_BP_MANY_CYAN), /*bhv*/ bhvFishSpawner),
RETURN(),
};
static const LevelScript script_func_local_2[] = {
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -4250, 0, /*angle*/ 0, 0, 0, /*bhvParam*/ BPARAM1(STAR_INDEX_ACT_1), /*bhv*/ bhvHiddenRedCoinStar),
RETURN(),
};
const LevelScript level_sa_entry[] = {
INIT_LEVEL(),
LOAD_MIO0 (/*seg*/ 0x07, _sa_segment_7SegmentRomStart, _sa_segment_7SegmentRomEnd),
LOAD_MIO0_TEXTURE(/*seg*/ 0x09, _inside_mio0SegmentRomStart, _inside_mio0SegmentRomEnd),
LOAD_MIO0 (/*seg*/ 0x0A, _cloud_floor_skybox_mio0SegmentRomStart, _cloud_floor_skybox_mio0SegmentRomEnd),
LOAD_MIO0 (/*seg*/ 0x0B, _effect_mio0SegmentRomStart, _effect_mio0SegmentRomEnd),
LOAD_MIO0 (/*seg*/ 0x05, _group4_mio0SegmentRomStart, _group4_mio0SegmentRomEnd),
LOAD_RAW (/*seg*/ 0x0C, _group4_geoSegmentRomStart, _group4_geoSegmentRomEnd),
LOAD_MIO0 (/*seg*/ 0x06, _group13_mio0SegmentRomStart, _group13_mio0SegmentRomEnd),
LOAD_RAW (/*seg*/ 0x0D, _group13_geoSegmentRomStart, _group13_geoSegmentRomEnd),
ALLOC_LEVEL_POOL(),
MARIO(/*model*/ MODEL_MARIO, /*bhvParam*/ BPARAM4(0x01), /*bhv*/ bhvMario),
JUMP_LINK(script_func_global_5),
JUMP_LINK(script_func_global_14),
AREA(/*index*/ 1, sa_geo_000170),
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -1535, 0, /*angle*/ 0, 90, 0, /*bhvParam*/ BPARAM2(WARP_NODE_0A), /*bhv*/ bhvSwimmingWarp),
WARP_NODE(/*id*/ WARP_NODE_0A, /*destLevel*/ LEVEL_SA, /*destArea*/ 1, /*destNode*/ WARP_NODE_0A, /*flags*/ WARP_NO_CHECKPOINT),
WARP_NODE(/*id*/ WARP_NODE_SUCCESS, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 1, /*destNode*/ WARP_NODE_27, /*flags*/ WARP_NO_CHECKPOINT),
WARP_NODE(/*id*/ WARP_NODE_DEATH, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 1, /*destNode*/ WARP_NODE_28, /*flags*/ WARP_NO_CHECKPOINT),
JUMP_LINK(script_func_local_1),
JUMP_LINK(script_func_local_2),
TERRAIN(/*terrainData*/ sa_seg7_collision),
MACRO_OBJECTS(/*objList*/ sa_seg7_macro_objs),
SET_BACKGROUND_MUSIC(/*settingsPreset*/ 0x0003, /*seq*/ (SEQ_LEVEL_WATER | SEQ_VARIATION)),
TERRAIN_TYPE(/*terrainType*/ TERRAIN_WATER),
END_AREA(),
FREE_LEVEL_POOL(),
MARIO_POS(/*area*/ 1, /*yaw*/ 90, /*pos*/ 0, -1535, 0),
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(),
};