1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 21:13:05 +01:00

Use constants for .PARK magic value

This commit is contained in:
Gymnasiast
2021-08-29 15:50:49 +02:00
parent c81cc63b36
commit 7912e0eee4
3 changed files with 5 additions and 4 deletions

View File

@@ -9,6 +9,7 @@
#include "FileClassifier.h"
#include "ParkFile.h"
#include "core/Console.hpp"
#include "core/FileStream.h"
#include "core/Path.hpp"
@@ -76,7 +77,7 @@ static bool TryClassifyAsPark(OpenRCT2::IStream* stream, ClassifiedFileInfo* res
try
{
auto magic = stream->ReadValue<uint32_t>();
if (magic == 0x4B524150)
if (magic == OpenRCT2::PARK_FILE_MAGIC)
{
result->Type = FILE_TYPE::PARK;
result->Version = 0;

View File

@@ -71,8 +71,6 @@ static void UpdateFootpathsFromMapping(
namespace OpenRCT2
{
constexpr uint32_t PARK_FILE_MAGIC = 0x4B524150; // PARK
// Current version that is saved.
constexpr uint32_t PARK_FILE_CURRENT_VERSION = 0x3;

View File

@@ -7,8 +7,10 @@ struct ObjectRepositoryItem;
namespace OpenRCT2
{
constexpr uint32_t PARK_FILE_MAGIC = 0x4B524150; // PARK
struct IStream;
}
} // namespace OpenRCT2
class ParkFileExporter
{