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)
110 printf("::: Display.c: ScrollTo(): %d, %d\n", X, Y);
118 X = ScrollDelta * (X / ScrollDelta);
119 X = Max(X, ScrollMinX);
120 X = Min(X, ScrollMaxX);
121 Y = ScrollDelta * (Y / ScrollDelta);
122 Y = Max(Y, ScrollMinY);
123 Y = Min(Y, ScrollMaxY);
127 Stage.ScrollTo(X, Y);
130 void ScrollTowards(int X, int Y)
138 printf("::: 1 ---> %d, %d\n", X, Y);
143 X = ScrollDelta * (X / ScrollDelta);
144 X = Max(X, ScrollMinX);
145 X = Min(X, ScrollMaxX);
146 Y = ScrollDelta * (Y / ScrollDelta);
147 Y = Max(Y, ScrollMinY);
148 Y = Min(Y, ScrollMaxY);
153 printf("::: 2 ---> %d, %d\n", X, Y);
157 Stage.ScrollTowards(X, Y, 2 * Stretch * ZoomFactor);
159 Stage.ScrollTowards(X, Y, 2 * Stretch);
163 void SoftScrollTo(int X, int Y, long TimeMS, int FPS)
171 printf(":(: %d, %d [%d, %d - %d, %d] [%d]\n",
172 X, Y, ScrollMinX, ScrollMinY, ScrollMaxX, ScrollMaxY,
178 X = ScrollDelta * (X / ScrollDelta);
179 X = Max(X, ScrollMinX);
180 X = Min(X, ScrollMaxX);
181 Y = ScrollDelta * (Y / ScrollDelta);
182 Y = Max(Y, ScrollMinY);
183 Y = Min(Y, ScrollMaxY);
188 printf(":): %d, %d [%d, %d - %d, %d] [%d]\n",
189 X, Y, ScrollMinX, ScrollMinY, ScrollMaxX, ScrollMaxY,
193 Stage.SoftScrollTo(X, Y, TimeMS, FPS);