mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
Expose visible widescreen reveal separately from culling guards
This commit is contained in:
@@ -261,6 +261,9 @@ void psx_ws_sprite_tag(struct CPUState* cpu);
|
||||
* by this; 0 when native-wide is inactive). */
|
||||
int ws_native_wide_active(void);
|
||||
int ws_nw_extra(void);
|
||||
/* Configured per-side reveal, excluding the world-culling safety envelope.
|
||||
* Available before scene classification so first-frame overlays can fit. */
|
||||
int gpu_ws_configured_x_reveal(void);
|
||||
int ws_nw_present_width(void);
|
||||
/* Display width (native px) the native-wide margins are derived from. */
|
||||
int gpu_ws_display_width(void);
|
||||
|
||||
@@ -106,8 +106,11 @@ uint32_t psx_mod_alloc_gpu_dma_memory(uint32_t size, uint32_t alignment);
|
||||
*/
|
||||
int psx_mod_set_main_ram_8mb(int enabled);
|
||||
|
||||
/* Current per-side widescreen reveal in native game pixels (zero at 4:3). */
|
||||
/* World-culling envelope in native game pixels, including safety guards. */
|
||||
int32_t psx_mod_widescreen_x_margin(void);
|
||||
/* Configured per-side visible reveal, excluding culling guards; zero at 4:3.
|
||||
* Use for screen-space layout, including the first frame of a new scene. */
|
||||
int32_t psx_mod_widescreen_view_x_margin(void);
|
||||
|
||||
/* Mark a guest GPU packet (P_TAG address) as persistent screen-space HUD.
|
||||
* edge = -1 left, +1 right, 0 clears a reused packet's tag. The native-wide
|
||||
|
||||
@@ -548,6 +548,7 @@ static int ws_nw_offset(void) {
|
||||
if (!ws_native_wide_active()) return 0;
|
||||
return ws_nw_configured_offset();
|
||||
}
|
||||
int gpu_ws_configured_x_reveal(void) { return ws_nw_configured_offset(); }
|
||||
int ws_nw_extra(void) { return 2 * ws_nw_offset(); }
|
||||
|
||||
static uint32_t ws_view_camera_addr, ws_view_min_addr, ws_view_max_addr, ws_view_active_addr;
|
||||
|
||||
@@ -1526,6 +1526,9 @@ extern "C" uint32_t psx_mod_alloc_gpu_dma_memory(uint32_t size,
|
||||
extern "C" int32_t psx_mod_widescreen_x_margin(void) {
|
||||
return (int32_t)psx_ws_x_margin();
|
||||
}
|
||||
extern "C" int32_t psx_mod_widescreen_view_x_margin(void) {
|
||||
return (int32_t)gpu_ws_configured_x_reveal();
|
||||
}
|
||||
|
||||
extern "C" void psx_mod_tag_hud_primitive(uint32_t primitive, int edge) {
|
||||
gpu_ws_tag_hud_primitive(primitive, edge);
|
||||
|
||||
Reference in New Issue
Block a user