Entry 81
The fight's sounds and the spells: ccSeOn3D and the sound tables, and attack spells cast through the effects
Filescrates/piney-audio/src/se3d.rscrates/piney-audio/src/setbl.rscrates/piney-audio/src/lib.rscrates/piney-audio/src/driver.rscrates/piney-game/src/fx.rscrates/piney-world/src/combat/mod.rscrates/piney-world/src/combat/stage.rstools/test_sound3d_rs.pytools/sound_tables.pytools/iopemu.pydocs/engine/sound.mddocs/engine/battle.md
80's fights were silent, and spells did nothing on screen. The combat agent's second increment adds both.
The sounds
- Positioned sound. The game places a fight's sounds in space:
ccSeOn3D,ccSeOn3DNote,ccSeOn3DLoopandccSeOffLoopwork out each sound's volume and pan from where it is (calcVel,calcPan);- the parameters come from setbl.cpp's tables through
ccSeSetParamEnemy,SPC,PCandInu.
- The port. piney-audio has them as se3d.rs. setbl.rs holds the
tables, generated from the executable by
tools/sound_tables.py setbl. - In the runtime. piney-game plays the battle's sounds, the effects' sounds and ccThSkill's heal and note sounds, heard from the active camera.
The spells
ccThSkill walks the running skills itself. So an attack spell's element
system (Fall, Tornado and the rest, from 79) runs in ccSkill::Main's
place, and its damage calls go back to piney-battle's skill_damage with
the run's flags, on the frame the game makes them.
Checked
- Against the game.
tools/test_sound3d_rs.py: 9 checks at 50,000 cases each, 0 mismatches. The sound chip's register writes (MODHSYN) also match over 350 fixture cases. - Runtime test.
a_spell_lands_through_the_effects: Kite's Tornado hits a portal goblin. This tests the port against itself, not the game. - Re-run in a clean worktree. The positioned-sound, sound, world, field, skill-flow and game-control suites pass, with the workspace's tests, clippy, fmt and the docs check.
Still unknown
- Not reached yet. The dungeon entry and event 4 are the combat agent's next increment. - Other agents in the same files. The stream presentation agent also works in piney-audio. This increment's additions to lib.rs and driver.rs are small and additive. - Not done yet: - the party AI's chat lines; - Data Drain's presentation; - game over; -
boss()for the events.