2
2
3
3
#include " gamefalloutttw.h"
4
4
5
- FalloutTTWSaveGame::FalloutTTWSaveGame (QString const &fileName, GameFalloutTTW const *game) :
6
- GamebryoSaveGame(fileName, game)
5
+ FalloutTTWSaveGame::FalloutTTWSaveGame (QString const & fileName,
6
+ GameFalloutTTW const * game)
7
+ : GamebryoSaveGame(fileName, game)
7
8
{
8
9
FileWrapper file (getFilepath (), " FO3SAVEGAME" );
9
10
unsigned long width, height;
10
- fetchInformationFields (file, width, height, m_SaveNumber, m_PCName, m_PCLevel, m_PCLocation);
11
-
11
+ fetchInformationFields (file, width, height, m_SaveNumber, m_PCName, m_PCLevel,
12
+ m_PCLocation);
12
13
}
13
14
14
- void FalloutTTWSaveGame::fetchInformationFields (
15
- FileWrapper& file,
16
- unsigned long & width,
17
- unsigned long & height,
18
- unsigned long & saveNumber,
19
- QString& playerName,
20
- unsigned short & playerLevel,
21
- QString& playerLocation) const
15
+ void FalloutTTWSaveGame::fetchInformationFields (FileWrapper& file, unsigned long & width,
16
+ unsigned long & height,
17
+ unsigned long & saveNumber,
18
+ QString& playerName,
19
+ unsigned short & playerLevel,
20
+ QString& playerLocation) const
22
21
{
23
- file.skip <unsigned long >(); // Save header size
22
+ file.skip <unsigned long >(); // Save header size
24
23
25
- file.skip <unsigned long >(); // File version?
26
- file.skip <unsigned char >(); // Delimiter
24
+ file.skip <unsigned long >(); // File version?
25
+ file.skip <unsigned char >(); // Delimiter
27
26
28
- // A huge wodge of text with no length but a delimiter. Given the null bytes
29
- // in it I presume it's fixed length (64 bytes + delim) but I have no
30
- // definite spec
31
- for (unsigned char ignore = 0 ; ignore != 0x7c ; ) {
32
- file.read (ignore); // unknown
27
+ // A huge wodge of text with no length but a delimiter. Given the null bytes
28
+ // in it I presume it's fixed length (64 bytes + delim) but I have no
29
+ // definite spec
30
+ for (unsigned char ignore = 0 ; ignore != 0x7c ;) {
31
+ file.read (ignore); // unknown
33
32
}
34
33
35
34
file.setHasFieldMarkers (true );
@@ -49,7 +48,8 @@ void FalloutTTWSaveGame::fetchInformationFields(
49
48
file.read (playerLocation);
50
49
}
51
50
52
- std::unique_ptr<GamebryoSaveGame::DataFields> FalloutTTWSaveGame::fetchDataFields () const
51
+ std::unique_ptr<GamebryoSaveGame::DataFields>
52
+ FalloutTTWSaveGame::fetchDataFields () const
53
53
{
54
54
FileWrapper file (getFilepath (), " FO3SAVEGAME" );
55
55
@@ -61,16 +61,16 @@ std::unique_ptr<GamebryoSaveGame::DataFields> FalloutTTWSaveGame::fetchDataField
61
61
unsigned short dummyLevel;
62
62
unsigned long dummySaveNumber;
63
63
64
- fetchInformationFields (file, width, height,
65
- dummySaveNumber, dummyName, dummyLevel, dummyLocation);
64
+ fetchInformationFields (file, width, height, dummySaveNumber, dummyName, dummyLevel,
65
+ dummyLocation);
66
66
}
67
67
68
68
QString playtime;
69
69
file.read (playtime);
70
70
71
71
fields->Screenshot = file.readImage (width, height, 256 );
72
72
73
- file.skip <char >(5 ); // unknown (1 byte), plugin size (4 bytes)
73
+ file.skip <char >(5 ); // unknown (1 byte), plugin size (4 bytes)
74
74
75
75
file.setPluginString (GamebryoSaveGame::StringType::TYPE_BSTRING);
76
76
fields->Plugins = file.readPlugins ();
0 commit comments