* @brief Check render pipline and blit indivudal screen parts * @param dwHgt Section of screen to update from top to bottom * @param draw_desc Render info box * @param draw_hp Render halth bar * @param draw_mana Render mana bar * @param draw_sbar Render belt * @param draw_btn Render panel buttons */
| 1177 | * @param draw_btn Render panel buttons |
| 1178 | */ |
| 1179 | static void DrawMain(int dwHgt, BOOL draw_desc, BOOL draw_hp, BOOL draw_mana, BOOL draw_sbar, BOOL draw_btn) |
| 1180 | { |
| 1181 | int ysize; |
| 1182 | DWORD dwTicks; |
| 1183 | BOOL retry; |
| 1184 | |
| 1185 | ysize = dwHgt; |
| 1186 | |
| 1187 | if (!gbActive) { |
| 1188 | return; |
| 1189 | } |
| 1190 | |
| 1191 | assert(ysize >= 0 && ysize <= SCREEN_HEIGHT); |
| 1192 | |
| 1193 | if (ysize > 0) { |
| 1194 | DoBlitScreen(0, 0, SCREEN_WIDTH, ysize); |
| 1195 | } |
| 1196 | if (ysize < SCREEN_HEIGHT) { |
| 1197 | if (draw_sbar) { |
| 1198 | DoBlitScreen(PANEL_LEFT + 204, PANEL_TOP + 5, 232, 28); |
| 1199 | } |
| 1200 | if (draw_desc) { |
| 1201 | DoBlitScreen(PANEL_LEFT + 176, PANEL_TOP + 46, 288, 60); |
| 1202 | } |
| 1203 | if (draw_mana) { |
| 1204 | DoBlitScreen(PANEL_LEFT + 460, PANEL_TOP, 88, 72); |
| 1205 | DoBlitScreen(PANEL_LEFT + 564, PANEL_TOP + 64, 56, 56); |
| 1206 | } |
| 1207 | if (draw_hp) { |
| 1208 | DoBlitScreen(PANEL_LEFT + 96, PANEL_TOP, 88, 72); |
| 1209 | } |
| 1210 | if (draw_btn) { |
| 1211 | DoBlitScreen(PANEL_LEFT + 8, PANEL_TOP + 5, 72, 119); |
| 1212 | DoBlitScreen(PANEL_LEFT + 556, PANEL_TOP + 5, 72, 48); |
| 1213 | if (gbMaxPlayers > 1) { |
| 1214 | DoBlitScreen(PANEL_LEFT + 84, PANEL_TOP + 91, 36, 32); |
| 1215 | DoBlitScreen(PANEL_LEFT + 524, PANEL_TOP + 91, 36, 32); |
| 1216 | } |
| 1217 | } |
| 1218 | if (sgdwCursWdtOld != 0) { |
| 1219 | DoBlitScreen(sgdwCursXOld, sgdwCursYOld, sgdwCursWdtOld, sgdwCursHgtOld); |
| 1220 | } |
| 1221 | if (sgdwCursWdt != 0) { |
| 1222 | DoBlitScreen(sgdwCursX, sgdwCursY, sgdwCursWdt, sgdwCursHgt); |
| 1223 | } |
| 1224 | } |
| 1225 | } |
| 1226 | |
| 1227 | /** |
| 1228 | * @brief Redraw screen |
no test coverage detected