|
|
|
|
@ -2615,11 +2615,7 @@ static void DoBlitScreen(DWORD dwX, DWORD dwY, DWORD dwWdt, DWORD dwHgt)
|
|
|
|
|
/// ASSERT: assert(! gpBuffer);
|
|
|
|
|
dwTicks = GetTickCount(); |
|
|
|
|
while (1) { |
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
hDDVal = lpDDSPrimary->BltFast(dwX, dwY, lpDDSBackBuf, &SrcRect, DDBLTFAST_WAIT); |
|
|
|
|
#else |
|
|
|
|
hDDVal = lpDDSPrimary->lpVtbl->BltFast(lpDDSPrimary, dwX, dwY, lpDDSBackBuf, &SrcRect, DDBLTFAST_WAIT); |
|
|
|
|
#endif |
|
|
|
|
if (hDDVal == DD_OK) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
@ -2716,17 +2712,10 @@ static void DrawMain(int dwHgt, BOOL draw_desc, BOOL draw_hp, BOOL draw_mana, BO
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
if (lpDDSPrimary->IsLost() == DDERR_SURFACELOST) { |
|
|
|
|
if (lpDDSPrimary->Restore() != DD_OK) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
#else |
|
|
|
|
if (lpDDSPrimary->lpVtbl->IsLost(lpDDSPrimary) == DDERR_SURFACELOST) { |
|
|
|
|
if (lpDDSPrimary->lpVtbl->Restore(lpDDSPrimary) != DD_OK) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
ResetPal(); |
|
|
|
|
ysize = SCREEN_HEIGHT; |
|
|
|
|
} |
|
|
|
|
@ -2736,11 +2725,7 @@ static void DrawMain(int dwHgt, BOOL draw_desc, BOOL draw_hp, BOOL draw_mana, BO
|
|
|
|
|
dwTicks = GetTickCount(); |
|
|
|
|
while (1) { |
|
|
|
|
DDS_desc.dwSize = sizeof(DDS_desc); |
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
hDDVal = lpDDSPrimary->Lock(NULL, &DDS_desc, DDLOCK_WRITEONLY | DDLOCK_WAIT, NULL); |
|
|
|
|
#else |
|
|
|
|
hDDVal = lpDDSPrimary->lpVtbl->Lock(lpDDSPrimary, NULL, &DDS_desc, DDLOCK_WRITEONLY | DDLOCK_WAIT, NULL); |
|
|
|
|
#endif |
|
|
|
|
if (hDDVal == DD_OK) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
@ -2807,11 +2792,7 @@ static void DrawMain(int dwHgt, BOOL draw_desc, BOOL draw_hp, BOOL draw_mana, BO
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (lpDDSBackBuf == NULL) { |
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
hDDVal = lpDDSPrimary->Unlock(NULL); |
|
|
|
|
#else |
|
|
|
|
hDDVal = lpDDSPrimary->lpVtbl->Unlock(lpDDSPrimary, NULL); |
|
|
|
|
#endif |
|
|
|
|
if (hDDVal != DDERR_SURFACELOST && hDDVal != DD_OK) { |
|
|
|
|
DDErrMsg(hDDVal, 3779, "C:\\Src\\Diablo\\Source\\SCROLLRT.CPP"); |
|
|
|
|
} |
|
|
|
|
|