diff --git a/assets/sound/doors/door_metal_medium_open1.ins b/assets/sound/doors/door_metal_medium_open1.ins new file mode 100644 index 00000000..78226b1e --- /dev/null +++ b/assets/sound/doors/door_metal_medium_open1.ins @@ -0,0 +1,15 @@ +envelope Envelope { + attackTime = 0 + attackVolume = 127 + decayTime = -1 + decayVolume = 127 + releaseTime = 0 +} + +sound Sound { + use("../../../portal_pak_dir/sound/doors/door_metal_medium_open1.wav") + loopCount = -1 + loopEnd = 3969 + pan=64 + envelope = Envelope +} \ No newline at end of file diff --git a/assets/sound/vehicles/apc/apc_shutdown.sox b/assets/sound/vehicles/apc/apc_shutdown.sox new file mode 100644 index 00000000..c86a8992 --- /dev/null +++ b/assets/sound/vehicles/apc/apc_shutdown.sox @@ -0,0 +1 @@ +-c 1 -r 22050 -b 16 \ No newline at end of file diff --git a/assets/sound/vehicles/apc/apc_start_loop3.jsox b/assets/sound/vehicles/apc/apc_start_loop3.jsox new file mode 100644 index 00000000..ce22f1c5 --- /dev/null +++ b/assets/sound/vehicles/apc/apc_start_loop3.jsox @@ -0,0 +1,6 @@ +[ + { + "flags": "-c 1", + "filters": "trim 0 2.5 fade 0 -0 0.650" + } +] \ No newline at end of file diff --git a/assets/test_chambers/test_chamber_09/test_chamber_09.blend b/assets/test_chambers/test_chamber_09/test_chamber_09.blend index bb5f7bb7..f9642723 100644 Binary files a/assets/test_chambers/test_chamber_09/test_chamber_09.blend and b/assets/test_chambers/test_chamber_09/test_chamber_09.blend differ diff --git a/assets/test_chambers/test_chamber_09/test_chamber_09.yaml b/assets/test_chambers/test_chamber_09/test_chamber_09.yaml index c4ffb3ca..445b7519 100644 --- a/assets/test_chambers/test_chamber_09/test_chamber_09.yaml +++ b/assets/test_chambers/test_chamber_09/test_chamber_09.yaml @@ -1,5 +1,6 @@ cutscenes: INTRO: + - start_cutscene CHECK_STAIRS - start_cutscene CHECK_CUBE_ON_PISTON - start_cutscene CHECK_CUBE_OFF_BUTTON - q_sound 09_PART1_ENTRY_1 CH_GLADOS PORTAL_09_PART1_ENTRY_1 @@ -26,6 +27,16 @@ cutscenes: - play_animation pit_1 pit_1_down -1 - delay 3 - goto pit_loop + CHECK_STAIRS: + - label stair_loop + - wait_for_signal should_raise_stairs + - play_animation stairs stairs_ascend + - wait_for_animation stairs + - delay 2 + - wait_for_signal should_lower_stairs + - play_animation stairs stairs_descend + - wait_for_animation stairs + - goto stair_loop CHECK_CUBE_ON_PISTON: - wait_for_signal cube_on_piston 210 - stop_cutscene CHECK_CUBE_OFF_BUTTON @@ -41,4 +52,7 @@ cutscenes: operators: - not_on_piston = not on_piston - not_cube_near_button = not cube_near_button - - open_door = open_door or escape_hatch \ No newline at end of file + - open_door = open_door or escape_hatch + - cube_retrieved = not cube_in_start + - should_raise_stairs = at_stairs_bottom or cube_retrieved + - should_lower_stairs = at_stairs_top and cube_in_start \ No newline at end of file diff --git a/documentation/levels/cutscenes/start_sound.md b/documentation/levels/cutscenes/start_sound.md index 1deff0d5..98743b96 100644 --- a/documentation/levels/cutscenes/start_sound.md +++ b/documentation/levels/cutscenes/start_sound.md @@ -1,4 +1,4 @@ -# starts_sound +# start_sound Starts a sound immediately without blocking. diff --git a/documentation/levels/level_objects/anim.md b/documentation/levels/level_objects/anim.md index 5e75ade6..c142475c 100644 --- a/documentation/levels/level_objects/anim.md +++ b/documentation/levels/level_objects/anim.md @@ -40,3 +40,4 @@ The possible values for `SOUND_TYPE_NAME` are: * `LightRail`: Horizontal moving platform sound * `Piston`: Vertical moving platform sound * `Arm`: Horizontal moving wall sound +* `Stairs`: Ascending/descending staircase sound diff --git a/src/levels/level_definition.h b/src/levels/level_definition.h index 125f28cd..7f0808e4 100644 --- a/src/levels/level_definition.h +++ b/src/levels/level_definition.h @@ -272,6 +272,7 @@ enum AnimationSoundType { AnimationSoundTypeLightRail, AnimationSoundTypePiston, AnimationSoundTypeArm, + AnimationSoundTypeStairs }; struct AnimationInfo { diff --git a/src/scene/scene_animator.c b/src/scene/scene_animator.c index dde3c6c6..dace0270 100644 --- a/src/scene/scene_animator.c +++ b/src/scene/scene_animator.c @@ -20,6 +20,7 @@ struct AnimatedAudioInfo gAnimatedAudioInfo[] = { {.startSoundId = SOUND_ID_NONE, .loopSoundId = SOUNDS_BEAM_PLATFORM_LOOP1, .endSoundId = SOUND_ID_NONE, .pitch = 0.5f}, {.startSoundId = SOUNDS_DOORMOVE1, .loopSoundId = SOUND_ID_NONE, .endSoundId = SOUND_ID_NONE, .pitch = 0.4f}, {.startSoundId = SOUNDS_TANK_TURRET_START1, .loopSoundId = SOUNDS_TANK_TURRET_LOOP1, .endSoundId = SOUNDS_ELEVATOR_STOP1, .pitch = 0.5f}, + {.startSoundId = SOUNDS_APC_START_LOOP3, .loopSoundId = SOUNDS_DOOR_METAL_MEDIUM_OPEN1, .endSoundId = SOUNDS_APC_SHUTDOWN, .pitch = 0.5f}, }; void sceneAnimatorInit(struct SceneAnimator* sceneAnimator, struct AnimationInfo* animationInfo, int animatorCount) { diff --git a/tools/export_fbx.py b/tools/export_fbx.py index d8cf32d9..8ee92ea0 100644 --- a/tools/export_fbx.py +++ b/tools/export_fbx.py @@ -4,4 +4,4 @@ print("Blender export scene in FBX Format in file "+sys.argv[-1]) # Doc can be found here: https://docs.blender.org/api/current/bpy.ops.export_scene.html -bpy.ops.export_scene.fbx(filepath=sys.argv[-1]) \ No newline at end of file +bpy.ops.export_scene.fbx(filepath=sys.argv[-1], add_leaf_bones=False) \ No newline at end of file