--- a/.hgtags Tue Jun 28 01:05:33 2011 +0200
+++ b/.hgtags Wed Jun 29 21:52:07 2011 +0200
@@ -24,3 +24,11 @@
adffb668f06e265b45d1e4aedc283e6f4e5ba7e8 Hedgewars-iOS-1.1
ede569bb76f389bd5dfbb7ebf68af3087e3e881c Hedgewars-iOS-1.2
a5735e877aae61cd705265e2f8c0c7ad08d45f0e Hedgewars-iOS-1.2.1
+bd74fd83929a09251d1ede09e6c03a641a0ee35f 0.9.15
+bd74fd83929a09251d1ede09e6c03a641a0ee35f 0.9.15
+0000000000000000000000000000000000000000 0.9.15
+0000000000000000000000000000000000000000 0.9.15
+29ab0d49c3e6e72a7633d0bd316ae533db15c65d 0.9.15
+29ab0d49c3e6e72a7633d0bd316ae533db15c65d 0.9.15
+0000000000000000000000000000000000000000 0.9.15
+29ab0d49c3e6e72a7633d0bd316ae533db15c65d 0.9.15-release
--- a/CMakeLists.txt Tue Jun 28 01:05:33 2011 +0200
+++ b/CMakeLists.txt Wed Jun 29 21:52:07 2011 +0200
@@ -77,7 +77,6 @@
set(CMAKE_OSX_ARCHITECTURES "i386;ppc7400")
-
#create universal binaries only when it's time to bundle the application, also build server
IF(BUNDLE)
set(WITH_SERVER true)
@@ -86,7 +85,11 @@
set(CMAKE_CXX_COMPILER "g++-4.0")
else()
if(current_macosx_version MATCHES "10.6")
- set(CMAKE_OSX_ARCHITECTURES "x86_64")
+ if(MACAPPSTORE)
+ set(CMAKE_OSX_ARCHITECTURES "x86_64;i386")
+ else()
+ set(CMAKE_OSX_ARCHITECTURES "x86_64")
+ endif()
endif()
endif()
ELSE()
--- a/QTfrontend/CMakeLists.txt Tue Jun 28 01:05:33 2011 +0200
+++ b/QTfrontend/CMakeLists.txt Wed Jun 29 21:52:07 2011 +0200
@@ -171,11 +171,13 @@
set(hwfr_src ${hwfr_src} InstallController.cpp CocoaInitializer.mm M3Panel.mm M3InstallController.m NSWorkspace_RBAdditions.m)
set(HW_LINK_LIBS IOKit)
- find_package(Sparkle)
- if(SPARKLE_FOUND)
- add_definitions(-DSPARKLE_ENABLED)
- set(hwfr_src ${hwfr_src} AutoUpdater.cpp SparkleAutoUpdater.mm)
- set(HW_LINK_LIBS ${SPARKLE_LIBRARY} ${HW_LINK_LIBS})
+ if(NOT NOAUTOUPDATE)
+ find_package(Sparkle)
+ if(SPARKLE_FOUND)
+ add_definitions(-DSPARKLE_ENABLED)
+ set(hwfr_src ${hwfr_src} AutoUpdater.cpp SparkleAutoUpdater.mm)
+ set(HW_LINK_LIBS ${SPARKLE_LIBRARY} ${HW_LINK_LIBS})
+ endif()
endif()
endif()
--- a/QTfrontend/game.cpp Tue Jun 28 01:05:33 2011 +0200
+++ b/QTfrontend/game.cpp Wed Jun 29 21:52:07 2011 +0200
@@ -56,7 +56,7 @@
emit HaveRecord(true, demo);
break;
default:
- if (gameState == gsInterrupted) emit HaveRecord(false, demo);
+ if (gameState == gsInterrupted || gameState == gsHalted) emit HaveRecord(false, demo);
else if (gameState == gsFinished) emit HaveRecord(true, demo);
}
SetGameState(gsStopped);
@@ -229,6 +229,10 @@
SetGameState(gsFinished);
break;
}
+ case 'H': {
+ SetGameState(gsHalted);
+ break;
+ }
case 's': {
int size = msg.size();
QString msgbody = QString::fromUtf8(msg.mid(2).left(size - 4));
@@ -250,8 +254,8 @@
{
emit SendNet(msg);
}
- if (msg.at(1) != 's')
- demo.append(msg);
+ if (msg.at(1) != 's')
+ demo.append(msg);
}
}
}
--- a/QTfrontend/game.h Tue Jun 28 01:05:33 2011 +0200
+++ b/QTfrontend/game.h Wed Jun 29 21:52:07 2011 +0200
@@ -35,7 +35,8 @@
gsInterrupted = 2,
gsFinished = 3,
gsStopped = 4,
- gsDestroyed = 5
+ gsDestroyed = 5,
+ gsHalted = 6
};
bool checkForDir(const QString & dir);
--- a/QTfrontend/hwform.cpp Tue Jun 28 01:05:33 2011 +0200
+++ b/QTfrontend/hwform.cpp Wed Jun 29 21:52:07 2011 +0200
@@ -36,6 +36,7 @@
#include <QTableView>
#include <QCryptographicHash>
#include <QSignalMapper>
+#include <QShortcut>
#include "hwform.h"
#include "game.h"
@@ -104,6 +105,10 @@
if (updater && config->isAutoUpdateEnabled())
updater->checkForUpdates();
#endif
+#else
+ // ctrl+q closes frontend for consistency
+ QShortcut *closeFrontend = new QShortcut(QKeySequence("Ctrl+Q"), this);
+ connect (closeFrontend, SIGNAL(activated()), this, SLOT(close()));
#endif
UpdateTeamsLists();
@@ -974,12 +979,13 @@
if (id == ID_PAGE_INGAME ||
// was room chief and the game was aborted
(hwnet && hwnet->isRoomChief() && hwnet->isInRoom() &&
- (gameState == gsInterrupted || gameState == gsStopped || gameState == gsDestroyed))) {
+ (gameState == gsInterrupted || gameState == gsStopped || gameState == gsDestroyed || gameState == gsHalted))) {
if (id == ID_PAGE_INGAME) GoBack();
Music(ui.pageOptions->CBEnableFrontendMusic->isChecked());
if (wBackground) wBackground->startAnimation();
if (hwnet) hwnet->gameFinished();
}
+ if (gameState == gsHalted) close();
};
}
}
--- a/gameServer/Actions.hs Tue Jun 28 01:05:33 2011 +0200
+++ b/gameServer/Actions.hs Wed Jun 29 21:52:07 2011 +0200
@@ -391,8 +391,10 @@
answerLobbyNicks = [AnswerThisClient ("LOBBY:JOINED": lobbyNicks) | not $ Prelude.null lobbyNicks]
-processAction (clID, serverInfo, clients, rooms) (KickClient kickID) =
- liftM2 replaceID (return clID) (processAction (kickID, serverInfo, clients, rooms) $ ByeClient "Kicked")
+processAction (clID, serverInfo, clients, rooms) (KickClient kickID) = do
+ let client = clients ! kickID
+ currentTime <- getCurrentTime
+ liftM2 replaceID (return clID) (processAction (kickID, serverInfo{lastLogins = (host client, (addUTCTime 60 $ currentTime, "60 seconds ban")) : lastLogins serverInfo}, clients, rooms) $ ByeClient "Kicked")
processAction (clID, serverInfo, clients, rooms) (BanClient banNick) =
@@ -419,12 +421,13 @@
infoM "Clients" (show (clientUID client) ++ ": New client. Time: " ++ show (connectTime client))
writeChan (sendChan client) ["CONNECTED", "Hedgewars server http://www.hedgewars.org/"]
- let newLogins = takeWhile (\(_ , time) -> (connectTime client) `diffUTCTime` time <= 11) $ lastLogins serverInfo
+ let newLogins = takeWhile (\(_ , (time, _)) -> (connectTime client) `diffUTCTime` time <= 0) $ lastLogins serverInfo
- if isJust $ host client `Prelude.lookup` newLogins then
- processAction (clID, serverInfo{lastLogins = newLogins}, updatedClients, rooms) $ ByeClient "Reconnected too fast"
+ let info = host client `Prelude.lookup` newLogins
+ if isJust info then
+ processAction (clID, serverInfo{lastLogins = newLogins}, updatedClients, rooms) $ ByeClient (snd . fromJust $ info)
else
- return (clID, serverInfo{lastLogins = (host client, connectTime client) : newLogins}, updatedClients, rooms)
+ return (clID, serverInfo{lastLogins = (host client, (addUTCTime 10 $ connectTime client, "Reconnected too fast")) : newLogins}, updatedClients, rooms)
processAction (clID, serverInfo, clients, rooms) PingAll = do
--- a/gameServer/CoreTypes.hs Tue Jun 28 01:05:33 2011 +0200
+++ b/gameServer/CoreTypes.hs Wed Jun 29 21:52:07 2011 +0200
@@ -136,14 +136,14 @@
dbHost :: String,
dbLogin :: String,
dbPassword :: String,
- lastLogins :: [(String, UTCTime)],
+ lastLogins :: [(String, (UTCTime, String))],
stats :: TMVar StatisticsInfo,
coreChan :: Chan CoreMessage,
dbQueries :: Chan DBQuery
}
instance Show ServerInfo where
- show si = "Server Info"
+ show _ = "Server Info"
newServerInfo = (
ServerInfo
--- a/gameServer/Utils.hs Tue Jun 28 01:05:33 2011 +0200
+++ b/gameServer/Utils.hs Wed Jun 29 21:52:07 2011 +0200
@@ -91,7 +91,7 @@
t : replaceTeam team teams
illegalName :: String -> Bool
-illegalName = all isSpace
+illegalName s = null s || all isSpace s || isSpace (head s) || isSpace (last s)
protoNumber2ver :: Word16 -> String
protoNumber2ver 17 = "0.9.7-dev"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gameServer/hedgewars-server.cabal Wed Jun 29 21:52:07 2011 +0200
@@ -0,0 +1,33 @@
+Name: hedgewars-server
+Version: 0.1
+Synopsis: hedgewars server
+Description: hedgewars server
+Homepage: http://www.hedgewars.org/
+License: GPL-2
+Author: unC0Rr
+Maintainer: unC0Rr@hedgewars.org
+Category: Game
+Build-type: Simple
+Cabal-version: >=1.2
+
+
+Executable hedgewars-server
+ main-is: hedgewars-server.hs
+
+ Build-depends:
+ base >= 4,
+ unix,
+ containers,
+ array,
+ bytestring,
+ network-bytestring,
+ network,
+ time,
+ stm,
+ mtl,
+ dataenc,
+ hslogger,
+ process,
+ utf8-string
+
+ ghc-options: -O2
\ No newline at end of file
--- a/hedgewars/hwengine.pas Tue Jun 28 01:05:33 2011 +0200
+++ b/hedgewars/hwengine.pas Wed Jun 29 21:52:07 2011 +0200
@@ -156,8 +156,8 @@
cHasFocus:= true;
{$ELSE}
KeyPressChat(event.key.keysym.unicode);
- SDL_MOUSEBUTTONDOWN: if event.button.button = SDL_BUTTON_WHEELDOWN then uKeys.wheelDown:= true;
- SDL_MOUSEBUTTONUP: if event.button.button = SDL_BUTTON_WHEELUP then uKeys.wheelUp:= true;
+ SDL_MOUSEBUTTONDOWN: if event.button.button = SDL_BUTTON_WHEELDOWN then wheelDown:= true;
+ SDL_MOUSEBUTTONUP: if event.button.button = SDL_BUTTON_WHEELUP then wheelUp:= true;
SDL_ACTIVEEVENT:
if (event.active.state and SDL_APPINPUTFOCUS) <> 0 then
cHasFocus:= event.active.gain = 1;
@@ -240,7 +240,7 @@
if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p];
WriteToConsole('Init SDL... ');
- SDLTry(SDL_Init(SDL_INIT_VIDEO) >= 0, true);
+ SDLTry(SDL_Init(SDL_INIT_VIDEO or SDL_INIT_NOPARACHUTE) >= 0, true);
WriteLnToConsole(msgOK);
SDL_EnableUNICODE(1);
--- a/hedgewars/uCommandHandlers.pas Tue Jun 28 01:05:33 2011 +0200
+++ b/hedgewars/uCommandHandlers.pas Wed Jun 29 21:52:07 2011 +0200
@@ -23,27 +23,41 @@
procedure chQuit(var s: shortstring);
const prevGState: TGameState = gsConfirm;
begin
-s:= s; // avoid compiler hint
-if GameState <> gsConfirm then
- begin
+ s:= s; // avoid compiler hint
+ if GameState <> gsConfirm then
+ begin
prevGState:= GameState;
GameState:= gsConfirm
- end else
- GameState:= prevGState
+ end else
+ GameState:= prevGState
+end;
+
+procedure chForceQuit(var s: shortstring);
+begin
+ s:= s; // avoid compiler hint
+ GameState:= gsConfirm;
+ ParseCommand('confirm', true);
end;
procedure chConfirm(var s: shortstring);
begin
-s:= s; // avoid compiler hint
-if GameState = gsConfirm then
+ s:= s; // avoid compiler hint
+ if GameState = gsConfirm then
begin
- SendIPC('Q');
- GameState:= gsExit
+ SendIPC('Q');
+ GameState:= gsExit
end
else
ParseCommand('chat team', true);
end;
+procedure chHalt (var s: shortstring);
+begin
+ s:= s; // avoid compiler hint
+ SendIPC('H');
+ GameState:= gsExit
+end;
+
procedure chCheckProto(var s: shortstring);
var i, c: LongInt;
begin
@@ -582,7 +596,9 @@
RegisterVariable('grave' , vtCommand, @chGrave , false);
RegisterVariable('hat' , vtCommand, @chSetHat , false);
RegisterVariable('quit' , vtCommand, @chQuit , true );
+ RegisterVariable('forcequit', vtCommand, @chForceQuit , true );
RegisterVariable('confirm' , vtCommand, @chConfirm , true );
+ RegisterVariable('halt', vtCommand, @chHalt , true );
RegisterVariable('+speedup', vtCommand, @chSpeedup_p , true );
RegisterVariable('-speedup', vtCommand, @chSpeedup_m , true );
RegisterVariable('zoomin' , vtCommand, @chZoomIn , true );
--- a/hedgewars/uKeys.pas Tue Jun 28 01:05:33 2011 +0200
+++ b/hedgewars/uKeys.pas Wed Jun 29 21:52:07 2011 +0200
@@ -40,47 +40,10 @@
procedure ControllerHatEvent(joy, hat, value: Byte);
procedure ControllerButtonEvent(joy, button: Byte; pressed: Boolean);
-var hideAmmoMenu: boolean;
- wheelUp: boolean;
- wheelDown: boolean;
-
- ControllerNumControllers: Integer;
- ControllerEnabled: Integer;
- ControllerNumAxes: array[0..5] of Integer;
- //ControllerNumBalls: array[0..5] of Integer;
- ControllerNumHats: array[0..5] of Integer;
- ControllerNumButtons: array[0..5] of Integer;
- ControllerAxes: array[0..5] of array[0..19] of Integer;
- //ControllerBalls: array[0..5] of array[0..19] of array[0..1] of Integer;
- ControllerHats: array[0..5] of array[0..19] of Byte;
- ControllerButtons: array[0..5] of array[0..19] of Byte;
-
- DefaultBinds, CurrentBinds: TBinds;
-
- coeff: LongInt;
-{$IFDEF HWLIBRARY}
- leftClick: boolean;
- middleClick: boolean;
- rightClick: boolean;
-
- upKey: boolean;
- downKey: boolean;
- rightKey: boolean;
- leftKey: boolean;
- preciseKey: boolean;
-
- backspaceKey: boolean;
- spaceKey: boolean;
- enterKey: boolean;
- tabKey: boolean;
-
- chatAction: boolean;
- pauseAction: boolean;
-
{$IFDEF IPHONEOS}
procedure setiPhoneBinds;
{$ENDIF}
-{$ENDIF}
+
implementation
uses uConsole, uCommands, uMisc, uVariables, uConsts, uUtils, uDebug;
@@ -109,7 +72,7 @@
// move cursor/camera
// TODO: Scale on screen dimensions and/or axis value (game controller)?
-movecursor(coeff * CursorMovementX, coeff * CursorMovementY);
+movecursor(5 * CursorMovementX, 5 * CursorMovementY);
k:= SDL_GetMouseState(nil, nil);
@@ -139,8 +102,7 @@
{$IFDEF IPHONEOS}
setiPhoneBinds();
-{$ENDIF}
-
+{$ELSE}
// Controller(s)
k:= j; // should we test k for hitting the limit? sounds rather unlikely to ever reach it
for j:= 0 to Pred(ControllerNumControllers) do
@@ -165,6 +127,18 @@
inc(k, 1);
end;
end;
+{$ENDIF}
+
+// ctrl/cmd + w/q to close engine and/or frontend
+{$IFDEF DARWIN}
+ if ((tkbdn[KeyNameToCode('left_meta')] = 1) or (tkbdn[KeyNameToCode('right_meta')] = 1)) then
+{$ELSE}
+ if ((tkbdn[KeyNameToCode('left_ctrl')] = 1) or (tkbdn[KeyNameToCode('right_ctrl')] = 1)) then
+{$ENDIF}
+ begin
+ if tkbdn[KeyNameToCode('q')] = 1 then ParseCommand ('halt', true)
+ else if tkbdn[KeyNameToCode('w')] = 1 then ParseCommand ('forcequit', true);
+ end;
// now process strokes
for i:= 0 to cKeyMaxIndex do
@@ -222,8 +196,7 @@
{$IFDEF IPHONEOS}
setiPhoneBinds();
-{$ENDIF}
-
+{$ELSE}
// Controller(s)
k:= j; // should we test k for hitting the limit? sounds rather unlikely to ever reach it
for j:= 0 to Pred(ControllerNumControllers) do
@@ -248,6 +221,7 @@
inc(k, 1);
end;
end;
+{$ENDIF}
for t:= 0 to cKeyMaxIndex do
tkbd[i]:= tkbdn[i]
@@ -350,6 +324,7 @@
DefaultBinds[KeyNameToCode('right')]:= '+right';
DefaultBinds[KeyNameToCode('left_shift')]:= '+precise';
{$ENDIF}
+DefaultBinds[1000]:= 'forcequit';
for i:= 1 to 10 do DefaultBinds[KeyNameToCode('f'+IntToStr(i))]:= 'slot '+IntToStr(i);
@@ -502,7 +477,6 @@
begin
wheelUp:= false;
wheelDown:= false;
- coeff:= 5;
{$IFDEF HWLIBRARY}
// this function is called by HW_allKeysUp so be careful
--- a/hedgewars/uStore.pas Tue Jun 28 01:05:33 2011 +0200
+++ b/hedgewars/uStore.pas Wed Jun 29 21:52:07 2011 +0200
@@ -274,7 +274,7 @@
for ii:= Low(TSprite) to High(TSprite) do
with SpritesData[ii] do
// FIXME - add a sprite attribute
- if ((cReducedQuality and rqNoBackground) = 0) or (not (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR, sprFlake, sprSplash, sprDroplet])) then // FIXME: hack
+ if ((cReducedQuality and rqNoBackground) = 0) or (not (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR, sprFlake, sprSplash, sprDroplet]) or (((Theme = 'Snow') or (Theme = 'Christmas')) and (ii = sprFlake))) then // FIXME: hack
begin
if AltPath = ptNone then
if ii in [sprHorizontL, sprHorizontR, sprSkyL, sprSkyR] then // FIXME: hack
--- a/hedgewars/uVariables.pas Tue Jun 28 01:05:33 2011 +0200
+++ b/hedgewars/uVariables.pas Wed Jun 29 21:52:07 2011 +0200
@@ -2109,7 +2109,6 @@
DefaultBinds, CurrentBinds: TBinds;
- coeff: LongInt;
{$IFDEF HWLIBRARY}
leftClick: boolean;
middleClick: boolean;
--- a/project_files/HedgewarsMobile/SDL.patch Tue Jun 28 01:05:33 2011 +0200
+++ b/project_files/HedgewarsMobile/SDL.patch Wed Jun 29 21:52:07 2011 +0200
@@ -1,22 +1,7 @@
-diff -r d716dff4b13e Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
---- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Thu Dec 02 11:56:23 2010 -0800
-+++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Thu Dec 02 22:38:57 2010 +0100
-@@ -1262,7 +1262,14 @@
- isa = PBXProject;
- buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDLiPhoneOS" */;
- compatibilityVersion = "Xcode 3.1";
-+ developmentRegion = English;
- hasScannedForEncodings = 1;
-+ knownRegions = (
-+ English,
-+ Japanese,
-+ French,
-+ German,
-+ );
- mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
- projectDirPath = "";
- projectRoot = ../..;
-@@ -1549,15 +1556,19 @@
+diff -r f2c2f0ecba5f Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
+--- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Sun Jan 30 13:42:05 2011 -0800
++++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Mon Jan 31 23:57:58 2011 +0100
+@@ -1564,11 +1564,15 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -32,12 +17,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
ONLY_ACTIVE_ARCH = NO;
PREBINDING = NO;
-- SDKROOT = iphoneos3.2;
-+ SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
-@@ -1566,14 +1577,19 @@
+@@ -1581,12 +1585,18 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -45,23 +25,21 @@
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
-+ GCC_OPTIMIZATION_LEVEL = 2;
++ GCC_OPTIMIZATION_LEVEL = s;
+ GCC_THUMB_SUPPORT = NO;
-+ GCC_UNROLL_LOOPS = YES;
++ GCC_UNROLL_LOOPS = NO;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = NO;
+ HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../include\"";
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
++ OTHER_CFLAGS = "";
PREBINDING = NO;
-- SDKROOT = iphoneos3.2;
-+ SDKROOT = iphoneos;
+ SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Release;
-diff -r d716dff4b13e Xcode-iPhoneOS/SDL/testsdl-Info.plist
---- a/Xcode-iPhoneOS/SDL/testsdl-Info.plist Thu Dec 02 11:56:23 2010 -0800
-+++ b/Xcode-iPhoneOS/SDL/testsdl-Info.plist Thu Dec 02 22:38:57 2010 +0100
+diff -r f2c2f0ecba5f Xcode-iPhoneOS/SDL/testsdl-Info.plist
+--- a/Xcode-iPhoneOS/SDL/testsdl-Info.plist Sun Jan 30 13:42:05 2011 -0800
++++ b/Xcode-iPhoneOS/SDL/testsdl-Info.plist Mon Jan 31 23:57:58 2011 +0100
@@ -16,7 +16,5 @@
<string>????</string>
<key>CFBundleVersion</key>
@@ -70,19 +48,10 @@
- <string>MainWindow</string>
</dict>
</plist>
-diff -r d716dff4b13e include/SDL_config_iphoneos.h
---- a/include/SDL_config_iphoneos.h Thu Dec 02 11:56:23 2010 -0800
-+++ b/include/SDL_config_iphoneos.h Thu Dec 02 22:38:57 2010 +0100
-@@ -98,6 +98,8 @@
- #define HAVE_COS 1
- #define HAVE_COSF 1
- #define HAVE_FABS 1
-+#define HAVE_ATAN 1
-+#define HAVE_ATAN2 1
- #define HAVE_FLOOR 1
- #define HAVE_LOG 1
- #define HAVE_POW 1
-@@ -114,7 +116,7 @@
+diff -r f2c2f0ecba5f include/SDL_config_iphoneos.h
+--- a/include/SDL_config_iphoneos.h Sun Jan 30 13:42:05 2011 -0800
++++ b/include/SDL_config_iphoneos.h Mon Jan 31 23:57:58 2011 +0100
+@@ -119,7 +119,7 @@
/* enable iPhone version of Core Audio driver */
#define SDL_AUDIO_DRIVER_COREAUDIOIPHONE 1
/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
@@ -91,7 +60,7 @@
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
#define SDL_HAPTIC_DISABLED 1
-@@ -135,7 +137,7 @@
+@@ -140,14 +140,17 @@
/* Supported video drivers */
#define SDL_VIDEO_DRIVER_UIKIT 1
@@ -100,7 +69,18 @@
/* enable OpenGL ES */
#define SDL_VIDEO_OPENGL_ES 1
-@@ -152,4 +154,7 @@
+ #define SDL_VIDEO_RENDER_OGL_ES 1
+
+ /* Enable system power support */
+-#define SDL_POWER_UIKIT 1
++#define SDL_POWER_UIKIT 0
++
++/* enable joystick subsystem */
++#define SDL_JOYSTICK_DISABLED 1
+
+ /* enable iPhone keyboard support */
+ #define SDL_IPHONE_KEYBOARD 1
+@@ -157,4 +160,7 @@
*/
#define SDL_IPHONE_MAX_GFORCE 5.0
@@ -108,109 +88,10 @@
+#define SDL_VIEW_TAG 456987
+
#endif /* _SDL_config_iphoneos_h */
-diff -r d716dff4b13e src/SDL_fatal.c
---- a/src/SDL_fatal.c Thu Dec 02 11:56:23 2010 -0800
-+++ b/src/SDL_fatal.c Thu Dec 02 22:38:57 2010 +0100
-@@ -38,9 +38,9 @@
- static void
- SDL_Parachute(int sig)
- {
-- signal(sig, SIG_DFL);
-+ /*signal(sig, SIG_DFL);
- SDL_Quit();
-- raise(sig);
-+ raise(sig);*/
- }
-
- static const int SDL_fatal_signals[] = {
-diff -r d716dff4b13e src/video/SDL_renderer_gles.c
---- a/src/video/SDL_renderer_gles.c Thu Dec 02 11:56:23 2010 -0800
-+++ b/src/video/SDL_renderer_gles.c Thu Dec 02 22:38:57 2010 +0100
-@@ -324,6 +324,9 @@
- data->glDisable(GL_CULL_FACE);
- data->updateSize = SDL_TRUE;
-
-+ data->glEnableClientState(GL_VERTEX_ARRAY);
-+ data->glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-+
- return renderer;
- }
-
-@@ -665,9 +668,7 @@
- vertices[2*i+1] = (GLshort)points[i].y;
- }
- data->glVertexPointer(2, GL_SHORT, 0, vertices);
-- data->glEnableClientState(GL_VERTEX_ARRAY);
- data->glDrawArrays(GL_POINTS, 0, count);
-- data->glDisableClientState(GL_VERTEX_ARRAY);
- SDL_stack_free(vertices);
-
- return 0;
-@@ -694,7 +695,6 @@
- vertices[2*i+1] = (GLshort)points[i].y;
- }
- data->glVertexPointer(2, GL_SHORT, 0, vertices);
-- data->glEnableClientState(GL_VERTEX_ARRAY);
- if (count > 2 &&
- points[0].x == points[count-1].x && points[0].y == points[count-1].y) {
- /* GL_LINE_LOOP takes care of the final segment */
-@@ -703,7 +703,6 @@
- } else {
- data->glDrawArrays(GL_LINE_STRIP, 0, count);
- }
-- data->glDisableClientState(GL_VERTEX_ARRAY);
- SDL_stack_free(vertices);
-
- return 0;
-@@ -723,7 +722,6 @@
- (GLfloat) renderer->b * inv255f,
- (GLfloat) renderer->a * inv255f);
-
-- data->glEnableClientState(GL_VERTEX_ARRAY);
- for (i = 0; i < count; ++i) {
- const SDL_Rect *rect = rects[i];
- GLshort minx = rect->x;
-@@ -743,7 +741,6 @@
- data->glVertexPointer(2, GL_SHORT, 0, vertices);
- data->glDrawArrays(GL_LINE_LOOP, 0, 4);
- }
-- data->glDisableClientState(GL_VERTEX_ARRAY);
-
- return 0;
- }
-@@ -762,7 +759,6 @@
- (GLfloat) renderer->b * inv255f,
- (GLfloat) renderer->a * inv255f);
-
-- data->glEnableClientState(GL_VERTEX_ARRAY);
- for (i = 0; i < count; ++i) {
- const SDL_Rect *rect = rects[i];
- GLshort minx = rect->x;
-@@ -782,7 +778,6 @@
- data->glVertexPointer(2, GL_SHORT, 0, vertices);
- data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
- }
-- data->glDisableClientState(GL_VERTEX_ARRAY);
-
- return 0;
- }
-@@ -925,12 +920,8 @@
- texCoords[7] = maxv;
-
- data->glVertexPointer(2, GL_SHORT, 0, vertices);
-- data->glEnableClientState(GL_VERTEX_ARRAY);
- data->glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
-- data->glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- data->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
-- data->glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-- data->glDisableClientState(GL_VERTEX_ARRAY);
- }
-
- data->glDisable(GL_TEXTURE_2D);
-diff -r d716dff4b13e src/video/SDL_video.c
---- a/src/video/SDL_video.c Thu Dec 02 11:56:23 2010 -0800
-+++ b/src/video/SDL_video.c Thu Dec 02 22:38:57 2010 +0100
-@@ -1421,9 +1421,9 @@
+diff -r f2c2f0ecba5f src/video/SDL_video.c
+--- a/src/video/SDL_video.c Sun Jan 30 13:42:05 2011 -0800
++++ b/src/video/SDL_video.c Mon Jan 31 23:57:58 2011 +0100
+@@ -1414,9 +1414,9 @@
SDL_MinimizeWindow(window);
}
@@ -222,23 +103,20 @@
if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN))
&& _this->SetWindowGrab) {
_this->SetWindowGrab(_this, window);
-diff -r d716dff4b13e src/video/uikit/SDL_uikitopengles.m
---- a/src/video/uikit/SDL_uikitopengles.m Thu Dec 02 11:56:23 2010 -0800
-+++ b/src/video/uikit/SDL_uikitopengles.m Thu Dec 02 22:38:57 2010 +0100
-@@ -114,8 +114,8 @@
- bBits: _this->gl_config.blue_size \
+diff -r f2c2f0ecba5f src/video/uikit/SDL_uikitopengles.m
+--- a/src/video/uikit/SDL_uikitopengles.m Sun Jan 30 13:42:05 2011 -0800
++++ b/src/video/uikit/SDL_uikitopengles.m Mon Jan 31 23:57:58 2011 +0100
+@@ -115,6 +115,7 @@
aBits: _this->gl_config.alpha_size \
depthBits: _this->gl_config.depth_size];
--
-- data->view = view;
-+ view.tag = SDL_VIEW_TAG;
-+ data->view = view;
+
++ view.tag = SDL_VIEW_TAG;
+ data->view = view;
/* add the view to our window */
- [uiwindow addSubview: view ];
-diff -r d716dff4b13e src/video/uikit/SDL_uikitopenglview.m
---- a/src/video/uikit/SDL_uikitopenglview.m Thu Dec 02 11:56:23 2010 -0800
-+++ b/src/video/uikit/SDL_uikitopenglview.m Thu Dec 02 22:38:57 2010 +0100
+diff -r f2c2f0ecba5f src/video/uikit/SDL_uikitopenglview.m
+--- a/src/video/uikit/SDL_uikitopenglview.m Sun Jan 30 13:42:05 2011 -0800
++++ b/src/video/uikit/SDL_uikitopenglview.m Mon Jan 31 23:57:58 2011 +0100
@@ -117,6 +117,8 @@
return NO;
}
@@ -248,9 +126,9 @@
}
return self;
}
-diff -r d716dff4b13e src/video/uikit/SDL_uikitview.h
---- a/src/video/uikit/SDL_uikitview.h Thu Dec 02 11:56:23 2010 -0800
-+++ b/src/video/uikit/SDL_uikitview.h Thu Dec 02 22:38:57 2010 +0100
+diff -r f2c2f0ecba5f src/video/uikit/SDL_uikitview.h
+--- a/src/video/uikit/SDL_uikitview.h Sun Jan 30 13:42:05 2011 -0800
++++ b/src/video/uikit/SDL_uikitview.h Mon Jan 31 23:57:58 2011 +0100
@@ -23,11 +23,11 @@
#include "SDL_stdinc.h"
#include "SDL_events.h"
@@ -266,45 +144,18 @@
#endif
/* *INDENT-OFF* */
-diff -r d716dff4b13e src/video/uikit/SDL_uikitview.m
---- a/src/video/uikit/SDL_uikitview.m Thu Dec 02 11:56:23 2010 -0800
-+++ b/src/video/uikit/SDL_uikitview.m Thu Dec 02 22:38:57 2010 +0100
-@@ -35,9 +35,6 @@
- @implementation SDL_uikitview
-
- - (void)dealloc {
--#if SDL_IPHONE_KEYBOARD
-- [textField release];
--#endif
- [super dealloc];
- }
-
-@@ -220,7 +217,7 @@
- /* Set ourselves up as a UITextFieldDelegate */
- - (void)initializeKeyboard {
-
-- textField = [[[UITextField alloc] initWithFrame: CGRectZero] autorelease];
-+ textField = [[UITextField alloc] initWithFrame: CGRectZero];
- textField.delegate = self;
- /* placeholder so there is something to delete! */
- textField.text = @" ";
-@@ -238,6 +235,7 @@
- keyboardVisible = NO;
- /* add the UITextField (hidden) to our view */
- [self addSubview: textField];
-+ [textField release];
- }
-
- /* reveal onscreen virtual keyboard */
-@@ -300,6 +298,7 @@
+diff -r f2c2f0ecba5f src/video/uikit/SDL_uikitview.m
+--- a/src/video/uikit/SDL_uikitview.m Sun Jan 30 13:42:05 2011 -0800
++++ b/src/video/uikit/SDL_uikitview.m Mon Jan 31 23:57:58 2011 +0100
+@@ -298,6 +298,7 @@
/* Terminates the editing session */
- (BOOL)textFieldShouldReturn:(UITextField*)_textField {
-+ SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RETURN);
++ SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RETURN);
[self hideKeyboard];
return YES;
}
-@@ -314,7 +313,7 @@
+@@ -312,7 +313,7 @@
int SDL_iPhoneKeyboardShow(SDL_Window * window) {
SDL_WindowData *data;
@@ -313,7 +164,7 @@
if (NULL == window) {
SDL_SetError("Window does not exist");
-@@ -322,7 +321,8 @@
+@@ -320,7 +321,8 @@
}
data = (SDL_WindowData *)window->driverdata;
@@ -323,7 +174,7 @@
if (nil == view) {
SDL_SetError("Window has no view");
-@@ -337,7 +337,7 @@
+@@ -335,7 +337,7 @@
int SDL_iPhoneKeyboardHide(SDL_Window * window) {
SDL_WindowData *data;
@@ -332,7 +183,7 @@
if (NULL == window) {
SDL_SetError("Window does not exist");
-@@ -345,7 +345,8 @@
+@@ -343,7 +345,8 @@
}
data = (SDL_WindowData *)window->driverdata;
@@ -342,7 +193,7 @@
if (NULL == view) {
SDL_SetError("Window has no view");
-@@ -360,7 +361,7 @@
+@@ -358,7 +361,7 @@
SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window) {
SDL_WindowData *data;
@@ -351,7 +202,7 @@
if (NULL == window) {
SDL_SetError("Window does not exist");
-@@ -368,7 +369,8 @@
+@@ -366,7 +369,8 @@
}
data = (SDL_WindowData *)window->driverdata;
@@ -361,7 +212,7 @@
if (NULL == view) {
SDL_SetError("Window has no view");
-@@ -382,7 +384,7 @@
+@@ -380,7 +384,7 @@
int SDL_iPhoneKeyboardToggle(SDL_Window * window) {
SDL_WindowData *data;
@@ -370,7 +221,7 @@
if (NULL == window) {
SDL_SetError("Window does not exist");
-@@ -390,7 +392,8 @@
+@@ -388,7 +392,8 @@
}
data = (SDL_WindowData *)window->driverdata;
@@ -380,10 +231,10 @@
if (NULL == view) {
SDL_SetError("Window has no view");
-diff -r d716dff4b13e src/video/uikit/SDL_uikitwindow.m
---- a/src/video/uikit/SDL_uikitwindow.m Thu Dec 02 11:56:23 2010 -0800
-+++ b/src/video/uikit/SDL_uikitwindow.m Thu Dec 02 22:38:57 2010 +0100
-@@ -144,7 +144,10 @@
+diff -r f2c2f0ecba5f src/video/uikit/SDL_uikitwindow.m
+--- a/src/video/uikit/SDL_uikitwindow.m Sun Jan 30 13:42:05 2011 -0800
++++ b/src/video/uikit/SDL_uikitwindow.m Mon Jan 31 23:57:58 2011 +0100
+@@ -145,7 +145,10 @@
if (SDL_UIKit_supports_multiple_displays) {
[uiwindow setScreen:uiscreen];
}
@@ -395,9 +246,9 @@
if (SetupWindowData(_this, window, uiwindow, SDL_TRUE) < 0) {
[uiwindow release];
return -1;
-diff -r d716dff4b13e src/video/uikit/keyinfotable.h
---- a/src/video/uikit/keyinfotable.h Thu Dec 02 11:56:23 2010 -0800
-+++ b/src/video/uikit/keyinfotable.h Thu Dec 02 22:38:57 2010 +0100
+diff -r f2c2f0ecba5f src/video/uikit/keyinfotable.h
+--- a/src/video/uikit/keyinfotable.h Sun Jan 30 13:42:05 2011 -0800
++++ b/src/video/uikit/keyinfotable.h Mon Jan 31 23:57:58 2011 +0100
@@ -54,7 +54,7 @@
/* 10 */ { SDL_SCANCODE_UNKNOWN, 0 },
/* 11 */ { SDL_SCANCODE_UNKNOWN, 0 },
Binary file share/hedgewars/Data/Maps/Blizzard/map.png has changed
Binary file share/hedgewars/Data/Maps/Blizzard/mask.png has changed
--- a/tools/CMakeLists.txt Tue Jun 28 01:05:33 2011 +0200
+++ b/tools/CMakeLists.txt Wed Jun 29 21:52:07 2011 +0200
@@ -16,7 +16,14 @@
find_package(SDL_ttf REQUIRED)
find_package(SDL_mixer REQUIRED)
find_package(OGGVORBIS REQUIRED)
- find_package(SPARKLE)
+ if(NOT NOAUTOUPDATE)
+ find_package(SPARKLE)
+ if(SPARKLE_FOUND)
+ set(SPARKLE_FOUND 1)
+ else()
+ set(SPARKLE_FOUND 0)
+ endif()
+ endif()
#use the associated tool from the libraries we've selected
string(REGEX REPLACE "(.*)/include.*" "\\1" qt_base_dir "${QT_INCLUDE_DIR}")
@@ -35,12 +42,6 @@
string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}")
- if(SPARKLE_FOUND)
- set(SPARKLE_FOUND 1)
- else()
- set(SPARKLE_FOUND 0)
- endif()
-
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CreateMacBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake)
endif(APPLE AND BUNDLE)