# HG changeset patch # User koda # Date 1327788639 -3600 # Node ID 5861b2cc991f37e1e2cfe1dc935ff7d4e24ada02 # Parent 9305a12f66bf502384e2d601e0596f5667558177 minor cleanup, gather AMSlotSize in uConsts diff -r 9305a12f66bf -r 5861b2cc991f hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Sat Jan 28 22:19:42 2012 +0100 +++ b/hedgewars/uConsts.pas Sat Jan 28 23:10:39 2012 +0100 @@ -289,7 +289,7 @@ htHealth = $04; htTransparent = $08; - + AMSlotSize = 33; implementation diff -r 9305a12f66bf -r 5861b2cc991f hedgewars/uTypes.pas --- a/hedgewars/uTypes.pas Sat Jan 28 22:19:42 2012 +0100 +++ b/hedgewars/uTypes.pas Sat Jan 28 23:10:39 2012 +0100 @@ -51,12 +51,12 @@ sprLag, sprArrow, sprBazookaShell, sprTargetP, sprBee, sprSmokeTrace, sprRopeHook, sprExplosion50, sprMineOff, sprMineOn, sprMineDead, sprCase, sprFAid, sprDynamite, sprPower, - sprClusterBomb, sprClusterParticle, sprFlame, sprHorizont, - sprHorizontL, sprHorizontR, sprSky, sprSkyL, - sprSkyR, sprAMBorderHorizontal, sprAMBorderVertical, sprAMSlot, sprAMAmmos, - sprAMSlotKeys, sprAMCorners, sprFinger, sprAirBomb, - sprAirplane, sprAmAirplane, sprAmGirder, sprHHTelepMask, - sprSwitch, sprParachute, sprTarget, sprRopeNode, + sprClusterBomb, sprClusterParticle, sprFlame, + sprHorizont, sprHorizontL, sprHorizontR, sprSky, sprSkyL, sprSkyR, + sprAMBorderHorizontal, sprAMBorderVertical, sprAMSlot, + sprAMAmmos, sprAMAmmosBW, sprAMSlotKeys, sprAMCorners, + sprFinger, sprAirBomb, sprAirplane, sprAmAirplane, sprAmGirder, + sprHHTelepMask, sprSwitch, sprParachute, sprTarget, sprRopeNode, sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR, sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun, sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer, @@ -64,7 +64,7 @@ sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft, sprKamikaze, sprWhip, sprKowtow, sprSad, sprWave, sprHurrah, sprLemonade, sprShrug, sprJuggle, sprExplPart, sprExplPart2, - sprCakeWalk, sprCakeDown, sprAMAmmosBW, sprWatermelon, + sprCakeWalk, sprCakeDown, sprWatermelon, sprEvilTrace, sprHellishBomb, sprSeduction, sprDress, sprCensored, sprDrill, sprHandDrill, sprHandBallgun, sprBalls, sprPlane, sprHandPlane, sprUtility, sprInvulnerable, sprVampiric, sprGirder, diff -r 9305a12f66bf -r 5861b2cc991f hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Sat Jan 28 22:19:42 2012 +0100 +++ b/hedgewars/uVariables.pas Sat Jan 28 23:10:39 2012 +0100 @@ -332,13 +332,15 @@ (FileName: 'SkyR'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil; Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: true; getImageDimensions: true),// sprSky (FileName: 'BorderHorizontal'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 33; Height: 2; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: false; getImageDimensions: true),// sprAMBorderHorizontal + Width: AMSlotSize; Height: 2; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: false; getImageDimensions: true),// sprAMBorderHorizontal (FileName: 'BorderVertical'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 2; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: false; getImageDimensions: true),// sprAMBorderVertical + Width: 2; Height: AMSlotSize; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpLow; getDimensions: false; getImageDimensions: true),// sprAMBorderVertical (FileName: 'Slot'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 33; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMSlot + Width: AMSlotSize; Height: AMSlotSize; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMSlot (FileName: 'Ammos'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMAmmos + (FileName: 'Ammos_bw'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; + Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprAMAmmosBW (FileName: 'SlotKeys'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprAMSlotKeys (FileName: 'Corners'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; @@ -433,8 +435,6 @@ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprCakeWalk (FileName: 'Cake_down'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprCakeDown - (FileName: 'Ammos_bw'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprAMAmmosBW (FileName: 'Watermelon'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprWatermelon (FileName: 'EvilTrace'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; diff -r 9305a12f66bf -r 5861b2cc991f hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Sat Jan 28 22:19:42 2012 +0100 +++ b/hedgewars/uWorld.pas Sat Jan 28 23:10:39 2012 +0100 @@ -61,7 +61,7 @@ ; var cWaveWidth, cWaveHeight: LongInt; - AMSlotSize, AMxOffset, AMyOffset, AMShiftTarget, AMShift, SlotsNum: LongInt; + AMxOffset, AMyOffset, AMShiftTarget, AMShift, SlotsNum: LongInt; tmpSurface: PSDL_Surface; fpsTexture: PTexture; timeTexture: PTexture; @@ -189,34 +189,25 @@ uCursor.init(); prevPoint.X:= 0; prevPoint.Y:= cScreenHeight div 2; -WorldDx:= - (LAND_WIDTH div 2) + cScreenWidth div 2; -WorldDy:= - (LAND_HEIGHT - (playHeight div 2)) + (cScreenHeight div 2); -// AMSlotSize is the active dimension of the ammo icon -// AMWidth is the horizontal size of the whole ammomenu -// cMaxSlotIndex is the amount of weapons per row -AMSlotSize:= 33; +WorldDx:= -(LAND_WIDTH div 2) + cScreenWidth div 2; +WorldDy:= -(LAND_HEIGHT - (playHeight div 2)) + (cScreenHeight div 2); + +//aligns it to the bottom of the screen, minus the border +AMShiftTarget:= (cMaxSlotAmmoIndex + 2) * AMSlotSize + AMxOffset; +AMShift:= AMShiftTarget; +SkyOffset:= 0; +HorizontOffset:= 0; + {$IFDEF MOBILE} +AMxOffset:= 0; if isPhone() then - begin - AMxOffset:= -30 + cScreenHeight div 2; - AMyOffset:= AMSlotSize; - end + AMyOffset:= AMSlotSize else - begin - AMxOffset:= 0; AMyOffset:= AMSlotSize * 2; - end; -//aligns it to the bottom of the screen, minus the border -AMShiftTarget:= ((cMaxSlotAmmoIndex + 2) * AMSlotSize) + AMyOffset; -AMShift:= AMShiftTarget; {$ELSE} AMxOffset:= 10; AMyOffset:= 60; -AMShiftTarget:= (cMaxSlotAmmoIndex + 2) * AMSlotSize + AMxOffset; -AMShift:= AMShiftTarget; {$ENDIF} -SkyOffset:= 0; -HorizontOffset:= 0; end; procedure InitCameraBorders; diff -r 9305a12f66bf -r 5861b2cc991f project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj --- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sat Jan 28 22:19:42 2012 +0100 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sat Jan 28 23:10:39 2012 +0100 @@ -306,42 +306,42 @@ isa = PBXContainerItemProxy; containerPortal = 61A19AE314D2010A004B1E6D /* SDL.xcodeproj */; proxyType = 2; - remoteGlobalIDString = FD6526630DE8FCCB002AD96B /* libSDL.a */; + remoteGlobalIDString = FD6526630DE8FCCB002AD96B; remoteInfo = libSDL; }; 61A19AEB14D2010A004B1E6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 61A19AE314D2010A004B1E6D /* SDL.xcodeproj */; proxyType = 2; - remoteGlobalIDString = 006E982211955059001DE610 /* testsdl.app */; + remoteGlobalIDString = 006E982211955059001DE610; remoteInfo = testsdl; }; 61A19B6514D20B6C004B1E6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 61A19B6114D20B6C004B1E6D /* SDL_image.xcodeproj */; proxyType = 2; - remoteGlobalIDString = BE1FA74107AF4C45004B6283 /* libSDL_image.a */; + remoteGlobalIDString = BE1FA74107AF4C45004B6283; remoteInfo = libSDL_image; }; 61A19BC514D20CDA004B1E6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 61A19BC114D20CDA004B1E6D /* SDL_ttf.xcodeproj */; proxyType = 2; - remoteGlobalIDString = BE48FD6E07AFA17000BB41DA /* libSDL_ttf.a */; + remoteGlobalIDString = BE48FD6E07AFA17000BB41DA; remoteInfo = "Static Library"; }; 61A19BF814D20D83004B1E6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 61A19BF414D20D83004B1E6D /* SDL_net.xcodeproj */; proxyType = 2; - remoteGlobalIDString = BE48FF6F07AFA9A900BB41DA /* libSDL_net.a */; + remoteGlobalIDString = BE48FF6F07AFA9A900BB41DA; remoteInfo = "Static Library"; }; 61A19C2214D20F51004B1E6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 61A19C1E14D20F51004B1E6D /* SDL_mixer.xcodeproj */; proxyType = 2; - remoteGlobalIDString = BE1FA95407AF96B2004B6283 /* libSDL_mixer.a */; + remoteGlobalIDString = BE1FA95407AF96B2004B6283; remoteInfo = "Static Library"; }; 928301590F10E41300CC5A3C /* PBXContainerItemProxy */ = {