Skip to content

Commit

Permalink
Merge pull request #42 from mwpenny/chamber-14
Browse files Browse the repository at this point in the history
Chamber 14 stairs first iteration
  • Loading branch information
mwpenny authored Mar 21, 2024
2 parents 236e799 + eaf1a30 commit c15576d
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 3 deletions.
15 changes: 15 additions & 0 deletions assets/sound/doors/door_metal_medium_open1.ins
Original file line number Diff line number Diff line change
@@ -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
}
1 change: 1 addition & 0 deletions assets/sound/vehicles/apc/apc_shutdown.sox
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-c 1 -r 22050 -b 16
6 changes: 6 additions & 0 deletions assets/sound/vehicles/apc/apc_start_loop3.jsox
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"flags": "-c 1",
"filters": "trim 0 2.5 fade 0 -0 0.650"
}
]
Binary file modified assets/test_chambers/test_chamber_09/test_chamber_09.blend
Binary file not shown.
16 changes: 15 additions & 1 deletion assets/test_chambers/test_chamber_09/test_chamber_09.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
- 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
2 changes: 1 addition & 1 deletion documentation/levels/cutscenes/start_sound.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# starts_sound
# start_sound

Starts a sound immediately without blocking.

Expand Down
1 change: 1 addition & 0 deletions documentation/levels/level_objects/anim.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/levels/level_definition.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ enum AnimationSoundType {
AnimationSoundTypeLightRail,
AnimationSoundTypePiston,
AnimationSoundTypeArm,
AnimationSoundTypeStairs
};

struct AnimationInfo {
Expand Down
1 change: 1 addition & 0 deletions src/scene/scene_animator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion tools/export_fbx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
bpy.ops.export_scene.fbx(filepath=sys.argv[-1], add_leaf_bones=False)

0 comments on commit c15576d

Please sign in to comment.