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);
123 Stage.ScrollTo(X, Y);
126 void ScrollTowards(int X, int Y)
135 X = ScrollDelta * (X / ScrollDelta);
136 X = Max(X, ScrollMinX);
137 X = Min(X, ScrollMaxX);
138 Y = ScrollDelta * (Y / ScrollDelta);
139 Y = Max(Y, ScrollMinY);
140 Y = Min(Y, ScrollMaxY);
144 Stage.ScrollTowards(X, Y, 2 * Stretch);
147 void SoftScrollTo(int X, int Y, long TimeMS, int FPS)
152 printf("::: 1: Display.c: SoftScrollTo: X,Y == %d, %d\n", X, Y);
153 printf("::: %d, %d, %d, %d [%ld]\n",
154 ScrollMinX, ScrollMaxX,
155 ScrollMinY, ScrollMaxY,
164 X = ScrollDelta * (X / ScrollDelta);
165 X = Max(X, ScrollMinX);
166 X = Min(X, ScrollMaxX);
167 Y = ScrollDelta * (Y / ScrollDelta);
168 Y = Max(Y, ScrollMinY);
169 Y = Min(Y, ScrollMaxY);
174 printf("::: 2: Display.c: SoftScrollTo: X,Y == %d, %d\n", X, Y);
177 Stage.SoftScrollTo(X, Y, TimeMS, FPS);