equal
deleted
inserted
replaced
178 prevPoint.X:= 0; |
178 prevPoint.X:= 0; |
179 prevPoint.Y:= cScreenHeight div 2; |
179 prevPoint.Y:= cScreenHeight div 2; |
180 WorldDx:= - (LAND_WIDTH div 2) + cScreenWidth div 2; |
180 WorldDx:= - (LAND_WIDTH div 2) + cScreenWidth div 2; |
181 WorldDy:= - (LAND_HEIGHT - (playHeight div 2)) + (cScreenHeight div 2); |
181 WorldDy:= - (LAND_HEIGHT - (playHeight div 2)) + (cScreenHeight div 2); |
182 AMSlotSize:= 33; |
182 AMSlotSize:= 33; |
183 {$IFDEF IPHONEOS} |
183 {$IFDEF MOBILE} |
184 AMxOffset:= 10; |
184 AMxOffset:= 10; |
185 AMyOffset:= 10 + 123; // moved downwards |
185 AMyOffset:= 10 + 123; // moved downwards |
186 AMWidth:= (cMaxSlotAmmoIndex + 1) * AMSlotSize + AMxOffset; |
186 AMWidth:= (cMaxSlotAmmoIndex + 1) * AMSlotSize + AMxOffset; |
187 {$ELSE} |
187 {$ELSE} |
188 AMxOffset:= 10; |
188 AMxOffset:= 10; |
243 exit |
243 exit |
244 end; |
244 end; |
245 SlotsNum:= 0; |
245 SlotsNum:= 0; |
246 x:= (cScreenWidth shr 1) - AMWidth + AMxShift; |
246 x:= (cScreenWidth shr 1) - AMWidth + AMxShift; |
247 |
247 |
248 {$IFDEF IPHONEOS} |
248 {$IFDEF MOBILE} |
249 Slot:= cMaxSlotIndex; |
249 Slot:= cMaxSlotIndex; |
250 x:= x - cOffsetY; |
250 x:= x - cOffsetY; |
251 y:= AMyOffset; |
251 y:= AMyOffset; |
252 dec(y, BORDERSIZE); |
252 dec(y, BORDERSIZE); |
253 DrawSprite(sprAMCorners, x - BORDERSIZE, y, 0); |
253 DrawSprite(sprAMCorners, x - BORDERSIZE, y, 0); |
367 begin |
367 begin |
368 amSel:= Ammo^[Slot, Pos].AmmoType; |
368 amSel:= Ammo^[Slot, Pos].AmmoType; |
369 RenderWeaponTooltip(amSel) |
369 RenderWeaponTooltip(amSel) |
370 end; |
370 end; |
371 |
371 |
372 {$IFDEF IPHONEOS} |
372 {$IFDEF MOBILE} |
373 DrawTexture(cScreenWidth div 2 - (AMWidth - 10) + AMxShift, AMyOffset - 25, Ammoz[Ammo^[Slot, Pos].AmmoType].NameTex); |
373 DrawTexture(cScreenWidth div 2 - (AMWidth - 10) + AMxShift, AMyOffset - 25, Ammoz[Ammo^[Slot, Pos].AmmoType].NameTex); |
374 |
374 |
375 if Ammo^[Slot, Pos].Count < AMMO_INFINITE then |
375 if Ammo^[Slot, Pos].Count < AMMO_INFINITE then |
376 DrawTexture(cScreenWidth div 2 + AMxOffset - 45, AMyOffset - 25, CountTexz[Ammo^[Slot, Pos].Count]); |
376 DrawTexture(cScreenWidth div 2 + AMxOffset - 45, AMyOffset - 25, CountTexz[Ammo^[Slot, Pos].Count]); |
377 {$ELSE} |
377 {$ELSE} |
391 end |
391 end |
392 end |
392 end |
393 else |
393 else |
394 FreeWeaponTooltip; |
394 FreeWeaponTooltip; |
395 if (WeaponTooltipTex <> nil) and (AMxShift = 0) then |
395 if (WeaponTooltipTex <> nil) and (AMxShift = 0) then |
396 {$IFDEF IPHONEOS} |
396 {$IFDEF MOBILE} |
397 ShowWeaponTooltip(x - WeaponTooltipTex^.w - 3, AMyOffset - 1); |
397 ShowWeaponTooltip(x - WeaponTooltipTex^.w - 3, AMyOffset - 1); |
398 {$ELSE} |
398 {$ELSE} |
399 ShowWeaponTooltip(x - WeaponTooltipTex^.w - 3, Min(y + 1, cScreenHeight - WeaponTooltipTex^.h - 40)); |
399 ShowWeaponTooltip(x - WeaponTooltipTex^.w - 3, Min(y + 1, cScreenHeight - WeaponTooltipTex^.h - 40)); |
400 {$ENDIF} |
400 {$ENDIF} |
401 |
401 |
875 |
875 |
876 // this scale is used to keep the various widgets at the same dimension at all zoom levels |
876 // this scale is used to keep the various widgets at the same dimension at all zoom levels |
877 SetScale(cDefaultZoomLevel); |
877 SetScale(cDefaultZoomLevel); |
878 |
878 |
879 // Turn time |
879 // Turn time |
880 {$IFDEF IPHONEOS} |
880 {$IFDEF MOBILE} |
881 offsetX:= cScreenHeight - 13; |
881 offsetX:= cScreenHeight - 13; |
882 {$ELSE} |
882 {$ELSE} |
883 offsetX:= 48; |
883 offsetX:= 48; |
884 {$ENDIF} |
884 {$ENDIF} |
885 offsetY:= cOffsetY; |
885 offsetY:= cOffsetY; |
964 |
964 |
965 // Lag alert |
965 // Lag alert |
966 if isInLag then DrawSprite(sprLag, 32 - (cScreenWidth shr 1), 32, (RealTicks shr 7) mod 12); |
966 if isInLag then DrawSprite(sprLag, 32 - (cScreenWidth shr 1), 32, (RealTicks shr 7) mod 12); |
967 |
967 |
968 // Wind bar |
968 // Wind bar |
969 {$IFDEF IPHONEOS} |
969 {$IFDEF MOBILE} |
970 offsetX:= cScreenHeight - 13; |
970 offsetX:= cScreenHeight - 13; |
971 offsetY:= (cScreenWidth shr 1) + 74; |
971 offsetY:= (cScreenWidth shr 1) + 74; |
972 {$ELSE} |
972 {$ELSE} |
973 offsetX:= 30; |
973 offsetX:= 30; |
974 offsetY:= 180; |
974 offsetY:= 180; |
1016 if missionTex <> nil then |
1016 if missionTex <> nil then |
1017 DrawCentered(0, Min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex); |
1017 DrawCentered(0, Min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex); |
1018 end; |
1018 end; |
1019 |
1019 |
1020 // fps |
1020 // fps |
1021 {$IFDEF IPHONEOS} |
1021 {$IFDEF MOBILE} |
1022 offsetX:= 8; |
1022 offsetX:= 8; |
1023 {$ELSE} |
1023 {$ELSE} |
1024 offsetX:= 10; |
1024 offsetX:= 10; |
1025 {$ENDIF} |
1025 {$ENDIF} |
1026 offsetY:= cOffsetY; |
1026 offsetY:= cOffsetY; |
1157 |
1157 |
1158 procedure MoveCamera; |
1158 procedure MoveCamera; |
1159 var EdgesDist, wdy, shs: LongInt; |
1159 var EdgesDist, wdy, shs: LongInt; |
1160 PrevSentPointTime: LongWord = 0; |
1160 PrevSentPointTime: LongWord = 0; |
1161 begin |
1161 begin |
1162 {$IFNDEF IPHONEOS} |
1162 {$IFNDEF IPHONE} |
1163 if (not (CurrentTeam^.ExtDriven and isCursorVisible and not bShowAmmoMenu)) and cHasFocus then |
1163 if (not (CurrentTeam^.ExtDriven and isCursorVisible and not bShowAmmoMenu)) and cHasFocus then |
1164 uCursor.updatePosition(); |
1164 uCursor.updatePosition(); |
1165 {$ENDIF} |
1165 {$ENDIF} |
1166 |
1166 |
1167 if (not PlacingHogs) and (FollowGear <> nil) and (not isCursorVisible) and (not fastUntilLag) then |
1167 if (not PlacingHogs) and (FollowGear <> nil) and (not isCursorVisible) and (not fastUntilLag) then |
1182 |
1182 |
1183 if ((CursorPoint.X = prevPoint.X) and (CursorPoint.Y = prevpoint.Y)) then exit; |
1183 if ((CursorPoint.X = prevPoint.X) and (CursorPoint.Y = prevpoint.Y)) then exit; |
1184 |
1184 |
1185 if AMxShift < AMWidth then |
1185 if AMxShift < AMWidth then |
1186 begin |
1186 begin |
1187 {$IFDEF IPHONEOS} |
1187 {$IFDEF IPHONE} |
1188 if CursorPoint.X < cScreenWidth div 2 + AMxShift - AMWidth then CursorPoint.X:= cScreenWidth div 2 + AMxShift - AMWidth; |
1188 if CursorPoint.X < cScreenWidth div 2 + AMxShift - AMWidth then CursorPoint.X:= cScreenWidth div 2 + AMxShift - AMWidth; |
1189 if CursorPoint.X > cScreenWidth div 2 + AMxShift - AMxOffset then CursorPoint.X:= cScreenWidth div 2 + AMxShift - AMxOffset; |
1189 if CursorPoint.X > cScreenWidth div 2 + AMxShift - AMxOffset then CursorPoint.X:= cScreenWidth div 2 + AMxShift - AMxOffset; |
1190 if CursorPoint.Y < cScreenHeight - AMyOffset - SlotsNum * AMSlotSize then CursorPoint.Y:= cScreenHeight - AMyOffset - SlotsNum * AMSlotSize; |
1190 if CursorPoint.Y < cScreenHeight - AMyOffset - SlotsNum * AMSlotSize then CursorPoint.Y:= cScreenHeight - AMyOffset - SlotsNum * AMSlotSize; |
1191 if CursorPoint.Y > cScreenHeight - AMyOffset then CursorPoint.Y:= cScreenHeight - AMyOffset; |
1191 if CursorPoint.Y > cScreenHeight - AMyOffset then CursorPoint.Y:= cScreenHeight - AMyOffset; |
1192 {$ELSE} |
1192 {$ELSE} |