mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
01c70368e3
* lsp: json-rpc example is working, a decent place to start... * lsp: vendor library * lsp: cleanup and time to get started * lsp: commit what i got so far * lsp: example `initialize` payload * lsp: switch to `stdio` * stash * modularize the lsp implementation * lsp: implement first actual LSP feature - function names in outline * lsp: produce document diagnostics * lsp: remove unused third-party lib * lsp: support hovering MIPS instructions in IR files * lsp: basic go-to all-types definition * stash * lsp: cleanup code, just need to add it to the release artifacts * fix some project configuration * fix linux build * lsp: add lsp to PR artifacts and release assets * lsp: address feedback
57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
#pragma once
|
|
|
|
/*!
|
|
* @file versions.h
|
|
* Version numbers for GOAL Language, Kernel, etc...
|
|
*/
|
|
|
|
#include <string>
|
|
|
|
#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 DGO_FILE_VERSION = 1;
|
|
constexpr u32 LEVEL_FILE_VERSION = 36;
|
|
constexpr u32 TX_PAGE_VERSION = 8;
|
|
|
|
} // namespace jak2
|
|
|
|
} // 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 };
|
|
|
|
template <typename T>
|
|
struct PerGameVersion {
|
|
constexpr PerGameVersion(T jak1, T jak2) : data{jak1, jak2} {}
|
|
constexpr T operator[](GameVersion v) const { return data[(int)v - 1]; }
|
|
T data[2];
|
|
};
|
|
|
|
constexpr PerGameVersion<const char*> game_version_names = {"jak1", "jak2"};
|
|
|
|
GameVersion game_name_to_version(const std::string& name);
|
|
bool valid_game_version(const std::string& name);
|