--- a/hedgewars/PascalExports.pas Sun Jul 25 16:02:02 2010 +0200
+++ b/hedgewars/PascalExports.pas Sun Jul 25 17:30:19 2010 +0200
@@ -49,6 +49,9 @@
procedure HW_zoomReset; cdecl; export;
begin
middleClick:= true;
+ // center the camera at current hog
+ if CurrentHedgehog <> nil then
+ followGear:= CurrentHedgehog^.Gear;
end;
procedure HW_ammoMenu; cdecl; export;
--- a/hedgewars/uGears.pas Sun Jul 25 16:02:02 2010 +0200
+++ b/hedgewars/uGears.pas Sun Jul 25 17:30:19 2010 +0200
@@ -95,8 +95,8 @@
procedure RemoveGearFromList(Gear: PGear);
function ModifyDamage(dmg: Longword; Gear: PGear): Longword;
procedure FindPlace(var Gear: PGear; withFall: boolean; Left, Right: LongInt);
-function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
-function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
+function GetLaunchX(at: TAmmoType; dir: LongInt; angle: LongInt): LongInt;
+function GetLaunchY(at: TAmmoType; angle: LongInt): LongInt;
implementation
uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions, uLand, uIO, uLandGraphics,
@@ -994,7 +994,6 @@
Tint($C0, $C0, $C0, $FF);
- glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2, GL_FLOAT, 0, @RopePoints.rounded[0]);
glDrawArrays(GL_LINE_STRIP, 0, RopePoints.Count + 2);
Tint($FF, $FF, $FF, $FF);
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sun Jul 25 16:02:02 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Sun Jul 25 17:30:19 2010 +0200
@@ -97,6 +97,8 @@
sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(180));
self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-90));
break;
+ default:
+ break;
}
CGRect rect = [[UIScreen mainScreen] bounds];
self.view.frame = CGRectMake(0, 0, rect.size.width, rect.size.height);
@@ -301,7 +303,8 @@
-(void) dismissPopover {
if (YES == isPopoverVisible) {
isPopoverVisible = NO;
- HW_pause();
+ if (HW_isPaused())
+ HW_pause();
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[(InGameMenuViewController *)popoverController.contentViewController removeChat];
@@ -368,11 +371,11 @@
// draw the button at the last touched point (which is the current position)
UIButton *tapAgain = [UIButton buttonWithType:UIButtonTypeRoundedRect];
- tapAgain.frame = CGRectMake(currentPosition.x - 90, currentPosition.y + 15, 180, 30);
+ tapAgain.frame = CGRectMake(currentPosition.x - 75, currentPosition.y + 25, 150, 40);
tapAgain.tag = CONFIRMATION_TAG;
tapAgain.alpha = 0;
[tapAgain addTarget:self action:@selector(sendHWClick) forControlEvents:UIControlEventTouchUpInside];
- [tapAgain setTitle:NSLocalizedString(@"Tap again to confirm",@"from the overlay") forState:UIControlStateNormal];
+ [tapAgain setTitle:NSLocalizedString(@"Tap to set!",@"from the overlay") forState:UIControlStateNormal];
[self.view addSubview:tapAgain];
// animation ftw!