This commit is contained in:
hackgrid 2023-11-30 18:41:59 +01:00
parent d238a0f7a5
commit d98f371aee
3 changed files with 5 additions and 5 deletions

View file

@ -67,7 +67,7 @@ void savefileListSlotInit(struct SavefileListSlot* savefileListSlot, int x, int
savefileListSlot->x = x;
savefileListSlot->y = y;
savefileListSlot->imageData = malloc(THUMBANIL_IMAGE_SIZE);
savefileListSlot->imageData = malloc(THUMBNAIL_IMAGE_SIZE);
savefileListSlot->slotIndex = -1;
}

View file

@ -156,7 +156,7 @@ void savefileSave() {
void savefileSaveGame(Checkpoint checkpoint, u16* screenshot, int testChamberIndex, int subjectNumber, int slotIndex) {
savefileSramSave((void*)SAVE_SLOT_SRAM_ADDRESS(slotIndex), checkpoint, MAX_CHECKPOINT_SIZE);
savefileSramSave((void*)SCREEN_SHOT_SRAM(slotIndex), screenshot, THUMBANIL_IMAGE_SIZE);
savefileSramSave((void*)SCREEN_SHOT_SRAM(slotIndex), screenshot, THUMBNAIL_IMAGE_SIZE);
unsigned char prevSortOrder = gSaveData.saveSlotMetadata[slotIndex].saveSlotOrder;
@ -316,9 +316,9 @@ void savefileLoadGame(int slot, Checkpoint checkpoint, int* testChamberIndex, in
void savefileLoadScreenshot(u16* target, u16* location) {
if ((int)location >= SRAM_START_ADDR && (int)location <= (SRAM_START_ADDR + SRAM_SIZE)) {
savefileSramLoad(location, target, THUMBANIL_IMAGE_SIZE);
savefileSramLoad(location, target, THUMBNAIL_IMAGE_SIZE);
} else {
memCopy(target, location, THUMBANIL_IMAGE_SIZE);
memCopy(target, location, THUMBNAIL_IMAGE_SIZE);
}
}

View file

@ -12,7 +12,7 @@
#define SAVE_SLOT_IMAGE_W 36
#define SAVE_SLOT_IMAGE_H 27
#define THUMBANIL_IMAGE_SIZE (SAVE_SLOT_IMAGE_W * SAVE_SLOT_IMAGE_H * sizeof(u16))
#define THUMBNAIL_IMAGE_SIZE (SAVE_SLOT_IMAGE_W * SAVE_SLOT_IMAGE_H * sizeof(u16))
#define THUMBNAIL_IMAGE_SPACE 2048