Entry 531
Story maps' shared set-up: no as_any, party_starts by StartSpread, one statics loader, event_hits and model_hits, light_group, one ee::ground_dist
18mworld
Files10 in 7 directories
crates/piney-world/src/
story_map/ee.rscrates/piney-world/src/field/area.rsfirefly.rsworld.rscrates/piney-world/src/sky/cloud.rscrates/piney-world/src/town/mod.rscrates/piney-world/examples/story_map_probe.rscrates/piney-game/src/session/tests/ending.rsplans/rust-cleanup.mdMentioned inplans/rust-cleanup.md:486
The story maps' item of section 2 (plans/rust-cleanup.md). The eight
EVENTAREA classes each carried copies of the same set-up: the statics'
loops, the event area's collision, the light group, the party's start
places, the ground distance, and three Any casts. Each is one piece now.
Nothing they compute changed.
The pieces
- No
as_any.StoryMap: Any, and the trait object upcasts todyn Any(Rust 1.86 on), soas_any,as_any_mutandinto_anyare gone from the trait and the eight impls.Place::story,story_mut,WORLD_MAN::Quit's kept map and the ending's test cast the object. party_starts(start, StartSpread)isSetCharPosition's event area branch: the leader ateventStartPosfacing its w, the two others at(+-side, back), the third at (0, +300).StartSpread::BEHIND(+-300, +150: main 0x001a1414) andAHEAD(+-200, -150: 0x001a1190).StoryMap::startandspread(BEHINDby default) feed a defaultedstart_positions. Seven copies are gone; the giant and the mirror sky sayAHEAD; the disc keeps its field 12 places over the default.- The copies wrote
add(c, x)orsub(y, c)where the one writesadd(x, c)andadd(y, -c). The EEadd.sport is symmetric andsubisaddof the negated bits, so the bits are the same.
StaticModel::load,StaticObject::load(the statics' one loader): a table's rows over the scene file, each row's object (its name through a function: the arena's stage rename), placed at its dummy or nowhere (Placing::Origin:EVENTAREA07::ChangeBlockcalls noSetPos), the objectsSetMatrix_PosRotZYX'd. Five maps' loops are gone. Each map still picks its table (statics::tables()orstatics::of(volume)).- The copies that mapped
Position::Noneto zeros were doing whatdummy_bitsdoes already.
- The copies that mapped
event_hits(volume, def_se, models): the event area'sHits(area 1, the bounds, no height map,defSE), eight literals gone, withmodel_hits: each model's own Hit chunk in the order the statics were built (six copies, the holy ground's block change among them).light_group(file, anim, names, skip_missing): the light animation's ambient and the named lights at frame 1, with their objects. The arena skips names its stage lacks, the others fail. Four copies gone; Area 43's, which takes every record of its one light, stays.ee::ground_dist(volume, dx, dy): the double-precision ground distance (sqrt.sfrom Outbreak on) of the statics, the town objects, the disc's objects, the clouds and both fireflies. Nine copies, two of them functions, are one;field::area::ground_distof a vector is a call to it.
The trait's hits, hits_mut and lights stay required one-liners: the
maps hold them in two shapes (their own fields, or the towns' Base).
The diff is about 260 lines added and 390 removed.
Checks
- piney-world's and piney-game's tests, release (the story maps' and towns' tests and session runs through every map).
- Against the game:
test_evarea_rson all four volumes (area 15's map: its set-up, statics, lights, hits, draw, ground, door and starts);test_town02_rs,test_town03_rs,test_area_rsandtest_field_ambient_rs(the clouds and fireflies) on Infection and Outbreak, either side of thesqrt.schange. - clippy with all features, fmt,
cairns check,tools/docs.py check. too_many_arguments: 151 before, 151 after.
Still unknown: nothing