Henek's patch - adds a column to ammoMenu and removes the F* column in iphone version
--- a/hedgewars/uConsts.pas Sat May 01 20:48:39 2010 +0000
+++ b/hedgewars/uConsts.pas Sat May 01 21:53:31 2010 +0000
@@ -72,7 +72,12 @@
sprHandGrenade, sprHandMelon, sprHandMortar, sprHandSkip, sprHandCluster,
sprHandDynamite, sprHandHellish, sprHandMine, sprHandSeduction, sprHandVamp,
sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg, sprTargetBee, sprHandBee,
- sprFeather, sprPiano, sprHandSineGun, sprPortalGun, sprPortal);
+ sprFeather, sprPiano, sprHandSineGun, sprPortalGun, sprPortal,
+{$IFDEF IPHONEOS}
+ sprAMBordersIPhone, sprAMSlotIPhone, sprAMSlotNameIPhone,
+{$ENDIF}
+ sprEgga // remove this
+ );
// Gears that interact with other Gears and/or Land
TGearType = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, // 3
@@ -451,7 +456,7 @@
);
SpritesData: array[TSprite] of record
- FileName: String[14];
+ FileName: String[16];
Path, AltPath: TPathType;
Texture: PTexture;
Surface: PSDL_Surface;
@@ -517,11 +522,11 @@
(FileName: 'SkyR'; Path: ptCurrTheme;AltPath: ptNone; Texture: nil; Surface: nil;
Width: 0; Height: 0; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprSky
(FileName: 'BrdrLines'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 202; Height: 1; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprAMBorders
+ Width: 236; Height: 1; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprAMBorders
(FileName: 'Slot'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 202; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprAMSlot
+ Width: 236; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprAMSlot
(FileName: 'AmmoName'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 202; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprAMSlotName
+ Width: 236; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprAMSlotName
(FileName: 'Ammos'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true),// sprAMAmmos
(FileName: 'SlotKeys'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
@@ -747,7 +752,17 @@
(FileName: 'amPortalGun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 128; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false), // sprPortalGun
(FileName: 'Portal'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false) // sprPortal
+ Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false), // sprPortal
+{$IFDEF IPHONEOS}
+ (FileName: 'BrdrLines_iPhone'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 202; Height: 1; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprAMBordersIPhone
+ (FileName: 'Slot_iPhone'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 202; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprAMSlotIPhone
+ (FileName: 'AmmoName_iPhone'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 202; Height: 33; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprAMSlotNameIPhone
+{$ENDIF}
+ (FileName: 'Egg'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false) // DELETEME (when adding another sprite)
);
Wavez: array [TWave] of record
--- a/hedgewars/uStore.pas Sat May 01 20:48:39 2010 +0000
+++ b/hedgewars/uStore.pas Sat May 01 21:53:31 2010 +0000
@@ -36,7 +36,12 @@
ProgrTex: PTexture;
MissionIcons: PSDL_Surface;
ropeIconTex: PTexture;
-
+{$IFDEF IPHONEOS}
+ rotationQt: GLfloat;
+{$ENDIF}
+ wScreen: LongInt;
+ hScreen: LongInt;
+
procedure initModule;
procedure freeModule;
@@ -71,7 +76,7 @@
function LoadImage(const filename: shortstring; imageFlags: LongInt): PSDL_Surface;
procedure SetupOpenGL;
procedure SetScale(f: GLfloat);
-function RenderHelpWindow(caption, subcaption, description, extra: ansistring; extracolor: LongInt; iconsurf: PSDL_Surface; iconrect: PSDL_Rect): PTexture;
+function RenderHelpWindow(caption, subcaption, description, extra: ansistring; extracolor: LongInt; iconsurf: PSDL_Surface; iconrect: PSDL_Rect): PTexture;
procedure RenderWeaponTooltip(atype: TAmmoType);
procedure ShowWeaponTooltip(x, y: LongInt);
procedure FreeWeaponTooltip;
@@ -1201,7 +1206,7 @@
// prepare default translation/scaling
glLoadIdentity();
{$IFDEF IPHONEOS}
- glRotatef(-90, 0, 0, 1);
+ glRotatef(rotationQt, 0, 0, 1);
{$ENDIF}
glScalef(2.0 / cScreenWidth, -2.0 / cScreenHeight, 1.0);
glTranslatef(0, -cScreenHeight / 2, 0);
@@ -1231,15 +1236,15 @@
if f = scale then
glPopMatrix // "return" to default scaling
else // other scaling
- begin
+ begin
glPushMatrix; // save default scaling
glLoadIdentity;
{$IFDEF IPHONEOS}
- glRotatef(-90, 0, 0, 1);
+ glRotatef(rotationQt, 0, 0, 1);
{$ENDIF}
- glScalef(f / cScreenWidth, -f / cScreenHeight, 1.0);
+ glScalef(f / wScreen, -f / hScreen, 1.0);
glTranslatef(0, -cScreenHeight / 2, 0);
- end;
+ end;
cScaleFactor:= f;
end;
@@ -1542,14 +1547,19 @@
procedure initModule;
begin
-PixelFormat:= nil;
-SDLPrimSurface:= nil;
-{$IFNDEF IPHONEOS}cGPUVendor:= gvUnknown;{$ENDIF}
-
-cScaleFactor:= 2.0;
-SupportNPOTT:= false;
-Step:= 0;
-ProgrTex:= nil;
+ PixelFormat:= nil;
+ SDLPrimSurface:= nil;
+{$IFDEF IPHONEOS}
+ rotationQt:= -90;
+{$ELSE}
+ cGPUVendor:= gvUnknown;
+{$ENDIF}
+ uStore.wScreen:= cScreenWidth;
+ uStore.hScreen:= cScreenHeight;
+ cScaleFactor:= 2.0;
+ SupportNPOTT:= false;
+ Step:= 0;
+ ProgrTex:= nil;
end;
procedure freeModule;
Binary file share/hedgewars/Data/Graphics/AmmoMenu/AmmoName.png has changed
Binary file share/hedgewars/Data/Graphics/AmmoMenu/AmmoName_iPhone.png has changed
Binary file share/hedgewars/Data/Graphics/AmmoMenu/BrdrLines.png has changed
Binary file share/hedgewars/Data/Graphics/AmmoMenu/BrdrLines_iPhone.png has changed
--- a/share/hedgewars/Data/Graphics/AmmoMenu/CMakeLists.txt Sat May 01 20:48:39 2010 +0000
+++ b/share/hedgewars/Data/Graphics/AmmoMenu/CMakeLists.txt Sat May 01 21:53:31 2010 +0000
@@ -1,4 +1,5 @@
-file(GLOB AmmoMenuSprites *.png)
+file(GLOB AmmoMenuSprites *.png)
+list(REMOVE_ITEM AmmoMenuSprites *_iPhone.png)
install(FILES
${AmmoMenuSprites}
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Slot.png has changed
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Slot_iPhone.png has changed