- Options window in three tabs; the auto-pickup settings move to Beute; sliders move with their page; black sides like the save game screen. - Tastenbelegung: every binding settable (click, press key; Esc cancels, Backspace unbinds), "Alle zurücksetzen" as a game button, saved on OK. - Potions bindable (default unbound), named by the game's potion texts; the game's own potion hotkeys are off; bar tooltips show the bound key. - Map (M), overview map (Tab, held) and labels (Alt, held) bindable; the game's own M / Tab / Alt handling is switched off. - Save game key calls the game's save window code instead of a posted key. - Teleportationstrank: fixed text replacement from startup (also the Ausdauertrank items, potion kind 5 as well). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
37 lines
1.4 KiB
C++
37 lines
1.4 KiB
C++
#pragma once
|
|
// Untextured quads on the UI's Direct3D 7 device (the argument of the UI's
|
|
// render methods, vf14).
|
|
|
|
#include <cstdint>
|
|
|
|
#include <windows.h>
|
|
|
|
namespace game {
|
|
|
|
constexpr int kDeviceDrawPrimitive = 25; // IDirect3DDevice7 vtable slots
|
|
constexpr int kDeviceSetTexture = 35;
|
|
constexpr DWORD kTriangleStrip = 5;
|
|
constexpr DWORD kFvfScreenColourTexture = 0x1c4; // XYZRHW | DIFFUSE | SPECULAR | TEX1
|
|
|
|
struct ScreenVertex {
|
|
float x, y, z, rhw;
|
|
uint32_t diffuse, specular;
|
|
float u, v;
|
|
};
|
|
|
|
// Fills (x0, y0)-(x1, y1) with the ARGB colour `color`.
|
|
inline void FillRect(void* device, float x0, float y0, float x1, float y1, uint32_t color) {
|
|
void** vtable = *static_cast<void***>(device);
|
|
using SetTextureFn = HRESULT(__stdcall*)(void*, DWORD, void*);
|
|
using DrawPrimitiveFn = HRESULT(__stdcall*)(void*, DWORD, DWORD, void*, DWORD, DWORD);
|
|
reinterpret_cast<SetTextureFn>(vtable[kDeviceSetTexture])(device, 0, nullptr);
|
|
ScreenVertex quad[4] = {{x0, y0, 0, 1, color, 0, 0, 0},
|
|
{x1, y0, 0, 1, color, 0, 1, 0},
|
|
{x0, y1, 0, 1, color, 0, 0, 1},
|
|
{x1, y1, 0, 1, color, 0, 1, 1}};
|
|
reinterpret_cast<DrawPrimitiveFn>(vtable[kDeviceDrawPrimitive])(device, kTriangleStrip, kFvfScreenColourTexture,
|
|
quad, 4, 0);
|
|
}
|
|
|
|
} // namespace game
|