2022-12-04 11:03:45 +00:00
|
|
|
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
|
|
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
|
|
|
|
2019-09-09 07:01:26 +00:00
|
|
|
#pragma once
|
2020-02-22 08:16:45 +00:00
|
|
|
#include "types.h"
|
2019-09-09 07:01:26 +00:00
|
|
|
|
2020-02-22 08:16:45 +00:00
|
|
|
static constexpr u32 SAVE_STATE_MAGIC = 0x43435544;
|
2023-10-01 06:30:28 +00:00
|
|
|
static constexpr u32 SAVE_STATE_VERSION = 61;
|
2020-10-12 10:46:59 +00:00
|
|
|
static constexpr u32 SAVE_STATE_MINIMUM_VERSION = 42;
|
2020-04-20 16:50:45 +00:00
|
|
|
|
2020-11-27 03:51:45 +00:00
|
|
|
static_assert(SAVE_STATE_VERSION >= SAVE_STATE_MINIMUM_VERSION);
|
|
|
|
|
2020-04-20 16:50:45 +00:00
|
|
|
#pragma pack(push, 4)
|
|
|
|
struct SAVE_STATE_HEADER
|
|
|
|
{
|
|
|
|
enum : u32
|
|
|
|
{
|
|
|
|
MAX_TITLE_LENGTH = 128,
|
2022-10-05 08:29:08 +00:00
|
|
|
MAX_SERIAL_LENGTH = 32,
|
2022-08-18 11:21:22 +00:00
|
|
|
|
|
|
|
COMPRESSION_TYPE_NONE = 0,
|
|
|
|
COMPRESSION_TYPE_ZLIB = 1,
|
|
|
|
COMPRESSION_TYPE_ZSTD = 2,
|
2020-04-20 16:50:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
u32 magic;
|
|
|
|
u32 version;
|
|
|
|
char title[MAX_TITLE_LENGTH];
|
2022-10-05 08:29:08 +00:00
|
|
|
char serial[MAX_SERIAL_LENGTH];
|
2020-05-26 16:01:09 +00:00
|
|
|
|
|
|
|
u32 media_filename_length;
|
|
|
|
u32 offset_to_media_filename;
|
2021-03-26 16:19:23 +00:00
|
|
|
u32 media_subimage_index;
|
|
|
|
u32 unused_offset_to_playlist_filename; // Unused as of version 51.
|
2020-08-15 10:38:17 +00:00
|
|
|
|
2020-04-20 16:50:45 +00:00
|
|
|
u32 screenshot_width;
|
|
|
|
u32 screenshot_height;
|
|
|
|
u32 screenshot_size;
|
|
|
|
u32 offset_to_screenshot;
|
|
|
|
|
|
|
|
u32 data_compression_type;
|
|
|
|
u32 data_compressed_size;
|
|
|
|
u32 data_uncompressed_size;
|
|
|
|
u32 offset_to_data;
|
|
|
|
};
|
|
|
|
#pragma pack(pop)
|