2019-11-03 14:36:27 -05:00
|
|
|
#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"
|
|
|
|
|
|
2023-11-29 09:36:33 +13:00
|
|
|
|
|
|
|
|
static const LevelScript script_sa_macro_objects[] = {
|
|
|
|
|
// Macro objects
|
|
|
|
|
OBJECT(/*model*/ MODEL_RED_COIN, /*pos*/ -2400, -4607, -2400, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvRedCoin),
|
|
|
|
|
OBJECT(/*model*/ MODEL_RED_COIN, /*pos*/ -2400, -4607, 2400, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvRedCoin),
|
|
|
|
|
OBJECT(/*model*/ MODEL_RED_COIN, /*pos*/ 2400, -4607, 2400, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvRedCoin),
|
|
|
|
|
OBJECT(/*model*/ MODEL_RED_COIN, /*pos*/ 2400, -4607, -2400, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvRedCoin),
|
|
|
|
|
OBJECT(/*model*/ MODEL_RED_COIN, /*pos*/ 0, -2200, -1500, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvRedCoin),
|
|
|
|
|
OBJECT(/*model*/ MODEL_RED_COIN, /*pos*/ -1500, -2200, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvRedCoin),
|
|
|
|
|
OBJECT(/*model*/ MODEL_RED_COIN, /*pos*/ 0, -2200, 1500, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvRedCoin),
|
|
|
|
|
OBJECT(/*model*/ MODEL_RED_COIN, /*pos*/ 1500, -2200, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvRedCoin),
|
|
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 1927, -2909, 0, /*angle*/ 0, 0, 0, /*behParam*/ (FISH_SPAWNER_BP_FEW_BLUE << 16), /*beh*/ bhvFishSpawner),
|
|
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -2400, -1500, /*angle*/ 0, 90, 0, /*behParam*/ ((COIN_FORMATION_FLAG_FLYING | COIN_FORMATION_FLAG_RING | COIN_FORMATION_FLAG_VERTICAL) << 16), /*beh*/ bhvCoinFormation),
|
|
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1500, -2400, 0, /*angle*/ 0, 0, 0, /*behParam*/ ((COIN_FORMATION_FLAG_FLYING | COIN_FORMATION_FLAG_RING | COIN_FORMATION_FLAG_VERTICAL) << 16), /*beh*/ bhvCoinFormation),
|
|
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -2400, 1500, /*angle*/ 0, 90, 0, /*behParam*/ ((COIN_FORMATION_FLAG_FLYING | COIN_FORMATION_FLAG_RING | COIN_FORMATION_FLAG_VERTICAL) << 16), /*beh*/ bhvCoinFormation),
|
|
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 1500, -2400, 0, /*angle*/ 0, 0, 0, /*behParam*/ ((COIN_FORMATION_FLAG_FLYING | COIN_FORMATION_FLAG_RING | COIN_FORMATION_FLAG_VERTICAL) << 16), /*beh*/ bhvCoinFormation),
|
|
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -3500, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvHidden1upTrigger),
|
|
|
|
|
OBJECT(/*model*/ MODEL_1UP, /*pos*/ 0, -3800, 0, /*angle*/ 0, 0, 0, /*behParam*/ (1 << 16), /*beh*/ bhvHidden1up),
|
|
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -3500, 0, /*angle*/ 0, 0, 0, /*behParam*/ ((COIN_FORMATION_FLAG_FLYING | COIN_FORMATION_FLAG_RING) << 16), /*beh*/ bhvCoinFormation),
|
|
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ -1000, -4080, -1740, /*angle*/ 0, 0, 0, /*behParam*/ (FISH_SPAWNER_BP_FEW_CYAN << 16), /*beh*/ bhvFishSpawner),
|
|
|
|
|
RETURN(),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const LevelScript script_sa_objects_1[] = {
|
2020-12-03 14:26:38 -05:00
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -1000, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvFishSpawner),
|
|
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -1000, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00020000, /*beh*/ bhvFishSpawner),
|
2019-11-03 14:36:27 -05:00
|
|
|
RETURN(),
|
|
|
|
|
};
|
|
|
|
|
|
2023-11-29 09:36:33 +13:00
|
|
|
static const LevelScript script_sa_objects_2[] = {
|
2019-11-03 14:36:27 -05:00
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -4250, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvHiddenRedCoinStar),
|
|
|
|
|
RETURN(),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const LevelScript level_sa_entry[] = {
|
|
|
|
|
INIT_LEVEL(),
|
2025-01-30 09:58:46 +08:00
|
|
|
#include "levels/sa/areas/script_vanilla_load.inc.c"
|
2019-11-03 14:36:27 -05:00
|
|
|
ALLOC_LEVEL_POOL(),
|
|
|
|
|
MARIO(/*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario),
|
2025-01-30 09:58:46 +08:00
|
|
|
#include "levels/sa/areas/script_vanilla.inc.c"
|
2019-11-03 14:36:27 -05:00
|
|
|
|
|
|
|
|
AREA(/*index*/ 1, sa_geo_000170),
|
2020-06-02 12:44:34 -04:00
|
|
|
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, -1535, 0, /*angle*/ 0, 90, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvSwimmingWarp),
|
2019-12-01 21:52:53 -05:00
|
|
|
WARP_NODE(/*id*/ 0x0A, /*destLevel*/ LEVEL_SA, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*flags*/ WARP_NO_CHECKPOINT),
|
|
|
|
|
WARP_NODE(/*id*/ 0xF0, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x27, /*flags*/ WARP_NO_CHECKPOINT),
|
|
|
|
|
WARP_NODE(/*id*/ 0xF1, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x28, /*flags*/ WARP_NO_CHECKPOINT),
|
2023-11-29 09:36:33 +13:00
|
|
|
JUMP_LINK(script_sa_objects_1),
|
|
|
|
|
JUMP_LINK(script_sa_objects_2),
|
2019-11-03 14:36:27 -05:00
|
|
|
TERRAIN(/*terrainData*/ sa_seg7_collision),
|
2023-11-29 09:36:33 +13:00
|
|
|
JUMP_LINK(script_sa_macro_objects),
|
2019-11-03 14:36:27 -05:00
|
|
|
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(),
|
|
|
|
|
};
|