From 2acf715c23429846ef2f3a8e430ee72cd06e672e Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 8 May 2024 03:33:47 +0000 Subject: [PATCH] Skip 'H' in background files if XGR_HIDDEN_FON is set Background file `resource/actint/800x600/screens/b600.bmp` uses 'H' (72) to indicate background color. When background is rendered to 2D buffer, this "color" should be skipped to avoid shadowing default buffer which is used to render the map. --- lib/xgraph/xgraph.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/xgraph/xgraph.cpp b/lib/xgraph/xgraph.cpp index 9da17c04..1a20ab71 100644 --- a/lib/xgraph/xgraph.cpp +++ b/lib/xgraph/xgraph.cpp @@ -447,7 +447,9 @@ void XGR_Screen::putspr(int x,int y,int sx,int sy,void* p,int mode) for(i = 0; i < _sy; i ++){ for(j = 0; j < _sx; j ++){ if(memBuf[j]){ - scrBuf[j] = memBuf[j]; + if ((mode & XGR_HIDDEN_FON) == 0 || memBuf[j] != 'H') { + scrBuf[j] = memBuf[j]; + } } } scrBuf += yStrOffs;