mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-01-17 06:18:22 +01:00
Skip loading authorship info in render
This commit is contained in:
parent
a438584871
commit
75191e7ac5
@ -51,7 +51,7 @@ int main(int argc, char *argv[])
|
||||
GameSave * gameSave = NULL;
|
||||
try
|
||||
{
|
||||
gameSave = new GameSave(fileData);
|
||||
gameSave = new GameSave(fileData, false);
|
||||
}
|
||||
catch (ParseException &e)
|
||||
{
|
||||
|
@ -27,8 +27,9 @@ GameSave::GameSave(int width, int height)
|
||||
setSize(width, height);
|
||||
}
|
||||
|
||||
GameSave::GameSave(const std::vector<char> &data)
|
||||
GameSave::GameSave(const std::vector<char> &data, bool newWantAuthors)
|
||||
{
|
||||
wantAuthors = newWantAuthors;
|
||||
blockWidth = 0;
|
||||
blockHeight = 0;
|
||||
|
||||
@ -688,7 +689,7 @@ void GameSave::readOPS(const std::vector<char> &data)
|
||||
fprintf(stderr, "Wrong type for %s\n", bson_iterator_key(&iter));
|
||||
}
|
||||
}
|
||||
else if (!strcmp(bson_iterator_key(&iter), "authors"))
|
||||
else if (wantAuthors && !strcmp(bson_iterator_key(&iter), "authors"))
|
||||
{
|
||||
if (bson_iterator_type(&iter) == BSON_OBJECT)
|
||||
{
|
||||
|
@ -115,6 +115,7 @@ public:
|
||||
int airMode = 0;
|
||||
float ambientAirTemp = R_TEMP + 273.15f;
|
||||
int edgeMode = 0;
|
||||
bool wantAuthors = true;
|
||||
|
||||
//Signs
|
||||
std::vector<sign> signs;
|
||||
@ -130,7 +131,7 @@ public:
|
||||
int pmapbits = 8; // default to 8 bits for older saves
|
||||
|
||||
GameSave(int width, int height);
|
||||
GameSave(const std::vector<char> &data);
|
||||
GameSave(const std::vector<char> &data, bool newWantAuthors = true);
|
||||
void setSize(int width, int height);
|
||||
// return value is [ fakeFromNewerVersion, gameData ]
|
||||
std::pair<bool, std::vector<char>> Serialise() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user