X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame_sp%2FDisplay.c;h=ac2ed31a5de35d764903f099b21b6d5336269052;hp=ea36612fb302949ecf2bf80828ea1468c1bbefab;hb=115ce6f2da1914d68b0fe0e5f9082973190dacdd;hpb=fe656a41b406b06d9dc5b93d01191d52b1da3b4d diff --git a/src/game_sp/Display.c b/src/game_sp/Display.c index ea36612f..ac2ed31a 100644 --- a/src/game_sp/Display.c +++ b/src/game_sp/Display.c @@ -4,183 +4,65 @@ #include "Display.h" -// static char *VB_Name = "modDisplay"; - -// --- Option Explicit int ScreenScrollXPos, ScreenScrollYPos; -int ScreenPosition, data_h_Xtmp, data_h_Ytmp; -int ShowRedDiskCounter, ShowPanel; -int ExplosionShake; +int ExplosionShake, ExplosionShakeMurphy; boolean NoDisplayFlag; -long DisplayMinX, DisplayMaxX, DisplayWidth; -long DisplayMinY, DisplayMaxY, DisplayHeight; - - -int subDisplayInfotronsNeeded() -{ - int subDisplayInfotronsNeeded; - - if (NoDisplayFlag) - return subDisplayInfotronsNeeded; - - { -#if 0 - MainForm.lblInfoCount.Caption = InfotronsNeeded; - MainForm.lblInfoCount.Refresh; -#endif - } - - return subDisplayInfotronsNeeded; -} - -int subDisplayPlayingTime() -{ - int subDisplayPlayingTime; +int DisplayMinX, DisplayMaxX; +int DisplayMinY, DisplayMaxY; - return subDisplayPlayingTime; -} - -int subDisplayLevel() +void subDisplayLevel(void) { - int subDisplayLevel; - if (NoDisplayFlag || ! LevelLoaded) - return subDisplayLevel; - -#if 1 - DisplayLevel(); -#else - MainForm.DisplayLevel(); -#endif - - return subDisplayLevel; -} - -void subDisplayPanel() -{ -} - -int subCheckRestoreRedDiskCountDisplay() -{ - int subCheckRestoreRedDiskCountDisplay; - - if (NoDisplayFlag) - return subCheckRestoreRedDiskCountDisplay; - - if (ShowRedDiskCounter == 0) - return subCheckRestoreRedDiskCountDisplay; - - ShowRedDiskCounter = ShowRedDiskCounter - 1; - if (ShowRedDiskCounter == 0) - { - { -#if 0 - MainForm.lblRedDiskCount.Caption = 0; - MainForm.lblRedDiskCount.Refresh; -#endif - } - } - - return subCheckRestoreRedDiskCountDisplay; -} - -void subDisplayRedDiskCount() -{ - if (NoDisplayFlag) return; - { -#if 0 - MainForm.lblRedDiskCount.Caption = RedDiskCount; - MainForm.lblRedDiskCount.Refresh; -#endif - } - ShowRedDiskCounter = 0x46; + DisplayLevel(); } void ScrollTo(int X, int Y) { - long oldX, oldY; - if (NoDisplayFlag) return; - oldX = ScrollX; - oldY = ScrollY; X = ScrollDelta * (X / ScrollDelta); X = Max(X, ScrollMinX); X = Min(X, ScrollMaxX); Y = ScrollDelta * (Y / ScrollDelta); Y = Max(Y, ScrollMinY); Y = Min(Y, ScrollMaxY); - // ScrollX = X - // ScrollY = Y -#if 1 DDScrollBuffer_ScrollTo(X, Y); -#else - Stage.ScrollTo(X, Y); -#endif } void ScrollTowards(int X, int Y) { - long oldX, oldY; - if (NoDisplayFlag) return; - oldX = ScrollX; - oldY = ScrollY; X = ScrollDelta * (X / ScrollDelta); X = Max(X, ScrollMinX); X = Min(X, ScrollMaxX); Y = ScrollDelta * (Y / ScrollDelta); Y = Max(Y, ScrollMinY); Y = Min(Y, ScrollMaxY); - // ScrollX = X - // ScrollY = Y - -#if 1 - DDScrollBuffer_ScrollTowards(X, Y, 2 * Stretch); -#else - Stage.ScrollTowards(X, Y, 2 * Stretch); -#endif + + DDScrollBuffer_ScrollTowards(X, Y, 2 * ZoomFactor); } -void SoftScrollTo(int X, int Y, long TimeMS, int FPS) +void SoftScrollTo(int X, int Y, int TimeMS, int FPS) { - long oldX, oldY; - -#if 1 - printf("::: 1: X,Y == %d, %d (1)\n", X, Y); -#endif - if (NoDisplayFlag) return; - oldX = ScrollX; - oldY = ScrollY; X = ScrollDelta * (X / ScrollDelta); X = Max(X, ScrollMinX); X = Min(X, ScrollMaxX); Y = ScrollDelta * (Y / ScrollDelta); Y = Max(Y, ScrollMinY); Y = Min(Y, ScrollMaxY); - // ScrollX = X - // ScrollY = Y - -#if 1 - printf("::: 2: X,Y == %d, %d\n", X, Y); -#endif -#if 1 DDScrollBuffer_SoftScrollTo(X, Y, TimeMS, FPS); -#else - Stage.SoftScrollTo(X, Y, TimeMS, FPS); -#endif }