Entry 314
"Outbreak's battle harnesses at 0: a menu word, swapped names, every foe type held, and sqrt.s beyond the battle"
Filestools/volume.pytools/test_battle.pytools/test_battle_flow_rs.pytools/test_battle_items_rs.pytools/test_ride_rs.pycrates/piney-battle/src/damage.rscrates/piney-battle/src/skill.rscrates/piney-battle/src/enemy_motion.rscrates/piney-data/src/libm.rscrates/piney-gen/src/manifest.rscrates/piney-fieldui/src/menus/target.rscrates/piney-world/src/lib.rscrates/piney-effect/src/effect.rscrates/piney-audio/src/se3d.rsdocs/engine/battle.md
308 left these Outbreak (OUT) harness mismatches:
- drain:
drain176,side_effect1; - flow:
area_item35,skill_main4; - enemy motion:
main2 of 300; - the ride harness would not start;
- items: the map items of category 13.
Every check below is now at 0 mismatches on Infection, Mutation and Outbreak, 100 cases each:
- drain:
drain,side_effect,evolution; - flow:
skill_main,note_affect,skill_check,attack_note,condition_adjustment,level_absent,area_item; - items: every check;
- enemy motion:
main.
The agent doing this work stopped at the last step (an account limit). The results above were re-run afterwards, before the commit.
The causes
-
A menu word.
ccMenuCtrlgrows a word afterdummyTargetfrom Outbreak on.itemNum(the Data Drain skill) is at +0x240 (OUT gcmn 0x0054ca44; MUT +0x23c), withtrapNumafter it. The drain harness now reads it there; which of the 176 cases it accounts for was not counted separately. -
Swapped names. The carry pairs Infection's note tables for important items 288 and 289 the wrong way round on Outbreak, which rewrote both notes. Two places now find each table by the branch
ccUseItemRequesttakes for the item (OUT gcmn 0x0059e93c for 288, 0x0059e964 for 289):- the build:
piney-gen'sitem_pages, a manifest change, data version 21; - the items harness:
note_table.
Outbreak's gcmn rows also misplace two of main's globals,
showMapInfoandtrapDischargeStr(0x00386168, 0x00386170). The harness now looks main's globals up by main's carry (tools/volume.py); the category-13 map items are among what this fixed. - the build:
-
Every foe type held. From Outbreak on, an area aimed at a foe takes in every foe type, not only the damage (307). It applies to
ccSkillHold(OUT 0x00597200, point 0x00597478) andccSkillModifyCondition(0x00597684, point 0x005979dc) too, with an enemy's own area attack taking the attacker in.damage::side_typesis now the one rule for all of them. The test isan_area_hold_takes_in_every_foe_type_from_outbreak_on. docs/engine/battle.md recordsskill_mainand the motion harness'smainat 0 on OUT with it. -
sqrt.s beyond the battle. Every Infection function that calls
sqrtf(70, main and gcmn) has the truncatingsqrt.sinline on Outbreak, and most of the drawing code's(float)sqrt((double)x)becamesqrt.stoo. Examples:STATICOBJECT::Draw(OUT 0x005f7fb8),CLOUD,FIREFLY,FOBJECT,waterUVModifi2,ccMerchan::mainandccChgate::main.BIRD::Move,TOBJ::Move,STATICMODEL::DrawandCheckFrontObstacleFkeep the double.piney_data::libm::sqrtf_onanddsqrt_onmatch on the volume. piney-world, piney-effect, piney-audio and piney-fieldui (the target menu'sflat_dist) take their roots through them. Infection and Mutation compute exactly what they did.
The ride harness
AwakeDistantLight has no carried name on Outbreak: it is a leaf too short to place.
volume.found now finds it as the call DrawPG makes, checked by its
opcodes. So tools/test_ride_rs.py starts on Outbreak. It passes on Infection.
On Mutation and Outbreak it fails 6 checks, with 2 errors. The riding Grunty changed from Mutation on:
ccPuccigusois 0x80 bytes longer;ControlMovegrows from 1288 bytes (INF) to 2260 (MUT) and 2516 (OUT), with newsinf/cosf/fabsphysics.
The port's ride is still Infection's (docs/engine/battle.md).
Checks
The piney-battle, piney-world, piney-effect, piney-audio, piney-fieldui,
piney-gen, piney-data and piney-game suites pass (piney-game 189). gen was
re-run: sjis.rs gains six kanji from the newly read note tables.
- The later volumes' riding Grunty (
ccPucciguso's new members andControlMove's physics) is not ported; the ride harness fails on MUT and OUT. -outbreak_whole_storyandmutation_whole_storywere not re-run after the hold rule and the roots changed.