Files
Ghostship/levels/vcutm/script.c
Lywx 20674529ab [WIP] Implemented GeoLayout loading and moved to otr every actor (#53)
* Fixed GeoLayout loading and implemented mario loading from otr

* Ported bobomb and coins

* Ported cannon barrel

* Ported blue_coin_switch

* Fixed collision loading

* Ported checkerboard_platform

* Ported most of common0 to otr

* Fixed amp on jp

* Fixed some wrong yamls

* Fixed faulty snow interpolation

* Bump LUS

* Extracted 99.99999% actors to be loaded from otr

* Removed unnessesary print and added o2r mod support

* Fixed headers

* Added us support into geolayout parser

* Fixed conflicts

* Removed done indicators

* Remove duplicated headers

* Added bbh, bitdw, bitfs, bits, bob and lll loaded from otr

* Bump torch

* Fixed linux compilation

* Pushed header generation

* Got compiling on Linux working. (#59)

* Added more data and hopefully fix more issues

* Updated libultraship

* bin dls and vtxs (#60)

* Fixed master volume

* Updated torch

* Renamed otr files

* Renamed otr en cmakelists

* Updated libultraship and torch

* Removed actors code

* [WIP] The big one that removes almost all hardcoded assets from levels and actors

* Updating cmake to match Starship

* Updated more references

* Updated cmake to add more targets

* Updated o2r name

* Removed unnecesary dma call

* Updated gitmodules

* Bump LUS, fixed cmake and fixed audio on windows

* Update torch and wdw

* Fixed some corrupted ptrs, cleaned up jp support and fixed bully

* Added USE_GBI_TRACE

* Fixed packaging.cmake and audio fixes

* Removed old LUS

* Updated torch and readded LUS

* More compilation issues

* Removed interpolation to use on the future the new system

* Bump libs

* Reimplemented skybox, and added synthesis overflow fix

* Removed prints to use SPDLOG

* This should had been on another branch but fuck it

* Added more interpolation stuff

* Fixed interpolation, fixed some random things and ported from GameInteractor to Lwyx's EventSystem

* Removed some FrameInterpolation changes

* Fixed gitignore and implemented PortEnhancements

* Fixed interpolation crashes, WIP implemented reset among other fixes

* Bump torch to fix paintings

* Moved log to be a trace

* Readded some frame tagging

* Fixed rumble

* Fixed skybox crashes

* Bump LUS

* Moved skybox and floats to float for better precision

* Moved to health change and created lives change event

* Fixed bubbles being broken

* Fixed lives event not being registered

* Fixed skybox crashes

* Initialized mixer variables

* Fixed some memory leaks

* Fixed trajectory being exported incorrectly

* Hopefully fixed us yamls

* Fixed remaining us issues

* Implemented o2r generation among some other things

---------

Co-authored-by: KiritoDv <KiritoDv>
Co-authored-by: sitton76 <58642183+sitton76@users.noreply.github.com>
Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com>
2026-01-07 01:37:43 -06:00

79 lines
4.2 KiB
C

#include <libultraship.h>
#include "sm64.h"
#include "behavior_data.h"
#include "model_ids.h"
#include "seq_ids.h"
#include "dialog_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 "assets/levels/vcutm.h"
static const LevelScript script_func_local_1[] = {
OBJECT(/*model*/ MODEL_VCUTM_SEESAW_PLATFORM, /*pos*/ 154, -1919, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x00070000, /*beh*/ bhvSeesawPlatform),
OBJECT(/*model*/ MODEL_VCUTM_SEESAW_PLATFORM, /*pos*/ -2047, -3378, -2047, /*angle*/ 0, 0, 0, /*behParam*/ 0x00070000, /*beh*/ bhvSeesawPlatform),
//! @bug invalid model IDs - model ID 0x37 isn't loaded
OBJECT(/*model*/ MODEL_VCUTM_CHECKERBOARD_PLATFORM_SPAWNER, /*pos*/ 3251, -1082, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup),
OBJECT(/*model*/ MODEL_VCUTM_CHECKERBOARD_PLATFORM_SPAWNER, /*pos*/ 2355, -1901, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup),
OBJECT(/*model*/ MODEL_VCUTM_CHECKERBOARD_PLATFORM_SPAWNER, /*pos*/ 1459, -1594, -6256, /*angle*/ 0, 90, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup),
OBJECT(/*model*/ MODEL_VCUTM_CHECKERBOARD_PLATFORM_SPAWNER, /*pos*/ -1151, -2413, -6256, /*angle*/ 0, 270, 0, /*behParam*/ 0x014B0000, /*beh*/ bhvCheckerboardElevatorGroup),
RETURN(),
};
static const LevelScript script_func_local_2[] = {
OBJECT(/*model*/ MODEL_CAP_SWITCH, /*pos*/ 4506, 26, -6246, /*angle*/ 0, 0, 0, /*behParam*/ 0x00020000, /*beh*/ bhvCapSwitch),
RETURN(),
};
static const LevelScript script_func_local_3[] = {
OBJECT(/*model*/ MODEL_NONE, /*pos*/ 4600, 250, -4500, /*angle*/ 0, 0, 0, /*behParam*/ 0x00000000, /*beh*/ bhvHiddenRedCoinStar),
RETURN(),
};
const LevelScript level_vcutm_entry[] = {
INIT_LEVEL(),
LOAD_MIO0_TEXTURE(/*seg*/ 0x09, _outside_mio0SegmentRomStart, _outside_mio0SegmentRomEnd),
LOAD_MIO0( /*seg*/ 0x07, _vcutm_segment_7SegmentRomStart, _vcutm_segment_7SegmentRomEnd),
LOAD_MIO0( /*seg*/ 0x05, _group8_mio0SegmentRomStart, _group8_mio0SegmentRomEnd),
LOAD_RAW( /*seg*/ 0x0C, _group8_geoSegmentRomStart, _group8_geoSegmentRomEnd),
LOAD_MIO0( /*seg*/ 0x08, _common0_mio0SegmentRomStart, _common0_mio0SegmentRomEnd),
LOAD_RAW( /*seg*/ 0x0F, _common0_geoSegmentRomStart, _common0_geoSegmentRomEnd),
ALLOC_LEVEL_POOL(),
MARIO(/*model*/ MODEL_MARIO, /*behParam*/ 0x00000001, /*beh*/ bhvMario),
JUMP_LINK(script_func_global_1),
JUMP_LINK(script_func_global_9),
LOAD_MODEL_FROM_GEO(MODEL_VCUTM_SEESAW_PLATFORM, vcutm_geo_0001F0),
LOAD_MODEL_FROM_GEO(MODEL_VCUTM_WARP_PIPE, warp_pipe_geo),
AREA(/*index*/ 1, vcutm_geo_000208),
OBJECT(/*model*/ MODEL_NONE, /*pos*/ -6143, 6734, -6143, /*angle*/ 0, 0, 0, /*behParam*/ 0x000A0000, /*beh*/ bhvAirborneWarp),
WARP_NODE(/*id*/ 0x0A, /*destLevel*/ LEVEL_VCUTM, /*destArea*/ 0x01, /*destNode*/ 0x0A, /*flags*/ WARP_NO_CHECKPOINT),
WARP_NODE(/*id*/ 0xF3, /*destLevel*/ LEVEL_CASTLE_GROUNDS, /*destArea*/ 0x01, /*destNode*/ 0x07, /*flags*/ WARP_NO_CHECKPOINT),
WARP_NODE(/*id*/ 0xF0, /*destLevel*/ LEVEL_CASTLE_GROUNDS, /*destArea*/ 0x01, /*destNode*/ 0x08, /*flags*/ WARP_NO_CHECKPOINT),
WARP_NODE(/*id*/ 0xF1, /*destLevel*/ LEVEL_CASTLE_GROUNDS, /*destArea*/ 0x01, /*destNode*/ 0x06, /*flags*/ WARP_NO_CHECKPOINT),
JUMP_LINK(script_func_local_3),
JUMP_LINK(script_func_local_1),
JUMP_LINK(script_func_local_2),
TERRAIN(/*terrainData*/ vcutm_seg7_collision),
MACRO_OBJECTS(/*objList*/ vcutm_seg7_macro_objs),
SHOW_DIALOG(/*index*/ 0x00, DIALOG_129),
SET_BACKGROUND_MUSIC(/*settingsPreset*/ 0x0000, /*seq*/ SEQ_LEVEL_SLIDE),
TERRAIN_TYPE(/*terrainType*/ TERRAIN_STONE),
END_AREA(),
FREE_LEVEL_POOL(),
MARIO_POS(/*area*/ 1, /*yaw*/ 0, /*pos*/ -6143, 5734, -6143),
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(),
};