equal
deleted
inserted
replaced
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:= 33; |
194 AMSlotSize:= 33; |
195 {$IFDEF IPHONEOS} |
195 {$IFDEF MOBILE} |
196 if isPhone() then |
196 if isPhone() then |
197 begin |
197 begin |
198 AMxOffset:= -30 + cScreenHeight div 2; |
198 AMxOffset:= -30 + cScreenHeight div 2; |
199 AMyOffset:= 10; |
199 AMyOffset:= 10; |
200 end |
200 end |
287 exit |
287 exit |
288 end; |
288 end; |
289 SlotsNum:= 0; |
289 SlotsNum:= 0; |
290 x:= (cScreenWidth shr 1) - AMWidth + AMxShift; |
290 x:= (cScreenWidth shr 1) - AMWidth + AMxShift; |
291 |
291 |
292 {$IFDEF IPHONEOS} |
292 {$IFDEF MOBILE} |
293 Slot:= cMaxSlotIndex; |
293 Slot:= cMaxSlotIndex; |
294 x:= x - cOffsetY; |
294 x:= x - cOffsetY; |
295 y:= AMyOffset; |
295 y:= AMyOffset; |
296 dec(y, BORDERSIZE); |
296 dec(y, BORDERSIZE); |
297 DrawSprite(sprAMCorners, x - BORDERSIZE, y, 0); |
297 DrawSprite(sprAMCorners, x - BORDERSIZE, y, 0); |
416 begin |
416 begin |
417 amSel:= Ammo^[Slot, Pos].AmmoType; |
417 amSel:= Ammo^[Slot, Pos].AmmoType; |
418 RenderWeaponTooltip(amSel) |
418 RenderWeaponTooltip(amSel) |
419 end; |
419 end; |
420 |
420 |
421 {$IFDEF IPHONEOS} |
421 {$IFDEF MOBILE} |
422 DrawTexture(cScreenWidth div 2 - (AMWidth - 10) + AMxShift, AMyOffset - 25, Ammoz[Ammo^[Slot, Pos].AmmoType].NameTex); |
422 DrawTexture(cScreenWidth div 2 - (AMWidth - 10) + AMxShift, AMyOffset - 25, Ammoz[Ammo^[Slot, Pos].AmmoType].NameTex); |
423 if Ammo^[Slot, Pos].Count < AMMO_INFINITE then |
423 if Ammo^[Slot, Pos].Count < AMMO_INFINITE then |
424 DrawTexture(cScreenWidth div 2 - (AMWidth - 10) + 163, AMyOffset - 25, CountTexz[Ammo^[Slot, Pos].Count]); |
424 DrawTexture(cScreenWidth div 2 - (AMWidth - 10) + 163, AMyOffset - 25, CountTexz[Ammo^[Slot, Pos].Count]); |
425 {$ELSE} |
425 {$ELSE} |
426 DrawTexture(cScreenWidth div 2 - (AMWidth - 10) + AMxShift, cScreenHeight - AMyOffset - 25, Ammoz[Ammo^[Slot, Pos].AmmoType].NameTex); |
426 DrawTexture(cScreenWidth div 2 - (AMWidth - 10) + AMxShift, cScreenHeight - AMyOffset - 25, Ammoz[Ammo^[Slot, Pos].AmmoType].NameTex); |
440 end |
440 end |
441 else |
441 else |
442 FreeWeaponTooltip; |
442 FreeWeaponTooltip; |
443 |
443 |
444 if (WeaponTooltipTex <> nil) and (AMxShift = 0) then |
444 if (WeaponTooltipTex <> nil) and (AMxShift = 0) then |
445 {$IFDEF IPHONEOS} |
445 {$IFDEF MOBILE} |
|
446 {$IFDEF ANDROID} |
|
447 ShowWeaponTooltip((AMxOffset - (cScreenHeight div 2)) - WeaponTooltipTex^.w, (AMyOffset + ((SlotsNum * AmSlotSize)div 2)) - (WeaponTooltipTex^.h div 2)); |
|
448 {$ELSE} |
446 ShowWeaponTooltip(-WeaponTooltipTex^.w div 2, 100); |
449 ShowWeaponTooltip(-WeaponTooltipTex^.w div 2, 100); |
|
450 {$ENDIF} |
447 {$ELSE} |
451 {$ELSE} |
448 ShowWeaponTooltip(x - WeaponTooltipTex^.w - 3, Min(y + 1, cScreenHeight - WeaponTooltipTex^.h - 40)); |
452 ShowWeaponTooltip(x - WeaponTooltipTex^.w - 3, Min(y + 1, cScreenHeight - WeaponTooltipTex^.h - 40)); |
449 {$ENDIF} |
453 {$ENDIF} |
450 |
454 |
451 bSelected:= false; |
455 bSelected:= false; |
981 |
985 |
982 {$IFDEF ANDROID} |
986 {$IFDEF ANDROID} |
983 // Draw buttons Related to the Touch interface |
987 // Draw buttons Related to the Touch interface |
984 DrawTexture(Round(-cScreenWidth*0.5 + cScreenHeight*0.02),Round((cScreenHeight*0.98)-(spritesData[sprFireButton].Height*0.4) ),spritesData[sprFireButton].Texture, 0.4); |
988 DrawTexture(Round(-cScreenWidth*0.5 + cScreenHeight*0.02),Round((cScreenHeight*0.98)-(spritesData[sprFireButton].Height*0.4) ),spritesData[sprFireButton].Texture, 0.4); |
985 {$ENDIF} |
989 {$ENDIF} |
|
990 |
986 // Teams Healths |
991 // Teams Healths |
987 if TeamsCount * 20 > Longword(cScreenHeight) div 7 then // take up less screen on small displays |
992 if TeamsCount * 20 > Longword(cScreenHeight) div 7 then // take up less screen on small displays |
988 begin |
993 begin |
989 SetScale(1.5); |
994 SetScale(1.5); |
990 smallScreenOffset:= cScreenHeight div 6; |
995 smallScreenOffset:= cScreenHeight div 6; |