diff --git a/Makefile b/Makefile index 0528b27..fb8e669 100644 --- a/Makefile +++ b/Makefile @@ -203,6 +203,7 @@ portal_pak_dir/materials/effects/portal_1_particle_orange.png: portal_pak_dir/ma $(VTF2PNG) -f 2 $< $@ portal_pak_dir/materials/signage/signage_overlay_fling1.png: portal_pak_dir/materials/signage/signage_overlay_fling2.png portal_pak_dir/materials/signage/signage_overlay_dots1.png portal_pak_dir/materials/signage/signage_overlay_dots2.png portal_pak_dir/materials/signage/signage_overlay_dots3.png portal_pak_dir/materials/signage/signage_overlay_dots4.png portal_pak_dir/materials/signage/signage_overlay_toxic.png portal_pak_dir/materials/signage/signage_overlay_fountain.png +portal_pak_dir/materials/signage/signage_overlay_midair1.png: portal_pak_dir/materials/signage/signage_overlay_midair2.png portal_pak_dir/materials/signage/signage_exit.png: portal_pak_dir/materials/signage/signage_overlay_arrow.png portal_pak_dir/materials/signage/signage_overlay_boxdispenser.png portal_pak_dir/materials/signage/signage_overlay_boxhurt.png portal_pak_dir/materials/signage/signage_overlay_energyball.png portal_pak_dir/materials/signage/signage_overlay_catcher.png portal_pak_dir/materials/signage/signage_overlay_toxic.png portal_pak_dir/materials/signage/signage_overlay_fountain.png portal_pak_dir/materials/signage/indicator_lights/indicator_lights_floor.png: portal_pak_dir/materials/signage/indicator_lights/indicator_lights_corner_floor.png portal_pak_dir/materials/signage/indicator_lights/indicator_lights_floor_on.png: portal_pak_dir/materials/signage/indicator_lights/indicator_lights_corner_floor_on.png @@ -408,7 +409,8 @@ ANIM_TEST_CHAMBERS = build/assets/test_chambers/test_chamber_00/test_chamber_00_ build/assets/test_chambers/test_chamber_06/test_chamber_06_anim.o \ build/assets/test_chambers/test_chamber_07/test_chamber_07_anim.o \ build/assets/test_chambers/test_chamber_08/test_chamber_08_anim.o \ - build/assets/test_chambers/test_chamber_09/test_chamber_09_anim.o + build/assets/test_chambers/test_chamber_09/test_chamber_09_anim.o \ + build/assets/test_chambers/test_chamber_10/test_chamber_10_anim.o build/anims.ld: $(ANIM_LIST) $(ANIM_TEST_CHAMBERS) tools/generate_animation_ld.js @mkdir -p $(@D) @@ -427,7 +429,8 @@ TEST_CHAMBERS = assets/test_chambers/test_chamber_00/test_chamber_00.blend \ assets/test_chambers/test_chamber_06/test_chamber_06.blend \ assets/test_chambers/test_chamber_07/test_chamber_07.blend \ assets/test_chambers/test_chamber_08/test_chamber_08.blend \ - assets/test_chambers/test_chamber_09/test_chamber_09.blend + assets/test_chambers/test_chamber_09/test_chamber_09.blend \ + assets/test_chambers/test_chamber_10/test_chamber_10.blend TEST_CHAMBER_HEADERS = $(TEST_CHAMBERS:%.blend=build/%.h) TEST_CHAMBER_OBJECTS = $(TEST_CHAMBERS:%.blend=build/%_geo.o) diff --git a/assets/materials/signage/signage_overlay_midair1.ims b/assets/materials/signage/signage_overlay_midair1.ims new file mode 100644 index 0000000..ee371e2 --- /dev/null +++ b/assets/materials/signage/signage_overlay_midair1.ims @@ -0,0 +1,6 @@ +-alpha off +-resize 32x32 -repage +0+0 +\( portal_pak_dir/materials/signage/signage_overlay_midair2.png -alpha off -resize 32x32 -repage +32+0 \) + +-compose Copy +-layers merge \ No newline at end of file diff --git a/assets/materials/static.skm.yaml b/assets/materials/static.skm.yaml index 340c30c..d00e3b1 100644 --- a/assets/materials/static.skm.yaml +++ b/assets/materials/static.skm.yaml @@ -1198,6 +1198,20 @@ materials: set: [G_SHADE] clear: [G_LIGHTING] + signage_overlay_midair1: + gDPSetTile: + filename: ../../portal_pak_modified/materials/signage/signage_overlay_midair1.png + siz: G_IM_SIZ_4b + fmt: G_IM_FMT_I + + gDPSetCombineMode: G_CC_MODULATERGB + gDPSetCycleType: G_CYC_1CYCLE + gDPSetRenderMode: G_RM_RA_ZB_OPA_DECAL + + gSPGeometryMode: + set: [G_SHADE] + clear: [G_LIGHTING] + signage_doorstate: gDPSetTile: filename: ../../portal_pak_modified/materials/signage/signage_doorstate.png diff --git a/assets/sound/vo/aperture_ai/10_part1_entry-1.sox b/assets/sound/vo/aperture_ai/10_part1_entry-1.sox new file mode 100644 index 0000000..5ad82e6 --- /dev/null +++ b/assets/sound/vo/aperture_ai/10_part1_entry-1.sox @@ -0,0 +1 @@ +-c 1 -r 22050 diff --git a/assets/sound/vo/aperture_ai/10_part1_entry-2.sox b/assets/sound/vo/aperture_ai/10_part1_entry-2.sox new file mode 100644 index 0000000..5ad82e6 --- /dev/null +++ b/assets/sound/vo/aperture_ai/10_part1_entry-2.sox @@ -0,0 +1 @@ +-c 1 -r 22050 diff --git a/assets/sound/vo/aperture_ai/10_part1_entry-3.sox b/assets/sound/vo/aperture_ai/10_part1_entry-3.sox new file mode 100644 index 0000000..5ad82e6 --- /dev/null +++ b/assets/sound/vo/aperture_ai/10_part1_entry-3.sox @@ -0,0 +1 @@ +-c 1 -r 22050 diff --git a/assets/sound/vo/aperture_ai/10_part1_success-1.sox b/assets/sound/vo/aperture_ai/10_part1_success-1.sox new file mode 100644 index 0000000..5ad82e6 --- /dev/null +++ b/assets/sound/vo/aperture_ai/10_part1_success-1.sox @@ -0,0 +1 @@ +-c 1 -r 22050 diff --git a/assets/test_chambers/materials.blend b/assets/test_chambers/materials.blend index 2611128..4141f46 100644 Binary files a/assets/test_chambers/materials.blend and b/assets/test_chambers/materials.blend differ diff --git a/assets/test_chambers/test_chamber_10/test_chamber_10.blend b/assets/test_chambers/test_chamber_10/test_chamber_10.blend new file mode 100644 index 0000000..9afb812 Binary files /dev/null and b/assets/test_chambers/test_chamber_10/test_chamber_10.blend differ diff --git a/assets/test_chambers/test_chamber_10/test_chamber_10.yaml b/assets/test_chambers/test_chamber_10/test_chamber_10.yaml new file mode 100644 index 0000000..606c35f --- /dev/null +++ b/assets/test_chambers/test_chamber_10/test_chamber_10.yaml @@ -0,0 +1,80 @@ +cutscenes: + INTRO: + - q_sound AMBIENCE_BASE CH_AMBIENT SubtitleKeyNone 0.55 + SIGNAGE: + - activate_signage 15 + - q_sound 10_PART1_ENTRY_1 CH_GLADOS PORTAL_10_PART1_ENTRY_1 + - q_sound 10_PART1_ENTRY_2 CH_GLADOS PORTAL_10_PART1_ENTRY_2 + - q_sound 10_PART1_ENTRY_3 CH_GLADOS PORTAL_10_PART1_ENTRY_3 + ROOM2: + - set_signal room2_launch_ball + - wait_for_signal room2_solved + - save_checkpoint + - label room2_piston_loop + - play_animation room2_piston piston_move_down + - wait_for_signal room2_on_piston + - play_animation room2_piston piston_move_down -1 + - wait_for_signal room2_piston_needed + - goto room2_piston_loop + ROOM_3_CHECKPOINT: + - save_checkpoint + ENTERED_ROOM_3: + - set_signal room_3_ball_launcher + - wait_for_signal hallway_platforms_activate + - start_cutscene HAZARD_HALLWAY_CHECKPOINT + # TODO: start platform spawn + HAZARD_HALLWAY_CHECKPOINT: + - wait_for_signal in_hazard_hallway_checkpoint + - save_checkpoint + DROWN_PLAYER: + - kill_player water + ENTERED_FINAL_ROOM: + - set_signal final_room_ball_launcher + - start_cutscene SWITCH_ROOM_1_PISTON + - start_cutscene SWITCH_ROOM_2_PISTON + - start_cutscene CHECK_TRAPPED + # TODO: disable spawning (looping) of hazard hallway platforms + - save_checkpoint + + - wait_for_signal exit_activate + - save_checkpoint + - q_sound 10_PART1_SUCCESS_1 CH_GLADOS PORTAL_10_PART1_SUCCESS_1 + + - label exit_piston_loop + - play_animation exit_piston exit_down + - wait_for_signal on_exit_piston + - play_animation exit_piston exit_down -1 + - wait_for_signal not_on_exit_piston + - goto exit_piston_loop + SWITCH_ROOM_1_PISTON: + - label piston_loop + - play_animation switch_room_1 switch_room_1_down + - wait_for_signal on_switch_room_1_piston + - play_animation switch_room_1 switch_room_1_down -1 + - wait_for_signal not_on_switch_room_1_piston + - goto piston_loop + SWITCH_ROOM_2_PISTON: + - label piston_loop + - play_animation switch_room_2 switch_room_2_down + - wait_for_signal on_switch_room_2_piston + - play_animation switch_room_2 switch_room_2_down -1 + - wait_for_signal not_on_switch_room_2_piston + - goto piston_loop + CHECK_TRAPPED: + - label trapped_loop + - wait_for_signal trapped 30 + - q_sound 07_PART1_TRAPPED_1 CH_GLADOS PORTAL_07_PART1_TRAPPED_1 + - q_sound 07_PART1_TRAPPED_2 CH_GLADOS PORTAL_07_PART1_TRAPPED_2 + - wait_for_channel CH_GLADOS + - play_animation escape_hatch escape_hatch_open + - wait_for_signal not_in_ball_trap 30 + - play_animation escape_hatch escape_hatch_open -1 + - goto trapped_loop +operators: + - not_on_exit_piston = not on_exit_piston + - not_on_switch_room_1_piston = not on_switch_room_1_piston + - not_on_switch_room_2_piston = not on_switch_room_2_piston + - ball_trap_open = ball_door_1 and ball_door_2 + - ball_trap_closed = not ball_trap_open + - trapped = ball_trap_closed and in_ball_trap + - not_in_ball_trap = not in_ball_trap \ No newline at end of file diff --git a/documentation/levels/level_objects/anim.md b/documentation/levels/level_objects/anim.md index c142475..a2c5b94 100644 --- a/documentation/levels/level_objects/anim.md +++ b/documentation/levels/level_objects/anim.md @@ -41,3 +41,4 @@ The possible values for `SOUND_TYPE_NAME` are: * `Piston`: Vertical moving platform sound * `Arm`: Horizontal moving wall sound * `Stairs`: Ascending/descending staircase sound +* `Door`: Door open/close sound diff --git a/documentation/levels/level_objects/static.md b/documentation/levels/level_objects/static.md index 252907e..6c01041 100644 --- a/documentation/levels/level_objects/static.md +++ b/documentation/levels/level_objects/static.md @@ -14,13 +14,13 @@ Static level geometry. Used to generate level mesh and portal surface data. | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `no_portals` (optional) | If specified, the surface will not be considered portalable, regardless of its material name | | `indicator_lights SIGNAL_NAME` (optional) | If specified and the indicator light or door state material is used, it will be switched to the corresponding "active" variant when the specified [signal](../signals.md) is set | -| `uvtransx TRANS_X` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_X` on the X axis | -| `uvtransy TRANS_Y` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_Y` on the Y axis | -| `uvtransz TRANS_Z` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_Z` on the Z axis | -| `uvrotx ROT_X` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_X` degrees on the X axis | -| `uvroty ROT_Y` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_Y` degrees on the Y axis | -| `uvrotz ROT_Z` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_Z` degrees on the Z axis | -| `uvscale SCALE` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, scales UV coordinates by `SCALE/tileSize` in each direction | +| `uvtransx TRANS_X` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_X` on the X axis. Defaults to 0. | +| `uvtransy TRANS_Y` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_Y` on the Y axis. Defaults to 0. | +| `uvtransz TRANS_Z` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, translates UV coordinates by `TRANS_Z` on the Z axis. Defaults to 0. | +| `uvrotx ROT_X` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_X` degrees on the X axis. Defaults to 0. | +| `uvroty ROT_Y` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_Y` degrees on the Y axis. Defaults to 0. | +| `uvrotz ROT_Z` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, rotates UV coordinates by `ROT_Z` degrees on the Z axis. Defaults to 0. | +| `uvscale SCALE` (optional) | If specified and the material has `tileSizeS` and `tileSizeT` properties, scales UV coordinates by `SCALE/tileSize` in each direction. Defaults to 1. | ## Notes diff --git a/skelatool64/src/ExtendedMesh.cpp b/skelatool64/src/ExtendedMesh.cpp index 1db9a9e..9998bc8 100644 --- a/skelatool64/src/ExtendedMesh.cpp +++ b/skelatool64/src/ExtendedMesh.cpp @@ -458,7 +458,7 @@ void cubeProjectSingleFace(aiMesh* mesh, std::set& faces, double sTile, for (unsigned i = 0; i < face->mNumIndices; ++i) { aiVector3D vertex = mesh->mVertices[face->mIndices[i]]; - vertex = rotation.Rotate(vertex) + translation; + vertex = rotation.Rotate(vertex); minLeft = std::min(minLeft, vertex * left); minUp = std::min(minUp, vertex * up); diff --git a/src/levels/level_definition.h b/src/levels/level_definition.h index 7f0808e..950aee5 100644 --- a/src/levels/level_definition.h +++ b/src/levels/level_definition.h @@ -272,7 +272,8 @@ enum AnimationSoundType { AnimationSoundTypeLightRail, AnimationSoundTypePiston, AnimationSoundTypeArm, - AnimationSoundTypeStairs + AnimationSoundTypeStairs, + AnimationSoundTypeDoor }; struct AnimationInfo { diff --git a/src/levels/levels.c b/src/levels/levels.c index 9be785e..afe20cd 100644 --- a/src/levels/levels.c +++ b/src/levels/levels.c @@ -259,6 +259,8 @@ int getChamberDisplayNumberFromLevelIndex(int levelIndex, int roomIndex){ return 13; case 9: return 14; + case 10: + return 15; default: return 0; } @@ -291,6 +293,8 @@ int getLevelIndexFromChamberDisplayNumber(int chamberNumber) { return 8; case 14: return 9; + case 15: + return 10; default: return 0; } diff --git a/src/menu/new_game_menu.c b/src/menu/new_game_menu.c index c4f1292..f40e9b4 100644 --- a/src/menu/new_game_menu.c +++ b/src/menu/new_game_menu.c @@ -29,7 +29,7 @@ struct Chapter gChapters[] = { {images_chapter4_rgba_16b, 6, 10}, {images_chapter5_rgba_16b, 8, 13}, {images_chapter6_rgba_16b, 9, 14}, - {images_chapter7_rgba_16b, -1, 15}, + {images_chapter7_rgba_16b, 10, 15}, {images_chapter8_rgba_16b, -1, 16}, {images_chapter9_rgba_16b, -1, 17}, {images_chapter10_rgba_16b, -1, 18}, diff --git a/src/scene/scene_animator.c b/src/scene/scene_animator.c index 529fc49..8d34214 100644 --- a/src/scene/scene_animator.c +++ b/src/scene/scene_animator.c @@ -21,6 +21,7 @@ struct AnimatedAudioInfo gAnimatedAudioInfo[] = { {.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}, + {.startSoundId = SOUNDS_DOOR_METAL_THIN_CLOSE2, .loopSoundId = SOUND_ID_NONE, .endSoundId = SOUND_ID_NONE, .pitch = 0.5f}, }; void sceneAnimatorInit(struct SceneAnimator* sceneAnimator, struct AnimationInfo* animationInfo, int animatorCount) {