Entry 131
The streams' own effects: effcStr's hit marks and transfers, checked against the game
Documented in In-engine streams.
Filescrates/piney-effect/src/strfx.rscrates/piney-effect/src/effect.rscrates/piney-effect/src/particle.rscrates/piney-effect/src/particle/one.rscrates/piney-effect/src/files.rscrates/piney-effect/src/hit.rscrates/piney-effect/src/lib.rscrates/piney-effect/examples/hit_probe.rscrates/piney-stream/src/lib.rscrates/piney-game/src/stream.rstools/test_effect_str_rs.pydocs/engine/effects.md
The in-engine streams' effect tasks (125, 126) ask for hit marks and transfers. The stream player took those requests and dropped them. The game runs them in a second effect system of its own, and this entry ports that system, gives it to the game's streams and checks it against the game.
What the game has
ccThEffectStr(priority 80). It makes and steps accEffectCtrl(1)(effcStr): 50 slots ineffStrWork, andeffectStrTbl's three objects ofparticle(the hit mark's sprite, the hit ring and the transfer ring).- A second
ccParticleCtrl(1). It holdsparticlesStr's 150 particles, each run byccParticle::MainStr. WhileparticleThreadStrFlagis set, every generator started and every particle made goes to it. effHitMarkStr,effTransferStrandccEffect::MainStr. These work like the field's hit mark and arrival, with their own cases. The draw uses no field-to-local transform and no camera test.
docs/engine/effects.md ("The streams' effects") has the details.
Three things only the check found
- Force fields.
ccEffectCtrl(1)'s constructor giveshitPhotonDummyStrGthe photons' two force fields, which make the stream's photons four times the size and slow them. Its destructor takes them away again. The port now wires them for the stream system only. - The active layer.
ccEffectCtrl::MainStrsetsactive__7ccLayerfor each effect that has a layer and never resets it per slot. So an effect with no layer draws on the last layer set in that pass, not on the streams' layer. - The slot readers. The effect harnesses read the slots at a base
address now (
effWorkoreffStrWork), and theirslotoverrides take it as well.
In the game
StreamEffectsgoes to the event and Data Drain streams (piney-game'sstream::stream_effects), built from DATA.BIN and main with GCMN.PRG.- Stream 7 shows Kite's arrival rings at Mac Anu's gate.
Checked
tools/test_effect_str_rs.py(new). It builds the game's two stream systems by their constructors, withparticleThreadStrFlagset, and runshit_probe'sstrreset,strhitandstrtransferalongside. There are 30 random runs of eight starts (hit marks at random turns and layers, transfers at random heights), each run until everything ends. Every frame, every live slot, draw, generator, particle andrand()state matches: 5313 frames, 15093 effect draws, 234972 particle draws.- The field's harnesses (
test_effect_rs,_particle_rs,_hit_rs,_misc_rs,_spell_rs) still pass. - The workspace's tests, clippy and fmt pass.
strEffectStopFlag, which holds a particle with astrFlagstill, is never set by anything the port runs. - Stream 15'sFunc_str0580andFunc_str0581, with their ownccEffPart0580parts, are still not ported.