fix(saves): read and write DOS Beta champions with the Beta layout #341
No reviewers
Labels
No labels
area/ci-release
area/cli
area/docs
area/dungeon
area/ftl
area/graphics
area/gui
area/music
area/saves
area/tooling
port/amiga
port/dos
port/fm-towns
port/mac
port/pc98
port/sega-cd
priority/high
priority/low
priority/medium
type/bug
type/chore
type/docs
type/feature
type/research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jqueuniet/dm2-tools!341
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/beta-champion-layout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #340
Championpicked offsets from byte order alone, so DOS Beta champions used the retail layout. NewChampionLayout { DosRetail, Mac, DosBeta }selects mask and field offsets; Beta decode paths and the JSON rebuild (GameplayJson::to_wirenow takes the save variant) use it.[7][2]+eability0x58[7][3]herotype/ench_auraAPI changes
enhanced_ability→Option<u8>(Noneon Beta);set_enhanced_ability→bool.decode_champions_with_maskreplaced bydecode_champions_with_layout.abilities.*.enhancedisnullon Beta; a value there is rejected (FieldNotInVariant).dm2 save champion --set <a>.enherrors on Beta.Tests
herotyperead the expected values at the Beta offsets.herotype,ench_aura) survive re-encode;herotypewas dropped before.Not done
raw.ench_aurais 2 bits; the setter does not reject wider values (same as retail's 4-bit mask today).