mirror of
https://github.com/open-goal/jak-project
synced 2026-05-30 17:06:23 -04:00
d3cc739e43
This attempts to get into master whatever work was done in this PR / it's earlier PR https://github.com/open-goal/jak-project/pull/3965 I don't want this work to be lost / floating around in massive PRs. However the changes are: - switch to ntsc_v1 instead of PAL as the development target, as we have done for all other games - remove most of the copied-from-jak2/3 changes as they need to be confirmed during the decompilation process not just assumed - avoids committing any changes to `game/kernel/common` as it was not clear to me if these were changes made in jak x's kernel that were not properly broken out into it's own functions. We don't want to accidentally introduce bugs into jak1-3's kernel code. - in other words, if the change in the kernel only happens in jak x...it should likely be specific to jak x's kernel, not common. --------- Co-authored-by: VodBox <dillon@vodbox.io> Co-authored-by: yodah <greenboyyodah@gmail.com>
77 lines
2.1 KiB
C++
77 lines
2.1 KiB
C++
#pragma once
|
|
|
|
/*!
|
|
* @file versions.h
|
|
* Version numbers for GOAL Language, Kernel, etc...
|
|
*/
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "common/common_types.h"
|
|
|
|
namespace versions {
|
|
// language version (OpenGOAL)
|
|
constexpr s32 GOAL_VERSION_MAJOR = 1;
|
|
constexpr s32 GOAL_VERSION_MINOR = 0;
|
|
|
|
namespace jak1 {
|
|
// these versions are from the game
|
|
constexpr u32 ART_FILE_VERSION = 6;
|
|
constexpr u32 LEVEL_FILE_VERSION = 30;
|
|
constexpr u32 DGO_FILE_VERSION = 1;
|
|
constexpr u32 RES_FILE_VERSION = 1;
|
|
constexpr u32 TX_PAGE_VERSION = 7;
|
|
} // namespace jak1
|
|
|
|
namespace jak2 {
|
|
constexpr u32 ART_FILE_VERSION = 7;
|
|
constexpr u32 LEVEL_FILE_VERSION = 36;
|
|
constexpr u32 DGO_FILE_VERSION = 1;
|
|
constexpr u32 TX_PAGE_VERSION = 8;
|
|
} // namespace jak2
|
|
|
|
namespace jak3 {
|
|
constexpr u32 ART_FILE_VERSION = 8;
|
|
constexpr u32 LEVEL_FILE_VERSION = 36;
|
|
constexpr u32 DGO_FILE_VERSION = 1;
|
|
constexpr u32 TX_PAGE_VERSION = 8;
|
|
} // namespace jak3
|
|
|
|
namespace jakx {
|
|
constexpr u32 ART_FILE_VERSION = 8;
|
|
constexpr u32 LEVEL_FILE_VERSION = 36;
|
|
constexpr u32 DGO_FILE_VERSION = 1;
|
|
constexpr u32 TX_PAGE_VERSION = 8;
|
|
} // namespace jakx
|
|
|
|
} // namespace versions
|
|
|
|
// GOAL kernel version (OpenGOAL changes this version from the game's version)
|
|
constexpr int KERNEL_VERSION_MAJOR = 2;
|
|
constexpr int KERNEL_VERSION_MINOR = 0;
|
|
|
|
// OVERLORD version returned by an RPC
|
|
constexpr int IRX_VERSION_MAJOR = 2;
|
|
constexpr int IRX_VERSION_MINOR = 0;
|
|
|
|
enum class GameVersion { Jak1 = 1, Jak2 = 2, Jak3 = 3, JakX = 4 };
|
|
|
|
// TODO: most usages of this are currently stubs for jak 3
|
|
template <typename T>
|
|
struct PerGameVersion {
|
|
constexpr PerGameVersion(T jak1, T jak2, T jak3, T jakx) : data{jak1, jak2, jak3, jakx} {}
|
|
constexpr const T& operator[](GameVersion v) const { return data[(int)v - 1]; }
|
|
T data[4];
|
|
};
|
|
|
|
constexpr PerGameVersion<const char*> game_version_names = {"jak1", "jak2", "jak3", "jakx"};
|
|
|
|
GameVersion game_name_to_version(const std::string& name);
|
|
bool valid_game_version(const std::string& name);
|
|
std::string version_to_game_name(GameVersion v);
|
|
std::string version_to_game_name_external(GameVersion v);
|
|
std::vector<std::string> valid_game_version_names();
|
|
|
|
std::string build_revision();
|