59 uCommands, |
59 uCommands, |
60 uMobile |
60 uMobile |
61 ; |
61 ; |
62 |
62 |
63 var cWaveWidth, cWaveHeight: LongInt; |
63 var cWaveWidth, cWaveHeight: LongInt; |
64 AMSlotSize, AMxOffset, AMyOffset, AMShiftTarget, AMShift, SlotsNum: LongInt; |
64 AMxOffset, AMyOffset, AMShiftTarget, AMShift, SlotsNum: LongInt; |
65 tmpSurface: PSDL_Surface; |
65 tmpSurface: PSDL_Surface; |
66 fpsTexture: PTexture; |
66 fpsTexture: PTexture; |
67 timeTexture: PTexture; |
67 timeTexture: PTexture; |
68 FPS: Longword; |
68 FPS: Longword; |
69 CountTicks: Longword; |
69 CountTicks: Longword; |
187 |
187 |
188 InitCameraBorders(); |
188 InitCameraBorders(); |
189 uCursor.init(); |
189 uCursor.init(); |
190 prevPoint.X:= 0; |
190 prevPoint.X:= 0; |
191 prevPoint.Y:= cScreenHeight div 2; |
191 prevPoint.Y:= cScreenHeight div 2; |
192 WorldDx:= - (LAND_WIDTH div 2) + cScreenWidth div 2; |
192 WorldDx:= -(LAND_WIDTH div 2) + cScreenWidth div 2; |
193 WorldDy:= - (LAND_HEIGHT - (playHeight div 2)) + (cScreenHeight div 2); |
193 WorldDy:= -(LAND_HEIGHT - (playHeight div 2)) + (cScreenHeight div 2); |
194 // AMSlotSize is the active dimension of the ammo icon |
194 |
195 // AMWidth is the horizontal size of the whole ammomenu |
195 //aligns it to the bottom of the screen, minus the border |
196 // cMaxSlotIndex is the amount of weapons per row |
196 AMShiftTarget:= (cMaxSlotAmmoIndex + 2) * AMSlotSize + AMxOffset; |
197 AMSlotSize:= 33; |
197 AMShift:= AMShiftTarget; |
|
198 SkyOffset:= 0; |
|
199 HorizontOffset:= 0; |
|
200 |
198 {$IFDEF MOBILE} |
201 {$IFDEF MOBILE} |
|
202 AMxOffset:= 0; |
199 if isPhone() then |
203 if isPhone() then |
200 begin |
204 AMyOffset:= AMSlotSize |
201 AMxOffset:= -30 + cScreenHeight div 2; |
|
202 AMyOffset:= AMSlotSize; |
|
203 end |
|
204 else |
205 else |
205 begin |
|
206 AMxOffset:= 0; |
|
207 AMyOffset:= AMSlotSize * 2; |
206 AMyOffset:= AMSlotSize * 2; |
208 end; |
|
209 //aligns it to the bottom of the screen, minus the border |
|
210 AMShiftTarget:= ((cMaxSlotAmmoIndex + 2) * AMSlotSize) + AMyOffset; |
|
211 AMShift:= AMShiftTarget; |
|
212 {$ELSE} |
207 {$ELSE} |
213 AMxOffset:= 10; |
208 AMxOffset:= 10; |
214 AMyOffset:= 60; |
209 AMyOffset:= 60; |
215 AMShiftTarget:= (cMaxSlotAmmoIndex + 2) * AMSlotSize + AMxOffset; |
|
216 AMShift:= AMShiftTarget; |
|
217 {$ENDIF} |
210 {$ENDIF} |
218 SkyOffset:= 0; |
|
219 HorizontOffset:= 0; |
|
220 end; |
211 end; |
221 |
212 |
222 procedure InitCameraBorders; |
213 procedure InitCameraBorders; |
223 begin |
214 begin |
224 cGearScrEdgesDist:= min(2 * cScreenHeight div 5, 2 * cScreenWidth div 5); |
215 cGearScrEdgesDist:= min(2 * cScreenHeight div 5, 2 * cScreenWidth div 5); |