1 // ----------------------------------------------------------------------------
3 // ----------------------------------------------------------------------------
7 // static char *VB_Name = "modDisplay";
11 int ScreenScrollXPos, ScreenScrollYPos;
12 int ScreenPosition, data_h_Xtmp, data_h_Ytmp;
14 int ShowRedDiskCounter, ShowPanel;
16 boolean NoDisplayFlag;
18 long DisplayMinX, DisplayMaxX, DisplayWidth;
19 long DisplayMinY, DisplayMaxY, DisplayHeight;
22 int subDisplayInfotronsNeeded()
24 int subDisplayInfotronsNeeded;
27 return subDisplayInfotronsNeeded;
31 MainForm.lblInfoCount.Caption = InfotronsNeeded;
32 MainForm.lblInfoCount.Refresh;
36 return subDisplayInfotronsNeeded;
39 int subDisplayPlayingTime()
41 int subDisplayPlayingTime;
44 return subDisplayPlayingTime;
51 if (NoDisplayFlag || ! LevelLoaded)
52 return subDisplayLevel;
57 MainForm.DisplayLevel();
60 return subDisplayLevel;
63 void subDisplayPanel()
67 int subCheckRestoreRedDiskCountDisplay()
69 int subCheckRestoreRedDiskCountDisplay;
72 return subCheckRestoreRedDiskCountDisplay;
74 if (ShowRedDiskCounter == 0)
75 return subCheckRestoreRedDiskCountDisplay;
77 ShowRedDiskCounter = ShowRedDiskCounter - 1;
78 if (ShowRedDiskCounter == 0)
82 MainForm.lblRedDiskCount.Caption = 0;
83 MainForm.lblRedDiskCount.Refresh;
88 return subCheckRestoreRedDiskCountDisplay;
91 void subDisplayRedDiskCount()
98 MainForm.lblRedDiskCount.Caption = RedDiskCount;
99 MainForm.lblRedDiskCount.Refresh;
102 ShowRedDiskCounter = 0x46;
105 void ScrollTo(int X, int Y)
114 X = ScrollDelta * (X / ScrollDelta);
115 X = Max(X, ScrollMinX);
116 X = Min(X, ScrollMaxX);
117 Y = ScrollDelta * (Y / ScrollDelta);
118 Y = Max(Y, ScrollMinY);
119 Y = Min(Y, ScrollMaxY);
124 DDScrollBuffer_ScrollTo(X, Y);
126 Stage.ScrollTo(X, Y);
130 void ScrollTowards(int X, int Y)
139 X = ScrollDelta * (X / ScrollDelta);
140 X = Max(X, ScrollMinX);
141 X = Min(X, ScrollMaxX);
142 Y = ScrollDelta * (Y / ScrollDelta);
143 Y = Max(Y, ScrollMinY);
144 Y = Min(Y, ScrollMaxY);
149 DDScrollBuffer_ScrollTowards(X, Y, 2 * Stretch);
151 Stage.ScrollTowards(X, Y, 2 * Stretch);
155 void SoftScrollTo(int X, int Y, long TimeMS, int FPS)
160 printf("::: 1: X,Y == %d, %d (1)\n", X, Y);
168 X = ScrollDelta * (X / ScrollDelta);
169 X = Max(X, ScrollMinX);
170 X = Min(X, ScrollMaxX);
171 Y = ScrollDelta * (Y / ScrollDelta);
172 Y = Max(Y, ScrollMinY);
173 Y = Min(Y, ScrollMaxY);
178 printf("::: 2: X,Y == %d, %d\n", X, Y);
182 DDScrollBuffer_SoftScrollTo(X, Y, TimeMS, FPS);
184 Stage.SoftScrollTo(X, Y, TimeMS, FPS);