MCPcopy Create free account
hub / github.com/diasurgical/devilution / scrollrt_draw_cursor_back_buffer

Function scrollrt_draw_cursor_back_buffer

Source/scrollrt.cpp:99–126  ·  view source on GitHub ↗

* @brief Remove the cursor from the back buffer */

Source from the content-addressed store, hash-verified

97 * @brief Remove the cursor from the back buffer
98 */
99static void scrollrt_draw_cursor_back_buffer()
100{
101 int i;
102 BYTE *src, *dst;
103
104 if (sgdwCursWdt == 0) {
105 return;
106 }
107
108 assert(gpBuffer);
109 src = sgSaveBack;
110 dst = &gpBuffer[SCREENXY(sgdwCursX, sgdwCursY)];
111 i = sgdwCursHgt;
112
113 if (sgdwCursHgt != 0) {
114 while (i--) {
115 memcpy(dst, src, sgdwCursWdt);
116 src += sgdwCursWdt;
117 dst += BUFFER_WIDTH;
118 }
119 }
120
121 sgdwCursXOld = sgdwCursX;
122 sgdwCursYOld = sgdwCursY;
123 sgdwCursWdtOld = sgdwCursWdt;
124 sgdwCursHgtOld = sgdwCursHgt;
125 sgdwCursWdt = 0;
126}
127
128/**
129 * @brief Draw the cursor on the back buffer

Callers 2

DrawAndBlitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected