ref: 0b803cef636de5ad0c273843135e1dd8d17d8d2d
parent: 96e3baf08dd5c704a607eab36cf62a50f386a9a6
author: Jonathan Dowland <[email protected]>
date: Wed Sep 2 04:32:47 EDT 2015
Minor changes (mostly) comments around diskicon
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -971,30 +971,8 @@
return result;
}
-static void UpdateRect(int x1, int y1, int x2, int y2)
-{
- int x1_scaled, x2_scaled, y1_scaled, y2_scaled;
+static int readtic = 0;
- // Do stretching and blitting
-
- if (BlitArea(x1, y1, x2, y2))
- {
- // Update the area
-
- x1_scaled = (x1 * screen_mode->width) / SCREENWIDTH;
- y1_scaled = (y1 * screen_mode->height) / SCREENHEIGHT;
- x2_scaled = (x2 * screen_mode->width) / SCREENWIDTH;
- y2_scaled = (y2 * screen_mode->height) / SCREENHEIGHT;
-
- SDL_UpdateRect(screen,
- x1_scaled, y1_scaled,
- x2_scaled - x1_scaled,
- y2_scaled - y1_scaled);
- }
-}
-
-static int readtic;
-
void I_BeginRead(void)
{
byte *screenloc = I_VideoBuffer
@@ -1005,10 +983,9 @@
if (!initialized || disk_image == NULL)
return;
- // save background and copy the disk image in
-
for (y=0; y<LOADING_DISK_H; ++y)
{
+ // save background if the disk isn't already drawn
if (!readtic)
{
memcpy(saved_background + y * LOADING_DISK_W,
@@ -1015,6 +992,8 @@
screenloc,
LOADING_DISK_W);
}
+
+ // copy the disk image in
memcpy(screenloc,
disk_image + y * LOADING_DISK_W,
LOADING_DISK_W);
@@ -1032,10 +1011,10 @@
+ (SCREENWIDTH - LOADING_DISK_W);
int y;
- if (!initialized || disk_image == NULL)
+ if (!initialized || saved_background == NULL)
return;
- // save background and copy the disk image in
+ // restore background from beneath disk indicator
for (y=0; y<LOADING_DISK_H; ++y)
{