mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 22:15:57 +00:00
Add a VERSION file with the port's semver, shown beside the installer title and on the game menu's title line with the game update
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4e764cd39a
commit
f4619f7b45
12 files changed
+38
-11
No files matched your search
@@ -171,6 +171,7 @@ extern const RtFileHash rt_exefs_sha256[]; // tools/data/expecte
|
||||
extern const int rt_exefs_sha256_count;
|
||||
extern const char rt_default_exefs[], rt_default_romfs[], rt_default_profile[];
|
||||
extern const int rt_game_version; // the game build: 121 (1.2.1) or 143 (1.4.3)
|
||||
extern const char rt_port_version[]; // VERSION at the build's root: 0.1.0, 0.1.0+973c626 in a release
|
||||
#define RT_V143 (rt_game_version >= 143)
|
||||
|
||||
// ---- kernel (kernel.c)
|
||||
|
||||
@@ -36,6 +36,8 @@ void vk_queue_lock(void);
|
||||
void vk_queue_unlock(void);
|
||||
void res_sizes(unsigned out[2], unsigned scene[2]);
|
||||
double frame_step_limit_hz(void);
|
||||
extern const int rt_game_version;
|
||||
extern const char rt_port_version[];
|
||||
}
|
||||
|
||||
// Roboto Medium (Apache-2.0, ui/fonts/LICENSE-Roboto.txt) with Latin and Cyrillic glyphs.
|
||||
@@ -735,6 +737,12 @@ static void layout_menu(uint32_t w, uint32_t h, float scale) {
|
||||
ImGui::Begin("##menu", nullptr, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove |
|
||||
ImGuiWindowFlags_NoSavedSettings);
|
||||
ImGui::TextColored(ImVec4(0.93f, 0.76f, 0.33f, 1), "%s", menu_text(UI_MENU_TITLE));
|
||||
// the port version and the game update, right-aligned on the title line: what a bug report needs first
|
||||
char game[16], version[96];
|
||||
snprintf(game, sizeof game, "%d.%d.%d", rt_game_version / 100, rt_game_version / 10 % 10, rt_game_version % 10);
|
||||
snprintf(version, sizeof version, menu_text(UI_MENU_VERSION), rt_port_version, game);
|
||||
ImGui::SameLine(ImGui::GetWindowWidth() - ImGui::GetStyle().WindowPadding.x - ImGui::CalcTextSize(version).x);
|
||||
ImGui::TextDisabled("%s", version);
|
||||
|
||||
int step = g_modal ? 0
|
||||
: ImGui::IsKeyPressed(ImGuiKey_GamepadR1, false) || ImGui::IsKeyPressed(ImGuiKey_E, false) ? 1
|
||||
|
||||
@@ -33,6 +33,7 @@ static const char *const text_en[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_ON] = "On", [UI_MENU_OFF] = "Off", [UI_MENU_AUTO] = "Automatic", [UI_MENU_DEFAULT_MARK] = "default",
|
||||
[UI_MENU_AFTER_RESTART] = "after restart", [UI_MENU_SET_BY_ENV] = "set by environment variable",
|
||||
[UI_MENU_SAVE_FAILED] = "could not save settings",
|
||||
[UI_MENU_VERSION] = "TotK Recomp %s, game %s",
|
||||
|
||||
[UI_MENU_FULLSCREEN] = "Fullscreen", [UI_MENU_FULLSCREEN_DESC] = "Fills the screen with the game; F11 toggles it.",
|
||||
[UI_MENU_WINDOW_SIZE] = "Window size", [UI_MENU_WINDOW_SIZE_DESC] = "Size of the game window when not fullscreen.",
|
||||
@@ -198,6 +199,7 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_DEFAULT_MARK] = "по умолчанию",
|
||||
[UI_MENU_AFTER_RESTART] = "после перезапуска", [UI_MENU_SET_BY_ENV] = "задано переменной окружения",
|
||||
[UI_MENU_SAVE_FAILED] = "не удалось сохранить настройки",
|
||||
[UI_MENU_VERSION] = "TotK Recomp %s, игра %s",
|
||||
|
||||
[UI_MENU_FULLSCREEN] = "Полный экран", [UI_MENU_FULLSCREEN_DESC] = "Игра на весь экран; F11 переключает режим.",
|
||||
[UI_MENU_WINDOW_SIZE] = "Размер окна", [UI_MENU_WINDOW_SIZE_DESC] = "Размер окна игры вне полноэкранного режима.",
|
||||
|
||||
@@ -21,6 +21,7 @@ typedef enum {
|
||||
UI_MENU_AFTER_RESTART, // note on a setting that is read at start
|
||||
UI_MENU_SET_BY_ENV, // note on a setting an environment variable fixes
|
||||
UI_MENU_SAVE_FAILED,
|
||||
UI_MENU_VERSION, // "TotK Recomp %s, game %s": the port version and the game update, beside the title
|
||||
|
||||
// Screen
|
||||
UI_MENU_FULLSCREEN, UI_MENU_FULLSCREEN_DESC,
|
||||
|
||||
Reference in new issue
Block a user