Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
trs:savegame:tr1 [2017/03/06 22:48] – zdimension | trs:savegame:tr1 [2021/07/15 03:00] (current) – update savegame format with new discoveries stohrendorf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== TR1 ====== | ====== TR1 ====== | ||
+ | |||
+ | <note tip>When loading a save game, classic TR games read the name and number and then load everything after that directly into the game RAM, without checking anything. That's why savegames from original versions don't work in multipatched versions (and make the game crash). It also makes the " | ||
<code cpp> | <code cpp> | ||
- | struct | + | struct |
{ | { | ||
- | uint8_t | + | uint8_t |
- | uint32_t | + | uint32_t |
- | uint8_t | + | uint8_t |
- | // First level use block 0, second use block 1... so that at the end of the game, | + | // First level use block 0, second use block 1... so that at the end of the game, |
// it sums up everything and/or checks if you found all secrets, etc | // it sums up everything and/or checks if you found all secrets, etc | ||
struct | struct | ||
{ | { | ||
- | uint16_t | + | uint16_t |
- | uint16_t | + | uint16_t |
- | uint16_t | + | uint16_t |
- | uint16_t | + | uint16_t |
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
/* 0 None | /* 0 None | ||
* 1 Climbing | * 1 Climbing | ||
- | * 2 ? | + | * 2 Draw weapon |
- | * 3 Single shot.? | + | * 3 Holster weapon |
- | * 4 Combat? | + | * 4 Combat |
*/ | */ | ||
- | uint8_t | + | uint8_t |
/* 0 None | /* 0 None | ||
* 1 Pistols | * 1 Pistols | ||
Line 31: | Line 33: | ||
* 4 Shotgun | * 4 Shotgun | ||
*/ | */ | ||
- | uint8_t | + | uint8_t |
/* 00000001 Level unlocked | /* 00000001 Level unlocked | ||
* 00000010 Pistols | * 00000010 Pistols | ||
Line 39: | Line 41: | ||
* 00100000 Midas Hand | * 00100000 Midas Hand | ||
*/ | */ | ||
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
- | } LevelInitData[21]; // for the 21 levels (315 bytes) | + | } levelInitData[21]; // for the 21 levels (315 bytes) |
- | uint32_t | + | uint32_t |
- | uint32_t | + | uint32_t |
- | uint16_t | + | uint16_t |
- | uint16_t | + | uint16_t |
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
// 10240 bytes starting from now | // 10240 bytes starting from now | ||
- | uint8_t | + | uint8_t |
- | uint8_t | + | uint8_t |
- | uint16_t | + | uint16_t |
// items block here todo | // items block here todo | ||
- | #pragma pack(push, 8) | + | #pragma pack(push, 8) |
struct | struct | ||
{ | { | ||
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | | + | |
- | | + | |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | | + | |
#pragma pack(push, 1) | #pragma pack(push, 1) | ||
struct MeshTree | struct MeshTree | ||
{ | { | ||
- | int32_t | + | int32_t |
- | MESH_HEADER *Meshes[15]; | + | MESH_HEADER *meshes[15]; |
- | } LaraMeshTree; | + | } laraMeshTree; |
#pragma pack(pop) | #pragma pack(pop) | ||
- | ITEM *Enemy; | + | ITEM *enemy; |
- | | + | |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | | + | |
- | | + | |
- | AimInfo | + | AimInfo |
- | AimInfo | + | AimInfo |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
struct RoutePlanner | struct RoutePlanner | ||
{ | { | ||
- | BoxNode *Node; | + | BoxNode *node; |
- | uint16_t | + | uint16_t |
- | uint16_t | + | uint16_t |
- | uint16_t | + | uint16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | uint16_t | + | uint16_t |
- | | + | |
- | } AiInfo; | + | } aiInfo; |
- | } Lara; // 236 bytes | + | } lara; // 236 bytes |
#pragma pack(pop) | #pragma pack(pop) | ||
- | int32_t | + | int32_t |
- | int32_t | + | int32_t |
}; | }; | ||
- | enum WEAPONID | + | enum WeaponID |
{ | { | ||
None = 0, | None = 0, | ||
Line 126: | Line 128: | ||
}; | }; | ||
- | struct | + | struct |
{ | { | ||
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
}; | }; | ||
- | struct | + | struct |
{ | { | ||
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
}; | }; | ||
- | struct | + | struct |
{ | { | ||
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
}; | }; | ||
- | struct | + | struct |
{ | { | ||
- | int32_t | + | int32_t |
- | int32_t | + | int32_t |
- | int32_t | + | int32_t |
}; | }; | ||
- | struct | + | struct |
{ | { | ||
- | int32_t | + | int32_t |
- | int32_t | + | int32_t |
- | int32_t | + | int32_t |
}; | }; | ||
Line 163: | Line 165: | ||
struct AimInfo | struct AimInfo | ||
{ | { | ||
- | ANIM_FRAME *WeaponAnimData; | + | ANIM_FRAME *weaponAnimData; |
- | int16_t | + | int16_t |
- | int16_t | + | int16_t |
- | | + | |
- | int16_t | + | int16_t |
}; | }; | ||
#pragma pack(pop) | #pragma pack(pop) | ||
+ | |||
</ | </ | ||
- | <note tip>The '' | ||
- | |||
+ | <note tip>The ''< | ||
===== Identifications ===== | ===== Identifications ===== | ||
==== Levels ==== | ==== Levels ==== | ||
- | ^ ID ^ Level ^ Filename ^ Cameras | + | ^ID^Level^Filename^Camera count^Items^ |
- | ^ ::: ^ ::: ^ ::: ^ ::: ^ ::: ^ ::: ^ 1 ^ 2 ^ 3 ^ 4 ^ 1 ^ 2 ^ 3 ^ 4 ^ | + | | ::: | ::: | ::: | ::: | ::: | ::: ^1^2^3^4^1^2^3^4| |
- | | 0 | Lara's Home | '' | + | | 0| Lara's Home | '' |
- | | 1 | Caves | '' | + | | 1| Caves | '' |
- | | 2 | City of Vilcabamba | + | | 2| City of Vilcabamba |
- | | 3 | Lost Valley | + | | 3| Lost Valley |
- | | 4 | Tomb of Qualopec | + | | 4| Tomb of Qualopec |
- | | 5 | St. Francis' | + | | 5| St. Francis' |
- | | 6 | Colosseum | + | | 6| Colosseum |
- | | 7 | Palace Midas | '' | + | | 7| Palace Midas | '' |
- | | 8 | The Cistern | + | | 8| The Cistern |
- | | 9 | Tomb of Tihocan | + | | 9| Tomb of Tihocan |
- | | 10 | City of Khamoon | + | | 10| City of Khamoon |
- | | 11 | Obelisk of Khamoon | + | | 11| Obelisk of Khamoon |
- | | 12 | Sanctuary of the Scion | '' | + | | 12| Sanctuary of the Scion | '' |
- | | 13 | Natla' | + | | 13| Natla' |
- | | 14 | Atlantis | + | | 14| Atlantis |
- | | 15 | The Great Pyramid | + | | 15| The Great Pyramid |
- | | 16 | Cut Scene 1 | '' | + | | 16| Cut Scene 1 | '' |
- | | 17 | Cut Scene 2 | '' | + | | 17| Cut Scene 2 | '' |
- | | 18 | Cut Scene 3 | '' | + | | 18| Cut Scene 3 | '' |
- | | 19 | Cut Scene 4 | '' | + | | 19| Cut Scene 4 | '' |
- | | 20 | Title | '' | + | | 20| Title | '' |
- | | 21 | Current Position | + | | 21| Current Position |
+ | |||
+ | <note important> | ||
- | <note important> |