Options: tabs Allgemein / Beute / Tastenbelegung with key bindings
- 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>
This commit is contained in:
1 parent
72525cd5ba
commit
838b1aa491
27 files changed
+1423
-184
No files matched your search
+3
-25
@@ -30,6 +30,7 @@
|
||||
#include "game/engine/arts.h"
|
||||
#include "game/engine/objects.h"
|
||||
#include "game/engine/skills.h"
|
||||
#include "game/ui/draw.h"
|
||||
#include "game/ui/events.h"
|
||||
#include "game/ui/text.h"
|
||||
#include "mods/hud.h"
|
||||
@@ -182,37 +183,14 @@ void Revert(uint8_t* panel, uint8_t* arts, int row) {
|
||||
re::Log("respec: skill %x removed, %u to choose", skill, *reinterpret_cast<uint16_t*>(arts + kSkillChoices));
|
||||
}
|
||||
|
||||
// IDirect3DDevice7 as the UI's render methods get it (their vf14 argument).
|
||||
constexpr int kDeviceDrawPrimitive = 25;
|
||||
constexpr int kDeviceSetTexture = 35;
|
||||
constexpr DWORD kTriangleStrip = 5;
|
||||
constexpr DWORD kFvfScreenColourTexture = 0x1c4; // XYZRHW | DIFFUSE | SPECULAR | TEX1
|
||||
struct Vertex {
|
||||
float x, y, z, rhw;
|
||||
uint32_t diffuse, specular;
|
||||
float u, v;
|
||||
};
|
||||
|
||||
// Turns the + that `minus` drew into a −.
|
||||
void CoverArm(void* device, uint8_t* minus) {
|
||||
const game::UiRect rect = game::ControlScreenRect(minus);
|
||||
const float sx = rect.w / kIconSize;
|
||||
const float sy = rect.h / kIconSize;
|
||||
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);
|
||||
for (const Patch& patch : kArmPatches) {
|
||||
const float x0 = rect.x + patch.x0 * sx;
|
||||
const float x1 = rect.x + patch.x1 * sx;
|
||||
const float y0 = rect.y + patch.y0 * sy;
|
||||
const float y1 = rect.y + patch.y1 * sy;
|
||||
Vertex quad[4] = {{x0, y0, 0, 1, kDiscGrey, 0, 0, 0},
|
||||
{x1, y0, 0, 1, kDiscGrey, 0, 1, 0},
|
||||
{x0, y1, 0, 1, kDiscGrey, 0, 0, 1},
|
||||
{x1, y1, 0, 1, kDiscGrey, 0, 1, 1}};
|
||||
reinterpret_cast<DrawPrimitiveFn>(vtable[kDeviceDrawPrimitive])(device, kTriangleStrip,
|
||||
kFvfScreenColourTexture, quad, 4, 0);
|
||||
game::FillRect(device, rect.x + patch.x0 * sx, rect.y + patch.y0 * sy, rect.x + patch.x1 * sx,
|
||||
rect.y + patch.y1 * sy, kDiscGrey);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user