1 // ----------------------------------------------------------------------------
3 // ----------------------------------------------------------------------------
8 int ScreenScrollXPos, ScreenScrollYPos;
10 int ExplosionShake, ExplosionShakeMurphy;
11 boolean NoDisplayFlag;
13 int DisplayMinX, DisplayMaxX;
14 int DisplayMinY, DisplayMaxY;
17 void subDisplayLevel()
19 if (NoDisplayFlag || ! LevelLoaded)
25 void ScrollTo(int X, int Y)
30 X = ScrollDelta * (X / ScrollDelta);
31 X = Max(X, ScrollMinX);
32 X = Min(X, ScrollMaxX);
33 Y = ScrollDelta * (Y / ScrollDelta);
34 Y = Max(Y, ScrollMinY);
35 Y = Min(Y, ScrollMaxY);
37 DDScrollBuffer_ScrollTo(X, Y);
40 void ScrollTowards(int X, int Y)
45 X = ScrollDelta * (X / ScrollDelta);
46 X = Max(X, ScrollMinX);
47 X = Min(X, ScrollMaxX);
48 Y = ScrollDelta * (Y / ScrollDelta);
49 Y = Max(Y, ScrollMinY);
50 Y = Min(Y, ScrollMaxY);
52 DDScrollBuffer_ScrollTowards(X, Y, 2 * ZoomFactor);
55 void SoftScrollTo(int X, int Y, int TimeMS, int FPS)
60 X = ScrollDelta * (X / ScrollDelta);
61 X = Max(X, ScrollMinX);
62 X = Min(X, ScrollMaxX);
63 Y = ScrollDelta * (Y / ScrollDelta);
64 Y = Max(Y, ScrollMinY);
65 Y = Min(Y, ScrollMaxY);
67 DDScrollBuffer_SoftScrollTo(X, Y, TimeMS, FPS);