Ghostdog's UI mod sets a transparent background for some in-game menu screens ( which looks awesome! )
However, the game suspends drawing of the background when the menu is open because it doesn't expect any of the background to be visible...
So if the background isn't being drawn then we get artifacts related to double buffering...
Here is a patch to bring the background back to life while the Inventory menu is open.
4CD1v1 File OFfset: 0x00220F4F Patch: FF 71 04 89 C8 83 C0 30 50 6A 00 6A 03 50 E8 46 5F 1B 00 59 E8 D1 82 ED FF 89 C1 E8 1F 74 ED FF A1 1C E8 96 00 8B 88 06 35 00 00 E8 BC 40 FA FF 59 E8 F5 8D ED FF 59 8B 01 FF 90 9C 00 00 00 C3 90 90
so all the other menus still need to be done...
eip: 8248C2 calls to
620F4F - draw inv screen
6426AA - draw map screen
6871D6 - draw mage spell book
6624ED - draw priest scroll
5EC10B - draw stat screen
7D3F72 - draw not paused / pause spacebar / pause wheel
a reference implementation of the inventory patch:
push ebp mov ebp,ecx // preserve this mov ecx,ebp CALL 007D6EA8 // draw area // sub_007D6EA8 is called as a chessy way to call sub_00485B1C which draws the area... // there is not room here to load up the args for sub_00485B1C // sub_007D6EA8 AFAIK normally controls the scrolling during a cut-scene // the background is drawing every frame,but the inv menu doesn't draw every frame... ohs noes. // so redraw the inv menu every frame. mov ecx,ebp push 3 add ecx, 0x30 call 004F9239 // just a helper to get a pointer from the labyrinth ? mov ecx,eax push 0 call 004F838E // invalidate rect ? // // now do the original sub_00620F4F code... // MOV EAX,DWORD PTR DS:[0x96E81C] MOV ECX,DWORD PTR DS:[EAX+0x3506] CALL 005C503B // ? as per original // mov ecx,ebp ADD ECX,0x30 CALL 004F9D7A // draw windows // mov ecx,[ebp + 4] MOV EAX,DWORD PTR DS:[ECX] CALL DWORD PTR DS:[EAX+0x9C] // ToScreen pop ebp RETN