Map: zoomed-view symbols centred, 10x reveal and enemy range; progress screen on the menu background
- Megamap / TAB map zoomed view: heroes' markers and the other symbols (integer 200h centre immediates) follow the view's centre. - Map reveal: the hero's reveal stamp scaled 10x (mods/mapreveal.cpp, docs/map-reveal.md); creatures on the zoomed map shown within 10x the sight range. - Load / save progress screen drawn on the rock background across the full width, the picture blended over it (mods/loadingscreen.cpp); the classic 1024x768 frame is gone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3f03228c29
commit
b452558122
18 files changed
+435
-40
No files matched your search
+1
-11
@@ -56,14 +56,12 @@ struct Viewport {
|
||||
HWND window = nullptr;
|
||||
bool runInBackground = false;
|
||||
Layout full; // the whole back buffer
|
||||
Layout classic; // its top-left 1024x768 (menus, loading screen; widescreen mod)
|
||||
};
|
||||
|
||||
Viewport g_viewport;
|
||||
std::atomic<bool> g_classicShown = false; // which layout the last presented frame used
|
||||
|
||||
const Layout& CurrentLayout() {
|
||||
return g_classicShown ? g_viewport.classic : g_viewport.full;
|
||||
return g_viewport.full;
|
||||
}
|
||||
|
||||
bool Enabled() {
|
||||
@@ -116,10 +114,8 @@ void ApplyBorderless(game::DxDriver7* driver) {
|
||||
viewport.window = window;
|
||||
viewport.runInBackground = re::ConfigInt("borderless", "RunInBackground", 1) != 0;
|
||||
viewport.full = makeLayout(driver->mode.width, driver->mode.height);
|
||||
viewport.classic = makeLayout(std::min<int>(driver->mode.width, 1024), std::min<int>(driver->mode.height, 768));
|
||||
viewport.active = true;
|
||||
g_viewport = viewport;
|
||||
g_classicShown = false;
|
||||
|
||||
// Paint the bars: the window class background brush is black.
|
||||
InvalidateRect(window, nullptr, TRUE);
|
||||
@@ -188,12 +184,6 @@ int __fastcall DxDriver7_Flip(DxDriver7* self, void* edx) {
|
||||
// The original computes the blit rectangles once, for a centred window of
|
||||
// exactly the game's size; override them on every present.
|
||||
if (g_viewport.active && self->window == g_viewport.window) {
|
||||
// Menus and the loading screen only fill the top-left 1024x768 of a
|
||||
// widened back buffer; show just that part, scaled like before.
|
||||
const bool classic = mods::widescreen::IsClassicFrame();
|
||||
if (g_classicShown.exchange(classic) != classic) {
|
||||
InvalidateRect(self->window, nullptr, TRUE); // repaint the bars for the new layout
|
||||
}
|
||||
const Layout& layout = CurrentLayout();
|
||||
self->blitSource = {0, 0, layout.gameWidth, layout.gameHeight};
|
||||
self->blitDest = layout.screen;
|
||||
|
||||
Reference in new issue
Block a user