Skip to content
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

Fix up save nomenclature #239

Open
luckytyphlosion opened this issue Aug 22, 2023 · 3 comments
Open

Fix up save nomenclature #239

luckytyphlosion opened this issue Aug 22, 2023 · 3 comments
Labels

Comments

@luckytyphlosion
Copy link
Member

It makes no sense. There are four structs: SaveArrayHeader, SaveArrayFooter, SaveChunkHeader, SaveChunkFooter. SaveChunkHeader isn't even defined in the same place as SaveChunkFooter.

static void CreateChunkFooter(SaveData *saveData, void *data, int idx, u32 size) {
    struct SaveArrayFooter *footer;

    footer = (struct SaveArrayFooter *)((u8 *)data + size);

    footer->magic = SAVE_CHUNK_MAGIC;
    footer->saveno = saveData->lastGoodSaveNo + 1;
    footer->size = size;
    footer->idx = idx;
    footer->crc = GF_CalcCRC16(data, size + offsetof(struct SaveArrayFooter, crc));
}

The function is named CreateChunkFooter yet it doesn't even use SaveChunkFooter.

Probably a bunch of other stuff, I could spend 15 minutes and find more inconsistencies but I don't think it's necessary to point out more stuff.

@red031000
Copy link
Member

makes sense to me 🥺

Copy link

This issue has had no activity for 60 days and will be marked stale. If there is no further activity, it will be closed in 30 days.

Copy link

github-actions bot commented Nov 1, 2024

This issue has had no activity for 60 days and will be marked stale. If there is no further activity, it will be closed in 30 days.

@github-actions github-actions bot added the stale label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants