forked from Ports/goldeneye-pc-port
D335: native widescreen, HUD + front end (Option B Phase 3)
HUD elements now keep 4:3 proportions via fast3d's EXT aspect modes (the PD pattern): watch, gauge bars, messages/title card, upper text and countdown CENTER; ammo RIGHT (right hand) / LEFT (left hand). The front end is pillarboxed (whole menu_jump_constructor_handler CENTER) and the menu pointer is mapped into the pillarbox. port/include/hudaspect.h emits only when native widescreen is on and the window is wider than 4:3, so 4:3 and native-off stay byte-identical. Rule-2 approved. Verified with 16:9/21:9 captures (HUD, watch, title card, legal, file select, gun barrel); golden 3/3; Win + Linux builds. Gun-barrel circle leaks into the bars while sliding in -> GRAPHICS-BACKLOG D335a.
This commit is contained in:
1 parent
d5d9a36a6f
commit
f62bceaf88
8 files changed
+144
No files matched your search
@@ -1052,6 +1052,18 @@ unsigned inputComputePad(int idx, signed char *stick_x, signed char *stick_y)
|
||||
}
|
||||
if (mx != lastMenuMouseX || my != lastMenuMouseY) {
|
||||
double fx = (double)mx / (double)ww;
|
||||
/* D335: under native widescreen the front end is
|
||||
* pillarboxed to a centred 4:3 region
|
||||
* (front.c menu_jump_constructor_handler), so map
|
||||
* the pointer across that region, not the window. */
|
||||
{
|
||||
extern f32 portNativeAspect(void);
|
||||
f32 na = portNativeAspect();
|
||||
if (na > (4.0f / 3.0f)) {
|
||||
double vis = (4.0 / 3.0) / (double)na; /* visible width fraction */
|
||||
fx = (fx - (1.0 - vis) * 0.5) / vis;
|
||||
}
|
||||
}
|
||||
double fy = (double)my / (double)wh;
|
||||
if (fx < 0.0) fx = 0.0; else if (fx > 1.0) fx = 1.0;
|
||||
if (fy < 0.0) fy = 0.0; else if (fy > 1.0) fy = 1.0;
|
||||
|
||||
Reference in new issue
Block a user