Update Star Road. (#288)

This commit is contained in:
Prince Frizzy 2023-02-21 21:31:59 -05:00 committed by GitHub
parent 48d1f28d81
commit 716fc5faa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 50 additions and 422 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,11 +2,6 @@
oHiddenStarLastInteractedPlayer = nil oHiddenStarLastInteractedPlayer = nil
function bhv_custom_hidden_star_trigger_init(obj) function bhv_custom_hidden_star_trigger_init(obj)
--obj.oFlags = (OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
--obj.hitboxRadius = 200
--obj.hitboxHeight = 200
--obj.oIntangibleTimer = 0
network_init_object(obj, true, { 'activeFlags', 'oInteractStatus' }) network_init_object(obj, true, { 'activeFlags', 'oInteractStatus' })
end end
@ -35,12 +30,9 @@ function bhv_custom_hidden_star_trigger_loop(obj)
end end
end end
--bhvSMSRHiddenStarTrigger = hook_behavior(nil, OBJ_LIST_LEVEL, true, bhv_custom_hidden_star_trigger_init, bhv_custom_hidden_star_trigger_loop)
-------------- --------------
function bhv_custom_hidden_star_init(obj) function bhv_custom_hidden_star_init(obj)
--obj.oFlags = (OBJ_FLAG_PERSISTENT_RESPAWN | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
local count = obj_count_objects_with_behavior_id(bhvSMSRHiddenStarTrigger) local count = obj_count_objects_with_behavior_id(bhvSMSRHiddenStarTrigger)
if count == 0 then if count == 0 then
local star = spawn_object_abs_with_rot(obj, 0, E_MODEL_STAR, id_bhvStar, obj.oPosX, obj.oPosY, obj.oPosZ, 0, 0, 0) local star = spawn_object_abs_with_rot(obj, 0, E_MODEL_STAR, id_bhvStar, obj.oPosX, obj.oPosY, obj.oPosZ, 0, 0, 0)
@ -88,38 +80,17 @@ function bhv_custom_hidden_star_loop(obj)
}) })
end end
--bhvSMSRHiddenStar = hook_behavior(nil, OBJ_LIST_LEVEL, true, bhv_custom_hidden_star_init, bhv_custom_hidden_star_loop)
-------------- --------------
function bhv_breakable_rock_init(obj) function bhv_breakable_rock_init(obj)
--obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
--obj.collisionData = smlua_collision_util_get("col_hmc_geo_000530_0x7020308")
--obj.oCollisionDistance = 500
--bhv_init_room()
network_init_object(obj, false, nil) network_init_object(obj, false, nil)
end end
--[[
function bhv_breakable_rock_loop(obj)
bhv_breakable_box_loop()
load_object_collision_model()
end
bhvSMSRBreakableRock = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_breakable_rock_init, bhv_breakable_rock_loop)
--]]
-------------- --------------
function bhv_breakable_window_init(obj) function bhv_breakable_window_init(obj)
obj.oFlags = (OBJ_FLAG_ACTIVE_FROM_AFAR | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
obj.collisionData = smlua_collision_util_get("wf_seg7_collision_small_bomp") obj.collisionData = smlua_collision_util_get("wf_seg7_collision_small_bomp")
obj.oIntangibleTimer = 0 network_init_object(obj, false, { 'oFlags', 'oInteractStatus' });
obj.hitboxRadius = 200
obj.hitboxHeight = 200
--obj.oMoveAngleYaw = obj.oMoveAngleYaw - 0x4000
network_init_object(obj, false, { 'oInteractStatus' });
end end
function bhv_breakable_window_loop(obj) function bhv_breakable_window_loop(obj)
@ -135,106 +106,42 @@ function bhv_breakable_window_loop(obj)
end end
end end
---bhvSMSRBreakableWindow = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_breakable_window_init, bhv_breakable_window_loop)
-------------- --------------
function bhv_star_replica_init(obj) function bhv_star_replica_init(obj)
--obj.oFlags = (OBJ_FLAG_HOLDABLE | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
--bhv_init_room()
--bhv_collect_star_init()
despawn_if_stars_below_count(obj, 121) -- 121 star check despawn_if_stars_below_count(obj, 121) -- 121 star check
end end
--[[
function bhv_star_replica_loop(obj)
bhv_collect_star_loop()
end
--]]
--bhvSMSRStarReplica = hook_behavior(nil, OBJ_LIST_LEVEL, true, bhv_star_replica_init, bhv_star_replica_loop)
-------------- --------------
function bhv_red_sinking_platform_init(obj) function bhv_red_sinking_platform_init(obj)
--obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
--obj.collisionData = smlua_collision_util_get("col_rr_geo_0008C0_0x701ae78")
--obj.oPosY = obj.oPosY - 306
cur_obj_set_home_once() cur_obj_set_home_once()
network_init_object(obj, true, { 'oSinkWhenSteppedOnUnk104', 'oGraphYOffset', 'oHomeY' }) network_init_object(obj, true, { 'oSinkWhenSteppedOnUnk104', 'oGraphYOffset', 'oHomeY' })
end end
--[[
function bhv_red_sinking_platform_loop(obj)
sinking_perform_sink_check(obj)
sinking_perform_sink_check(obj) -- called twice
load_object_collision_model()
end
bhvSMSRRedSinkingPlatform = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_red_sinking_platform_init, bhv_red_sinking_platform_loop)
--]]
-------------- --------------
--[[
function bhv_star_door_wall_init(obj)
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
obj.collisionData = smlua_collision_util_get("custom_collision_door_30_stars")
obj.oCollisionDistance = 4000
end
--]]
function bhv_star_door_wall_loop(obj) function bhv_star_door_wall_loop(obj)
if get_star_count() >= 30 then if get_star_count() >= 30 then
obj.activeFlags = ACTIVE_FLAG_DEACTIVATED obj.activeFlags = ACTIVE_FLAG_DEACTIVATED
end end
--load_object_collision_model()
end end
--bhvSMSR30StarDoorWall = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_star_door_wall_init, bhv_star_door_wall_loop)
-------------- --------------
function bhv_special_breakable_box_init(obj) function bhv_special_breakable_box_init(obj)
--obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
--obj.collisionData = smlua_collision_util_get("breakable_box_seg8_collision_08012D70")
--obj.oCollisionDistance = 500
--bhv_init_room()
despawn_if_stars_below_count(obj, 121) -- 121 star check despawn_if_stars_below_count(obj, 121) -- 121 star check
network_init_object(obj, false, nil);
end end
--[[
function bhv_special_breakable_box_loop(obj)
bhv_breakable_box_loop()
load_object_collision_model()
end
bhvSMSRSpecialBreakeableBox = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_special_breakable_box_init, bhv_special_breakable_box_loop)
--]]
-------------- --------------
--[[
function bhv_piranha_plant_wild_init(obj)
obj.oFlags = (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
obj.oAnimations = gObjectAnimations.piranha_plant_seg6_anims_0601C31C
cur_obj_init_animation(0)
obj.oInteractType = INTERACT_MR_BLIZZARD
obj.hitboxRadius = 400
obj.hitboxHeight = 400
end
--]]
function bhv_piranha_plant_wild_loop(obj) function bhv_piranha_plant_wild_loop(obj)
end end
--bhvSMSRPiranhaPlantWild = hook_behavior(nil, OBJ_LIST_GENACTOR, true, bhv_piranha_plant_wild_init, bhv_piranha_plant_wild_loop)
-------------- --------------
function bhv_big_leaves_init(obj) function bhv_big_leaves_init(obj)
obj.header.gfx.node.flags = obj.header.gfx.node.flags | GRAPH_RENDER_CYLBOARD
end end
-------------- --------------
@ -246,357 +153,80 @@ end
-------------- --------------
function bhv_tambourine_init(obj) function bhv_tambourine_init(obj)
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE network_init_object(obj, false, nil);
obj.collisionData = smlua_collision_util_get("col_ddd_geo_0004A0_0x700cbf0")
end end
function bhv_tambourine_loop(obj)
bhv_ttc_spinner_update()
load_object_collision_model()
end
bhvSMSRTambourine = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_tambourine_init, bhv_tambourine_loop)
-------------- --------------
function bhv_small_bee_init(obj) function bhv_small_bee_init(obj)
obj.oFlags = (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE) network_init_object(obj, false, nil);
obj.header.gfx.node.flags = obj.header.gfx.node.flags | GRAPH_RENDER_BILLBOARD
cur_obj_set_home_once()
bhv_init_room()
cur_obj_scale(150 / 100.0)
end end
function bhv_small_bee_loop(obj)
bhv_fly_guy_update()
bhv_fly_guy_update() -- called twice
obj.oAnimState = obj.oAnimState + 1
end
bhvSMSRSmallBee = hook_behavior(nil, OBJ_LIST_GENACTOR, true, bhv_small_bee_init, bhv_small_bee_loop)
--------------
function bhv_drum_stick_init(obj)
obj.oFlags = (OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
obj.collisionData = smlua_collision_util_get("col_ddd_geo_000478_0x7000540")
bhv_ssl_moving_pyramid_wall_init()
end
function bhv_drum_stick_loop(obj)
bhv_ssl_moving_pyramid_wall_loop()
load_object_collision_model()
end
bhvSMSRDrumStick = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_drum_stick_init, bhv_drum_stick_loop)
-------------- --------------
function bhv_star_moving_init(obj) function bhv_star_moving_init(obj)
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE network_init_object(obj, false, nil);
bhv_init_room()
bhv_collect_star_init()
end end
function bhv_star_moving_loop(obj)
bhv_collect_star_loop()
bhv_ssl_moving_pyramid_wall_loop()
end
bhvSMSRStarMoving = hook_behavior(nil, OBJ_LIST_LEVEL, true, bhv_star_moving_init, bhv_star_moving_loop)
-------------- --------------
function bhv_falling_domino_init(obj) function bhv_falling_domino_init(obj)
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE network_init_object(obj, false, nil);
obj.collisionData = smlua_collision_util_get("col_ttm_geo_000DF4_0x702b870")
cur_obj_set_home_once()
end end
function bhv_falling_domino_loop(obj)
bhv_volcano_trap_loop()
load_object_collision_model()
end
bhvSMSRFallingDomino = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_falling_domino_init, bhv_falling_domino_loop)
-------------- --------------
function bhv_lava_lift_init(obj) function bhv_lava_lift_init(obj)
obj.oFlags = (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE) network_init_object(obj, false, nil);
obj.oPosY = obj.oPosY + -50
obj.collisionData = smlua_collision_util_get("col_ttm_geo_000920_0x700a710")
end end
function bhv_lava_lift_loop(obj)
bhv_lll_moving_octagonal_mesh_platform_loop()
load_object_collision_model()
end
bhvSMSRLavaLift = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_lava_lift_init, bhv_lava_lift_loop)
-------------- --------------
function bhv_rotating_lava_platform_init(obj) function bhv_rotating_lava_platform_init(obj)
obj.oFlags = (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE) network_init_object(obj, false, nil);
obj.collisionData = smlua_collision_util_get("col_lll_geo_000A78_0x701d68c")
cur_obj_set_home_once()
end end
function bhv_rotating_lava_platform_loop(obj)
obj.oAngleVelYaw = 256
obj.oMoveAngleYaw = obj.oMoveAngleYaw + 256
load_object_collision_model()
end
bhvSMSRRotatingLavaPlatform = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_rotating_lava_platform_init, bhv_rotating_lava_platform_loop)
--------------
function bhv_small_swing_platform_init(obj)
obj.collisionData = smlua_collision_util_get("rr_seg7_collision_pendulum")
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
obj.oCollisionDistance = 2000
cur_obj_scale(160 / 100.0)
bhv_swing_platform_init()
end
function bhv_small_swing_platform_loop(obj)
bhv_swing_platform_update()
load_object_collision_model()
end
bhvSMSRSmallSwingPlatform = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_small_swing_platform_init, bhv_small_swing_platform_loop)
-------------- --------------
function bhv_sinking_donut_init(obj) function bhv_sinking_donut_init(obj)
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
obj.collisionData = smlua_collision_util_get("col_rr_geo_000920_0x70295ec")
obj.oPosY = obj.oPosY - 306
cur_obj_set_home_once()
network_init_object(obj, true, { 'oSinkWhenSteppedOnUnk104', 'oGraphYOffset', 'oHomeY' }) network_init_object(obj, true, { 'oSinkWhenSteppedOnUnk104', 'oGraphYOffset', 'oHomeY' })
end end
function bhv_sinking_donut_loop(obj) function bhv_sinking_donut_loop(obj)
sinking_perform_sink_check(obj) sinking_perform_sink_check(obj)
sinking_perform_sink_check(obj) -- called twice sinking_perform_sink_check(obj) -- called twice
load_object_collision_model()
end end
bhvSMSRSinkingDonut = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_sinking_donut_init, bhv_sinking_donut_loop)
-------------- --------------
function bhv_floating_thwomp_init(obj) function bhv_floating_thwomp_init(obj)
obj.collisionData = smlua_collision_util_get("thwomp_seg5_collision_0500B7D0") network_init_object(obj, true, { 'oHomeX', 'oHomeY', 'oHomeZ', 'oAction', 'oPosX', 'oPosY', 'oPosZ', 'oVelX', 'oVelY', 'oVelZ' })
obj.oFlags = (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
obj.oGraphYOffset = 5
bhv_butterfly_init()
end end
function bhv_floating_thwomp_loop(obj)
bhv_butterfly_loop()
load_object_collision_model()
end
bhvSMSRFloatingThwomp = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_floating_thwomp_init, bhv_floating_thwomp_loop)
--------------
function bhv_tilting_pyramid_init(obj)
obj.oFlags = (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
obj.collisionData = smlua_collision_util_get("col_geo_bbh_0005F8_0x701fba8")
cur_obj_set_home_once()
bhv_platform_normals_init()
end
function bhv_tilting_pyramid_loop(obj)
bhv_tilting_inverted_pyramid_loop()
load_object_collision_model()
end
bhvSMSRTiltingPyramid = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_tilting_pyramid_init, bhv_tilting_pyramid_loop)
--------------
function bhv_platform_lift_init(obj)
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
obj.collisionData = smlua_collision_util_get("col_geo_bbh_0005C8_0x701f700")
obj.oArrowLiftUnk100 = 1
end
function bhv_platform_lift_loop(obj)
bhv_arrow_lift_loop()
load_object_collision_model()
end
bhvSMSRPlatformLift = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_platform_lift_init, bhv_platform_lift_loop)
--------------
function bhv_rising_lava_init(obj)
obj.oFlags = (OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
obj.collisionData = smlua_collision_util_get("col_geo_bbh_0005B0_0x701f2d8")
bhv_ssl_moving_pyramid_wall_init()
end
function bhv_rising_lava_loop(obj)
bhv_ssl_moving_pyramid_wall_loop()
load_object_collision_model()
end
bhvSMSRRisingLava = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_rising_lava_init, bhv_rising_lava_loop)
--------------
function bhv_rising_tall_platform_init(obj)
obj.oFlags = (OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
obj.collisionData = smlua_collision_util_get("col_geo_bbh_000628_0x70200f0")
bhv_ssl_moving_pyramid_wall_init()
end
function bhv_rising_tall_platform_loop(obj)
bhv_ssl_moving_pyramid_wall_loop()
load_object_collision_model()
end
bhvSMSRRisingTallPlatform = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_rising_tall_platform_init, bhv_rising_tall_platform_loop)
--------------
function bhv_sinking_platform_init(obj)
obj.oFlags = (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
obj.collisionData = smlua_collision_util_get("col_geo_bbh_000640_0x600d758")
obj.oPosY = obj.oPosY + 5
obj.oCollisionDistance = 2000
end
function bhv_sinking_platform_loop(obj)
bhv_lll_sinking_square_platforms_loop()
bhv_lll_sinking_square_platforms_loop() -- called twice
load_object_collision_model()
end
bhvSMSRSinkingPlatform = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_sinking_platform_init, bhv_sinking_platform_loop)
-------------- --------------
function bhv_toxic_waste_platform_init(obj) function bhv_toxic_waste_platform_init(obj)
obj.oFlags = (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
obj.collisionData = smlua_collision_util_get("col_hmc_geo_000548_0x7023478")
obj.oPosY = obj.oPosY - 50
cur_obj_set_home_once()
network_init_object(obj, true, { 'oSinkWhenSteppedOnUnk104', 'oGraphYOffset', 'oHomeY' }) network_init_object(obj, true, { 'oSinkWhenSteppedOnUnk104', 'oGraphYOffset', 'oHomeY' })
end end
function bhv_toxic_waste_platform_loop(obj) function bhv_toxic_waste_platform_loop(obj)
sinking_perform_sink_check(obj) sinking_perform_sink_check(obj)
load_object_collision_model()
end end
bhvSMSRToxicWastePlatform = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_toxic_waste_platform_init, bhv_toxic_waste_platform_loop)
-------------- --------------
function bhv_attracted_space_box_init(obj) function bhv_pushable_tomb_init(obj)
obj.oFlags = (OBJ_FLAG_HOLDABLE | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE) network_init_object(obj, true, { 'oPosX', 'oPosY', 'oPosZ' })
obj.collisionData = smlua_collision_util_get("ssl_seg7_collision_tox_box")
obj.oPosY = obj.oPosY + 256
cur_obj_set_home_once()
end end
function bhv_attracted_space_box_loop(obj)
bhv_chuckya_loop()
bhv_spindrift_loop()
cur_obj_scale(64 / 100.0)
load_object_collision_model()
end
bhvSMSRAttractedSpaceBox = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_attracted_space_box_init, bhv_attracted_space_box_loop)
--------------
function bhv_space_box_init(obj)
obj.oFlags = (OBJ_FLAG_HOLDABLE | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
obj.collisionData = smlua_collision_util_get("ssl_seg7_collision_tox_box")
obj.oPosY = obj.oPosY + 256
end
function bhv_space_box_loop(obj)
bhv_spindrift_loop()
cur_obj_scale(64 / 100.0)
load_object_collision_model()
end
bhvSMSRSpaceBox = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_space_box_init, bhv_space_box_loop)
--------------
function bhv_space_octagon_platform_init(obj)
obj.collisionData = smlua_collision_util_get("ssl_seg7_collision_spindel")
obj.oFlags = (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
cur_obj_set_home_once()
bhv_ttc_moving_bar_init()
end
function bhv_space_octagon_platform_loop(obj)
bhv_ttc_moving_bar_update()
load_object_collision_model()
end
bhvSMSRSpaceOctagonPlatform = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_space_octagon_platform_init, bhv_space_octagon_platform_loop)
--------------
function bhv_space_red_platform_init(obj)
obj.collisionData = smlua_collision_util_get("ssl_seg7_collision_grindel")
obj.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
cur_obj_set_home_once()
cur_obj_scale(91 / 100.0)
bhv_horizontal_grindel_init()
end
function bhv_space_red_platform_loop(obj)
bhv_squishable_platform_loop()
bhv_squishable_platform_loop() -- called twice
load_object_collision_model()
end
bhvSMSRSpaceRedPlatform = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_space_red_platform_init, bhv_space_red_platform_loop)
--------------
function bhv_bullet_mine_init(obj)
obj.oFlags = (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_MOVE_XZ_USING_FVEL | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
cur_obj_set_home_once()
obj.hitboxRadius = 50
obj.hitboxHeight = 50
obj.hitboxDownOffset = 50
obj.oInteractType = INTERACT_DAMAGE
obj.oDamageOrCoinValue = 3
cur_obj_scale(256 / 100.0)
obj.oIntangibleTimer = 0
bhv_bullet_bill_init()
end
function bhv_bullet_mine_loop(obj)
bhv_bullet_bill_loop()
end
bhvSMSRBulletMine = hook_behavior(nil, OBJ_LIST_GENACTOR, true, bhv_bullet_mine_init, bhv_bullet_mine_loop)
-------------- --------------
E_MODEL_VCUTM_LIGHT = smlua_model_util_get_id("vcutm_light_geo") E_MODEL_VCUTM_LIGHT = smlua_model_util_get_id("vcutm_light_geo")
function bhv_lights_on_switch_init(obj) function bhv_lights_on_switch_init(obj)
--obj.oFlags = (OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)
--obj.oCollisionDistance = 8000
obj.parentObj = cur_obj_nearest_object_with_behavior(get_behavior_from_id(id_bhvFloorSwitchAnimatesObject)); obj.parentObj = cur_obj_nearest_object_with_behavior(get_behavior_from_id(id_bhvFloorSwitchAnimatesObject));
obj_set_model_extended(obj, E_MODEL_VCUTM_LIGHT) obj_set_model_extended(obj, E_MODEL_VCUTM_LIGHT)
network_init_object(obj, true, { 'oFloorSwitchPressAnimationUnkF4', 'oFloorSwitchPressAnimationUnkF8', 'oFloorSwitchPressAnimationUnkFC' })
end end
function bhv_lights_on_switch_loop(obj) function bhv_lights_on_switch_loop(obj)
@ -646,6 +276,4 @@ function bhv_lights_on_switch_loop(obj)
else else
cur_obj_unhide() cur_obj_unhide()
end end
end end
--bhvSMSRLightsOnSwitch = hook_behavior(nil, OBJ_LIST_SURFACE, true, bhv_lights_on_switch_init, bhv_lights_on_switch_loop)

View File

@ -35,4 +35,4 @@ hook_event(HOOK_UPDATE, function()
if (m.controller.buttonPressed & L_TRIG) ~= 0 then if (m.controller.buttonPressed & L_TRIG) ~= 0 then
center_rom_hack_camera() center_rom_hack_camera()
end end
end) end)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -33,7 +33,8 @@ LEVEL_ZERO_LIFE = level_register('level_zerolife_entry', COURSE_NONE, 'ZERO LIFE
-- force server settings -- -- force server settings --
--------------------------- ---------------------------
gLevelValues.fixCollisionBugs = 1 gLevelValues.fixCollisionBugs = true
gLevelValues.vanishCapSequence = 0x32
gServerSettings.skipIntro = 1 gServerSettings.skipIntro = 1
@ -43,39 +44,39 @@ gServerSettings.skipIntro = 1
-- These have a custom entry in the Star road sequences.json patch. But aren't actually ripped. -- These have a custom entry in the Star road sequences.json patch. But aren't actually ripped.
--smlua_audio_utils_replace_sequence(0x01, 0x22, 80, "01_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_COLLECT_STAR --smlua_audio_utils_replace_sequence(0x01, 0x22, 80, "01_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_COLLECT_STAR
smlua_audio_utils_replace_sequence(0x02, 0x25, 80, "02_Seq_smsrdeluxe_custom") -- SEQ_MENU_TITLE_SCREEN
smlua_audio_utils_replace_sequence(0x03, 0x25, 75, "03_Seq_smsrdeluxe_custom") -- SEQ_LEVEL_GRASS
smlua_audio_utils_replace_sequence(0x04, 0x25, 70, "04_Seq_smsrdeluxe_custom") -- SEQ_LEVEL_INSIDE_CASTLE
smlua_audio_utils_replace_sequence(0x05, 0x25, 75, "05_Seq_smsrdeluxe_custom") -- SEQ_LEVEL_WATER
smlua_audio_utils_replace_sequence(0x06, 0x25, 75, "06_Seq_smsrdeluxe_custom") -- SEQ_LEVEL_HOT
smlua_audio_utils_replace_sequence(0x07, 0x19, 75, "07_Seq_smsrdeluxe_custom") -- SEQ_LEVEL_BOSS_KOOPA
smlua_audio_utils_replace_sequence(0x08, 0x25, 70, "08_Seq_smsrdeluxe_custom") -- SEQ_LEVEL_SNOW
smlua_audio_utils_replace_sequence(0x09, 0x0D, 65, "09_Seq_smsrdeluxe_custom") -- SEQ_LEVEL_SLIDE, Is this possibly just normal slide? TODO: Verify this later on.
smlua_audio_utils_replace_sequence(0x0B, 0x14, 65, "0B_Seq_smsrdeluxe_custom") -- SEQ_EVENT_PIRANHA_PLANT
smlua_audio_utils_replace_sequence(0x0C, 0x17, 85, "0C_Seq_smsrdeluxe_custom") -- SEQ_LEVEL_UNDERGROUND
smlua_audio_utils_replace_sequence(0x0D, 0x25, 75, "0D_Seq_smsrdeluxe_custom") -- SEQ_MENU_STAR_SELECT, Star Road has music here instead of the original intro effect.
smlua_audio_utils_replace_sequence(0x0E, 0x25, 65, "0E_Seq_smsrdeluxe_custom") -- SEQ_EVENT_POWERUP
smlua_audio_utils_replace_sequence(0x0F, 0x25, 70, "0F_Seq_smsrdeluxe_custom") -- SEQ_EVENT_METAL_CAP
smlua_audio_utils_replace_sequence(0x10, 0x25, 65, "10_Seq_smsrdeluxe_custom") -- SEQ_EVENT_KOOPA_MESSAGE
smlua_audio_utils_replace_sequence(0x11, 0x25, 70, "11_Seq_smsrdeluxe_custom") -- SEQ_LEVEL_KOOPA_ROAD
smlua_audio_utils_replace_sequence(0x12, 0x25, 70, "12_Seq_smsrdeluxe_custom") -- SEQ_EVENT_HIGH_SCORE
smlua_audio_utils_replace_sequence(0x13, 0x1E, 65, "13_Seq_smsrdeluxe_custom") -- SEQ_EVENT_MERRY_GO_ROUND
smlua_audio_utils_replace_sequence(0x14, 0x1A, 80, "14_Seq_smsrdeluxe_custom") -- SEQ_EVENT_RACE smlua_audio_utils_replace_sequence(0x14, 0x1A, 80, "14_Seq_smsrdeluxe_custom") -- SEQ_EVENT_RACE
smlua_audio_utils_replace_sequence(0x15, 0x0E, 70, "15_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_STAR_SPAWN smlua_audio_utils_replace_sequence(0x15, 0x0E, 70, "15_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_STAR_SPAWN
smlua_audio_utils_replace_sequence(0x16, 0x25, 85, "16_Seq_smsrdeluxe_custom") -- SEQ_EVENT_BOSS
smlua_audio_utils_replace_sequence(0x17, 0x1A, 75, "17_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_COLLECT_KEY smlua_audio_utils_replace_sequence(0x17, 0x1A, 75, "17_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_COLLECT_KEY
smlua_audio_utils_replace_sequence(0x18, 0x25, 75, "18_Seq_smsrdeluxe_custom") -- SEQ_EVENT_ENDLESS_STAIRS
smlua_audio_utils_replace_sequence(0x19, 0x11, 85, "19_Seq_smsrdeluxe_custom") -- SEQ_LEVEL_BOSS_KOOPA_FINAL
smlua_audio_utils_replace_sequence(0x1A, 0x25, 70, "1A_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_CREDITS
smlua_audio_utils_replace_sequence(0x1B, 0x14, 80, "1B_Seq_smsrdeluxe_custom") -- SEQ_EVENT_SOLVE_PUZZLE smlua_audio_utils_replace_sequence(0x1B, 0x14, 80, "1B_Seq_smsrdeluxe_custom") -- SEQ_EVENT_SOLVE_PUZZLE
smlua_audio_utils_replace_sequence(0x1C, 0x20, 80, "1C_Seq_smsrdeluxe_custom") -- SEQ_EVENT_TOAD_MESSAGE
smlua_audio_utils_replace_sequence(0x02, 0x25, 80, "02_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x1D, 0x11, 70, "1D_Seq_smsrdeluxe_custom") -- SEQ_EVENT_PEACH_MESSAGE
smlua_audio_utils_replace_sequence(0x03, 0x25, 75, "03_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x1E, 0x25, 75, "1E_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_INTRO
smlua_audio_utils_replace_sequence(0x04, 0x25, 70, "04_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x1F, 0x25, 80, "1F_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_VICTORY
smlua_audio_utils_replace_sequence(0x05, 0x25, 75, "05_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x20, 0x25, 70, "20_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_ENDING
smlua_audio_utils_replace_sequence(0x06, 0x25, 75, "06_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x21, 0x25, 65, "21_Seq_smsrdeluxe_custom") -- SEQ_MENU_FILE_SELECT
smlua_audio_utils_replace_sequence(0x07, 0x19, 75, "07_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x22, 0x11, 80, "22_Seq_smsrdeluxe_custom") -- SEQ_EVENT_CUTSCENE_LAKITU
smlua_audio_utils_replace_sequence(0x08, 0x25, 70, "08_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x09, 0x0D, 65, "09_Seq_smsrdeluxe_custom") -- Is this possibly just normal slide? TODO: Verify this later on.
smlua_audio_utils_replace_sequence(0x0B, 0x14, 65, "0B_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x0C, 0x17, 85, "0C_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x0D, 0x25, 75, "0D_Seq_smsrdeluxe_custom") -- Star Select, Star Road has music here instead of the original intro effect.
smlua_audio_utils_replace_sequence(0x0E, 0x25, 65, "0E_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x0F, 0x25, 70, "0F_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x10, 0x25, 65, "10_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x11, 0x25, 70, "11_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x12, 0x25, 70, "12_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x13, 0x1E, 65, "13_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x16, 0x25, 85, "16_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x18, 0x25, 75, "18_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x19, 0x11, 85, "19_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x1A, 0x25, 70, "1A_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x1C, 0x20, 80, "1C_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x1D, 0x11, 70, "1D_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x1E, 0x25, 75, "1E_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x1F, 0x25, 80, "1F_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x20, 0x25, 70, "20_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x21, 0x25, 65, "21_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x22, 0x11, 80, "22_Seq_smsrdeluxe_custom")
-- TODO: See if we can figure out the original volumes for the things below this point. -- TODO: See if we can figure out the original volumes for the things below this point.
smlua_audio_utils_replace_sequence(0x23, 0x25, 80, "23_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x23, 0x25, 80, "23_Seq_smsrdeluxe_custom")
@ -83,7 +84,7 @@ smlua_audio_utils_replace_sequence(0x24, 0x11, 70, "24_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x25, 0x25, 85, "25_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x25, 0x25, 85, "25_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x26, 0x25, 75, "26_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x26, 0x25, 75, "26_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x27, 0x25, 75, "27_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x27, 0x25, 75, "27_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x28, 0x25, 85, "28_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x28, 0x25, 85, "28_Seq_smsrdeluxe_custom") -- One of Simpleflips outros. (Don't know the actual song name.)
smlua_audio_utils_replace_sequence(0x29, 0x25, 70, "29_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x29, 0x25, 70, "29_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x2A, 0x11, 80, "2A_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x2A, 0x11, 80, "2A_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x2B, 0x1B, 80, "2B_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x2B, 0x1B, 80, "2B_Seq_smsrdeluxe_custom")
@ -91,9 +92,9 @@ smlua_audio_utils_replace_sequence(0x2C, 0x25, 70, "2C_Seq_smsrdeluxe_custom")
-- We don't know the correct instruments for these. -- We don't know the correct instruments for these.
smlua_audio_utils_replace_sequence(0x2D, 0x25, 75, "2D_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x2D, 0x25, 75, "2D_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x2E, 0x12, 80, "2E_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x2E, 0x12, 80, "2E_Seq_smsrdeluxe_custom") -- Final Boss Music
smlua_audio_utils_replace_sequence(0x2F, 0x25, 70, "2F_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x2F, 0x25, 70, "2F_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x30, 0x25, 65, "30_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x30, 0x25, 65, "30_Seq_smsrdeluxe_custom") -- Game Over Area
smlua_audio_utils_replace_sequence(0x31, 0x25, 80, "31_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x31, 0x25, 80, "31_Seq_smsrdeluxe_custom")
smlua_audio_utils_replace_sequence(0x32, 0x25, 80, "32_Seq_smsrdeluxe_custom") smlua_audio_utils_replace_sequence(0x32, 0x25, 80, "32_Seq_smsrdeluxe_custom")
@ -129,8 +130,7 @@ function on_warp_and_init() -- 130 stars castle grounds music
end end
end end
hook_event(HOOK_MARIO_UPDATE, mario_update) hook_event(HOOK_MARIO_UPDATE, mario_update)
hook_event(HOOK_ON_DEATH, on_death) hook_event(HOOK_ON_DEATH, on_death)
hook_event(HOOK_ON_LEVEL_INIT, on_warp_and_init) hook_event(HOOK_ON_LEVEL_INIT, on_warp_and_init)
hook_event(HOOK_ON_WARP, on_warp_and_init) hook_event(HOOK_ON_WARP, on_warp_and_init)