From c33ca3a6edecd47ffd089dff7dc971d760854928 Mon Sep 17 00:00:00 2001 From: galaxyhaxz Date: Thu, 14 Jun 2018 02:06:39 -0500 Subject: [PATCH] Update scrollrt.cpp --- Source/scrollrt.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/scrollrt.cpp b/Source/scrollrt.cpp index c190f23..778cb2c 100644 --- a/Source/scrollrt.cpp +++ b/Source/scrollrt.cpp @@ -3177,9 +3177,9 @@ void __fastcall DrawMain(int dwHgt, int draw_desc, int draw_hp, int draw_mana, i a4 = dwHgt; if ( window_activated && lpDDSPrimary ) { - if ( IDirectDrawSurface_IsLost(lpDDSPrimary) == DDERR_SURFACELOST ) + if ( lpDDSPrimary->IsLost() == DDERR_SURFACELOST ) { - if ( IDirectDrawSurface_Restore(lpDDSPrimary) ) + if ( lpDDSPrimary->Restore() ) return; ResetPal(); a4 = 480; @@ -3192,7 +3192,7 @@ LABEL_8: while ( 1 ) { DDS_desc.dwSize = 108; - v8 = IDirectDrawSurface_Lock(lpDDSPrimary, NULL, &DDS_desc, DDLOCK_WRITEONLY|DDLOCK_WAIT, NULL); + v8 = lpDDSPrimary->Lock(NULL, &DDS_desc, DDLOCK_WRITEONLY|DDLOCK_WAIT, NULL); if ( !v8 ) break; if ( v7 - GetTickCount() > 5000 ) @@ -3251,7 +3251,7 @@ LABEL_17: } if ( !lpDDSBackBuf ) { - v9 = IDirectDrawSurface_Unlock(lpDDSPrimary, NULL); + v9 = lpDDSPrimary->Unlock(NULL); if ( v9 != DDERR_SURFACELOST ) { if ( v9 ) @@ -3288,10 +3288,10 @@ void __cdecl DrawFPS() if ( framerate > 99 ) framerate = 99; wsprintfA(String, "%2d", framerate); - if ( !IDirectDrawSurface_GetDC(lpDDSPrimary, &hdc) ) + if ( !lpDDSPrimary->GetDC(&hdc) ) { TextOutA(hdc, 0, 400, String, strlen(String)); - IDirectDrawSurface_ReleaseDC(lpDDSPrimary, hdc); + lpDDSPrimary->ReleaseDC(hdc); } } } @@ -3326,7 +3326,7 @@ void __fastcall DoBlitScreen(int dwX, int dwY, int dwWdt, int dwHgt) a4 = GetTickCount(); while ( 1 ) { - error_code = IDirectDrawSurface_BltFast(lpDDSPrimary, v5, v4, lpDDSBackBuf, &Rect, DDBLTFAST_WAIT); + error_code = lpDDSPrimary->BltFast(v5, v4, lpDDSBackBuf, &Rect, DDBLTFAST_WAIT); if ( !error_code ) break; if ( a4 - GetTickCount() <= 5000 )