Menu screens: rock background, centred frame, logo, 3D hero

- Spielen hero panel shows the selected hero in 3D (cUI_NetGranny,
  game/ui/granny.h).
- All menu screens draw on the options' rock wall; the main menu's 1024
  frame is drawn centred over it, mouse and cursor shifted to match.
- The main menu's and options' own pictures and the main menu's 3D scene
  are left out (textures hidden by surface, scene call redirected).
- Logo top left: FX_SACREDLOGO.TGA, drawn added.
- Game textures by name (game/ui/texture.h), textured and added quads.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-21 00:05:55 +02:00
1 parent 34a119433a
commit db87e276bf
16 files changed
+620 -69

No files matched your search

+14 -17
View File
@@ -63,14 +63,14 @@ bool g_pushesPatched = false;
int g_renderWidth = 0;
int g_renderHeight = 0;
// Frames from the main menu thread and the loading screen are laid out for
// 1024x768 ("classic"); everything else is the widened in-game view.
// The loading screen is laid out for 1024x768 ("classic"); the main menu
// thread renders the full width too (its windows drawn centred by
// mods/screen.cpp), the in-game view is widened.
std::atomic<DWORD> g_menuThread = 0;
// Whether the most recent scene (on any thread) was a classic one: the main
// menu is showing. UI input is processed outside the menu thread.
std::atomic<bool> g_lastSceneClassic = false;
// Whether the most recent scene (on any thread) was the main menu's or the
// loading screen's. UI input is processed outside the menu thread.
std::atomic<bool> g_lastSceneMenu = false;
thread_local int g_loadingScreenDepth = 0;
std::atomic<bool> g_wideMenuScreen = false;
// D3DVIEWPORT7 (d3d.h is not in current Windows SDKs).
struct Viewport7 {
@@ -340,18 +340,15 @@ int RenderWidth() {
}
bool MenuIsShowing() {
return g_lastSceneClassic;
return g_lastSceneMenu;
}
bool IsClassicFrame() {
if (g_renderWidth == 0) {
return false;
}
return g_loadingScreenDepth > 0 || (GetCurrentThreadId() == g_menuThread.load() && !g_wideMenuScreen);
return g_renderWidth != 0 && g_loadingScreenDepth > 0;
}
void SetWideMenuScreen(bool shown) {
g_wideMenuScreen = shown;
bool IsMenuThread() {
return GetCurrentThreadId() == g_menuThread.load();
}
} // namespace mods::widescreen
@@ -376,13 +373,13 @@ void __fastcall DxDriver7_LoadingScreen(DxDriver7* self, void* edx, uint32_t pro
--g_loadingScreenDepth;
}
// Menus draw their 3D parts for a 1024x768 screen: give them a 1024x768
// viewport (the borderless mod then presents just that area, scaled), and the
// world the full render size.
// The loading screen draws for a 1024x768 screen: give it a 1024x768
// viewport (the borderless mod then presents just that area, scaled), and
// everything else the full render size.
int __fastcall DxDriver7_BeginScene(DxDriver7* self, void* edx) {
mods::hud::OnDevice(self->device);
if (self->sceneDepth == 0) {
g_lastSceneClassic = IsClassicFrame();
g_lastSceneMenu = IsClassicFrame() || IsMenuThread();
}
if (g_renderWidth != 0 && self->sceneDepth == 0 && self->device) {
const bool classic = IsClassicFrame();