You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using software mode, if a GUI is Visible, but positioned with Y in excess of the screen height, the bottom of the screen will produce a black line. You can move the mouse over the line to view a small part of the line.
AGS Version
3.6.0.38
Game
Create a new game using the Sierra Template, and in the Project Explorer, select the gStatusline GUI, and in properties, set it's Y position to 201 or bigger. In default setup, chose the Software Renderer. Alternatively, download the project below. SoftwareRendererBug.zip
To Reproduce
Steps to reproduce the behavior:
Move the mouse to the bottom of the screen, and notice a black line there
Where the mouse goes over, the black line is removed
Expected behavior
There should be no line at the bottom
The text was updated successfully, but these errors were encountered:
ericoporto
changed the title
Software renderer on screen border line renders weird with GUI out of screen
Software renderer renders bottom blac line when a GUI is out of screen
Dec 10, 2022
ericoporto
changed the title
Software renderer renders bottom blac line when a GUI is out of screen
Software renderer renders bottom line when a GUI is out of screen
Dec 10, 2022
Basically, we get to a condition where the rect is not in the viewport (it's outside of the screen), but it's not over the black border either. But it then it gets on the screen because of the clamping.
The below appears to fix, but I am not sure if it causes new problems - could not find any so far.
diff --git a/Engine/ac/draw_software.cpp b/Engine/ac/draw_software.cpp
index e1469aae1..947900859 100644
--- a/Engine/ac/draw_software.cpp+++ b/Engine/ac/draw_software.cpp@@ -256,6 +256,13 @@ void invalidate_all_camera_rects(int view_index)
RoomCamRects[view_index].NumDirtyRegions = WHOLESCREENDIRTY;
}
+void swap_pos(int &a, int &b)+{+ int tmp = a;+ a = b;+ b = tmp;+}+
void invalidate_rect_on_surf(int x1, int y1, int x2, int y2, DirtyRects &rects)
{
if (rects.DirtyRows.size() == 0)
@@ -266,9 +273,15 @@ void invalidate_rect_on_surf(int x1, int y1, int x2, int y2, DirtyRects &rects)
return;
}
+ if(x1 > x2) swap_pos(x1, x2);+ if(y1 > y2) swap_pos(y1, y2);+
int a;
const Size &surfsz = rects.SurfaceSize;
++ if(x1 >= surfsz.Width || y1 >= surfsz.Height || x2 < 0 || y2 < 0) return;+
if (x1 >= surfsz.Width) x1 = surfsz.Width - 1;
if (y1 >= surfsz.Height) y1 = surfsz.Height - 1;
if (x2 >= surfsz.Width) x2 = surfsz.Width - 1;
Describe the bug
When using software mode, if a GUI is Visible, but positioned with Y in excess of the screen height, the bottom of the screen will produce a black line. You can move the mouse over the line to view a small part of the line.
AGS Version
3.6.0.38
Game
Create a new game using the Sierra Template, and in the Project Explorer, select the gStatusline GUI, and in properties, set it's Y position to 201 or bigger. In default setup, chose the Software Renderer. Alternatively, download the project below.
SoftwareRendererBug.zip
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should be no line at the bottom
Screenshots
Note the bottom line.
Desktop:
Additional context
Originally reported here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=60323.msg636651847#msg636651847
The text was updated successfully, but these errors were encountered: