Files
HackerSM64/levels/bowser_1/script.c
arthurtilly db2a739b8a Remove macro objects and free up bparam3 (#558)
* BoB, WF, JRB, CCM

* HMC and LLL

* SSL

* DDD to RR

* bowser courses

* overworld

* all stages done

* remove macro object code

* fix bparam3 and respawn info

* rename script_func_locals to be unique

* Remove level_misc_macros

* formatting changes :)

* added some enums for respawn info

---------

Co-authored-by: Arceveti <arceveti@gmail.com>
2023-11-28 15:36:33 -05:00

76 lines
5.2 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 "actors/group12.h"
#include "make_const_nonconst.h"
#include "levels/bowser_1/header.h"
static const LevelScript script_bowser_1_macro_objects[] = {
// Special objects
OBJECT(/*model*/ MODEL_WATER_MINE, /*pos*/ 2949, 589, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvBowserBomb),
OBJECT(/*model*/ MODEL_WATER_MINE, /*pos*/ 0, 589, -2949, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvBowserBomb),
OBJECT(/*model*/ MODEL_WATER_MINE, /*pos*/ 0, 589, 2949, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvBowserBomb),
OBJECT(/*model*/ MODEL_WATER_MINE, /*pos*/ -2949, 589, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvBowserBomb),
OBJECT(/*model*/ MODEL_BOWSER, /*pos*/ 0, 300, -1000, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvBowser),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ 0, 384, 3072, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ -2171, 384, -2171, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ 0, 384, -3071, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ -3071, 384, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ -2171, 384, 2172, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ -2621, 384, 1086, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ 2172, 384, 2172, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ 3072, 384, 0, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ 2172, 384, -2171, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ -1085, 384, 2622, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ 2622, 384, 1086, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ -2621, 384, -1085, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ -1085, 384, -2621, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ 1086, 384, -2621, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ 2622, 384, -1085, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
OBJECT(/*model*/ MODEL_LEVEL_GEOMETRY_03, /*pos*/ 1086, 384, 2622, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvStaticObject),
RETURN(),
};
const LevelScript level_bowser_1_entry[] = {
INIT_LEVEL(),
LOAD_YAY0(/*seg*/ 0x07, _bowser_1_segment_7SegmentRomStart, _bowser_1_segment_7SegmentRomEnd),
LOAD_YAY0(/*seg*/ 0x0A, _bidw_skybox_yay0SegmentRomStart, _bidw_skybox_yay0SegmentRomEnd),
LOAD_YAY0(/*seg*/ 0x06, _group12_yay0SegmentRomStart, _group12_yay0SegmentRomEnd),
LOAD_RAW( /*seg*/ 0x0D, _group12_geoSegmentRomStart, _group12_geoSegmentRomEnd),
ALLOC_LEVEL_POOL(),
MARIO(/*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario),
JUMP_LINK(script_func_global_13),
LOAD_MODEL_FROM_GEO(MODEL_LEVEL_GEOMETRY_03, bowser_1_yellow_sphere_geo),
AREA(/*index*/ 1, bowser_1_geo_0000D0),
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 0, 1307, 0, /*angle*/ 0, 180, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvSpinAirborneCircleWarp),
WARP_NODE(/*id*/ 0x0A, /*destLevel*/ LEVEL_BOWSER_1, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*flags*/ WARP_NO_CHECKPOINT),
WARP_NODE(/*id*/ 0xF0, /*destLevel*/ LEVEL_CASTLE, /*destArea*/ 0x01, /*destNode*/ 0x24, /*flags*/ WARP_NO_CHECKPOINT),
WARP_NODE(/*id*/ 0xF1, /*destLevel*/ LEVEL_BITDW, /*destArea*/ 0x01, /*destNode*/ 0x0C, /*flags*/ WARP_NO_CHECKPOINT),
TERRAIN(/*terrainData*/ bowser_1_seg7_collision_level),
JUMP_LINK(script_bowser_1_macro_objects),
SET_BACKGROUND_MUSIC(/*settingsPreset*/ 0x0002, /*seq*/ SEQ_LEVEL_BOSS_KOOPA),
TERRAIN_TYPE(/*terrainType*/ TERRAIN_STONE),
END_AREA(),
FREE_LEVEL_POOL(),
MARIO_POS(/*area*/ 1, /*yaw*/ 180, /*pos*/ 0, 307, 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(),
};