Entry 556

Bosses as defs: the class machinery and BossData out; a bare ccBoss its own def's steps, Patterns::words by the volume, actAnmTbl a static slice

Files50 in 15 directories
crates/piney-battle/examples/battle_probe/boss.rscorbenik.rscorbenik_b.rscorbenik_c.rsfidchell.rsgorre.rsinnis.rskyvia.rsmacha.rsmagus.rstarvos.rscrates/piney-battle/src/boss.rscrates/piney-battle/src/boss/class.rscorbenik.rsdefs.rsfidchell.rsgorre.rsinnis.rskyvia.rsmacha.rsmagus.rspart.rsskeith.rstarvos.rscrates/piney-battle/src/boss/corbenik/eye.rsfirst.rssecond.rsseed.rstests.rsthird.rscrates/piney-battle/src/boss/fidchell/tests.rscrates/piney-battle/src/boss/gorre/brother.rsmessage.rstests.rscrates/piney-battle/src/boss/kyvia/core.rsfourth.rsgomora.rstests.rscrates/piney-battle/src/boss/macha/tests.rscrates/piney-battle/src/boss/magus/leaf.rstests.rscrates/piney-battle/src/boss/systems/frame.rsmod.rspatterns.rscrates/piney-battle/src/boss/tarvos/tests.rscrates/piney-game/src/session/tests/survey.rscrates/piney-world/src/combat/boss.rsmod.rsdocs/engine/boss.mdplans/rust-cleanup.md

Mentioned inplans/rust-cleanup.md:457

Section 2's "Bosses as defs and systems", its last step: with Corbenik (555) every boss class is its def and its systems, so what dispatched to the classes not yet converted goes.

Gone

  • Class (the enum a boss carried beside its systems) and Boss.class; boss/class.rs with BossClass (the class's Main, Affect, pass, next and show), Bare and each_class!. Boss::build(def, base) is the one way to make a boss.
  • Step::Class and Hook::Main from the runner, and the class's show in Boss::show (each system's draw over ccBoss::Draw's body is all of it now).
  • BossBase::base_main, the closure-driven ccBoss::Main the classes and the bare base ran through: its last users, Innis's images (554) and Corbenik's roots (555), write the blocks out.
  • PartClass and part_system!: a part's own is any system kind, Part<T: SystemKind> lends it off its boss's list and puts it back at its place in the def's.
  • BossData, Cx::data, BossEnv::data and piney-world's BattleData::bosses (always set; the boss start and the affects checked it): every boss's tables are views of the volume's tables::combat.

Changed

  • BASE_BOSS is what a bare ccBoss is: its Main the blocks alone (Live[Prologue, TickStop, LockParty, Move, ForwardAndDraw], its Think and Action empty), its Affect ccBoss::Affect, no pass and no hand-over. BASE_PART has no frame of its own (its master runs it). The defs no longer write out the empty pass and hand-over or ccBoss's Affect they get from it; Corbenik's later forms keep an empty hand-over over the first's.
  • Patterns::words takes the volume (&'static words), and each class's table helper with it.
  • BossBase.anm_tbl (actAnmTbl) is a static slice of the volume's tables, no longer a copy of owned strings.
  • piney-game's tests name the boss they look for by its def (r.look.def == &defs::GORRE), not by its game class.

rg -n 'class::<|split_mut|has\(System::|Class::' crates/piney-battle crates/piney-world/src/combat crates/piney-game/src now finds, of the bosses, only the defs' own class: BossGameClass::... rows (the game class a def is); the rest are the towns' town.class::<T>() (the town item next), the sky maps' and the gimmicks' own Class enums.

Checks

  • The pins: 290 recorded battle_probe calls replayed against the new release probe, none differ.
  • Against the game: the eleven test_battle_*_rs on their volumes, test_boss_effect_rs on all four, test_bosscam_rs on Infection, Mutation and Quarantine.
  • The golden shots, all 21 tests of s552 (worklog 553): 2,255 PNGs, every one byte for byte.
  • piney-battle's, piney-world's, piney-effect's, piney-data's and piney-event's tests, piney-game's suite (release).
  • piney-gen gen --check, clippy with all features (too_many_arguments 150, no dead_code allows), fmt, cairns check, tools/docs.py check.
Still unknown

nothing this step opened.