8000 Missing padding in save files after `floormove_t::texture` field · Issue #1683 · chocolate-doom/chocolate-doom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Missing padding in save files after floormove_t::texture field #1683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Rua opened this issue May 31, 2024 · 0 comments
Open

Missing padding in save files after floormove_t::texture field #1683

Rua opened this issue May 31, 2024 · 0 comments

Comments

@Rua
Copy link
Rua commented May 31, 2024

Background

Version of Chocolate Doom: git master

Game: Doom

Bug description

In the original engine, the floormove_t structure is 44 bytes. The texture field is at offset 32 and is only 2 bytes, while the next field floordestheight must be aligned to 4 bytes. That means that two padding bytes get added after texture.

Chocolate Doom doesn't appear to do this:

// short texture;
str->texture = saveg_read16();
// fixed_t floordestheight;
str->floordestheight = saveg_read32();

// short texture;
saveg_write16(str->texture);
// fixed_t floordestheight;
saveg_write32(str->floordestheight);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0