# HG changeset patch # User koda # Date 1288180940 -7200 # Node ID b1c2c2f6fc5eb9aab9d95c967a52b6c8a9a029de # Parent 79338661006877a79f3ae20b5f6f6058f4a08eb5# Parent 3e173ac6384913b460bf537fa91109b15f49a044 update branch with latest head, most likely breaking water color in stereo mode diff -r 793386610068 -r b1c2c2f6fc5e .hgignore --- a/.hgignore Thu Aug 26 23:59:18 2010 +0200 +++ b/.hgignore Wed Oct 27 14:02:20 2010 +0200 @@ -1,24 +1,34 @@ -glob:CMakeCache.txt -glob:CMakeFiles -glob:moc_*.cxx -glob:qrc_*.cxx -glob:*.o -glob:Makefile -glob:bin -glob:*.hi -glob:*.*~ -glob:*.core -glob:hedgewars/config.inc -glob:cmake_install.cmake -glob:QTfrontend/hwconsts.cpp -glob:CPackConfig.cmake -glob:CPackSourceConfig.cmake -glob:tools/cmake_uninstall.cmake -glob:install_manifest.txt -glob:.DS_Store -glob:*.swp -glob:*.orig -glob:*.diff -glob:project_files/HedgewarsMobile/Data/ -glob:project_files/HedgewarsMobile/build/ -glob:project_files/HedgewarsMobile/Hedgewars.xcodeproj/vittorio.* +glob:CMakeCache.txt +glob:CMakeFiles +glob:moc_*.cxx +glob:qrc_*.cxx +glob:*.o +glob:Makefile +glob:bin +glob:*.hi +glob:*.*~ +glob:*.core +glob:hedgewars/config.inc +glob:cmake_install.cmake +glob:QTfrontend/hwconsts.cpp +glob:CPackConfig.cmake +glob:CPackSourceConfig.cmake +glob:tools/cmake_uninstall.cmake +glob:install_manifest.txt +glob:.DS_Store +glob:*.swp +glob:*.orig +glob:*.diff +glob:project_files/HedgewarsMobile/Data/ +glob:project_files/HedgewarsMobile/build/ +glob:project_files/HedgewarsMobile/audio/ +glob:project_files/HedgewarsMobile/Hedgewars.xcodeproj/vittorio.* +glob:moc_*.cxx_parameters +relre:^release\/ +glob:*.log +glob:*.cmd +glob:*.diff +glob:*.patch +glob:*.orig +glob:*.bak +glob:*.rej diff -r 793386610068 -r b1c2c2f6fc5e .hgtags --- a/.hgtags Thu Aug 26 23:59:18 2010 +0200 +++ b/.hgtags Wed Oct 27 14:02:20 2010 +0200 @@ -11,3 +11,14 @@ bb56f0682655b18f229be97085a409e3c76f578e hedgewars-0.8.1 fee68e3a303998fdfcc69f74775dc84a36f587fb 0.9.9 fee68e3a303998fdfcc69f74775dc84a36f587fb 0.9.9.1 +fd6c20cd90e33fa5e4f03e1c1f220b3eb14d169a Hedgewars-iOS-1.0 +fd6c20cd90e33fa5e4f03e1c1f220b3eb14d169a Hedgewars-iOS-1.0 +0000000000000000000000000000000000000000 Hedgewars-iOS-1.0 +0000000000000000000000000000000000000000 Hedgewars-iOS-1.0 +81db3c85784b4f35c7ff1ef9a5d64f5bdd383f08 Hedgewars-iOS-1.0 +296ec09490d92a74619aa8595df1bbcfd0dff4e5 Hedgewars-iOS-1.0.1 +296ec09490d92a74619aa8595df1bbcfd0dff4e5 Hedgewars-iOS-1.0.1 +0000000000000000000000000000000000000000 Hedgewars-iOS-1.0.1 +0000000000000000000000000000000000000000 Hedgewars-iOS-1.0.1 +3620607258cdc1213dce20cb6ad7872f6b8085e0 Hedgewars-iOS-1.0.1 +adffb668f06e265b45d1e4aedc283e6f4e5ba7e8 Hedgewars-iOS-1.1 diff -r 793386610068 -r b1c2c2f6fc5e CMakeLists.txt --- a/CMakeLists.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/CMakeLists.txt Wed Oct 27 14:02:20 2010 +0200 @@ -11,10 +11,10 @@ set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME IF(version_suffix MATCHES "-dev") set(HW_DEV true) - IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg) + IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg) FIND_PROGRAM(HGCOMMAND hg) IF(HGCOMMAND) - exec_program(${HGCOMMAND} + exec_program(${HGCOMMAND} ARGS identify -in ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE version_suffix ) @@ -55,16 +55,16 @@ if(APPLE) set(CMAKE_FIND_FRAMEWORK "FIRST") - + #paths for creating the bundle set(bundle_name Hedgewars.app) - set(CMAKE_INSTALL_PREFIX ${bundle_name}/Contents/MacOS/) + set(CMAKE_INSTALL_PREFIX ${bundle_name}/Contents/MacOS/) set(DATA_INSTALL_DIR "../Resources/") set(target_dir ".") - + #what system are we building for set(minimum_macosx $ENV{MACOSX_DEPLOYMENT_TARGET}) - + #detect on which system are we EXEC_PROGRAM("/usr/bin/sw_vers" OUTPUT_VARIABLE MACOSX_VERSION_TMP) STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" MACOSX_VERSION_TMP "${MACOSX_VERSION_TMP}") @@ -97,9 +97,9 @@ if(current_macosx_version MATCHES "10.6") set(CMAKE_OSX_ARCHITECTURES "x86_64") endif() - ENDIF() + ENDIF() - message(STATUS "Target system: Mac OS X ${minimum_macosx} ${CMAKE_OSX_ARCHITECTURES}") + message(STATUS "Target system: Mac OS X ${minimum_macosx} ${CMAKE_OSX_ARCHITECTURES}") if(minimum_macosx MATCHES "10.4") set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk/") @@ -132,10 +132,10 @@ endif (NOT CMAKE_BUILD_TYPE) if(CMAKE_BUILD_TYPE MATCHES RELEASE OR CMAKE_BUILD_TYPE MATCHES "Release") - message(STATUS "Building Release") + message(STATUS "Building Release") set(Optz true) else() - message(STATUS "Building Debug") + message(STATUS "Building Debug") #set(CMAKE_VERBOSE_MAKEFILE true) set(Optz false) endif() @@ -205,7 +205,7 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "Hedgewars ${HEDGEWARS_VERSION}") if(WIN32 AND NOT UNIX) - set(CPACK_NSIS_DISPLAY_NAME ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + set(CPACK_NSIS_DISPLAY_NAME "Hedgewars") set(CPACK_NSIS_HELP_LINK "http://www.hedgewars.org/") set(CPACK_NSIS_URL_INFO_ABOUT "http://www.hedgewars.org/") set(CPACK_NSIS_CONTACT "unC0Rr@gmail.com") diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/CMakeLists.txt --- a/QTfrontend/CMakeLists.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/CMakeLists.txt Wed Oct 27 14:02:20 2010 +0200 @@ -183,7 +183,7 @@ ) -set( HW_LINK_LIBS +set( HW_LINK_LIBS ${QT_LIBRARIES} ${SDL_LIBRARY} ${SDLMIXER_LIBRARY} @@ -195,7 +195,7 @@ set(HW_LINK_LIBS ${HW_LINK_LIBS} SDL) endif() - set( HW_LINK_LIBS + set( HW_LINK_LIBS ${HW_LINK_LIBS} ole32 oleaut32 diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/CocoaInitializer.mm --- a/QTfrontend/CocoaInitializer.mm Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/CocoaInitializer.mm Wed Oct 27 14:02:20 2010 +0200 @@ -8,7 +8,7 @@ #include #include -class CocoaInitializer::Private +class CocoaInitializer::Private { public: NSAutoreleasePool* autoReleasePool_; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/InstallController.cpp --- a/QTfrontend/InstallController.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/InstallController.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -1,6 +1,6 @@ /* * InstallController.cpp - * + * * * Created by Vittorio on 28/09/09. * Copyright 2009 __MyCompanyName__. All rights reserved. diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/InstallController.h --- a/QTfrontend/InstallController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/InstallController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,6 +1,6 @@ /* * InstallController.h - * + * * * Created by Vittorio on 28/09/09. * Copyright 2009 __MyCompanyName__. All rights reserved. @@ -14,8 +14,8 @@ { public: virtual ~InstallController(); - + virtual void showInstallController() = 0; }; -#endif \ No newline at end of file +#endif diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/M3InstallController.h --- a/QTfrontend/M3InstallController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/M3InstallController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,10 @@ /***************************************************************** M3InstallController.m - + Created by Martin Pilkington on 02/06/2007. - + Copyright (c) 2006-2009 M Cubed Software - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without @@ -13,10 +13,10 @@ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -25,7 +25,7 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + *****************************************************************/ #import diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/M3InstallController.m --- a/QTfrontend/M3InstallController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/M3InstallController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,10 @@ /***************************************************************** M3InstallController.m - + Created by Martin Pilkington on 02/06/2007. - + Copyright (c) 2006-2009 M Cubed Software - + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without @@ -13,10 +13,10 @@ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -25,7 +25,7 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + *****************************************************************/ #import "M3InstallController.h" @@ -40,7 +40,7 @@ NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; NSString *title = [NSString stringWithFormat:NSLocalizedString(@"%@ is currently running from a disk image", @"AppName is currently running from a disk image"), appName]; NSString *body = [NSString stringWithFormat:NSLocalizedString(@"Would you like to install %@ in your applications folder before quitting?", @"Would you like to install App Name in your applications folder before quitting?"), appName]; - alert = [[NSAlert alertWithMessageText:title + alert = [[NSAlert alertWithMessageText:title defaultButton:NSLocalizedString(@"Install", @"Install") alternateButton:NSLocalizedString(@"Don't Install", @"Don't Install") otherButton:nil @@ -67,16 +67,16 @@ NSString *appsPath = [[NSString stringWithString:@"/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]]; NSString *userAppsPath = [[[NSString stringWithString:@"~/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]] stringByExpandingTildeInPath]; NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; - + //Delete the app that is installed if ([[NSFileManager defaultManager] fileExistsAtPath:appsPath]) { [[NSFileManager defaultManager] removeFileAtPath:appsPath handler:nil]; } //Delete the app that is installed - if ([[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath] toPath:appsPath + if ([[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath] toPath:appsPath handler:nil]) { - NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"App Name installed successfully"), appName], - [NSString stringWithFormat:NSLocalizedString(@"%@ was installed in /Applications", @"App Name was installed in /Applications"), appName], + NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"App Name installed successfully"), appName], + [NSString stringWithFormat:NSLocalizedString(@"%@ was installed in /Applications", @"App Name was installed in /Applications"), appName], NSLocalizedString(@"Quit", @"Quit"), nil, nil); } else { if ([[NSFileManager defaultManager] fileExistsAtPath:userAppsPath]) { @@ -84,11 +84,11 @@ } if ([[NSFileManager defaultManager] copyPath:[[NSBundle mainBundle] bundlePath] toPath:userAppsPath handler:nil]) { - NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"AppName installed successfully"), appName], - [NSString stringWithFormat:NSLocalizedString(@"%@ was installed in %@", @"App Name was installed in %@"), appName, [[NSString stringWithString:@"~/Applications"] stringByExpandingTildeInPath]], + NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"AppName installed successfully"), appName], + [NSString stringWithFormat:NSLocalizedString(@"%@ was installed in %@", @"App Name was installed in %@"), appName, [[NSString stringWithString:@"~/Applications"] stringByExpandingTildeInPath]], NSLocalizedString(@"Quit", @"Quit"), nil, nil); } else { - NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"Could not install %@", @"Could not install App Name"), appName], + NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"Could not install %@", @"Could not install App Name"), appName], NSLocalizedString(@"An error occurred when installing", @"An error occurred when installing"), NSLocalizedString(@"Quit", @"Quit"), nil, nil); } } diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/M3Panel.h --- a/QTfrontend/M3Panel.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/M3Panel.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,6 +1,6 @@ /* * M3Panel.h - * + * * * Created by Vittorio on 28/09/09. * Copyright 2009 __MyCompanyName__. All rights reserved. @@ -17,9 +17,9 @@ public: M3Panel(void); ~M3Panel(); - + void showInstallController(); - + private: class Private; Private* c; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/M3Panel.mm --- a/QTfrontend/M3Panel.mm Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/M3Panel.mm Wed Oct 27 14:02:20 2010 +0200 @@ -1,6 +1,6 @@ /* * M3Panel.cpp - * + * * * Created by Vittorio on 28/09/09. * Copyright 2009 __MyCompanyName__. All rights reserved. @@ -21,10 +21,10 @@ M3Panel::M3Panel(void) { c = new Private; - + c->install = [[M3InstallController alloc] init]; [c->install retain]; - + } M3Panel::~M3Panel() diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/NSWorkspace_RBAdditions.m --- a/QTfrontend/NSWorkspace_RBAdditions.m Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/NSWorkspace_RBAdditions.m Wed Oct 27 14:02:20 2010 +0200 @@ -107,7 +107,7 @@ } NSString* cls = [(NSString*)IOObjectCopyClass(nextParent) autorelease]; if (![cls isEqualToString:@"IOPCIDevice"]) { - + // Uncomment the following line to have the device tree dumped to the console. // NSLog(@"=================================> %@:%@\n",cls,props); @@ -207,7 +207,7 @@ } } //Don't need this for disk images, gets around warnings for some deprecated functions - + /* else { // For a network volume, get the volume reference number and use to get the server URL. FSRef ref; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/SDLs.cpp --- a/QTfrontend/SDLs.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/SDLs.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -35,7 +35,7 @@ { SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK); - + musicInitialized = 0; music = NULL; if(SDL_NumJoysticks()) @@ -86,7 +86,7 @@ for(int jid = 0; jid < SDL_NumJoysticks(); jid++) { SDL_Joystick* joy = SDL_JoystickOpen(jid); - + // Retrieve the game controller's name and strip "Controller (...)" that's added by some drivers (English only) QString joyname = QString(SDL_JoystickName(jid)).replace(QRegExp("^Controller \\((.*)\\)$"), "\\1"); @@ -102,7 +102,7 @@ { // Again store the part of the string not changing for multiple uses QString axis = prefix + QApplication::translate("binds (keys)", "Axis") + QString(" %1 ").arg(aid + 1); - + // Entry for "Axis Up" sprintf(sdlkeys[i][0], "j%da%du", jid, aid); sprintf(sdlkeys[i++][1], "%s", ((isxb && aid < 5) ? (prefix + QApplication::translate("binds (keys)", xbox360axes[aid * 2])) : axis + QApplication::translate("binds (keys)", "(Up)")).toStdString().c_str()); @@ -119,33 +119,33 @@ QString hat = prefix + (isxb ? (QApplication::translate("binds (keys)", xb360dpad) + QString(" ")) : QApplication::translate("binds (keys)", "Hat") + QString(" %1 ").arg(hid + 1)); // Entry for "Hat Up" - sprintf(sdlkeys[i][0], "j%dh%du", jid, hid); + sprintf(sdlkeys[i][0], "j%dh%du", jid, hid); sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Up)")).toStdString().c_str()); // Entry for "Hat Down" - sprintf(sdlkeys[i][0], "j%dh%dd", jid, hid); + sprintf(sdlkeys[i][0], "j%dh%dd", jid, hid); sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Down)")).toStdString().c_str()); // Entry for "Hat Left" - sprintf(sdlkeys[i][0], "j%dh%dl", jid, hid); + sprintf(sdlkeys[i][0], "j%dh%dl", jid, hid); sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Left)")).toStdString().c_str()); // Entry for "Hat Right" - sprintf(sdlkeys[i][0], "j%dh%dr", jid, hid); + sprintf(sdlkeys[i][0], "j%dh%dr", jid, hid); sprintf(sdlkeys[i++][1], "%s", (hat + QApplication::translate("binds (keys)", "(Right)")).toStdString().c_str()); } - + // Register entries for all buttons of this joystick/gamepad for(int bid = 0; bid < SDL_JoystickNumButtons(joy) && i < 1022; bid++) { // Buttons - sprintf(sdlkeys[i][0], "j%db%d", jid, bid); + sprintf(sdlkeys[i][0], "j%db%d", jid, bid); sprintf(sdlkeys[i++][1], "%s", (prefix + ((isxb && bid < 10) ? (QApplication::translate("binds (keys)", xb360buttons[bid]) + QString(" ")) : QApplication::translate("binds (keys)", "Button") + QString(" %1").arg(bid + 1))).toStdString().c_str()); } // Close the game controller as we no longer need it SDL_JoystickClose(joy); } - + // Terminate the list sdlkeys[i][0][0] = '\0'; sdlkeys[i][1][0] = '\0'; @@ -167,7 +167,7 @@ if (music == NULL) { music = Mix_LoadMUS((datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData()); - + } Mix_VolumeMusic(MIX_MAX_VOLUME - 28); Mix_FadeInMusic(music, -1, 1750); diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/SDLs.h --- a/QTfrontend/SDLs.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/SDLs.h Wed Oct 27 14:02:20 2010 +0200 @@ -32,7 +32,7 @@ private: Mix_Music *music; - int musicInitialized; + int musicInitialized; public: SDLInteraction(); @@ -41,7 +41,7 @@ void addGameControllerKeys() const; void StartMusic(); void StopMusic(); - void SDLMusicInit(); + void SDLMusicInit(); }; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/about.cpp --- a/QTfrontend/about.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/about.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -90,7 +90,7 @@ "
" "Julien Koesten <julienkoesten@aol.com>" "
" - "Joshua O'Sullivan <battysausage@hotmail.co.uk>" + "Joshua O'Sullivan <coheedftw@hotmail.co.uk>" "
" "Nils Lück <nils.luck.design@gmail.com>" "
" @@ -118,7 +118,7 @@ "German: Peter Hüwe <PeterHuewe@gmx.de>, Mario Liebisch <mario.liebisch@gmail.com>
" "Italian: Luca Bonora <bonora.luca@gmail.com>
" "Japanese: ADAM Etienne <etienne.adam@gmail.com>
" - "Polish: Maciej Mroziński <mynick2@o2.pl>, Wojciech Latkowski <magikmagik17l@gmail.com>, Maciej Górny
" + "Polish: Maciej Mroziński <mynick2@o2.pl>, Wojciech Latkowski <magik17l@gmail.com>, Piotr Mitana, Maciej Górny
" "Portuguese: Fábio Canário <inufabie@gmail.com>
" "Russian: Andrey Korotaev <unC0Rr@gmail.com>
" "Slovak: Jose Riha
" diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/achievements.cpp --- a/QTfrontend/achievements.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/achievements.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -33,5 +33,5 @@ {"skipping", QT_TRANSLATE_NOOP("achievements", "Skipped"), QT_TRANSLATE_NOOP("achievements", "Let a single hog skip over the surface of the water for at least 5 times."), "skipped", "1", "hidden"}, {"cgunman", QT_TRANSLATE_NOOP("achievements", "Crazy Gunman"), QT_TRANSLATE_NOOP("achievements", "Eliminate 3 hogs with a single shot of the sniper rifle."), "cgunman", "1", ""}, */ - {0, 0, 0, 0, 0, 0} // "terminator" line + { {0, 0, 0, 0, 0, 0} } // "terminator" line }; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/ammoSchemeModel.cpp --- a/QTfrontend/ammoSchemeModel.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/ammoSchemeModel.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -41,15 +41,19 @@ << QVariant(false) // shared ammo 15 << QVariant(false) //disable girders 16 << QVariant(false) // disable land objects 17 - << QVariant(100) // damage modfier 18 - << QVariant(45) // turn time 19 - << QVariant(100) // init health 20 - << QVariant(15) // sudden death 21 - << QVariant(5) // case prob 22 - << QVariant(3) // mines time 23 - << QVariant(4) // landadds 24 - << QVariant(0) // mine dud pct 25 - << QVariant(2) // explosives 26 + << QVariant(false) // AI survival 18 + << QVariant(false) // inf. attack 19 + << QVariant(false) // reset weps 20 + << QVariant(false) // per hog ammo 21 + << QVariant(100) // damage modfier 22 + << QVariant(45) // turn time 23 + << QVariant(100) // init health 24 + << QVariant(15) // sudden death 25 + << QVariant(5) // case prob 26 + << QVariant(3) // mines time 27 + << QVariant(4) // landadds 28 + << QVariant(0) // mine dud pct 29 + << QVariant(2) // explosives 30 ; AmmoSchemeModel::AmmoSchemeModel(QObject* parent, const QString & fileName) : @@ -87,15 +91,19 @@ << "sharedammo" // 15 << "disablegirders" // 16 << "disablelandobjects" // 17 - << "damagefactor" // 18 - << "turntime" // 19 - << "health" // 20 - << "suddendeath" // 21 - << "caseprobability" // 22 - << "minestime" // 23 - << "landadds" // 24 - << "minedudpct" // 25 - << "explosives" // 26 + << "aisurvival" // 18 + << "infattack" // 19 + << "resetweps" // 20 + << "perhogammo" // 21 + << "damagefactor" // 22 + << "turntime" // 23 + << "health" // 24 + << "suddendeath" // 25 + << "caseprobability" // 26 + << "minestime" // 27 + << "landadds" // 28 + << "minedudpct" // 29 + << "explosives" // 30 ; QList proMode; @@ -118,15 +126,19 @@ << QVariant(true) // shared ammo 15 << QVariant(false) //disable girders 16 << QVariant(false) // disable land objects 17 - << QVariant(100) // damage modfier 18 - << QVariant(15) // turn time 19 - << QVariant(100) // init health 20 - << QVariant(15) // sudden death 21 - << QVariant(0) // case prob 22 - << QVariant(3) // mines time 23 - << QVariant(4) // landadds 24 - << QVariant(0) // mine dud pct 25 - << QVariant(2) // explosives 26 + << QVariant(false) // AI survival 18 + << QVariant(false) // inf. attack 19 + << QVariant(false) // reset weps 20 + << QVariant(false) // per hog ammo 21 + << QVariant(100) // damage modfier 22 + << QVariant(15) // turn time 23 + << QVariant(100) // init health 24 + << QVariant(15) // sudden death 25 + << QVariant(0) // case prob 26 + << QVariant(3) // mines time 27 + << QVariant(4) // landadds 28 + << QVariant(0) // mine dud pct 29 + << QVariant(2) // explosives 30 ; QList shoppa; @@ -149,15 +161,19 @@ << QVariant(true) // shared ammo 15 << QVariant(true) //disable girders 16 << QVariant(false) // disable land objects 17 - << QVariant(100) // damage modfier 18 - << QVariant(30) // turn time 19 - << QVariant(100) // init health 20 - << QVariant(50) // sudden death 21 - << QVariant(1) // case prob 22 - << QVariant(3) // mines time 23 - << QVariant(4) // landadds 24 - << QVariant(0) // mine dud pct 25 - << QVariant(0) // explosives 26 + << QVariant(false) // AI survival 18 + << QVariant(false) // inf. attack 19 + << QVariant(false) // reset weps 20 + << QVariant(false) // per hog ammo 21 + << QVariant(100) // damage modfier 22 + << QVariant(30) // turn time 23 + << QVariant(100) // init health 24 + << QVariant(50) // sudden death 25 + << QVariant(1) // case prob 26 + << QVariant(3) // mines time 27 + << QVariant(4) // landadds 28 + << QVariant(0) // mine dud pct 29 + << QVariant(0) // explosives 30 ; QList basketball; @@ -180,15 +196,19 @@ << QVariant(true) // shared ammo 15 << QVariant(true) //disable girders 16 << QVariant(false) // disable land objects 17 - << QVariant(100) // damage modfier 18 - << QVariant(30) // turn time 19 - << QVariant(100) // init health 20 - << QVariant(15) // sudden death 21 - << QVariant(0) // case prob 22 - << QVariant(3) // mines time 23 - << QVariant(4) // landadds 24 - << QVariant(0) // mine dud pct 25 - << QVariant(0) // explosives 26 + << QVariant(false) // AI survival 18 + << QVariant(false) // inf. attack 19 + << QVariant(false) // reset weps 20 + << QVariant(false) // per hog ammo 21 + << QVariant(100) // damage modfier 22 + << QVariant(30) // turn time 23 + << QVariant(100) // init health 24 + << QVariant(15) // sudden death 25 + << QVariant(0) // case prob 26 + << QVariant(3) // mines time 27 + << QVariant(4) // landadds 28 + << QVariant(0) // mine dud pct 29 + << QVariant(0) // explosives 30 ; QList minefield; @@ -211,15 +231,19 @@ << QVariant(true) // shared ammo 15 << QVariant(true) //disable girders 16 << QVariant(false) // disable land objects 17 - << QVariant(150) // damage modfier 18 - << QVariant(30) // turn time 19 - << QVariant(50) // init health 20 - << QVariant(15) // sudden death 21 - << QVariant(0) // case prob 22 - << QVariant(0) // mines time 23 - << QVariant(80) // landadds 24 - << QVariant(0) // mine dud pct 25 - << QVariant(0) // explosives 26 + << QVariant(false) // AI survival 18 + << QVariant(false) // inf. attack 19 + << QVariant(false) // reset weps 20 + << QVariant(false) // per hog ammo 21 + << QVariant(150) // damage modfier 22 + << QVariant(30) // turn time 23 + << QVariant(50) // init health 24 + << QVariant(15) // sudden death 25 + << QVariant(0) // case prob 26 + << QVariant(0) // mines time 27 + << QVariant(80) // landadds 28 + << QVariant(0) // mine dud pct 29 + << QVariant(0) // explosives 30 ; QList barrelmayhem; @@ -242,15 +266,19 @@ << QVariant(true) // shared ammo 15 << QVariant(false) //disable girders 16 << QVariant(false) // disable land objects 17 - << QVariant(100) // damage modfier 18 - << QVariant(30) // turn time 19 - << QVariant(100) // init health 20 - << QVariant(15) // sudden death 21 - << QVariant(0) // case prob 22 - << QVariant(0) // mines time 23 - << QVariant(0) // landadds 24 - << QVariant(0) // mine dud pct 25 - << QVariant(80) // explosives 26 + << QVariant(false) // AI survival 18 + << QVariant(false) // inf. attack 19 + << QVariant(false) // reset weps 20 + << QVariant(false) // per hog ammo 21 + << QVariant(100) // damage modfier 22 + << QVariant(30) // turn time 23 + << QVariant(100) // init health 24 + << QVariant(15) // sudden death 25 + << QVariant(0) // case prob 26 + << QVariant(0) // mines time 27 + << QVariant(0) // landadds 28 + << QVariant(0) // mine dud pct 29 + << QVariant(80) // explosives 30 ; QList tunnelhogs; @@ -273,15 +301,19 @@ << QVariant(true) // shared ammo 15 << QVariant(true) //disable girders 16 << QVariant(true) // disable land objects 17 - << QVariant(100) // damage modfier 18 - << QVariant(30) // turn time 19 - << QVariant(100) // init health 20 - << QVariant(15) // sudden death 21 - << QVariant(5) // case prob 22 - << QVariant(3) // mines time 23 - << QVariant(10) // landadds 24 - << QVariant(10) // mine dud pct 25 - << QVariant(10) // explosives 26 + << QVariant(false) // AI survival 18 + << QVariant(false) // inf. attack 19 + << QVariant(false) // reset weps 20 + << QVariant(false) // per hog ammo 21 + << QVariant(100) // damage modfier 22 + << QVariant(30) // turn time 23 + << QVariant(100) // init health 24 + << QVariant(15) // sudden death 25 + << QVariant(5) // case prob 26 + << QVariant(3) // mines time 27 + << QVariant(10) // landadds 28 + << QVariant(10) // mine dud pct 29 + << QVariant(10) // explosives 30 ; schemes.append(defaultScheme); diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/chatwidget.cpp --- a/QTfrontend/chatwidget.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/chatwidget.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -54,14 +54,14 @@ mainLayout.setSpacing(1); mainLayout.setMargin(1); mainLayout.setSizeConstraint(QLayout::SetMinimumSize); - mainLayout.setColumnStretch(0, 75); - mainLayout.setColumnStretch(1, 25); + mainLayout.setColumnStretch(0, 76); + mainLayout.setColumnStretch(1, 24); chatEditLine = new QLineEdit(this); chatEditLine->setMaxLength(300); connect(chatEditLine, SIGNAL(returnPressed()), this, SLOT(returnPressed())); - mainLayout.addWidget(chatEditLine, 1, 0, 1, 2); + mainLayout.addWidget(chatEditLine, 1, 0); chatText = new QTextBrowser(this); chatText->setMinimumHeight(20); @@ -81,7 +81,7 @@ connect(chatNicks, SIGNAL(currentRowChanged(int)), this, SLOT(chatNickSelected(int))); - mainLayout.addWidget(chatNicks, 0, 1); + mainLayout.addWidget(chatNicks, 0, 1, -1, 1); acInfo = new QAction(QAction::tr("Info"), chatNicks); acInfo->setIcon(QIcon(":/res/info.png")); @@ -106,7 +106,7 @@ chatNicks->insertAction(0, acFollow); chatNicks->insertAction(0, acIgnore); chatNicks->insertAction(0, acFriend); - + showReady = false; } @@ -151,17 +151,17 @@ if(ignoreList.contains(nick, Qt::CaseInsensitive)) { - item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_ignore_on" : ":/res/chat_ignore_off") : ":/res/chat_ignore.png")); + item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_ignore_on.png" : ":/res/chat_ignore_off.png") : ":/res/chat_ignore.png")); item->setForeground(Qt::gray); } else if(friendsList.contains(nick, Qt::CaseInsensitive)) { - item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_friend_on" : ":/res/chat_friend_off") : ":/res/chat_friend.png")); + item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_friend_on.png" : ":/res/chat_friend_off.png") : ":/res/chat_friend.png")); item->setForeground(Qt::green); } else { - item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_default_on" : ":/res/chat_default_off") : ":/res/chat_default.png")); + item->setIcon(QIcon(showReady ? (item->data(Qt::UserRole).toBool() ? ":/res/chat_default_on.png" : ":/res/chat_default_off.png") : ":/res/chat_default.png")); item->setForeground(QBrush(QColor(0xff, 0xcc, 0x00))); } } @@ -209,7 +209,7 @@ QString color(""); bool isFriend = friendsList.contains(parts[0], Qt::CaseInsensitive); - + if (str.startsWith("\x03")) color = QString("#c0c0c0"); else if (str.startsWith("\x02")) diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/frameTeam.cpp --- a/QTfrontend/frameTeam.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/frameTeam.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -35,12 +35,9 @@ mainLayout.setSpacing(1); mainLayout.setContentsMargins(4, 4, 4, 4); - availableColors.push_back(*color1); - availableColors.push_back(*color2); - availableColors.push_back(*color3); - availableColors.push_back(*color4); - availableColors.push_back(*color5); - availableColors.push_back(*color6); + int i = 0; + while(colors[i]) + availableColors.push_back(*colors[i++]); resetColors(); } @@ -57,7 +54,7 @@ void FrameTeams::resetColors() { - currentColor=availableColors.begin(); + currentColor=availableColors.end() - 1; // ensure next color is the first one } QColor FrameTeams::getNextColor() const diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/game.cpp --- a/QTfrontend/game.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/game.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -30,7 +30,7 @@ #include -QString training; // TODO: Cleaner solution? +QString training, campaign; // TODO: Cleaner solution? HWGame::HWGame(GameUIConfig * config, GameCFGWidget * gamecfg, QString ammo, TeamSelWidget* pTeamSelWidget) : TCPBase(true), @@ -84,13 +84,13 @@ QList teams = m_pTeamSelWidget->getPlayingTeams(); for(QList::iterator it = teams.begin(); it != teams.end(); ++it) { - HWProto::addStringListToBuffer(buf, - (*it).TeamGameConfig(gamecfg->getInitHealth())); HWProto::addStringToBuffer(buf, QString("eammloadt %1").arg(ammostr.mid(0, cAmmoNumber))); HWProto::addStringToBuffer(buf, QString("eammprob %1").arg(ammostr.mid(cAmmoNumber, cAmmoNumber))); HWProto::addStringToBuffer(buf, QString("eammdelay %1").arg(ammostr.mid(2 * cAmmoNumber, cAmmoNumber))); HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber))); HWProto::addStringToBuffer(buf, QString("eammstore")); + HWProto::addStringListToBuffer(buf, + (*it).TeamGameConfig(gamecfg->getInitHealth())); } } RawSendIPC(buf); @@ -115,7 +115,7 @@ HWTeam * team1; team1 = new HWTeam; team1->difficulty = 0; - team1->teamColor = *color1; + team1->teamColor = *colors[0]; team1->numHedgehogs = 4; namegen.TeamRandomNames(team1,TRUE); HWProto::addStringListToBuffer(teamscfg, @@ -124,7 +124,7 @@ HWTeam * team2; team2 = new HWTeam; team2->difficulty = 4; - team2->teamColor = *color2; + team2->teamColor = *colors[1]; team2->numHedgehogs = 4; do namegen.TeamRandomNames(team2,TRUE); @@ -146,11 +146,21 @@ QByteArray traincfg; HWProto::addStringToBuffer(traincfg, "TL"); - HWProto::addStringToBuffer(traincfg, "escript " + datadir->absolutePath() + "/Missions/Training/" + training + ".lua"); + HWProto::addStringToBuffer(traincfg, "escript " + training); RawSendIPC(traincfg); } +void HWGame::SendCampaignConfig() +{ + QByteArray campaigncfg; + HWProto::addStringToBuffer(campaigncfg, "TL"); + + HWProto::addStringToBuffer(campaigncfg, "escript " + campaign); + + RawSendIPC(campaigncfg); +} + void HWGame::SendNetConfig() { commonConfig(); @@ -182,6 +192,10 @@ SendTrainingConfig(); break; } + case gtCampaign: { + SendCampaignConfig(); + break; + } } break; } @@ -277,18 +291,17 @@ arguments << QString("%1").arg(ipc_port); arguments << (config->vid_Fullscreen() ? "1" : "0"); arguments << (config->isSoundEnabled() ? "1" : "0"); - arguments << "0"; //(config->isSoundHardware() ? "1" : "0"); - arguments << "0"; //(config->isWeaponTooltip() ? "1" : "0"); - arguments << tr("en.txt"); + arguments << (config->isMusicEnabled() ? "1" : "0"); arguments << QString::number(config->volume()); // sound volume arguments << QString::number(config->timerInterval()); arguments << datadir->absolutePath(); arguments << (config->isShowFPSEnabled() ? "1" : "0"); arguments << (config->isAltDamageEnabled() ? "1" : "0"); arguments << config->netNick().toUtf8().toBase64(); - arguments << (config->isMusicEnabled() ? "1" : "0"); arguments << QString::number(config->translateQuality()); arguments << QString::number(config->stereoMode()); + arguments << tr("en.txt"); + return arguments; } @@ -345,7 +358,16 @@ void HWGame::StartTraining(const QString & file) { gameType = gtTraining; - training = file; + training = "Missions/Training/" + file + ".lua"; + demo.clear(); + Start(); + SetGameState(gsStarted); +} + +void HWGame::StartCampaign(const QString & file) +{ + gameType = gtCampaign; + campaign = "Missions/Campaign/" + file + ".lua"; demo.clear(); Start(); SetGameState(gsStarted); diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/game.h --- a/QTfrontend/game.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/game.h Wed Oct 27 14:02:20 2010 +0200 @@ -51,6 +51,7 @@ void StartQuick(); void StartNet(); void StartTraining(const QString & file); + void StartCampaign(const QString & file); protected: virtual QStringList setArguments(); @@ -76,7 +77,8 @@ gtQLocal = 2, gtDemo = 3, gtNet = 4, - gtTraining = 5 + gtTraining = 5, + gtCampaign = 6, }; char msgbuf[MAXMSGCHARS]; QString teams[5]; @@ -93,6 +95,7 @@ void SendQuickConfig(); void SendNetConfig(); void SendTrainingConfig(); + void SendCampaignConfig(); void ParseMessage(const QByteArray & msg); void SetGameState(GameState state); }; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/gamecfgwidget.cpp --- a/QTfrontend/gamecfgwidget.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/gamecfgwidget.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -101,46 +101,54 @@ quint32 result = 0; if (schemeData(1).toBool()) - result |= 0x01; + result |= 0x00001000; if (schemeData(2).toBool()) - result |= 0x10; + result |= 0x00000010; if (schemeData(3).toBool()) - result |= 0x04; + result |= 0x00000004; if (schemeData(4).toBool()) - result |= 0x08; + result |= 0x00000008; if (schemeData(5).toBool()) - result |= 0x20; + result |= 0x00000020; if (schemeData(6).toBool()) - result |= 0x40; + result |= 0x00000040; if (schemeData(7).toBool()) - result |= 0x80; + result |= 0x00000080; if (schemeData(8).toBool()) - result |= 0x100; + result |= 0x00000100; if (schemeData(9).toBool()) - result |= 0x200; + result |= 0x00000200; if (schemeData(10).toBool()) - result |= 0x400; + result |= 0x00000400; if (schemeData(11).toBool()) - result |= 0x800; + result |= 0x00000800; if (schemeData(12).toBool()) - result |= 0x2000; + result |= 0x00002000; if (schemeData(13).toBool()) - result |= 0x4000; + result |= 0x00004000; if (schemeData(14).toBool()) - result |= 0x8000; + result |= 0x00008000; if (schemeData(15).toBool()) - result |= 0x10000; + result |= 0x00010000; if (schemeData(16).toBool()) - result |= 0x20000; + result |= 0x00020000; if (schemeData(17).toBool()) - result |= 0x80000; + result |= 0x00040000; + if (schemeData(18).toBool()) + result |= 0x00080000; + if (schemeData(19).toBool()) + result |= 0x00100000; + if (schemeData(20).toBool()) + result |= 0x00200000; + if (schemeData(21).toBool()) + result |= 0x00400000; return result; } quint32 GameCFGWidget::getInitHealth() const { - return schemeData(20).toInt(); + return schemeData(24).toInt(); } QStringList GameCFGWidget::getFullConfig() const @@ -148,14 +156,14 @@ QStringList sl; sl.append("eseed " + pMapContainer->getCurrentSeed()); sl.append(QString("e$gmflags %1").arg(getGameFlags())); - sl.append(QString("e$damagepct %1").arg(schemeData(18).toInt())); - sl.append(QString("e$turntime %1").arg(schemeData(19).toInt() * 1000)); - sl.append(QString("e$minestime %1").arg(schemeData(23).toInt() * 1000)); - sl.append(QString("e$landadds %1").arg(schemeData(24).toInt())); - sl.append(QString("e$sd_turns %1").arg(schemeData(21).toInt())); - sl.append(QString("e$casefreq %1").arg(schemeData(22).toInt())); - sl.append(QString("e$minedudpct %1").arg(schemeData(25).toInt())); - sl.append(QString("e$explosives %1").arg(schemeData(26).toInt())); + sl.append(QString("e$damagepct %1").arg(schemeData(22).toInt())); + sl.append(QString("e$turntime %1").arg(schemeData(23).toInt() * 1000)); + sl.append(QString("e$minestime %1").arg(schemeData(27).toInt() * 1000)); + sl.append(QString("e$landadds %1").arg(schemeData(28).toInt())); + sl.append(QString("e$sd_turns %1").arg(schemeData(25).toInt())); + sl.append(QString("e$casefreq %1").arg(schemeData(26).toInt())); + sl.append(QString("e$minedudpct %1").arg(schemeData(29).toInt())); + sl.append(QString("e$explosives %1").arg(schemeData(30).toInt())); sl.append(QString("e$template_filter %1").arg(pMapContainer->getTemplateFilter())); sl.append(QString("e$mapgen %1").arg(pMapContainer->get_mapgen())); sl.append(QString("e$maze_size %1").arg(pMapContainer->get_maze_size())); @@ -165,8 +173,7 @@ { sl.append("emap " + currentMap); if(pMapContainer->getCurrentIsMission()) - sl.append(QString("escript %1/Maps/%2/map.lua") - .arg(datadir->absolutePath()) + sl.append(QString("escript Maps/%1/map.lua") .arg(currentMap)); } sl.append("etheme " + pMapContainer->getCurrentTheme()); diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/gameuiconfig.cpp --- a/QTfrontend/gameuiconfig.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/gameuiconfig.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -94,10 +94,10 @@ { QDir teamdir; teamdir.cd(cfgdir->absolutePath() + "/Teams"); - QStringList teamslist = teamdir.entryList(QStringList("*.ini")); + QStringList teamslist = teamdir.entryList(QStringList("*.hwt")); QStringList cleanedList; for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) { - QString tmpTeamStr=(*it).replace(QRegExp("^(.*)\\.ini$"), "\\1"); + QString tmpTeamStr=(*it).replace(QRegExp("^(.*)\\.hwt$"), "\\1"); cleanedList.push_back(tmpTeamStr); } return cleanedList; @@ -180,7 +180,7 @@ quint32 GameUIConfig::translateQuality() { quint32 rqNone = 0x00000000; // don't reduce quality - quint32 rqLowRes = 0x00000001; // use half land array + //quint32 rqLowRes = 0x00000001; // use half land array quint32 rqBlurryLand = 0x00000002; // downscaled terrain quint32 rqNoBackground = 0x00000004; // don't draw background quint32 rqSimpleRope = 0x00000008; // avoid drawing rope diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/gameuiconfig.h diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/hedgehogerWidget.cpp --- a/QTfrontend/hedgehogerWidget.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/hedgehogerWidget.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -23,34 +23,36 @@ CHedgehogerWidget::CHedgehogerWidget(const QImage& im, QWidget * parent) : ItemNum(im, parent, 1) { - if(parent) { + // TODO: maxHedgehogsPerGame doesn't reset properly and won't match map limits for now + /*if(parent) { pOurFrameTeams = dynamic_cast(parent->parentWidget()); } if(pOurFrameTeams->overallHedgehogs + 4 > pOurFrameTeams->maxHedgehogsPerGame) { numItems = pOurFrameTeams->maxHedgehogsPerGame - pOurFrameTeams->overallHedgehogs; } else numItems = 4; - pOurFrameTeams->overallHedgehogs += numItems; + pOurFrameTeams->overallHedgehogs += numItems;*/ } void CHedgehogerWidget::incItems() { - if (pOurFrameTeams->overallHedgehogs < pOurFrameTeams->maxHedgehogsPerGame) { + //if (pOurFrameTeams->overallHedgehogs < pOurFrameTeams->maxHedgehogsPerGame) { numItems++; - pOurFrameTeams->overallHedgehogs++; + //pOurFrameTeams->overallHedgehogs++; emit hedgehogsNumChanged(); - } + //} } void CHedgehogerWidget::decItems() { numItems--; - pOurFrameTeams->overallHedgehogs--; + //pOurFrameTeams->overallHedgehogs--; emit hedgehogsNumChanged(); } CHedgehogerWidget::~CHedgehogerWidget() { - pOurFrameTeams->overallHedgehogs-=numItems; + // TODO: not called? + //pOurFrameTeams->overallHedgehogs-=numItems; } void CHedgehogerWidget::setNonInteractive() @@ -60,9 +62,10 @@ void CHedgehogerWidget::setHHNum(unsigned int num) { - unsigned int diff = num - numItems; + /*unsigned int diff = num - numItems; numItems += diff; - pOurFrameTeams->overallHedgehogs += diff; + pOurFrameTeams->overallHedgehogs += diff;*/ + numItems = num; repaint(); } diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/hedgewars.qrc --- a/QTfrontend/hedgewars.qrc Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/hedgewars.qrc Wed Oct 27 14:02:20 2010 +0200 @@ -66,6 +66,10 @@ res/btnSharedAmmo.png res/btnDisableGirders.png res/btnDisableLandObjects.png + res/btnAISurvival.png + res/btnInfAttack.png + res/btnResetWeps.png + res/btnPerHogAmmo.png res/iconBox.png res/iconHealth.png res/iconSuddenDeath.png @@ -95,5 +99,23 @@ res/follow.png res/info.png res/kick.png + res/StatsMedal1.png + res/StatsMedal2.png + res/StatsMedal3.png + res/StatsMedal4.png + res/StatsR.png + res/StatsH.png + res/StatsD.png + res/StatsBestKiller.png + res/StatsBestShot.png + res/StatsHedgehogsKilled.png + res/StatsMostSelfDamage.png + res/StatsSelfKilled.png + res/StatsSkipped.png + res/mapRandom.png + res/mapMaze.png + res/mapMissing.png + res/mapCustom.png + res/mapMission.png diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/hwconsts.cpp.in --- a/QTfrontend/hwconsts.cpp.in Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/hwconsts.cpp.in Wed Oct 27 14:02:20 2010 +0200 @@ -30,50 +30,65 @@ QStringList * Themes; QStringList * mapList; +bool custom_config = false; +bool custom_data = false; + +int cMaxTeams = 6; + QString * cDefaultAmmoStore = new QString( - "9391929422199121032235111001201000000211110111" - "0405040541600655546554464776576666666155510111" - "0000000000000205500000040007004000000000200000" - "1311110312111111123114111111111111111211111111" - ); + "9391929422199121032235111001201000000211110101011" + "0405040541600655546554464776576666666155510101117" + "0000000000000205500000040007004000000000200000000" + "1311110312111111123114111111111111111211111101111" + ); int cAmmoNumber = cDefaultAmmoStore->size() / 4; QList< QPair > cDefaultAmmos = - QList< QPair >() - << qMakePair(QString("Default"), *cDefaultAmmoStore) - << qMakePair(QString("Crazy"), QString( - "9999999999999999992999999999999999299999999999" // TODO: Remove Piano's unlimited uses! - "1111110111111111111111111111111111111111111111" - "0000000000000000000000000000000000000000000000" - "1311110312111111123114111111111111111211110101")) - << qMakePair(QString("Pro mode"), QString( - "9090009000000000000009000000000000000000000900" - "0000000000000000000000000000000000000000000000" - "0000000000000205500000040007004000000000200000" - "1111111111111111111111111111111111111111100111")) - << qMakePair(QString("Shoppa"), QString( - "0000009900000000000000000000000000000000000000" - "4444410044244402210112121222422000000002000400" - "0000000000000000000000000000000000000000000000" - "1111111111111111111111111111111111111111101111")) - << qMakePair(QString("Basketball"),QString( - "0000009000000900000000000000000000000000000000" - "0000000000000000000000000000000000000000000000" - "0000000000000005500000040007004000000000200000" - "1111111111111111111111111111111111111111111111")) - << qMakePair(QString("Minefield"), QString( - "0000009900090000000300000000000000000000000000" - "0000000000000000000000000000000000000000000000" - "0000000000000205500000040007004000000000200000" - "1111111111111111111111111111111111111111111111")) - ; + QList< QPair >() + << qMakePair(QString("Default"), *cDefaultAmmoStore) + << qMakePair(QString("Crazy"), QString( + // TODO: Remove Piano's unlimited uses! + "9999999999999999992999999999999999299999999909999" + "1111110111111111111111111111111111111111111101111" + "0000000000000000000000000000000000000000000000000" + "1311110312111111123114111111111111111211110101111" + )) + << qMakePair(QString("Pro mode"), QString( + "9090009000000000000009000000000000000000000000000" + "0000000000000000000000000000000000000000000000000" + "0000000000000205500000040007004000000000200000000" + "1111111111111111111111111111111111111111100101111" + )) + << qMakePair(QString("Shoppa"), QString( + "0000009900000000000000000000000000000000000000000" + "4444410044244402210112121222422000000002000400010" + "0000000000000000000000000000000000000000000000000" + "1111111111111111111111111111111111111111101101111" + )) + << qMakePair(QString("Basketball"),QString( + "0000009000000900000000000000000000000000000000000" + "0000000000000000000000000000000000000000000000000" + "0000000000000005500000040007004000000000200000000" + "1111111111111111111111111111111111111111111101111" + )) + << qMakePair(QString("Minefield"), QString( + "0000009900090000000300000000000000000000000000000" + "0000000000000000000000000000000000000000000000000" + "0000000000000205500000040007004000000000200000000" + "1111111111111111111111111111111111111111111101111" + )); -QColor * color1 = new QColor(221, 0, 0); -QColor * color2 = new QColor( 67, 118, 233); -QColor * color3 = new QColor( 62, 147, 33); -QColor * color4 = new QColor(162, 61, 187); -QColor * color5 = new QColor(255, 147, 41); -QColor * color6 = new QColor(115, 115, 115); +QColor *colors[] = { + new QColor(221, 0, 0), // classic red + new QColor( 67, 118, 233), // classic blue + new QColor( 62, 147, 33), // classic green + new QColor(162, 61, 187), // classic purple + new QColor(255, 147, 41), // classic orange + new QColor(115, 115, 115), // classic gray + new QColor(187, 162, 61), // gold + new QColor( 61, 162, 187), // cyan + // add new colors here + 0}; QString * netHost = new QString(); quint16 netPort = 46631; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/hwconsts.h --- a/QTfrontend/hwconsts.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/hwconsts.h Wed Oct 27 14:02:20 2010 +0200 @@ -31,6 +31,11 @@ extern QDir * cfgdir; extern QDir * datadir; +extern bool custom_config; +extern bool custom_data; + +extern int cMaxTeams; + extern QStringList * Themes; extern QStringList * mapList; @@ -38,12 +43,7 @@ extern int cAmmoNumber; extern QList< QPair > cDefaultAmmos; -extern QColor * color1; -extern QColor * color2; -extern QColor * color3; -extern QColor * color4; -extern QColor * color5; -extern QColor * color6; +extern QColor *colors[]; extern QString * netHost; extern quint16 netPort; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/hwform.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -83,9 +83,9 @@ ui.setupUi(this); setMinimumSize(760, 580); - + setFocusPolicy(Qt::StrongFocus); CustomizePalettes(); - + ui.pageOptions->CBResolution->addItems(sdli.getResolutions()); config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini"); @@ -93,17 +93,18 @@ namegen = new HWNamegen(); #ifdef __APPLE__ - panel = new M3Panel; + panel = new M3Panel; #ifdef SPARKLE_ENABLED - AutoUpdater* updater; - CocoaInitializer initializer; - updater = new SparkleAutoUpdater(SPARKLE_APPCAST_URL); - if(updater && config->isAutoUpdateEnabled()) - updater->checkForUpdates(); -#endif + AutoUpdater* updater; + CocoaInitializer initializer; + updater = new SparkleAutoUpdater(SPARKLE_APPCAST_URL); + if (updater && config->isAutoUpdateEnabled()) + updater->checkForUpdates(); +#endif #endif UpdateTeamsLists(); + UpdateCampaignPage(0); UpdateWeapons(); connect(config, SIGNAL(frontendFullscreen(bool)), this, SLOT(onFrontendFullscreen(bool))); @@ -140,6 +141,9 @@ connect(ui.pageOptions->BtnDeleteTeam, SIGNAL(clicked()), this, SLOT(DeleteTeam())); connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), config, SLOT(SaveOptions())); connect(ui.pageOptions->BtnSaveOptions, SIGNAL(clicked()), this, SLOT(GoBack())); +#ifdef _WIN32 + connect(ui.pageOptions->BtnAssociateFiles, SIGNAL(clicked()), this, SLOT(AssociateFiles())); +#endif connect(ui.pageOptions->WeaponEdit, SIGNAL(clicked()), this, SLOT(GoToSelectWeapon())); connect(ui.pageOptions->WeaponsButt, SIGNAL(clicked()), this, SLOT(GoToSelectNewWeapon())); @@ -171,6 +175,7 @@ connect(ui.pageSinglePlayer->BtnSimpleGamePage, SIGNAL(clicked()), this, SLOT(SimpleGame())); connect(ui.pageSinglePlayer->BtnTrainPage, SIGNAL(clicked()), this, SLOT(GoToTraining())); + connect(ui.pageSinglePlayer->BtnCampaignPage, SIGNAL(clicked()), this, SLOT(GoToCampaign())); connect(ui.pageSinglePlayer->BtnMultiplayer, SIGNAL(clicked()), this, SLOT(GoToMultiplayer())); connect(ui.pageSinglePlayer->BtnLoad, SIGNAL(clicked()), this, SLOT(GoToSaves())); connect(ui.pageSinglePlayer->BtnDemos, SIGNAL(clicked()), this, SLOT(GoToDemos())); @@ -179,6 +184,10 @@ connect(ui.pageTraining->BtnStartTrain, SIGNAL(clicked()), this, SLOT(StartTraining())); connect(ui.pageTraining->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); + connect(ui.pageCampaign->BtnStartCampaign, SIGNAL(clicked()), this, SLOT(StartCampaign())); + connect(ui.pageCampaign->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); + connect(ui.pageCampaign->CBTeam, SIGNAL(currentIndexChanged(int)), this, SLOT(UpdateCampaignPage(int))); + connect(ui.pageSelectWeapon->BtnBack, SIGNAL(clicked()), this, SLOT(GoBack())); connect(ui.pageSelectWeapon->BtnDelete, SIGNAL(clicked()), @@ -265,6 +274,12 @@ } } +void HWForm::keyReleaseEvent(QKeyEvent *event) +{ + if (event->key() == Qt::Key_Escape /*|| event->key() == Qt::Key_Backspace*/ ) + this->GoBack(); +} + void HWForm::CustomizePalettes() { QList allSBars = findChildren(); @@ -310,13 +325,15 @@ } if(teamslist.empty()) { - HWTeam defaultTeam("DefaultTeam"); + HWTeam defaultTeam(tr("DefaultTeam")); defaultTeam.SaveToFile(); - teamslist.push_back("DefaultTeam"); + teamslist.push_back(tr("DefaultTeam")); } ui.pageOptions->CBTeamName->clear(); ui.pageOptions->CBTeamName->addItems(teamslist); + ui.pageCampaign->CBTeam->clear(); + ui.pageCampaign->CBTeam->addItems(teamslist); } void HWForm::GoToMain() @@ -334,6 +351,11 @@ GoToPage(ID_PAGE_TRAINING); } +void HWForm::GoToCampaign() +{ + GoToPage(ID_PAGE_CAMPAIGN); +} + void HWForm::GoToSetup() { GoToPage(ID_PAGE_SETUP); @@ -513,11 +535,11 @@ { if (eggTimer.elapsed() < 3000){ #ifdef __APPLE__ - panel->showInstallController(); + panel->showInstallController(); #endif close(); } - else + else { QPushButton * btn = findChild("imageButt"); if (btn) @@ -543,7 +565,8 @@ for(QList::iterator it = teams.begin(); it != teams.end(); ++it) { tmnames += it->TeamName; } - UpdateTeamsLists(&tmnames); // FIXME: still need more work if teamname is updated while configuring + //UpdateTeamsLists(&tmnames); // FIXME: still need more work if teamname is updated while configuring + UpdateTeamsLists(); GoToPage(ID_PAGE_SETUP); } @@ -961,7 +984,14 @@ { CreateGame(0, 0, 0); - game->StartTraining(ui.pageTraining->CBSelect->currentText()); + game->StartTraining(ui.pageTraining->CBSelect->itemData(ui.pageTraining->CBSelect->currentIndex()).toString()); +} + +void HWForm::StartCampaign() +{ + CreateGame(0, 0, 0); + + game->StartCampaign(ui.pageCampaign->CBSelect->itemData(ui.pageCampaign->CBSelect->currentIndex()).toString()); } void HWForm::CreateNetGame() @@ -1074,3 +1104,33 @@ wBackground->move(0, 0); } } + +void HWForm::UpdateCampaignPage(int index) +{ + HWTeam team(ui.pageCampaign->CBTeam->currentText()); + ui.pageCampaign->CBSelect->clear(); + + QDir tmpdir; + tmpdir.cd(datadir->absolutePath()); + tmpdir.cd("Missions/Campaign"); + tmpdir.setFilter(QDir::Files); + QStringList entries = tmpdir.entryList(QStringList("*#*.lua")); + //entries.sort(); + for(int i = 0; (i < entries.count()) && (i <= team.CampaignProgress); i++) + ui.pageCampaign->CBSelect->addItem(QString(entries[i]).replace(QRegExp("^(\\d+)#(.+)\\.lua"), QComboBox::tr("Mission") + " \\1: \\2"), QString(entries[i]).replace(QRegExp("^(.*)\\.lua"), "\\1")); +} + +void HWForm::AssociateFiles() +{ + QSettings registry_hkcr("HKEY_CLASSES_ROOT", QSettings::NativeFormat); + registry_hkcr.setValue(".hwd/Default", "Hedgewars.Demo"); + registry_hkcr.setValue(".hws/Default", "Hedgewars.Save"); + registry_hkcr.setValue("Hedgewars.Demo/Default", tr("Hedgewars Demo File", "File Types")); + registry_hkcr.setValue("Hedgewars.Save/Default", tr("Hedgewars Save File", "File Types")); + registry_hkcr.setValue("Hedgewars.Demo/DefaultIcon/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwdfile.ico\",0"); + registry_hkcr.setValue("Hedgewars.Save/DefaultIcon/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwsfile.ico\",0"); + registry_hkcr.setValue("Hedgewars.Demo/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"" + datadir->absolutePath().replace("/", "\\") + "\" \"%1\""); + registry_hkcr.setValue("Hedgewars.Save/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"" + datadir->absolutePath().replace("/", "\\") + "\" \"%1\""); + QMessageBox::information(0, "", QMessageBox::tr("All file associations have been set.")); +} + diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/hwform.h --- a/QTfrontend/hwform.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/hwform.h Wed Oct 27 14:02:20 2010 +0200 @@ -69,6 +69,7 @@ void GoToNetType(); void GoToInfo(); void GoToTraining(); + void GoToCampaign(); void GoToSelectWeapon(); void GoToSelectWeaponSet(const QString & name); void GoToSelectNewWeapon(); @@ -77,6 +78,7 @@ void GoToAdmin(); void GoToPage(quint8 id); void GoBack(); + void AssociateFiles(); void btnExitPressed(); void btnExitClicked(); void IntermediateSetup(); @@ -90,6 +92,7 @@ void SimpleGame(); void PlayDemo(); void StartTraining(); + void StartCampaign(); void NetConnect(); void NetConnectServer(const QString & host, quint16 port); void NetConnectOfficialServer(); @@ -107,6 +110,7 @@ void UpdateWeapons(); void onFrontendFullscreen(bool value); void Music(bool checked); + void UpdateCampaignPage(int index); void NetGameChangeStatus(bool isMaster); void NetGameMaster(); @@ -123,7 +127,8 @@ void closeEvent(QCloseEvent *event); void CustomizePalettes(); void resizeEvent(QResizeEvent * event); - + void keyReleaseEvent(QKeyEvent *event); + enum PageIDs { ID_PAGE_SETUP_TEAM = 0, ID_PAGE_SETUP = 1, @@ -143,7 +148,8 @@ ID_PAGE_CONNECTING = 15, ID_PAGE_SCHEME = 16, ID_PAGE_ADMIN = 17, - ID_PAGE_NETTYPE = 18 + ID_PAGE_NETTYPE = 18, + ID_PAGE_CAMPAIGN = 19 }; HWGame * game; HWNetServer* pnetserver; @@ -155,11 +161,11 @@ QStack PagesStack; QTime eggTimer; BGWidget * wBackground; - + #ifdef __APPLE__ InstallController * panel; #endif - + void OnPageShown(quint8 id, quint8 lastid=0); }; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/main.cpp --- a/QTfrontend/main.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/main.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -47,7 +47,7 @@ return true; } -int main(int argc, char *argv[]) { +int main(int argc, char *argv[]) { QApplication app(argc, argv); QStringList arguments = app.arguments(); @@ -73,11 +73,13 @@ qWarning() << "WARNING: Cannot open DATA_PATH=" << f.absoluteFilePath(); } *cDataDir = f.absoluteFilePath(); + custom_data = true; } if(parsedArgs.contains("config-dir")) { QFileInfo f(parsedArgs["config-dir"]); *cConfigDir = f.absoluteFilePath(); + custom_config = true; } app.setStyle(new QPlastiqueStyle); @@ -180,6 +182,7 @@ "}" "QTableView {" "alternate-background-color: #2f213a;" + "gridline-color: transparent;" "}" "QTabBar::tab {" @@ -294,6 +297,18 @@ "SquareLabel, ItemNum {" "background-color: #000000;" "}" + "QSlider::groove::horizontal {" + "height: 2px;" + "margin: 2px 0px;" + "background-color: #ffcc00;" + "}" + "QSlider::handle::horizontal {" + "border: 0px;" + "margin: -2px 0px;" + "border-radius: 3px;" + "background-color: #ffcc00;" + "width: 8px;" + "}" ) ); @@ -307,62 +322,53 @@ if(cConfigDir->length() == 0) { #ifdef __APPLE__ - if (checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars")) - { - checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos"); - checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Saves"); - checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Screenshots"); - checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Teams"); - } + checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars"); cfgdir->cd("Library/Application Support/Hedgewars"); #elif defined _WIN32 char path[1024]; if(!SHGetFolderPathA(0, CSIDL_PERSONAL, NULL, 0, path)) { cfgdir->cd(path); - if (checkForDir(cfgdir->absolutePath() + "/Hedgewars")) - { - checkForDir(cfgdir->absolutePath() + "/Hedgewars/Demos"); - checkForDir(cfgdir->absolutePath() + "/Hedgewars/Saves"); - checkForDir(cfgdir->absolutePath() + "/Hedgewars/Screenshots"); - checkForDir(cfgdir->absolutePath() + "/Hedgewars/Teams"); - } + checkForDir(cfgdir->absolutePath() + "/Hedgewars"); cfgdir->cd("Hedgewars"); } - else + else // couldn't retrieve documents folder? almost impossible, but in case fall back to classic path { - if (checkForDir(cfgdir->absolutePath() + "/.hedgewars")) - { - checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos"); - checkForDir(cfgdir->absolutePath() + "/.hedgewars/Saves"); - checkForDir(cfgdir->absolutePath() + "/.hedgewars/Screenshots"); - checkForDir(cfgdir->absolutePath() + "/.hedgewars/Teams"); - } + checkForDir(cfgdir->absolutePath() + "/.hedgewars"); cfgdir->cd(".hedgewars"); } #else - if (checkForDir(cfgdir->absolutePath() + "/.hedgewars")) - { - checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos"); - checkForDir(cfgdir->absolutePath() + "/.hedgewars/Saves"); - checkForDir(cfgdir->absolutePath() + "/.hedgewars/Screenshots"); - checkForDir(cfgdir->absolutePath() + "/.hedgewars/Teams"); - } + checkForDir(cfgdir->absolutePath() + "/.hedgewars"); cfgdir->cd(".hedgewars"); #endif } - else + + if (checkForDir(cfgdir->absolutePath())) { - if (checkForDir(cfgdir->absolutePath())) - { - checkForDir(cfgdir->absolutePath() + "/Demos"); - checkForDir(cfgdir->absolutePath() + "/Saves"); - checkForDir(cfgdir->absolutePath() + "/Screenshots"); - checkForDir(cfgdir->absolutePath() + "/Teams"); - } + // alternative loading/lookup paths + // TODO: Uncomment paths as they're implemented + checkForDir(cfgdir->absolutePath() + "/Data"); + //checkForDir(cfgdir->absolutePath() + "/Data/Forts"); + //checkForDir(cfgdir->absolutePath() + "/Data/Graphics"); + //checkForDir(cfgdir->absolutePath() + "/Data/Graphics/Flags"); + //checkForDir(cfgdir->absolutePath() + "/Data/Graphics/Graves"); + //checkForDir(cfgdir->absolutePath() + "/Data/Graphics/Hats"); + //checkForDir(cfgdir->absolutePath() + "/Data/Maps"); + //checkForDir(cfgdir->absolutePath() + "/Data/Missions"); + //checkForDir(cfgdir->absolutePath() + "/Data/Missions/Campaign"); + //checkForDir(cfgdir->absolutePath() + "/Data/Missions/Training"); + //checkForDir(cfgdir->absolutePath() + "/Data/Sounds"); + //checkForDir(cfgdir->absolutePath() + "/Data/Sounds/voices"); + //checkForDir(cfgdir->absolutePath() + "/Data/Themes"); + + // config/save paths + checkForDir(cfgdir->absolutePath() + "/Demos"); + checkForDir(cfgdir->absolutePath() + "/Saves"); + checkForDir(cfgdir->absolutePath() + "/Screenshots"); + checkForDir(cfgdir->absolutePath() + "/Teams"); + checkForDir(cfgdir->absolutePath() + "/Logs"); } - datadir->cd(bindir->absolutePath()); datadir->cd(*cDataDir); if(!datadir->cd("hedgewars/Data")) { @@ -406,12 +412,11 @@ // Win32 registry setup (used for xfire detection etc. - don't set it if we're running in "portable" mode with a custom config dir) #ifdef _WIN32 - if(cConfigDir->length() == 0) + if(!custom_config) { - QSettings registry(QSettings::NativeFormat, QSettings::UserScope, "Hedgewars Project", "Hedgewars"); - QFileInfo f(argv[0]); - registry.setValue("file", f.absoluteFilePath()); - registry.setValue("path", f.absolutePath()); + QSettings registry_hklm("HKEY_LOCAL_MACHINE", QSettings::NativeFormat); + registry_hklm.setValue("Software/Hedgewars/Frontend", bindir->absolutePath().replace("/", "\\") + "\\hedgewars.exe"); + registry_hklm.setValue("Software/Hedgewars/Path", bindir->absolutePath().replace("/", "\\")); } #endif diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/mapContainer.cpp --- a/QTfrontend/mapContainer.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/mapContainer.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -56,16 +56,18 @@ imageButt->setFlat(true); imageButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);//QSizePolicy::Minimum, QSizePolicy::Minimum); mainLayout.addWidget(imageButt, 0, 0, 1, 2); - connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomSeed())); - connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme())); + //connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomSeed())); + //connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme())); + connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomMap())); chooseMap = new QComboBox(this); chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - chooseMap->addItem(QComboBox::tr("generated map...")); - chooseMap->addItem(QComboBox::tr("generated maze...")); + chooseMap->addItem(QIcon(":/res/mapRandom.png"), QComboBox::tr("generated map...")); + chooseMap->addItem(QIcon(":/res/mapMaze.png"), QComboBox::tr("generated maze...")); chooseMap->insertSeparator(chooseMap->count()); // separator between generators and missions int missionindex = chooseMap->count(); + numMissions = 0; for (int i = 0; i < mapList->size(); ++i) { QString map = (*mapList)[i]; QFile mapCfgFile( @@ -92,9 +94,12 @@ mapInfo.push_back(18); mapInfo.push_back(mapLuaFile.exists()); if(mapLuaFile.exists()) - chooseMap->insertItem(missionindex++, QComboBox::tr("Mission") + ": " + map, mapInfo); + { + chooseMap->insertItem(missionindex++, QIcon(":/res/mapMission.png"), QComboBox::tr("Mission") + ": " + map, mapInfo); + numMissions++; + } else - chooseMap->addItem(map, mapInfo); + chooseMap->addItem(QIcon(":/res/mapCustom.png"), map, mapInfo); mapCfgFile.close(); } } @@ -149,11 +154,12 @@ gbTLayout->setSpacing(0); lwThemes = new QListWidget(this); lwThemes->setMinimumHeight(30); - lwThemes->setFixedWidth(120); + lwThemes->setFixedWidth(140); for (int i = 0; i < Themes->size(); ++i) { QListWidgetItem * lwi = new QListWidgetItem(); lwi->setText(Themes->at(i)); - lwi->setTextAlignment(Qt::AlignHCenter); + lwi->setIcon(QIcon(QString("%1/Themes/%2/icon.png").arg(datadir->absolutePath()).arg(Themes->at(i)))); + //lwi->setTextAlignment(Qt::AlignHCenter); lwThemes->addItem(lwi); } connect(lwThemes, SIGNAL(currentRowChanged(int)), this, SLOT(themeSelected(int))); @@ -167,7 +173,7 @@ "border-color: transparent;" "background-color: #0d0544;" "color: #ffcc00;" - "font: bold 14px;" + "font: bold 13px;" "}" ) ); @@ -389,6 +395,36 @@ if(items.size()) lwThemes->setCurrentItem(items.at(0)); } +#include +void HWMapContainer::setRandomMap() +{ + switch(chooseMap->currentIndex()) + { + case MAPGEN_REGULAR: + case MAPGEN_MAZE: + setRandomSeed(); + setRandomTheme(); + break; + default: + if(chooseMap->currentIndex() < numMissions + 3) + setRandomMission(); + else + setRandomStatic(); + break; + } +} + +void HWMapContainer::setRandomStatic() +{ + chooseMap->setCurrentIndex(4 + numMissions + rand() % (chooseMap->count() - 4 - numMissions)); + m_seed = QUuid::createUuid().toString(); +} + +void HWMapContainer::setRandomMission() +{ + chooseMap->setCurrentIndex(3 + rand() % numMissions); + m_seed = QUuid::createUuid().toString(); +} void HWMapContainer::setRandomSeed() { diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/mapContainer.h --- a/QTfrontend/mapContainer.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/mapContainer.h Wed Oct 27 14:02:20 2010 +0200 @@ -72,6 +72,9 @@ void mapChanged(int index); void setRandomSeed(); void setRandomTheme(); + void setRandomMap(); + void setRandomStatic(); + void setRandomMission(); void themeSelected(int currentRow); void addInfoToPreview(QPixmap image); void templateFilterChanged(int filter); @@ -95,6 +98,7 @@ QLabel *maze_size_label; QComboBox *maze_size_selection; MapGenerator mapgen; + int numMissions; int maze_size; void loadMap(int index); diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/newnetclient.cpp --- a/QTfrontend/newnetclient.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/newnetclient.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -305,7 +305,7 @@ if(tmp[0] == "MOTD_NEW") emit serverMessageNew(tmp[1]); else if(tmp[0] == "MOTD_OLD") emit serverMessageOld(tmp[1]); else if(tmp[0] == "LATEST_PROTO") emit latestProtocolVar(tmp[1].toInt()); - + tmp.removeFirst(); tmp.removeFirst(); } @@ -472,13 +472,13 @@ int passLength = config->value("net/passwordlength", 0).toInt(); QString hash = config->value("net/passwordhash", "").toString(); QString password = QInputDialog::getText(0, tr("Password"), tr("Your nickname %1 is\nregistered on Hedgewars.org\nPlease provide your password below\nor pick another nickname in game config:").arg(mynick), QLineEdit::Password, passLength==0?NULL:QString(passLength,'\0'), &ok); - + if (!ok) { Disconnect(); emit Disconnected(); return; } - + if (!passLength || password!=QString(passLength, '\0')) { hash = QCryptographicHash::hash(password.toLatin1(), QCryptographicHash::Md5).toHex(); config->setValue("net/passwordhash", hash); @@ -750,5 +750,5 @@ void HWNewNet::askServerVars() { - RawSendNet(QString("GET_SERVER_VAR")); + RawSendNet(QString("GET_SERVER_VAR")); } diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/newnetclient.h --- a/QTfrontend/newnetclient.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/newnetclient.h Wed Oct 27 14:02:20 2010 +0200 @@ -48,7 +48,7 @@ QString getNick(); QString getRoom(); QString getHost(); - + private: GameUIConfig* config; GameCFGWidget* m_pGameCFGWidget; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/pages.cpp --- a/QTfrontend/pages.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/pages.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -92,39 +92,69 @@ mainNote = new QLabel(this); mainNote->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); mainNote->setWordWrap(true); + mainNote->setOpenExternalLinks(true); - QStringList Tips; - Tips << tr("Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together.", "Tips"); - Tips << tr("Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water.", "Tips"); - Tips << tr("If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death!", "Tips"); - Tips << tr("Want to save ropse? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo!", "Tips"); - Tips << tr("If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/.", "Tips"); - Tips << tr("You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked.", "Tips"); - Tips << tr("By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them.", "Tips"); - Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support!", "Tips"); - Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work!", "Tips"); - Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like!", "Tips"); - Tips << tr("From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance.", "Tips"); - Tips << tr("Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us!", "Tips"); - Tips << tr("Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux.", "Tips"); - Tips << tr("Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option.", "Tips"); - Tips << tr("Connect one or more gamepads before launching the game to be able to assign their controls to your teams.", "Tips"); - Tips << tr("Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server.", "Tips"); - Tips << tr("While playing you should give yourself a short break at least once an hour.", "Tips"); - Tips << tr("If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance.", "Tips"); - Tips << tr("We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know!", "Tips"); - Tips << tr("Especially while playing online be polite and always remember there might be some minors playing with or against you as well!", "Tips"); - Tips << tr("Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game!", "Tips"); - Tips << tr("The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing.", "Tips"); - Tips << tr("You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead!", "Tips"); - Tips << tr("Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well.", "Tips"); - Tips << tr("No hedgehogs were harmed in making this game.", "Tips"); - - - if(isDevBuild) + if(!isDevBuild) + { + QStringList Tips; + Tips << tr("Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together.", "Tips"); + Tips << tr("Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water.", "Tips"); + Tips << tr("If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death!", "Tips"); + Tips << tr("Want to save ropse? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo!", "Tips"); + Tips << tr("If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/.", "Tips"); + Tips << tr("You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked.", "Tips"); + Tips << tr("By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them.", "Tips"); + Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support!", "Tips"); + Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work!", "Tips"); + Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like!", "Tips"); + Tips << tr("Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund!", "Tips"); + Tips << tr("From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance.", "Tips"); + Tips << tr("Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us!", "Tips"); + Tips << tr("Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux.", "Tips"); + Tips << tr("Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option.", "Tips"); + Tips << tr("Connect one or more gamepads before starting the game to be able to assign their controls to your teams.", "Tips"); + Tips << tr("Create an account on %1 to keep others from using your most favourite nickname while playing on the official server.", "Tips").arg("http://www.hedgewars.org/"); + Tips << tr("While playing you should give yourself a short break at least once an hour.", "Tips"); + Tips << tr("If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance.", "Tips"); + Tips << tr("If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers.", "Tips"); + Tips << tr("We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know!", "Tips"); + Tips << tr("Especially while playing online be polite and always remember there might be some minors playing with or against you as well!", "Tips"); + Tips << tr("Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game!", "Tips"); + Tips << tr("The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing.", "Tips"); + Tips << tr("You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead!", "Tips"); + Tips << tr("Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well.", "Tips"); + Tips << tr("No hedgehogs were harmed in making this game.", "Tips"); + Tips << tr("There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump.", "Tips"); + Tips << tr("Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving.", "Tips"); + Tips << tr("Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once.", "Tips"); + Tips << tr("Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this.", "Tips"); + Tips << tr("The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once.", "Tips"); + Tips << tr("The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well.", "Tips"); + Tips << tr("The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power.", "Tips"); + Tips << tr("Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water.", "Tips"); + Tips << tr("The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground.", "Tips"); + Tips << tr("If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion.", "Tips"); + Tips << tr("The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early.", "Tips"); + Tips << tr("The Flame Thrower is a weapon but it can be used for tunnel digging as well.", "Tips"); + Tips << tr("Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms.", "Tips"); + Tips << tr("Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits.", "Tips"); + Tips << tr("Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well!", "Tips").arg("Facebook").arg("Steam Community").arg("Twitter"); + Tips << tr("Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online.", "Tips"); + Tips << tr("Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice!", "Tips"); + // The following tip will require links to app store entries first. + //Tips << tr("Want to play Hedgewars any time? Grab the Mobile version for %1 and %2.", "Tips").arg("").arg(""); + Tips << tr("Keep your video card drivers up to date to avoid issues playing the game.", "Tips"); + //Tips << tr("", "Tips"); +#ifdef _WIN32 + Tips << tr("You can find your Hedgewars configuration files under \"My Documents\\Hedgewars\". Create backups or take the files with you, but don't edit them by hand.", "Tips"); + Tips << tr("You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser.", "Tips"); +#else + Tips << tr("You can find your Hedgewars configuration files under \"Hedgewars\" in your home directory. Create backups or take the files with you, but don't edit them by hand.", "Tips"); +#endif + mainNote->setText(QLabel::tr("Tip: ") + Tips[QTime(0, 0, 0).secsTo(QTime::currentTime()) % Tips.length()]); + } + else mainNote->setText(QLabel::tr("This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk!")); - else - mainNote->setText(QLabel::tr("Tip: ") + Tips[QTime(0, 0, 0).secsTo(QTime::currentTime()) % Tips.length()]); pageLayout->addWidget(mainNote, 4, 1, 1, 2); @@ -301,12 +331,33 @@ tmpdir.cd(datadir->absolutePath()); tmpdir.cd("Graphics/Flags"); list = tmpdir.entryList(QStringList("*.png")); + + // add the default flag + CBFlag->addItem(QIcon(QPixmap(datadir->absolutePath() + "/Graphics/Flags/hedgewars.png").copy(0, 0, 22, 15)), "Hedgewars", "hedgewars"); + + CBFlag->insertSeparator(CBFlag->count()); + // add all country flags for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { QPixmap pix(datadir->absolutePath() + "/Graphics/Flags/" + *it); QIcon icon(pix.copy(0, 0, 22, 15)); - if(it->compare("cpu.png")) // skip cpu flag - CBFlag->addItem(icon, (*it).replace(QRegExp("^(.*)\\.png"), "\\1")); + if(it->compare("cpu.png") && it->compare("hedgewars.png") && (it->indexOf("cm_") == -1)) // skip cpu and hedgewars flags as well as all community flags + { + QString flag = (*it).replace(QRegExp("^(.*)\\.png"), "\\1"); + CBFlag->addItem(icon, QString(flag).replace("_", " "), flag); + } + } + CBFlag->insertSeparator(CBFlag->count()); + // add all community flags + for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + { + QPixmap pix(datadir->absolutePath() + "/Graphics/Flags/" + *it); + QIcon icon(pix.copy(0, 0, 22, 15)); + if(it->indexOf("cm_") > -1) // skip non community flags this time + { + QString flag = (*it).replace(QRegExp("^(.*)\\.png"), "\\1"); + CBFlag->addItem(icon, QString(flag).replace("cm_", QComboBox::tr("Community") + ": "), flag); + } } vbox1->addStretch(); @@ -560,7 +611,12 @@ CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup")); MiscLayout->addWidget(CBAutoUpdate, 4, 0, 1, 2); #endif - +#ifdef _WIN32 + BtnAssociateFiles = new QPushButton(groupMisc); + BtnAssociateFiles->setText(QPushButton::tr("Associate file extensions")); + BtnAssociateFiles->setEnabled(!custom_data && !custom_config); + MiscLayout->addWidget(BtnAssociateFiles, 4, 0, 1, 2); +#endif gbTBLayout->addWidget(groupMisc, 2, 0); } @@ -613,6 +669,7 @@ QLabel * quality = new QLabel(AGGroupBox); quality->setText(QLabel::tr("Quality")); + quality->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); GBAqualayout->addWidget(quality); SLQuality = new QSlider(Qt::Horizontal, AGGroupBox); @@ -622,7 +679,6 @@ SLQuality->setFixedWidth(150); GBAqualayout->addWidget(SLQuality); GBAlayout->addLayout(GBAqualayout); - QLabel * stereo = new QLabel(AGGroupBox); stereo->setText(QLabel::tr("Stereo rendering")); GBAstereolayout->addWidget(stereo); @@ -962,7 +1018,10 @@ topLine->addStretch(); - BtnTrainPage = addButton(":/res/Trainings.png", middleLine, 0, true); + BtnCampaignPage = addButton(":/res/SimpleGame.png", middleLine, 0, true); + BtnCampaignPage->setToolTip(tr("Campaign Mode (...). IN DEVELOPMENT")); + + BtnTrainPage = addButton(":/res/Trainings.png", middleLine, 1, true); BtnTrainPage->setToolTip(tr("Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT")); BtnBack = addButton(":/res/Exit.png", bottomLine, 0, true); @@ -993,6 +1052,8 @@ tmpdir.cd("Missions/Training"); tmpdir.setFilter(QDir::Files); CBSelect->addItems(tmpdir.entryList(QStringList("*.lua")).replaceInStrings(QRegExp("^(.*)\\.lua"), "\\1")); + for(int i = 0; i < CBSelect->count(); i++) + CBSelect->setItemData(i, CBSelect->itemText(i)); pageLayout->addWidget(CBSelect, 1, 1); @@ -1004,6 +1065,29 @@ BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); } +PageCampaign::PageCampaign(QWidget* parent) : AbstractPage(parent) +{ + QGridLayout * pageLayout = new QGridLayout(this); + pageLayout->setColumnStretch(0, 1); + pageLayout->setColumnStretch(1, 2); + pageLayout->setColumnStretch(2, 1); + pageLayout->setRowStretch(0, 1); + pageLayout->setRowStretch(3, 1); + + CBSelect = new QComboBox(this); + CBTeam = new QComboBox(this); + + pageLayout->addWidget(CBTeam, 1, 1); + pageLayout->addWidget(CBSelect, 2, 1); + + BtnStartCampaign = new QPushButton(this); + BtnStartCampaign->setFont(*font14); + BtnStartCampaign->setText(QPushButton::tr("Go!")); + pageLayout->addWidget(BtnStartCampaign, 2, 2); + + BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true); +} + PageSelectWeapon::PageSelectWeapon(QWidget* parent) : AbstractPage(parent) { @@ -1050,24 +1134,85 @@ roomsList->verticalHeader()->setVisible(false); roomsList->horizontalHeader()->setResizeMode(QHeaderView::Interactive); roomsList->setAlternatingRowColors(true); + roomsList->setShowGrid(false); + roomsList->setSelectionMode(QAbstractItemView::SingleSelection); pageLayout->addWidget(roomsList, 1, 0, 3, 1); pageLayout->setRowStretch(2, 100); + + QHBoxLayout * filterLayout = new QHBoxLayout(); + + QLabel * stateLabel = new QLabel(this); + stateLabel->setText(tr("State:")); + CBState = new QComboBox(this); + CBState->addItem(QComboBox::tr("Any")); + CBState->addItem(QComboBox::tr("In lobby")); + CBState->addItem(QComboBox::tr("In progress")); + filterLayout->addWidget(stateLabel); + filterLayout->addWidget(CBState); + filterLayout->addSpacing(30); + + QLabel * ruleLabel = new QLabel(this); + ruleLabel->setText(tr("Rules:")); + CBRules = new QComboBox(this); + CBRules->addItem(QComboBox::tr("Any")); + CBRules->addItem(QComboBox::tr("Default")); + CBRules->addItem(QComboBox::tr("Pro mode")); + CBRules->addItem(QComboBox::tr("Shoppa")); + CBRules->addItem(QComboBox::tr("Basketball")); + CBRules->addItem(QComboBox::tr("Minefield")); + CBRules->addItem(QComboBox::tr("Barrel mayhem")); + CBRules->addItem(QComboBox::tr("Tunnel hogs")); + filterLayout->addWidget(ruleLabel); + filterLayout->addWidget(CBRules); + filterLayout->addSpacing(30); + + QLabel * weaponLabel = new QLabel(this); + weaponLabel->setText(tr("Weapons:")); + CBWeapons = new QComboBox(this); + CBWeapons->addItem(QComboBox::tr("Any")); + CBWeapons->addItem(QComboBox::tr("Basketball")); + CBWeapons->addItem(QComboBox::tr("Crazy")); + CBWeapons->addItem(QComboBox::tr("Default")); + CBWeapons->addItem(QComboBox::tr("Minefield")); + CBWeapons->addItem(QComboBox::tr("Pro mode")); + CBWeapons->addItem(QComboBox::tr("Shoppa")); + filterLayout->addWidget(weaponLabel); + filterLayout->addWidget(CBWeapons); + filterLayout->addSpacing(30); + + QLabel * searchLabel = new QLabel(this); + searchLabel->setText(tr("Search:")); + searchText = new QLineEdit(this); + searchText->setMaxLength(60); + filterLayout->addWidget(searchLabel); + filterLayout->addWidget(searchText); + + pageLayout->addLayout(filterLayout, 4, 0); chatWidget = new HWChatWidget(this, gameSettings, sdli, false); - pageLayout->addWidget(chatWidget, 4, 0, 1, 2); - pageLayout->setRowStretch(4, 350); + pageLayout->addWidget(chatWidget, 5, 0, 1, 2); + pageLayout->setRowStretch(5, 350); BtnCreate = addButton(tr("Create"), pageLayout, 0, 1); BtnJoin = addButton(tr("Join"), pageLayout, 1, 1); BtnRefresh = addButton(tr("Refresh"), pageLayout, 3, 1); + BtnClear = addButton(tr("Clear"), pageLayout, 4, 1); - BtnBack = addButton(":/res/Exit.png", pageLayout, 5, 0, true); - BtnAdmin = addButton(tr("Admin features"), pageLayout, 5, 1); + BtnBack = addButton(":/res/Exit.png", pageLayout, 6, 0, true); + BtnAdmin = addButton(tr("Admin features"), pageLayout, 6, 1); connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick())); connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick())); connect(BtnRefresh, SIGNAL(clicked()), this, SLOT(onRefreshClick())); + connect(BtnClear, SIGNAL(clicked()), this, SLOT(onClearClick())); connect(roomsList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(onJoinClick())); + connect(CBState, SIGNAL(currentIndexChanged (int)), this, SLOT(onRefreshClick())); + connect(CBRules, SIGNAL(currentIndexChanged (int)), this, SLOT(onRefreshClick())); + connect(CBWeapons, SIGNAL(currentIndexChanged (int)), this, SLOT(onRefreshClick())); + connect(searchText, SIGNAL(textChanged (const QString &)), this, SLOT(onRefreshClick())); + connect(this, SIGNAL(askJoinConfirmation (const QString &)), this, SLOT(onJoinConfirmation(const QString &)), Qt::QueuedConnection); + + gameInLobby = false; } void PageRoomsList::setAdmin(bool flag) @@ -1077,6 +1222,18 @@ void PageRoomsList::setRoomsList(const QStringList & list) { + QBrush red(QColor(255, 0, 0)); + QBrush orange(QColor(127, 127, 0)); + QBrush yellow(QColor(255, 255, 0)); + QBrush green(QColor(0, 255, 0)); + + listFromServer = list; + + QString selection = ""; + + if(QTableWidgetItem *item = roomsList->item(roomsList->currentRow(), 0)) + selection = item->text(); + roomsList->clear(); roomsList->setColumnCount(7); roomsList->setHorizontalHeaderLabels( @@ -1102,12 +1259,46 @@ // set resize modes // roomsList->horizontalHeader()->setResizeMode(QHeaderView::Interactive); + bool gameCanBeJoined = true; + if (list.size() % 8) return; roomsList->setRowCount(list.size() / 8); for(int i = 0, r = 0; i < list.size(); i += 8, r++) { + // if we are joining a game + // TODO: Should NOT be done here + if (gameInLobby) { + if (gameInLobbyName == list[i + 1]) { + gameCanBeJoined = list[i].compare("True"); + } + } + + // check filter settings + #define NO_FILTER_MATCH roomsList->setRowCount(roomsList->rowCount() - 1); --r; continue + + if (list[i].compare("True") && CBState->currentIndex() == 2) { NO_FILTER_MATCH; } + if (list[i].compare("False") && CBState->currentIndex() == 1) { NO_FILTER_MATCH; } + if (CBRules->currentIndex() != 0 && list[i + 6].compare(CBRules->currentText())) { NO_FILTER_MATCH; } + if (CBWeapons->currentIndex() != 0 && list[i + 7].compare(CBWeapons->currentText())) { NO_FILTER_MATCH; } + bool found = list[i + 1].contains(searchText->text(), Qt::CaseInsensitive); + if (!found) { + for (int a = 4; a <= 7; ++a) { + QString compString = list[i + a]; + if (a == 5 && compString == "+rnd+") { + compString = "Random Map"; + } else if (a == 5 && compString == "+maze+") { + compString = "Random Maze"; + } + if (compString.contains(searchText->text(), Qt::CaseInsensitive)) { + found = true; + break; + } + } + } + if (!searchText->text().isEmpty() && !found) { NO_FILTER_MATCH; } + QTableWidgetItem * item; item = new QTableWidgetItem(list[i + 1]); // room name item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); @@ -1136,6 +1327,9 @@ item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); item->setTextAlignment(Qt::AlignCenter); item->setToolTip(tr("There are %1 teams participating in this room.", "", list[i + 3].toInt()).arg(list[i + 3])); + //Should we highlight "full" games? Might get misinterpreted + //if(list[i + 3].toInt() >= cMaxTeams) + // item->setForeground(red); roomsList->setItem(r, 2, item); item = new QTableWidgetItem(list[i + 4].left(15)); // name of host @@ -1144,9 +1338,15 @@ roomsList->setItem(r, 3, item); if(list[i + 5] == "+rnd+") + { item = new QTableWidgetItem(tr("Random Map")); // selected map (is randomized) + item->setIcon(QIcon(":/res/mapRandom.png")); + } else if (list[i+5] == "+maze+") + { item = new QTableWidgetItem(tr("Random Maze")); + item->setIcon(QIcon(":/res/mapMaze.png")); + } else { item = new QTableWidgetItem(list[i + 5]); // selected map @@ -1154,7 +1354,15 @@ // check to see if we've got this map // not perfect but a start if(!mapList->contains(list[i + 5])) - item->setForeground(QBrush(QColor(255, 0, 0))); + { + item->setForeground(red); + item->setIcon(QIcon(":/res/mapMissing.png")); + } + else + { + // todo: mission icon? + item->setIcon(QIcon(":/res/mapCustom.png")); + } } item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable); @@ -1171,14 +1379,27 @@ item->setToolTip(tr("The Weapon Scheme defines available weapons and their ammunition count.")); roomsList->setItem(r, 6, item); + if(!list[i + 1].compare(selection) && !selection.isEmpty()) + roomsList->selectionModel()->setCurrentIndex(roomsList->model()->index(r, 0), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); } - roomsList->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); - roomsList->horizontalHeader()->setResizeMode(1, QHeaderView::ResizeToContents); - roomsList->horizontalHeader()->setResizeMode(2, QHeaderView::ResizeToContents); - roomsList->horizontalHeader()->setResizeMode(3, QHeaderView::ResizeToContents); - roomsList->horizontalHeader()->setResizeMode(4, QHeaderView::ResizeToContents); - roomsList->horizontalHeader()->setResizeMode(5, QHeaderView::ResizeToContents); - roomsList->horizontalHeader()->setResizeMode(6, QHeaderView::ResizeToContents); + + roomsList->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); + roomsList->horizontalHeader()->setResizeMode(1, QHeaderView::ResizeToContents); + roomsList->horizontalHeader()->setResizeMode(2, QHeaderView::ResizeToContents); + roomsList->horizontalHeader()->setResizeMode(3, QHeaderView::ResizeToContents); + roomsList->horizontalHeader()->setResizeMode(4, QHeaderView::ResizeToContents); + roomsList->horizontalHeader()->setResizeMode(5, QHeaderView::ResizeToContents); + roomsList->horizontalHeader()->setResizeMode(6, QHeaderView::ResizeToContents); + + // TODO: Should NOT be done here + if (gameInLobby) { + gameInLobby = false; + if (gameCanBeJoined) { + emit askForJoinRoom(gameInLobbyName); + } else { + emit askJoinConfirmation(gameInLobbyName); + } + } // roomsList->resizeColumnsToContents(); } @@ -1203,9 +1424,22 @@ tr("Error"), tr("Please select room from the list"), tr("OK")); - return ; + return; } - emit askForJoinRoom(curritem->data(Qt::DisplayRole).toString()); + + for (int i = 0; i < listFromServer.size(); i += 8) { + if (listFromServer[i + 1] == curritem->data(Qt::DisplayRole).toString()) { + gameInLobby = listFromServer[i].compare("True"); + break; + } + } + + if (gameInLobby) { + gameInLobbyName = curritem->data(Qt::DisplayRole).toString(); + emit askForRoomList(); + } else { + emit askForJoinRoom(curritem->data(Qt::DisplayRole).toString()); + } } void PageRoomsList::onRefreshClick() @@ -1213,6 +1447,24 @@ emit askForRoomList(); } +void PageRoomsList::onClearClick() +{ + CBState->setCurrentIndex(0); + CBRules->setCurrentIndex(0); + CBWeapons->setCurrentIndex(0); + searchText->clear(); +} + +void PageRoomsList::onJoinConfirmation(const QString & room) +{ + if (QMessageBox::warning(this, + tr("Warning"), + tr("The game you are trying to join has started.\nDo you still want to join the room?"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) + { + emit askForJoinRoom(room); + } +} PageConnecting::PageConnecting(QWidget* parent) : AbstractPage(parent) @@ -1277,55 +1529,71 @@ TBW_lowGravity = new ToggleButtonWidget(gbGameModes, ":/res/btnLowGravity.png"); TBW_lowGravity->setToolTip("" + ToggleButtonWidget::tr("Low Gravity") + ":
" + tr("Lower gravity")); - glGMLayout->addWidget(TBW_lowGravity,1,0,1,1); + glGMLayout->addWidget(TBW_lowGravity,0,4,1,1); TBW_laserSight = new ToggleButtonWidget(gbGameModes, ":/res/btnLaserSight.png"); TBW_laserSight->setToolTip("" + ToggleButtonWidget::tr("Laser Sight") + ":
" + tr("Assisted aiming with laser sight")); - glGMLayout->addWidget(TBW_laserSight,1,1,1,1); + glGMLayout->addWidget(TBW_laserSight,1,0,1,1); TBW_invulnerable = new ToggleButtonWidget(gbGameModes, ":/res/btnInvulnerable.png"); TBW_invulnerable->setToolTip("" + ToggleButtonWidget::tr("Invulnerable") + ":
" + tr("All hogs have a personal forcefield")); - glGMLayout->addWidget(TBW_invulnerable,1,2,1,1); + glGMLayout->addWidget(TBW_invulnerable,1,1,1,1); TBW_mines = new ToggleButtonWidget(gbGameModes, ":/res/btnMines.png"); TBW_mines->setToolTip("" + ToggleButtonWidget::tr("Add Mines") + ":
" + tr("Enable random mines")); - glGMLayout->addWidget(TBW_mines,1,3,1,1); + glGMLayout->addWidget(TBW_mines,1,2,1,1); TBW_vampiric = new ToggleButtonWidget(gbGameModes, ":/res/btnVampiric.png"); TBW_vampiric->setToolTip("" + ToggleButtonWidget::tr("Vampirism") + ":
" + tr("Gain 80% of the damage you do back in health")); - glGMLayout->addWidget(TBW_vampiric,2,0,1,1); + glGMLayout->addWidget(TBW_vampiric,1,3,1,1); TBW_karma = new ToggleButtonWidget(gbGameModes, ":/res/btnKarma.png"); TBW_karma->setToolTip("" + ToggleButtonWidget::tr("Karma") + ":
" + tr("Share your opponents pain, share their damage")); - glGMLayout->addWidget(TBW_karma,2,1,1,1); + glGMLayout->addWidget(TBW_karma,1,4,1,1); TBW_artillery = new ToggleButtonWidget(gbGameModes, ":/res/btnArtillery.png"); TBW_artillery->setToolTip("" + ToggleButtonWidget::tr("Artillery") + ":
" + tr("Your hogs are unable to move, put your artillery skills to the test")); - glGMLayout->addWidget(TBW_artillery,2,2,1,1); + glGMLayout->addWidget(TBW_artillery,2,0,1,1); TBW_randomorder = new ToggleButtonWidget(gbGameModes, ":/res/btnRandomOrder.png"); TBW_randomorder->setToolTip("" + ToggleButtonWidget::tr("Random Order") + ":
" + tr("Order of play is random instead of in room order.")); - glGMLayout->addWidget(TBW_randomorder,2,3,1,1); + glGMLayout->addWidget(TBW_randomorder,2,1,1,1); TBW_king = new ToggleButtonWidget(gbGameModes, ":/res/btnKing.png"); TBW_king->setToolTip("" + ToggleButtonWidget::tr("King") + ":
" + tr("Play with a King. If he dies, your side dies.")); - glGMLayout->addWidget(TBW_king,3,0,1,1); + glGMLayout->addWidget(TBW_king,2,2,1,1); TBW_placehog = new ToggleButtonWidget(gbGameModes, ":/res/btnPlaceHog.png"); TBW_placehog->setToolTip("" + ToggleButtonWidget::tr("Place Hedgehogs") + ":
" + tr("Take turns placing your hedgehogs before the start of play.")); - glGMLayout->addWidget(TBW_placehog,3,1,1,1); + glGMLayout->addWidget(TBW_placehog,2,3,1,1); TBW_sharedammo = new ToggleButtonWidget(gbGameModes, ":/res/btnSharedAmmo.png"); TBW_sharedammo->setToolTip("" + ToggleButtonWidget::tr("Clan Shares Ammo") + ":
" + tr("Ammo is shared between all teams that share a colour.")); - glGMLayout->addWidget(TBW_sharedammo,3,2,1,1); + glGMLayout->addWidget(TBW_sharedammo,2,4,1,1); TBW_disablegirders = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableGirders.png"); TBW_disablegirders->setToolTip("" + ToggleButtonWidget::tr("Disable Girders") + ":
" + tr("Disable girders when generating random maps.")); - glGMLayout->addWidget(TBW_disablegirders,3,3,1,1); + glGMLayout->addWidget(TBW_disablegirders,3,0,1,1); TBW_disablelandobjects = new ToggleButtonWidget(gbGameModes, ":/res/btnDisableLandObjects.png"); TBW_disablelandobjects->setToolTip("" + ToggleButtonWidget::tr("Disable Land Objects") + ":
" + tr("Disable land objects when generating random maps.")); - glGMLayout->addWidget(TBW_disablelandobjects,4,0,1,1); + glGMLayout->addWidget(TBW_disablelandobjects,3,1,1,1); + + TBW_aisurvival = new ToggleButtonWidget(gbGameModes, ":/res/btnAISurvival.png"); + TBW_aisurvival->setToolTip("" + ToggleButtonWidget::tr("AI Survival Mode") + ":
" + tr("AI respawns on death.")); + glGMLayout->addWidget(TBW_aisurvival,3,2,1,1); + + TBW_infattack = new ToggleButtonWidget(gbGameModes, ":/res/btnInfAttack.png"); + TBW_infattack->setToolTip("" + ToggleButtonWidget::tr("Unlimited Attacks") + ":
" + tr("Attacking does not end your turn.")); + glGMLayout->addWidget(TBW_infattack,3,3,1,1); + + TBW_resetweps = new ToggleButtonWidget(gbGameModes, ":/res/btnResetWeps.png"); + TBW_resetweps->setToolTip("" + ToggleButtonWidget::tr("Reset Weapons") + ":
" + tr("Weapons are reset to starting values each turn.")); + glGMLayout->addWidget(TBW_resetweps,3,4,1,1); + + TBW_perhogammo = new ToggleButtonWidget(gbGameModes, ":/res/btnPerHogAmmo.png"); + TBW_perhogammo->setToolTip("" + ToggleButtonWidget::tr("Per Hedgehog Ammo") + ":
" + tr("Each hedgehog has its own ammo. It does not share with the team.")); + glGMLayout->addWidget(TBW_perhogammo,4,0,1,1); // Right QLabel * l; @@ -1355,7 +1623,7 @@ glBSLayout->addWidget(l,1,1,1,1); SB_TurnTime = new QSpinBox(gbBasicSettings); - SB_TurnTime->setRange(1, 99); + SB_TurnTime->setRange(1, 9999); SB_TurnTime->setValue(45); SB_TurnTime->setSingleStep(15); glBSLayout->addWidget(SB_TurnTime,1,2,1,1); @@ -1510,15 +1778,19 @@ mapper->addMapping(TBW_sharedammo, 15); mapper->addMapping(TBW_disablegirders, 16); mapper->addMapping(TBW_disablelandobjects, 17); - mapper->addMapping(SB_DamageModifier, 18); - mapper->addMapping(SB_TurnTime, 19); - mapper->addMapping(SB_InitHealth, 20); - mapper->addMapping(SB_SuddenDeath, 21); - mapper->addMapping(SB_CaseProb, 22); - mapper->addMapping(SB_MinesTime, 23); - mapper->addMapping(SB_Mines, 24); - mapper->addMapping(SB_MineDuds, 25); - mapper->addMapping(SB_Explosives, 26); + mapper->addMapping(TBW_aisurvival, 18); + mapper->addMapping(TBW_infattack, 19); + mapper->addMapping(TBW_resetweps, 20); + mapper->addMapping(TBW_perhogammo, 21); + mapper->addMapping(SB_DamageModifier, 22); + mapper->addMapping(SB_TurnTime, 23); + mapper->addMapping(SB_InitHealth, 24); + mapper->addMapping(SB_SuddenDeath, 25); + mapper->addMapping(SB_CaseProb, 26); + mapper->addMapping(SB_MinesTime, 27); + mapper->addMapping(SB_Mines, 28); + mapper->addMapping(SB_MineDuds, 29); + mapper->addMapping(SB_Explosives, 30); mapper->toFirst(); } diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/pages.h --- a/QTfrontend/pages.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/pages.h Wed Oct 27 14:02:20 2010 +0200 @@ -70,6 +70,7 @@ protected: AbstractPage(QWidget* parent = 0) { font14 = new QFont("MS Shell Dlg", 14); + setFocusPolicy(Qt::StrongFocus); } virtual ~AbstractPage() {}; @@ -216,6 +217,7 @@ QPushButton *BtnNewTeam; QPushButton *BtnEditTeam; QPushButton *BtnDeleteTeam; + QPushButton *BtnAssociateFiles; QLabel *LblNoEditTeam; QComboBox *CBTeamName; IconedGroupBox *AGGroupBox; @@ -340,6 +342,7 @@ QPushButton *BtnSimpleGamePage; QPushButton *BtnTrainPage; + QPushButton *BtnCampaignPage; QPushButton *BtnMultiplayer; QPushButton *BtnLoad; QPushButton *BtnDemos; @@ -359,6 +362,19 @@ QComboBox *CBSelect; }; +class PageCampaign : public AbstractPage +{ + Q_OBJECT + +public: + PageCampaign(QWidget* parent = 0); + + QPushButton *BtnStartCampaign; + QPushButton *BtnBack; + QComboBox *CBSelect; + QComboBox *CBTeam; +}; + class PageSelectWeapon : public AbstractPage { Q_OBJECT @@ -389,14 +405,24 @@ PageRoomsList(QWidget* parent, QSettings * config, SDLInteraction * sdli); QLineEdit * roomName; + QLineEdit * searchText; QTableWidget * roomsList; QPushButton * BtnBack; QPushButton * BtnCreate; QPushButton * BtnJoin; QPushButton * BtnRefresh; QPushButton * BtnAdmin; + QPushButton * BtnClear; + QComboBox * CBState; + QComboBox * CBRules; + QComboBox * CBWeapons; HWChatWidget * chatWidget; +private: + bool gameInLobby; + QString gameInLobbyName; + QStringList listFromServer; + public slots: void setRoomsList(const QStringList & list); void setAdmin(bool); @@ -405,11 +431,14 @@ void onCreateClick(); void onJoinClick(); void onRefreshClick(); + void onClearClick(); + void onJoinConfirmation(const QString &); signals: void askForCreateRoom(const QString &); void askForJoinRoom(const QString &); void askForRoomList(); + void askJoinConfirmation(const QString &); }; class PageConnecting : public AbstractPage @@ -453,6 +482,10 @@ ToggleButtonWidget * TBW_sharedammo; ToggleButtonWidget * TBW_disablegirders; ToggleButtonWidget * TBW_disablelandobjects; + ToggleButtonWidget * TBW_aisurvival; + ToggleButtonWidget * TBW_infattack; + ToggleButtonWidget * TBW_resetweps; + ToggleButtonWidget * TBW_perhogammo; QSpinBox * SB_DamageModifier; QSpinBox * SB_TurnTime; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsBestKiller.png Binary file QTfrontend/res/StatsBestKiller.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsBestShot.png Binary file QTfrontend/res/StatsBestShot.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsD.png Binary file QTfrontend/res/StatsD.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsH.png Binary file QTfrontend/res/StatsH.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsHedgehogsKilled.png Binary file QTfrontend/res/StatsHedgehogsKilled.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsMedal1.png Binary file QTfrontend/res/StatsMedal1.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsMedal2.png Binary file QTfrontend/res/StatsMedal2.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsMedal3.png Binary file QTfrontend/res/StatsMedal3.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsMedal4.png Binary file QTfrontend/res/StatsMedal4.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsMostSelfDamage.png Binary file QTfrontend/res/StatsMostSelfDamage.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsR.png Binary file QTfrontend/res/StatsR.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsSelfKilled.png Binary file QTfrontend/res/StatsSelfKilled.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/StatsSkipped.png Binary file QTfrontend/res/StatsSkipped.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/btnAISurvival.png Binary file QTfrontend/res/btnAISurvival.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/btnInfAttack.png Binary file QTfrontend/res/btnInfAttack.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/btnPerHogAmmo.png Binary file QTfrontend/res/btnPerHogAmmo.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/btnResetWeps.png Binary file QTfrontend/res/btnResetWeps.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/mapCustom.png Binary file QTfrontend/res/mapCustom.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/mapMaze.png Binary file QTfrontend/res/mapMaze.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/mapMissing.png Binary file QTfrontend/res/mapMissing.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/mapMission.png Binary file QTfrontend/res/mapMission.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/res/mapRandom.png Binary file QTfrontend/res/mapRandom.png has changed diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/sdlkeys.h --- a/QTfrontend/sdlkeys.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/sdlkeys.h Wed Oct 27 14:02:20 2010 +0200 @@ -39,7 +39,7 @@ {")", ")"}, {"*", "*"}, {"+", "+"}, - {", ", ", "}, + {",", ","}, {"-", "-"}, {".", "."}, {"/", "/"}, diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/selectWeapon.cpp --- a/QTfrontend/selectWeapon.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/selectWeapon.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -131,11 +131,11 @@ SelWeaponItem * pwi = new SelWeaponItem(false, i, currentState[numItems + i].digitValue(), QImage(":/res/ammopicbox.png"), this); weaponItems[i].append(pwi); p2Layout->addWidget(pwi, j, k % 4); - + SelWeaponItem * dwi = new SelWeaponItem(false, i, currentState[numItems*2 + i].digitValue(), QImage(":/res/ammopicdelay.png"), this); weaponItems[i].append(dwi); p3Layout->addWidget(dwi, j, k % 4); - + SelWeaponItem * awi = new SelWeaponItem(false, i, currentState[numItems*3 + i].digitValue(), QImage(":/res/ammopic.png"), this); weaponItems[i].append(awi); p4Layout->addWidget(awi, j, k % 4); diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/statsPage.cpp --- a/QTfrontend/statsPage.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/statsPage.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -19,7 +19,8 @@ #include #include #include - +#include +#include #include "statsPage.h" #include "team.h" @@ -36,20 +37,59 @@ PageGameStats::PageGameStats(QWidget* parent) : AbstractPage(parent) { QGridLayout * pageLayout = new QGridLayout(this); + pageLayout->setSpacing(20); pageLayout->setColumnStretch(0, 1); pageLayout->setColumnStretch(1, 1); - pageLayout->setColumnStretch(2, 1); + + BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true); + BtnBack->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); + QGroupBox * gb = new QGroupBox(this); + QVBoxLayout * gbl = new QVBoxLayout; + // details labelGameStats = new QLabel(this); + QLabel * l = new QLabel(this); + l->setTextFormat(Qt::RichText); + l->setText("

" + PageGameStats::tr("Details") + "

"); + l->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); labelGameStats->setTextFormat(Qt::RichText); - pageLayout->addWidget(labelGameStats, 0, 0, 1, 3); - - graphic = new FitGraphicsView(this); + labelGameStats->setAlignment(Qt::AlignTop); + gbl->addWidget(l); + gbl->addWidget(labelGameStats); + gb->setLayout(gbl); + pageLayout->addWidget(gb, 1, 1); + + // graph + graphic = new FitGraphicsView(gb); + l = new QLabel(this); + l->setTextFormat(Qt::RichText); + l->setText("

" + PageGameStats::tr("Health graph") + "

"); + l->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + gbl->addWidget(l); + gbl->addWidget(graphic); graphic->scale(1.0, -1.0); graphic->setBackgroundBrush(QBrush(Qt::black)); - pageLayout->addWidget(graphic, 1, 0, 1, 3); + + labelGameWin = new QLabel(this); + labelGameWin->setTextFormat(Qt::RichText); + pageLayout->addWidget(labelGameWin, 0, 0, 1, 2); + + // ranking box + gb = new QGroupBox(this); + gbl = new QVBoxLayout; + labelGameRank = new QLabel(gb); + l = new QLabel(this); + l->setTextFormat(Qt::RichText); + l->setText("

" + PageGameStats::tr("Ranking") + "

"); + l->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + gbl->addWidget(l); + gbl->addWidget(labelGameRank); + gb->setLayout(gbl); + + labelGameRank->setTextFormat(Qt::RichText); + labelGameRank->setAlignment(Qt::AlignTop); + pageLayout->addWidget(gb, 1, 0); } void PageGameStats::AddStatText(const QString & msg) @@ -61,6 +101,9 @@ { labelGameStats->setText(""); healthPoints.clear(); + labelGameRank->setText(""); + playerPosition = 0; + lastColor = 0; } void PageGameStats::renderStats() @@ -93,27 +136,25 @@ { switch(type) { case 'r' : { - AddStatText(QString("

%1

").arg(info)); + labelGameWin->setText(QString("

%1

").arg(info)); break; } case 'D' : { int i = info.indexOf(' '); - QString message = PageGameStats::tr("

The best shot award was won by %1 with %2 pts.

") - .arg(info.mid(i + 1), info.left(i)); + QString message = "

" + PageGameStats::tr("The best shot award was won by %1 with %2 pts.").arg(info.mid(i + 1), info.left(i)) + "

"; AddStatText(message); break; } case 'k' : { int i = info.indexOf(' '); int num = info.left(i).toInt(); - QString message = PageGameStats::tr("

The best killer is %1 with %2 kills in a turn.

", "", num) - .arg(info.mid(i + 1), info.left(i)); + QString message = "

" + PageGameStats::tr("The best killer is %1 with %2 kills in a turn.", "", num).arg(info.mid(i + 1), info.left(i)) + "

"; AddStatText(message); break; } case 'K' : { int num = info.toInt(); - QString message = PageGameStats::tr("

A total of %1 hedgehog(s) were killed during this round.

", "", num).arg(num); + QString message = "

" + PageGameStats::tr("A total of %1 hedgehog(s) were killed during this round.", "", num).arg(num) + "

"; AddStatText(message); break; } @@ -136,6 +177,75 @@ team.Wins++; // should draws count as wins? //team.SaveToFile(); // don't save yet } + break; } + + case 'P' : { + int i = info.indexOf(' '); + playerPosition++; + QString color = info.left(i); + quint32 c = color.toInt(); + QColor clanColor = QColor(qRgb((c >> 16) & 255, (c >> 8) & 255, c & 255)); + + QString playerinfo = info.mid(i + 1); + + i = playerinfo.indexOf(' '); + + QString kills = playerinfo.left(i); + QString playername = playerinfo.mid(i + 1); + QString image; + + if (lastColor == c && playerPosition <= 2) playerPosition = 1; + lastColor = c; + + switch (playerPosition) + { + case 1: + image = ""; + break; + case 2: + image = ""; + break; + case 3: + image = ""; + break; + default: + image = ""; + break; + } + + QString message; + QString killstring; + if (kills.toInt() == 1) + { + killstring = PageGameStats::tr("(%1 kill)").arg(kills); + } else { + killstring = PageGameStats::tr("(%1 kills)").arg(kills); + } + + message = QString("

%1 %2. %3 ").arg(image, QString::number(playerPosition), playername, clanColor.name()) + killstring + "

"; + + labelGameRank->setText(labelGameRank->text() + message); + break; + } + case 's' : { + int i = info.indexOf(' '); + QString message = "

" + PageGameStats::tr("%1 thought it's good to shoot his own hedgehogs with %2 pts.").arg(info.mid(i + 1), info.left(i)) + "

"; + AddStatText(message); + break; + } + case 'S' : { + int i = info.indexOf(' '); + QString message = "

" + PageGameStats::tr("%1 killed %2 of his own hedgehogs.").arg(info.mid(i + 1), info.left(i)) + "

"; + AddStatText(message); + break; + } + case 'B' : { + int i = info.indexOf(' '); + QString message = "

" + PageGameStats::tr("%1 was scared and skipped turn %2 times.").arg(info.mid(i + 1), info.left(i)) + "

"; + AddStatText(message); + break; + } + } } diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/statsPage.h --- a/QTfrontend/statsPage.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/statsPage.h Wed Oct 27 14:02:20 2010 +0200 @@ -44,6 +44,8 @@ QPushButton *BtnBack; QLabel *labelGameStats; + QLabel *labelGameWin; + QLabel *labelGameRank; FitGraphicsView * graphic; public slots: @@ -55,6 +57,8 @@ void AddStatText(const QString & msg); QMap > healthPoints; + unsigned int playerPosition; + quint32 lastColor; }; #endif // STATSPAGE_H diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/tcpBase.cpp --- a/QTfrontend/tcpBase.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/tcpBase.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -72,7 +72,7 @@ process = new QProcess; connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(StartProcessError(QProcess::ProcessError))); QStringList arguments=setArguments(); - + // redirect everything written on stdout/stderr if(isDevBuild) process->setProcessChannelMode(QProcess::ForwardedChannels); diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/team.cpp --- a/QTfrontend/team.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/team.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -52,6 +52,7 @@ } Rounds = 0; Wins = 0; + CampaignProgress = 0; } HWTeam::HWTeam(const QStringList& strLst) : @@ -73,10 +74,11 @@ Hedgehogs[i].Hat=strLst[i * 2 + 8]; // Somehow claymore managed an empty hat. Until we figure out how, this should avoid a repeat // Checking net teams is probably pointless, but can't hurt. - if (Hedgehogs[i].Hat.length() == 0) Hedgehogs[i].Hat = "NoHat"; + if (Hedgehogs[i].Hat.isEmpty()) Hedgehogs[i].Hat = "NoHat"; } Rounds = 0; Wins = 0; + CampaignProgress = 0; } HWTeam::HWTeam() : @@ -103,12 +105,13 @@ } Rounds = 0; Wins = 0; + CampaignProgress = 0; } bool HWTeam::LoadFromFile() { - QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + TeamName + ".ini", QSettings::IniFormat, 0); + QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + TeamName + ".hwt", QSettings::IniFormat, 0); teamfile.setIniCodec("UTF-8"); TeamName = teamfile.value("Team/Name", TeamName).toString(); Grave = teamfile.value("Team/Grave", "Statue").toString(); @@ -118,6 +121,7 @@ difficulty = teamfile.value("Team/Difficulty", 0).toInt(); Rounds = teamfile.value("Team/Rounds", 0).toInt(); Wins = teamfile.value("Team/Wins", 0).toInt(); + CampaignProgress = teamfile.value("Team/CampaignProgress", 0).toInt(); for(int i = 0; i < 8; i++) { QString hh = QString("Hedgehog%1/").arg(i); @@ -140,7 +144,7 @@ bool HWTeam::FileExists() { - QFile f(cfgdir->absolutePath() + "/Teams/" + TeamName + ".ini"); + QFile f(cfgdir->absolutePath() + "/Teams/" + TeamName + ".hwt"); return f.exists(); } @@ -148,7 +152,7 @@ { if(m_isNetTeam) return false; - QFile cfgfile(cfgdir->absolutePath() + "/Teams/" + TeamName + ".ini"); + QFile cfgfile(cfgdir->absolutePath() + "/Teams/" + TeamName + ".hwt"); cfgfile.remove(); return true; } @@ -157,11 +161,11 @@ { if (OldTeamName != TeamName) { - QFile cfgfile(cfgdir->absolutePath() + "/Teams/" + OldTeamName + ".ini"); + QFile cfgfile(cfgdir->absolutePath() + "/Teams/" + OldTeamName + ".hwt"); cfgfile.remove(); OldTeamName = TeamName; } - QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + TeamName + ".ini", QSettings::IniFormat, 0); + QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + TeamName + ".hwt", QSettings::IniFormat, 0); teamfile.setIniCodec("UTF-8"); teamfile.setValue("Team/Name", TeamName); teamfile.setValue("Team/Grave", Grave); @@ -171,6 +175,7 @@ teamfile.setValue("Team/Difficulty", difficulty); teamfile.setValue("Team/Rounds", Rounds); teamfile.setValue("Team/Wins", Wins); + teamfile.setValue("Team/CampaignProgress", CampaignProgress); for(int i = 0; i < 8; i++) { QString hh = QString("Hedgehog%1/").arg(i); @@ -204,7 +209,7 @@ hwform->ui.pageEditTeam->HHHats[i]->setCurrentIndex(hwform->ui.pageEditTeam->HHHats[i]->findData(Hedgehogs[i].Hat, Qt::DisplayRole)); } hwform->ui.pageEditTeam->CBGrave->setCurrentIndex(hwform->ui.pageEditTeam->CBGrave->findText(Grave)); - hwform->ui.pageEditTeam->CBFlag->setCurrentIndex(hwform->ui.pageEditTeam->CBFlag->findText(Flag)); + hwform->ui.pageEditTeam->CBFlag->setCurrentIndex(hwform->ui.pageEditTeam->CBFlag->findData(Flag)); hwform->ui.pageEditTeam->CBFort->setCurrentIndex(hwform->ui.pageEditTeam->CBFort->findText(Fort)); hwform->ui.pageEditTeam->CBVoicepack->setCurrentIndex(hwform->ui.pageEditTeam->CBVoicepack->findText(Voicepack)); @@ -232,7 +237,7 @@ Grave = hwform->ui.pageEditTeam->CBGrave->currentText(); Fort = hwform->ui.pageEditTeam->CBFort->currentText(); Voicepack = hwform->ui.pageEditTeam->CBVoicepack->currentText(); - Flag = hwform->ui.pageEditTeam->CBFlag->currentText(); + Flag = hwform->ui.pageEditTeam->CBFlag->itemData(hwform->ui.pageEditTeam->CBFlag->currentIndex()).toString(); for(int i = 0; i < BINDS_NUMBER; i++) { binds[i].strbind = hwform->ui.pageEditTeam->CBBind[i]->itemData(hwform->ui.pageEditTeam->CBBind[i]->currentIndex()).toString(); diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/team.h --- a/QTfrontend/team.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/team.h Wed Oct 27 14:02:20 2010 +0200 @@ -56,6 +56,7 @@ QString Owner; int Rounds; int Wins; + int CampaignProgress; HWHog Hedgehogs[8]; unsigned int AchievementProgress[MAX_ACHIEVEMENTS]; unsigned int difficulty; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/teamselhelper.cpp --- a/QTfrontend/teamselhelper.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/teamselhelper.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -75,6 +75,7 @@ phhoger = new CHedgehogerWidget(QImage(":/res/hh25x25.png"), this); connect(phhoger, SIGNAL(hedgehogsNumChanged()), this, SLOT(hhNumChanged())); + phhoger->setHHNum(team.numHedgehogs); mainLayout.addWidget(phhoger); } else { } diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/ui_hwform.cpp --- a/QTfrontend/ui_hwform.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/ui_hwform.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -113,4 +113,7 @@ pageNetType = new PageNetType(); Pages->addWidget(pageNetType); + + pageCampaign = new PageCampaign(); + Pages->addWidget(pageCampaign); } diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/ui_hwform.h --- a/QTfrontend/ui_hwform.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/ui_hwform.h Wed Oct 27 14:02:20 2010 +0200 @@ -32,6 +32,7 @@ class PageGameStats; class PageSinglePlayer; class PageTraining; +class PageCampaign; class PageSelectWeapon; class PageInGame; class PageRoomsList; @@ -70,6 +71,7 @@ PageScheme *pageScheme; PageAdmin *pageAdmin; PageNetType *pageNetType; + PageCampaign *pageCampaign; QStackedLayout *Pages; QFont *font14; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/xfire.cpp --- a/QTfrontend/xfire.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/xfire.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -1,6 +1,6 @@ /* * Hedgewars Xfire integration - * Copyright (c) 2010 Mario Liebisch + * Copyright (c) 2010 Andrey Korotaev * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,10 +34,10 @@ if(use_xfire) return; use_xfire = XfireIsLoaded() == 1; - + if(!use_xfire) return; - + for(int i = 0; i < XFIRE_KEY_COUNT; i++) { keys[i] = new char[256]; @@ -45,7 +45,7 @@ strcpy(keys[i], ""); strcpy(values[i], ""); } - + strcpy(keys[XFIRE_NICKNAME], "Nickname"); strcpy(keys[XFIRE_ROOM], "Room"); strcpy(keys[XFIRE_SERVER], "Server"); @@ -58,7 +58,7 @@ { if(!use_xfire) return; - + for(int i = 0; i < XFIRE_KEY_COUNT; i++) { delete [] keys[i]; diff -r 793386610068 -r b1c2c2f6fc5e QTfrontend/xfire.h --- a/QTfrontend/xfire.h Thu Aug 26 23:59:18 2010 +0200 +++ b/QTfrontend/xfire.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,6 +1,6 @@ /* * Hedgewars Xfire integration - * Copyright (c) 2010 Mario Liebisch + * Copyright (c) 2010 Andrey Korotaev * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r 793386610068 -r b1c2c2f6fc5e bin/hwdfile.ico Binary file bin/hwdfile.ico has changed diff -r 793386610068 -r b1c2c2f6fc5e bin/hwsfile.ico Binary file bin/hwsfile.ico has changed diff -r 793386610068 -r b1c2c2f6fc5e gameServer/Actions.hs --- a/gameServer/Actions.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/Actions.hs Wed Oct 27 14:02:20 2010 +0200 @@ -11,7 +11,7 @@ import Data.Time import Data.Maybe import Control.Monad.Reader -import Control.Monad.State +import Control.Monad.State.Strict import qualified Data.ByteString.Char8 as B ----------------------------- import CoreTypes @@ -57,9 +57,7 @@ processAction (AnswerClients chans msg) = do - liftIO (putStr $ "AnswerClients... " ++ (show $ length chans) ++ " (" ++ (show msg) ++")") - liftIO $ map (flip seq ()) chans `seq` mapM_ (flip writeChan msg) chans - liftIO (putStrLn "done") + liftIO $ map (flip seq ()) chans `seq` map (flip seq ()) msg `seq` mapM_ (flip writeChan msg) chans processAction SendServerMessage = do @@ -100,30 +98,35 @@ (Just ci) <- gets clientIndex rnc <- gets roomsClients ri <- clientRoomA - when (ri /= lobbyId) $ do - processAction $ MoveToLobby ("quit: " `B.append` msg) - return () chan <- client's sendChan ready <- client's isReady + when (ri /= lobbyId) $ do + processAction $ MoveToLobby ("quit: " `B.append` msg) + liftIO $ modifyRoom rnc (\r -> r{ + --playersIDs = IntSet.delete ci (playersIDs r) + playersIn = (playersIn r) - 1, + readyPlayers = if ready then readyPlayers r - 1 else readyPlayers r + }) ri + return () + liftIO $ do infoM "Clients" (show ci ++ " quits: " ++ (B.unpack msg)) --mapM_ (processAction (ci, serverInfo, rnc)) $ answerOthersQuit ++ answerInformRoom - modifyRoom rnc (\r -> r{ - --playersIDs = IntSet.delete ci (playersIDs r) - playersIn = (playersIn r) - 1, - readyPlayers = if ready then readyPlayers r - 1 else readyPlayers r - }) ri processAction $ AnswerClients [chan] ["BYE", msg] - modify (\s -> s{removedClients = ci `Set.insert` removedClients s}) + + s <- get + put $! s{removedClients = ci `Set.insert` removedClients s} processAction (DeleteClient ci) = do rnc <- gets roomsClients liftIO $ removeClient rnc ci - modify (\s -> s{removedClients = ci `Set.delete` removedClients s}) + + s <- get + put $! s{removedClients = ci `Set.delete` removedClients s} {- where @@ -258,7 +261,7 @@ processAction $ MoveToRoom rId - chans <- liftM (map sendChan) $ roomClientsS lobbyId + chans <- liftM (map sendChan) $! roomClientsS lobbyId mapM_ processAction [ AnswerClients chans ["ROOM", "ADD", roomName] @@ -401,7 +404,7 @@ liftIO $ do ci <- addClient rnc client forkIO $ clientRecvLoop (clientSocket client) (coreChan si) ci - forkIO $ clientSendLoop (clientSocket client) (coreChan si) (sendChan client) ci + forkIO $ clientSendLoop (clientSocket client) (sendChan client) ci infoM "Clients" (show ci ++ ": New client. Time: " ++ show (connectTime client)) diff -r 793386610068 -r b1c2c2f6fc5e gameServer/ClientIO.hs --- a/gameServer/ClientIO.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/ClientIO.hs Wed Oct 27 14:02:20 2010 +0200 @@ -57,8 +57,8 @@ -clientSendLoop :: Socket -> Chan CoreMessage -> Chan [B.ByteString] -> ClientIndex -> IO() -clientSendLoop s coreChan chan ci = do +clientSendLoop :: Socket -> Chan [B.ByteString] -> ClientIndex -> IO () +clientSendLoop s chan ci = do answer <- readChan chan Exception.handle (\(e :: Exception.IOException) -> when (not $ isQuit answer) $ sendQuit e) $ do @@ -67,7 +67,7 @@ if (isQuit answer) then Exception.handle (\(_ :: Exception.IOException) -> putStrLn "error on sClose") $ sClose s else - clientSendLoop s coreChan chan ci + clientSendLoop s chan ci where --sendQuit e = writeChan coreChan $ ClientMessage (ci, ["QUIT", B.pack $ show e]) diff -r 793386610068 -r b1c2c2f6fc5e gameServer/CoreTypes.hs --- a/gameServer/CoreTypes.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/CoreTypes.hs Wed Oct 27 14:02:20 2010 +0200 @@ -31,7 +31,7 @@ roomID :: RoomIndex, pingsQueue :: !Word, isMaster :: Bool, - isReady :: Bool, + isReady :: !Bool, isAdministrator :: Bool, clientClan :: B.ByteString, teamsInGame :: Word @@ -78,7 +78,6 @@ gameinprogress :: Bool, playersIn :: !Int, readyPlayers :: !Int, - playersIDs :: IntSet.IntSet, isRestrictedJoins :: Bool, isRestrictedTeams :: Bool, roundMsgs :: Seq B.ByteString, @@ -88,8 +87,7 @@ } instance Show RoomInfo where - show ri = ", players ids: " ++ show (IntSet.size $ playersIDs ri) - ++ ", players: " ++ show (playersIn ri) + show ri = ", players: " ++ show (playersIn ri) ++ ", ready: " ++ show (readyPlayers ri) ++ ", teams: " ++ show (teams ri) @@ -104,7 +102,6 @@ False 0 0 - IntSet.empty False False Data.Sequence.empty diff -r 793386610068 -r b1c2c2f6fc5e gameServer/OfficialServer/extdbinterface.hs --- a/gameServer/OfficialServer/extdbinterface.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/OfficialServer/extdbinterface.hs Wed Oct 27 14:02:20 2010 +0200 @@ -1,4 +1,4 @@ -{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} module Main where @@ -26,7 +26,7 @@ case q of CheckAccount clUid clNick _ -> do statement <- prepare dbConn dbQueryAccount - execute statement [SqlString $ clNick] + execute statement [SqlByteString $ clNick] passAndRole <- fetchRow statement finish statement let response = @@ -47,7 +47,7 @@ dbConnectionLoop mySQLConnectionInfo = - Control.Exception.handle (\(_ :: IOException) -> return ()) $ handleSqlError $ + Control.Exception.handle (\(e :: IOException) -> hPutStrLn stderr $ show e) $ handleSqlError $ bracket (connectMySQL mySQLConnectionInfo) (disconnect) diff -r 793386610068 -r b1c2c2f6fc5e gameServer/RoomsAndClients.hs --- a/gameServer/RoomsAndClients.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/RoomsAndClients.hs Wed Oct 27 14:02:20 2010 +0200 @@ -1,193 +1,196 @@ -module RoomsAndClients( - RoomIndex(), - ClientIndex(), - MRoomsAndClients(), - IRoomsAndClients(), - newRoomsAndClients, - addRoom, - addClient, - removeRoom, - removeClient, - modifyRoom, - modifyClient, - lobbyId, - moveClientToLobby, - moveClientToRoom, - clientRoom, - clientRoomM, - client, - room, - client'sM, - room'sM, - allClientsM, - clientsM, - roomClientsM, - roomClientsIndicesM, - withRoomsAndClients, - allRooms, - allClients, - clientRoom, - showRooms, - roomClients - ) where - - -import Store -import Control.Monad - - -data Room r = Room { - roomClients' :: [ClientIndex], - room' :: r - } - - -data Client c = Client { - clientRoom' :: RoomIndex, - client' :: c - } - - -newtype RoomIndex = RoomIndex ElemIndex - deriving (Eq) -newtype ClientIndex = ClientIndex ElemIndex - deriving (Eq, Show, Read, Ord) - -instance Show RoomIndex where - show (RoomIndex i) = 'r' : show i - -unRoomIndex :: RoomIndex -> ElemIndex -unRoomIndex (RoomIndex r) = r - -unClientIndex :: ClientIndex -> ElemIndex -unClientIndex (ClientIndex c) = c - - -newtype MRoomsAndClients r c = MRoomsAndClients (MStore (Room r), MStore (Client c)) -newtype IRoomsAndClients r c = IRoomsAndClients (IStore (Room r), IStore (Client c)) - - -lobbyId :: RoomIndex -lobbyId = RoomIndex firstIndex - - -newRoomsAndClients :: r -> IO (MRoomsAndClients r c) -newRoomsAndClients r = do - rooms <- newStore - clients <- newStore - let rnc = MRoomsAndClients (rooms, clients) - ri <- addRoom rnc r - when (ri /= lobbyId) $ error "Empty struct inserts not at firstIndex index" - return rnc - - -roomAddClient :: ClientIndex -> Room r -> Room r -roomAddClient cl room = room{roomClients' = cl : roomClients' room} - -roomRemoveClient :: ClientIndex -> Room r -> Room r -roomRemoveClient cl room = room{roomClients' = filter (/= cl) $ roomClients' room} - - -addRoom :: MRoomsAndClients r c -> r -> IO RoomIndex -addRoom (MRoomsAndClients (rooms, _)) room = do - i <- addElem rooms (Room [] room) - return $ RoomIndex i - - -addClient :: MRoomsAndClients r c -> c -> IO ClientIndex -addClient (MRoomsAndClients (rooms, clients)) client = do - i <- addElem clients (Client lobbyId client) - modifyElem rooms (roomAddClient (ClientIndex i)) (unRoomIndex lobbyId) - return $ ClientIndex i - -removeRoom :: MRoomsAndClients r c -> RoomIndex -> IO () -removeRoom rnc@(MRoomsAndClients (rooms, _)) room@(RoomIndex ri) - | room == lobbyId = error "Cannot delete lobby" - | otherwise = do - clIds <- liftM roomClients' $ readElem rooms ri - forM_ clIds (moveClientToLobby rnc) - removeElem rooms ri - - -removeClient :: MRoomsAndClients r c -> ClientIndex -> IO () -removeClient (MRoomsAndClients (rooms, clients)) cl@(ClientIndex ci) = do - RoomIndex ri <- liftM clientRoom' $ readElem clients ci - modifyElem rooms (roomRemoveClient cl) ri - removeElem clients ci - - -modifyRoom :: MRoomsAndClients r c -> (r -> r) -> RoomIndex -> IO () -modifyRoom (MRoomsAndClients (rooms, _)) f (RoomIndex ri) = modifyElem rooms (\r -> r{room' = f $ room' r}) ri - -modifyClient :: MRoomsAndClients r c -> (c -> c) -> ClientIndex -> IO () -modifyClient (MRoomsAndClients (_, clients)) f (ClientIndex ci) = modifyElem clients (\c -> c{client' = f $ client' c}) ci - -moveClientInRooms :: MRoomsAndClients r c -> RoomIndex -> RoomIndex -> ClientIndex -> IO () -moveClientInRooms (MRoomsAndClients (rooms, clients)) (RoomIndex riFrom) rt@(RoomIndex riTo) cl@(ClientIndex ci) = do - modifyElem rooms (roomRemoveClient cl) riFrom - modifyElem rooms (roomAddClient cl) riTo - modifyElem clients (\c -> c{clientRoom' = rt}) ci - - -moveClientToLobby :: MRoomsAndClients r c -> ClientIndex -> IO () -moveClientToLobby rnc ci = do - room <- clientRoomM rnc ci - moveClientInRooms rnc room lobbyId ci - - -moveClientToRoom :: MRoomsAndClients r c -> RoomIndex -> ClientIndex -> IO () -moveClientToRoom rnc ri ci = moveClientInRooms rnc lobbyId ri ci - - -clientRoomM :: MRoomsAndClients r c -> ClientIndex -> IO RoomIndex -clientRoomM (MRoomsAndClients (_, clients)) (ClientIndex ci) = liftM clientRoom' (clients `readElem` ci) - -client'sM :: MRoomsAndClients r c -> (c -> a) -> ClientIndex -> IO a -client'sM (MRoomsAndClients (_, clients)) f (ClientIndex ci) = liftM (f . client') (clients `readElem` ci) - -room'sM :: MRoomsAndClients r c -> (r -> a) -> RoomIndex -> IO a -room'sM (MRoomsAndClients (rooms, _)) f (RoomIndex ri) = liftM (f . room') (rooms `readElem` ri) - -allClientsM :: MRoomsAndClients r c -> IO [ClientIndex] -allClientsM (MRoomsAndClients (_, clients)) = liftM (map ClientIndex) $ indicesM clients - -clientsM :: MRoomsAndClients r c -> IO [c] -clientsM (MRoomsAndClients (_, clients)) = indicesM clients >>= mapM (\ci -> liftM client' $ readElem clients ci) - -roomClientsIndicesM :: MRoomsAndClients r c -> RoomIndex -> IO [ClientIndex] -roomClientsIndicesM (MRoomsAndClients (rooms, clients)) (RoomIndex ri) = liftM roomClients' (rooms `readElem` ri) - -roomClientsM :: MRoomsAndClients r c -> RoomIndex -> IO [c] -roomClientsM (MRoomsAndClients (rooms, clients)) (RoomIndex ri) = liftM roomClients' (rooms `readElem` ri) >>= mapM (\(ClientIndex ci) -> liftM client' $ readElem clients ci) - -withRoomsAndClients :: MRoomsAndClients r c -> (IRoomsAndClients r c -> a) -> IO a -withRoomsAndClients (MRoomsAndClients (rooms, clients)) f = - withIStore2 rooms clients (\r c -> f $ IRoomsAndClients (r, c)) - ----------------------------------------- ------------ IRoomsAndClients ----------- - -showRooms :: (Show r, Show c) => IRoomsAndClients r c -> String -showRooms rnc@(IRoomsAndClients (rooms, clients)) = concatMap showRoom (allRooms rnc) - where - showRoom r = unlines $ ((show r) ++ ": " ++ (show $ room' $ rooms ! (unRoomIndex r))) : (map showClient (roomClients' $ rooms ! (unRoomIndex r))) - showClient c = " " ++ (show c) ++ ": " ++ (show $ client' $ clients ! (unClientIndex c)) - - -allRooms :: IRoomsAndClients r c -> [RoomIndex] -allRooms (IRoomsAndClients (rooms, _)) = map RoomIndex $ indices rooms - -allClients :: IRoomsAndClients r c -> [ClientIndex] -allClients (IRoomsAndClients (_, clients)) = map ClientIndex $ indices clients - -clientRoom :: IRoomsAndClients r c -> ClientIndex -> RoomIndex -clientRoom (IRoomsAndClients (_, clients)) (ClientIndex ci) = clientRoom' (clients ! ci) - -client :: IRoomsAndClients r c -> ClientIndex -> c -client (IRoomsAndClients (_, clients)) (ClientIndex ci) = client' (clients ! ci) - -room :: IRoomsAndClients r c -> RoomIndex -> r -room (IRoomsAndClients (rooms, _)) (RoomIndex ri) = room' (rooms ! ri) - -roomClients :: IRoomsAndClients r c -> RoomIndex -> [ClientIndex] -roomClients (IRoomsAndClients (rooms, _)) (RoomIndex ri) = roomClients' $ (rooms ! ri) +module RoomsAndClients( + RoomIndex(), + ClientIndex(), + MRoomsAndClients(), + IRoomsAndClients(), + newRoomsAndClients, + addRoom, + addClient, + removeRoom, + removeClient, + modifyRoom, + modifyClient, + lobbyId, + moveClientToLobby, + moveClientToRoom, + clientRoomM, + clientExists, + client, + room, + client'sM, + room'sM, + allClientsM, + clientsM, + roomClientsM, + roomClientsIndicesM, + withRoomsAndClients, + allRooms, + allClients, + clientRoom, + showRooms, + roomClients + ) where + + +import Store +import Control.Monad + + +data Room r = Room { + roomClients' :: [ClientIndex], + room' :: r + } + + +data Client c = Client { + clientRoom' :: RoomIndex, + client' :: c + } + + +newtype RoomIndex = RoomIndex ElemIndex + deriving (Eq) +newtype ClientIndex = ClientIndex ElemIndex + deriving (Eq, Show, Read, Ord) + +instance Show RoomIndex where + show (RoomIndex i) = 'r' : show i + +unRoomIndex :: RoomIndex -> ElemIndex +unRoomIndex (RoomIndex r) = r + +unClientIndex :: ClientIndex -> ElemIndex +unClientIndex (ClientIndex c) = c + + +newtype MRoomsAndClients r c = MRoomsAndClients (MStore (Room r), MStore (Client c)) +newtype IRoomsAndClients r c = IRoomsAndClients (IStore (Room r), IStore (Client c)) + + +lobbyId :: RoomIndex +lobbyId = RoomIndex firstIndex + + +newRoomsAndClients :: r -> IO (MRoomsAndClients r c) +newRoomsAndClients r = do + rooms <- newStore + clients <- newStore + let rnc = MRoomsAndClients (rooms, clients) + ri <- addRoom rnc r + when (ri /= lobbyId) $ error "Empty struct inserts not at firstIndex index" + return rnc + + +roomAddClient :: ClientIndex -> Room r -> Room r +roomAddClient cl room = let cls = cl : roomClients' room; nr = room{roomClients' = cls} in cls `seq` nr `seq` nr + +roomRemoveClient :: ClientIndex -> Room r -> Room r +roomRemoveClient cl room = let cls = filter (/= cl) $ roomClients' room; nr = room{roomClients' = cls} in cls `seq` nr `seq` nr + + +addRoom :: MRoomsAndClients r c -> r -> IO RoomIndex +addRoom (MRoomsAndClients (rooms, _)) room = do + i <- addElem rooms (Room [] room) + return $ RoomIndex i + + +addClient :: MRoomsAndClients r c -> c -> IO ClientIndex +addClient (MRoomsAndClients (rooms, clients)) client = do + i <- addElem clients (Client lobbyId client) + modifyElem rooms (roomAddClient (ClientIndex i)) (unRoomIndex lobbyId) + return $ ClientIndex i + +removeRoom :: MRoomsAndClients r c -> RoomIndex -> IO () +removeRoom rnc@(MRoomsAndClients (rooms, _)) room@(RoomIndex ri) + | room == lobbyId = error "Cannot delete lobby" + | otherwise = do + clIds <- liftM roomClients' $ readElem rooms ri + forM_ clIds (moveClientToLobby rnc) + removeElem rooms ri + + +removeClient :: MRoomsAndClients r c -> ClientIndex -> IO () +removeClient (MRoomsAndClients (rooms, clients)) cl@(ClientIndex ci) = do + RoomIndex ri <- liftM clientRoom' $ readElem clients ci + modifyElem rooms (roomRemoveClient cl) ri + removeElem clients ci + + +modifyRoom :: MRoomsAndClients r c -> (r -> r) -> RoomIndex -> IO () +modifyRoom (MRoomsAndClients (rooms, _)) f (RoomIndex ri) = modifyElem rooms (\r -> r{room' = f $ room' r}) ri + +modifyClient :: MRoomsAndClients r c -> (c -> c) -> ClientIndex -> IO () +modifyClient (MRoomsAndClients (_, clients)) f (ClientIndex ci) = modifyElem clients (\c -> c{client' = f $ client' c}) ci + +moveClientInRooms :: MRoomsAndClients r c -> RoomIndex -> RoomIndex -> ClientIndex -> IO () +moveClientInRooms (MRoomsAndClients (rooms, clients)) (RoomIndex riFrom) rt@(RoomIndex riTo) cl@(ClientIndex ci) = do + modifyElem rooms (roomRemoveClient cl) riFrom + modifyElem rooms (roomAddClient cl) riTo + modifyElem clients (\c -> c{clientRoom' = rt}) ci + + +moveClientToLobby :: MRoomsAndClients r c -> ClientIndex -> IO () +moveClientToLobby rnc ci = do + room <- clientRoomM rnc ci + moveClientInRooms rnc room lobbyId ci + + +moveClientToRoom :: MRoomsAndClients r c -> RoomIndex -> ClientIndex -> IO () +moveClientToRoom rnc ri ci = moveClientInRooms rnc lobbyId ri ci + + +clientExists :: MRoomsAndClients r c -> ClientIndex -> IO Bool +clientExists (MRoomsAndClients (_, clients)) (ClientIndex ci) = elemExists clients ci + +clientRoomM :: MRoomsAndClients r c -> ClientIndex -> IO RoomIndex +clientRoomM (MRoomsAndClients (_, clients)) (ClientIndex ci) = liftM clientRoom' (clients `readElem` ci) + +client'sM :: MRoomsAndClients r c -> (c -> a) -> ClientIndex -> IO a +client'sM (MRoomsAndClients (_, clients)) f (ClientIndex ci) = liftM (f . client') (clients `readElem` ci) + +room'sM :: MRoomsAndClients r c -> (r -> a) -> RoomIndex -> IO a +room'sM (MRoomsAndClients (rooms, _)) f (RoomIndex ri) = liftM (f . room') (rooms `readElem` ri) + +allClientsM :: MRoomsAndClients r c -> IO [ClientIndex] +allClientsM (MRoomsAndClients (_, clients)) = liftM (map ClientIndex) $ indicesM clients + +clientsM :: MRoomsAndClients r c -> IO [c] +clientsM (MRoomsAndClients (_, clients)) = indicesM clients >>= mapM (\ci -> liftM client' $ readElem clients ci) + +roomClientsIndicesM :: MRoomsAndClients r c -> RoomIndex -> IO [ClientIndex] +roomClientsIndicesM (MRoomsAndClients (rooms, clients)) (RoomIndex ri) = liftM roomClients' (rooms `readElem` ri) + +roomClientsM :: MRoomsAndClients r c -> RoomIndex -> IO [c] +roomClientsM (MRoomsAndClients (rooms, clients)) (RoomIndex ri) = liftM roomClients' (rooms `readElem` ri) >>= mapM (\(ClientIndex ci) -> liftM client' $ readElem clients ci) + +withRoomsAndClients :: MRoomsAndClients r c -> (IRoomsAndClients r c -> a) -> IO a +withRoomsAndClients (MRoomsAndClients (rooms, clients)) f = + withIStore2 rooms clients (\r c -> f $ IRoomsAndClients (r, c)) + +---------------------------------------- +----------- IRoomsAndClients ----------- + +showRooms :: (Show r, Show c) => IRoomsAndClients r c -> String +showRooms rnc@(IRoomsAndClients (rooms, clients)) = concatMap showRoom (allRooms rnc) + where + showRoom r = unlines $ ((show r) ++ ": " ++ (show $ room' $ rooms ! (unRoomIndex r))) : (map showClient (roomClients' $ rooms ! (unRoomIndex r))) + showClient c = " " ++ (show c) ++ ": " ++ (show $ client' $ clients ! (unClientIndex c)) + + +allRooms :: IRoomsAndClients r c -> [RoomIndex] +allRooms (IRoomsAndClients (rooms, _)) = map RoomIndex $ indices rooms + +allClients :: IRoomsAndClients r c -> [ClientIndex] +allClients (IRoomsAndClients (_, clients)) = map ClientIndex $ indices clients + +clientRoom :: IRoomsAndClients r c -> ClientIndex -> RoomIndex +clientRoom (IRoomsAndClients (_, clients)) (ClientIndex ci) = clientRoom' (clients ! ci) + +client :: IRoomsAndClients r c -> ClientIndex -> c +client (IRoomsAndClients (_, clients)) (ClientIndex ci) = client' (clients ! ci) + +room :: IRoomsAndClients r c -> RoomIndex -> r +room (IRoomsAndClients (rooms, _)) (RoomIndex ri) = room' (rooms ! ri) + +roomClients :: IRoomsAndClients r c -> RoomIndex -> [ClientIndex] +roomClients (IRoomsAndClients (rooms, _)) (RoomIndex ri) = roomClients' $ (rooms ! ri) diff -r 793386610068 -r b1c2c2f6fc5e gameServer/ServerCore.hs --- a/gameServer/ServerCore.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/ServerCore.hs Wed Oct 27 14:02:20 2010 +0200 @@ -7,7 +7,7 @@ import qualified Data.IntMap as IntMap import System.Log.Logger import Control.Monad.Reader -import Control.Monad.State +import Control.Monad.State.Strict import Data.Set as Set import qualified Data.ByteString.Char8 as B -------------------------------------- @@ -19,7 +19,7 @@ import ServerState -timerLoop :: Int -> Chan CoreMessage -> IO() +timerLoop :: Int -> Chan CoreMessage -> IO () timerLoop tick messagesChan = threadDelay (30 * 10^6) >> writeChan messagesChan (TimerAction tick) >> timerLoop (tick + 1) messagesChan @@ -32,10 +32,11 @@ mainLoop :: StateT ServerState IO () mainLoop = forever $ do + get >>= \s -> put $! s + si <- gets serverInfo r <- liftIO $ readChan $ coreChan si - liftIO $ putStrLn $ "Core msg: " ++ show r case r of Accept ci -> processAction (AddClient ci) @@ -44,7 +45,8 @@ removed <- gets removedClients when (not $ ci `Set.member` removed) $ do - modify (\as -> as{clientIndex = Just ci}) + as <- get + put $! as{clientIndex = Just ci} reactCmd cmd Remove ci -> do @@ -57,13 +59,14 @@ --return (serverInfo, rnc) ClientAccountInfo (ci, info) -> do - --should instead check ci exists and has same nick/hostname - --removed <- gets removedClients - --when (not $ ci `Set.member` removed) $ do - -- modify (\as -> as{clientIndex = Just ci}) - -- processAction (ProcessAccountInfo info) - return () - + rnc <- gets roomsClients + exists <- liftIO $ clientExists rnc ci + when (exists) $ do + as <- get + put $! as{clientIndex = Just ci} + processAction (ProcessAccountInfo info) + return () + TimerAction tick -> mapM_ processAction $ PingAll : [StatsAction | even tick] diff -r 793386610068 -r b1c2c2f6fc5e gameServer/ServerState.hs --- a/gameServer/ServerState.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/ServerState.hs Wed Oct 27 14:02:20 2010 +0200 @@ -8,17 +8,17 @@ roomClientsS ) where -import Control.Monad.State +import Control.Monad.State.Strict import Data.Set as Set ---------------------- import RoomsAndClients import CoreTypes data ServerState = ServerState { - clientIndex :: Maybe ClientIndex, - serverInfo :: ServerInfo, - removedClients :: Set.Set ClientIndex, - roomsClients :: MRnC + clientIndex :: !(Maybe ClientIndex), + serverInfo :: !ServerInfo, + removedClients :: !(Set.Set ClientIndex), + roomsClients :: !MRnC } diff -r 793386610068 -r b1c2c2f6fc5e gameServer/Store.hs --- a/gameServer/Store.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/Store.hs Wed Oct 27 14:02:20 2010 +0200 @@ -1,128 +1,145 @@ -module Store( - ElemIndex(), - MStore(), - IStore(), - newStore, - addElem, - removeElem, - readElem, - writeElem, - modifyElem, - firstIndex, - indicesM, - withIStore, - withIStore2, - (!), - indices - ) where - -import qualified Data.Array.IArray as IA -import qualified Data.Array.IO as IOA -import qualified Data.IntSet as IntSet -import Data.IORef -import Control.Monad - - -newtype ElemIndex = ElemIndex Int - deriving (Eq, Show, Read, Ord) -newtype MStore e = MStore (IORef (IntSet.IntSet, IntSet.IntSet, IOA.IOArray Int e)) -newtype IStore e = IStore (IntSet.IntSet, IA.Array Int e) - - -firstIndex :: ElemIndex -firstIndex = ElemIndex 0 - --- MStore code -initialSize :: Int -initialSize = 10 - - -growFunc :: Int -> Int -growFunc a = a * 3 `div` 2 - - -newStore :: IO (MStore e) -newStore = do - newar <- IOA.newArray_ (0, initialSize - 1) - new <- newIORef (IntSet.empty, IntSet.fromAscList [0..initialSize - 1], newar) - return (MStore new) - - -growStore :: MStore e -> IO () -growStore (MStore ref) = do - (busyElems, freeElems, arr) <- readIORef ref - (_, m') <- IOA.getBounds arr - let newM' = growFunc (m' + 1) - 1 - newArr <- IOA.newArray_ (0, newM') - sequence_ [IOA.readArray arr i >>= IOA.writeArray newArr i | i <- [0..m']] - writeIORef ref (busyElems, freeElems `IntSet.union` (IntSet.fromAscList [m'+1..newM']), newArr) - - -growIfNeeded :: MStore e -> IO () -growIfNeeded m@(MStore ref) = do - (_, freeElems, _) <- readIORef ref - when (IntSet.null freeElems) $ growStore m - - -addElem :: MStore e -> e -> IO ElemIndex -addElem m@(MStore ref) element = do - growIfNeeded m - (busyElems, freeElems, arr) <- readIORef ref - let (n, freeElems') = IntSet.deleteFindMin freeElems - IOA.writeArray arr n element - writeIORef ref (IntSet.insert n busyElems, freeElems', arr) - return $ ElemIndex n - - -removeElem :: MStore e -> ElemIndex -> IO () -removeElem (MStore ref) (ElemIndex n) = do - (busyElems, freeElems, arr) <- readIORef ref - IOA.writeArray arr n (error $ "Store: no element " ++ show n) - writeIORef ref (IntSet.delete n busyElems, IntSet.insert n freeElems, arr) - - -readElem :: MStore e -> ElemIndex -> IO e -readElem (MStore ref) (ElemIndex n) = readIORef ref >>= \(_, _, arr) -> IOA.readArray arr n - - -writeElem :: MStore e -> ElemIndex -> e -> IO () -writeElem (MStore ref) (ElemIndex n) el = readIORef ref >>= \(_, _, arr) -> IOA.writeArray arr n el - - -modifyElem :: MStore e -> (e -> e) -> ElemIndex -> IO () -modifyElem (MStore ref) f (ElemIndex n) = do - (_, _, arr) <- readIORef ref - IOA.readArray arr n >>= (IOA.writeArray arr n) . f - - -indicesM :: MStore e -> IO [ElemIndex] -indicesM (MStore ref) = do - (busy, _, _) <- readIORef ref - return $ map ElemIndex $ IntSet.toList busy - - --- A way to use see MStore elements in pure code via IStore -m2i :: MStore e -> IO (IStore e) -m2i (MStore ref) = do - (a, _, c') <- readIORef ref - c <- IOA.freeze c' - return $ IStore (a, c) - - -withIStore :: MStore e -> (IStore e -> a) -> IO a -withIStore m f = liftM f (m2i m) - - -withIStore2 :: MStore e1 -> MStore e2 -> (IStore e1 -> IStore e2 -> a) -> IO a -withIStore2 m1 m2 f = do - i1 <- m2i m1 - i2 <- m2i m2 - return $ f i1 i2 - - --- IStore code -(!) :: IStore e -> ElemIndex -> e -(!) (IStore (_, arr)) (ElemIndex i) = (IA.!) arr i - -indices :: IStore e -> [ElemIndex] -indices (IStore (busy, _)) = map ElemIndex $ IntSet.toList busy +module Store( + ElemIndex(), + MStore(), + IStore(), + newStore, + addElem, + removeElem, + readElem, + writeElem, + modifyElem, + elemExists, + firstIndex, + indicesM, + withIStore, + withIStore2, + (!), + indices + ) where + +import qualified Data.Array.IArray as IA +import qualified Data.Array.IO as IOA +import qualified Data.IntSet as IntSet +import Data.IORef +import Control.Monad + + +newtype ElemIndex = ElemIndex Int + deriving (Eq, Show, Read, Ord) +newtype MStore e = MStore (IORef (IntSet.IntSet, IntSet.IntSet, IOA.IOArray Int e)) +newtype IStore e = IStore (IntSet.IntSet, IA.Array Int e) + + +firstIndex :: ElemIndex +firstIndex = ElemIndex 0 + +-- MStore code +initialSize :: Int +initialSize = 10 + + +growFunc :: Int -> Int +growFunc a = a * 3 `div` 2 + + +newStore :: IO (MStore e) +newStore = do + newar <- IOA.newArray_ (0, initialSize - 1) + new <- newIORef (IntSet.empty, IntSet.fromAscList [0..initialSize - 1], newar) + return (MStore new) + + +growStore :: MStore e -> IO () +growStore (MStore ref) = do + (busyElems, freeElems, arr) <- readIORef ref + (_, m') <- IOA.getBounds arr + let newM' = growFunc (m' + 1) - 1 + newArr <- IOA.newArray_ (0, newM') + sequence_ [IOA.readArray arr i >>= IOA.writeArray newArr i | i <- [0..m']] + writeIORef ref (busyElems, freeElems `IntSet.union` (IntSet.fromAscList [m'+1..newM']), newArr) + + +growIfNeeded :: MStore e -> IO () +growIfNeeded m@(MStore ref) = do + (_, freeElems, _) <- readIORef ref + when (IntSet.null freeElems) $ growStore m + + +addElem :: MStore e -> e -> IO ElemIndex +addElem m@(MStore ref) element = do + growIfNeeded m + (busyElems, freeElems, arr) <- readIORef ref + let (n, freeElems') = IntSet.deleteFindMin freeElems + IOA.writeArray arr n element + writeIORef ref (IntSet.insert n busyElems, freeElems', arr) + return $ ElemIndex n + + +removeElem :: MStore e -> ElemIndex -> IO () +removeElem (MStore ref) (ElemIndex n) = do + (busyElems, freeElems, arr) <- readIORef ref + IOA.writeArray arr n (error $ "Store: no element " ++ show n) + writeIORef ref (IntSet.delete n busyElems, IntSet.insert n freeElems, arr) + + +readElem :: MStore e -> ElemIndex -> IO e +readElem (MStore ref) (ElemIndex n) = readIORef ref >>= \(_, _, arr) -> IOA.readArray arr n + + +writeElem :: MStore e -> ElemIndex -> e -> IO () +writeElem (MStore ref) (ElemIndex n) el = readIORef ref >>= \(_, _, arr) -> IOA.writeArray arr n el + + +modifyElem :: MStore e -> (e -> e) -> ElemIndex -> IO () +modifyElem (MStore ref) f (ElemIndex n) = do + (_, _, arr) <- readIORef ref + IOA.readArray arr n >>= IOA.writeArray arr n . f + +elemExists :: MStore e -> ElemIndex -> IO Bool +elemExists (MStore ref) (ElemIndex n) = do + (_, free, _) <- readIORef ref + return $ n `IntSet.notMember` free + +indicesM :: MStore e -> IO [ElemIndex] +indicesM (MStore ref) = do + (busy, _, _) <- readIORef ref + return $ map ElemIndex $ IntSet.toList busy + + +-- A way to see MStore elements in pure code via IStore +m2i :: MStore e -> IO (IStore e) +m2i (MStore ref) = do + (a, _, c') <- readIORef ref + c <- IOA.unsafeFreeze c' + return $ IStore (a, c) + +i2m :: (MStore e) -> IStore e -> IO () +i2m (MStore ref) (IStore (_, arr)) = do + (b, e, _) <- readIORef ref + a <- IOA.unsafeThaw arr + writeIORef ref (b, e, a) + +withIStore :: MStore e -> (IStore e -> a) -> IO a +withIStore m f = do + i <- m2i m + let res = f i + res `seq` i2m m i + return res + + +withIStore2 :: MStore e1 -> MStore e2 -> (IStore e1 -> IStore e2 -> a) -> IO a +withIStore2 m1 m2 f = do + i1 <- m2i m1 + i2 <- m2i m2 + let res = f i1 i2 + res `seq` i2m m1 i1 + i2m m2 i2 + return res + + +-- IStore code +(!) :: IStore e -> ElemIndex -> e +(!) (IStore (_, arr)) (ElemIndex i) = (IA.!) arr i + +indices :: IStore e -> [ElemIndex] +indices (IStore (busy, _)) = map ElemIndex $ IntSet.toList busy diff -r 793386610068 -r b1c2c2f6fc5e gameServer/hedgewars-server.hs --- a/gameServer/hedgewars-server.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/hedgewars-server.hs Wed Oct 27 14:02:20 2010 +0200 @@ -21,7 +21,7 @@ setupLoggers :: IO () setupLoggers = updateGlobalLogger "Clients" - (setLevel DEBUG) + (setLevel INFO) main :: IO () main = withSocketsDo $ do diff -r 793386610068 -r b1c2c2f6fc5e gameServer/stresstest.hs --- a/gameServer/stresstest.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/stresstest.hs Wed Oct 27 14:02:20 2010 +0200 @@ -19,7 +19,7 @@ session3 nick room = ["NICK", nick, "", "PROTO", "32", "", "LIST", "", "JOIN_ROON", room, "", "CHAT", "room 2", "", "QUIT", "quit", ""] emulateSession sock s = do - mapM_ (\x -> hPutStrLn sock x >> hFlush sock >> randomRIO (300000::Int, 590000) >>= threadDelay) s + mapM_ (\x -> hPutStrLn sock x >> hFlush sock >> randomRIO (30000::Int, 59000) >>= threadDelay) s hFlush sock threadDelay 225000 @@ -40,7 +40,7 @@ putStrLn "Finish" forks = forever $ do - delay <- randomRIO (300000::Int, 590000) + delay <- randomRIO (30000::Int, 59000) threadDelay delay forkIO testing diff -r 793386610068 -r b1c2c2f6fc5e gameServer/stresstest2.hs --- a/gameServer/stresstest2.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/stresstest2.hs Wed Oct 27 14:02:20 2010 +0200 @@ -6,7 +6,7 @@ import System.IO import Control.Concurrent import Network -import Control.Exception +import Control.OldException import Control.Monad import System.Random @@ -14,22 +14,28 @@ import System.Posix #endif -testing = Control.Exception.handle print $ do - delay <- randomRIO (100::Int, 300) - threadDelay delay +session1 nick room = ["NICK", nick, "", "PROTO", "32", ""] + + + +testing = Control.OldException.handle print $ do + putStrLn "Start" sock <- connectTo "127.0.0.1" (PortNumber 46631) - hClose sock -forks i = do - delay <- randomRIO (50::Int, 190) - if i `mod` 10 == 0 then putStr (show i) else putStr "." - hFlush stdout - threadDelay delay - forkIO testing - forks (i + 1) + num1 <- randomRIO (70000::Int, 70100) + num2 <- randomRIO (0::Int, 2) + num3 <- randomRIO (0::Int, 5) + let nick1 = 'n' : show num1 + let room1 = 'r' : show num2 + mapM_ (\x -> hPutStrLn sock x >> hFlush sock >> randomRIO (300::Int, 590) >>= threadDelay) $ session1 nick1 room1 + mapM_ (\x -> hPutStrLn sock x >> hFlush sock) $ concatMap (\x -> ["CHAT_MSG", show x, ""]) [1..] + hClose sock + putStrLn "Finish" + +forks = testing main = withSocketsDo $ do #if !defined(mingw32_HOST_OS) installHandler sigPIPE Ignore Nothing; #endif - forks 1 + forks diff -r 793386610068 -r b1c2c2f6fc5e gameServer/stresstest3.hs --- a/gameServer/stresstest3.hs Thu Aug 26 23:59:18 2010 +0200 +++ b/gameServer/stresstest3.hs Wed Oct 27 14:02:20 2010 +0200 @@ -44,7 +44,7 @@ emulateSession :: StateT SState IO () emulateSession = do - n <- io $ randomRIO (100000::Int, 100000) + n <- io $ randomRIO (100000::Int, 100100) waitPacket "CONNECTED" sendPacket ["NICK", "test" ++ (show n)] waitPacket "NICK" @@ -52,6 +52,7 @@ waitPacket "PROTO" b <- waitPacket "LOBBY:JOINED" --io $ print b + sendPacket ["QUIT", "BYE"] return () testing = Control.OldException.handle print $ do @@ -62,7 +63,7 @@ putStr "-" hFlush stdout -forks = forever $ do +forks = forM_ [1..100] $ const $ do delay <- randomRIO (10000::Int, 30000) threadDelay delay forkIO testing diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/ArgParsers.inc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hedgewars/ArgParsers.inc Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,202 @@ + +procedure internalSetGameTypeLandPreviewFromParameters(); +begin + val(ParamStr(2), ipcPort); + GameType:= gmtLandPreview; + if ParamStr(3) <> 'landpreview' then + GameType:= gmtSyntax +end; + +procedure internalStartGameWithParameters(); +var tmp: LongInt; +begin + val(ParamStr(2), cScreenWidth); + val(ParamStr(3), cScreenHeight); + val(ParamStr(4), cBits); + val(ParamStr(5), ipcPort); + cFullScreen:= ParamStr(6) = '1'; + isSoundEnabled:= ParamStr(7) = '1'; + isMusicEnabled:= ParamStr(8) = '1'; + val(ParamStr(9), cInitVolume); + val(ParamStr(10), cTimerInterval); + PathPrefix:= ParamStr(11); + cShowFPS:= ParamStr(12) = '1'; + cAltDamage:= ParamStr(13) = '1'; + UserNick:= DecodeBase64(ParamStr(14)); + val(ParamStr(15), cReducedQuality); + val(ParamStr(16), tmp); + cStereoMode:= TStereoMode(max(0, min(ord(high(TStereoMode)), tmp))); + cLocaleFName:= ParamStr(17); +end; + +procedure setVideo(screenWidth: LongInt; screenHeight: LongInt; bitsStr: LongInt); +begin + cScreenWidth:= screenWidth; + cScreenHeight:= screenHeight; + cBits:= bitsStr +end; + +procedure setVideoWithParameters(screenWidthParam: string; screenHeightParam: string; bitsParam: string); +var screenWidthAsInt, screenHeightAsInt, bitsStrAsInt: LongInt; +begin + val(screenWidthParam, screenWidthAsInt); + val(screenHeightParam, screenHeightAsInt); + val(bitsParam, bitsStrAsInt); + setVideo(screenWidthAsInt,screenHeightAsInt,bitsStrAsInt) +end; + +procedure setOtherOptions(languageFile: string; fullScreen: boolean); +begin + cLocaleFName:= languageFile; + cFullScreen:= fullScreen +end; + +procedure setShowFPS(showFPS: boolean); +begin + cShowFPS:= showFPS +end; + +procedure setOtherOptionsWithParameters(languageFileParam: string; fullScreenParam: string; showFPSParam: string); +var fullScreen, showFPS: boolean; +begin + fullScreen:= fullScreenParam = '1'; + showFPS:= showFPSParam = '1'; + setOtherOptions(languageFileParam,fullScreen); + setShowFPS(showFPS) +end; + +procedure setAudio(initialVolume: LongInt; musicEnabled: boolean; soundEnabled: boolean); +begin + cInitVolume:= initialVolume; + isMusicEnabled:= musicEnabled; + isSoundEnabled:= soundEnabled +end; + +procedure setAudioWithParameters(initialVolumeParam: string; musicEnabledParam: string; soundEnabledParam: string); +var initialVolumeAsInt: LongInt; + musicEnabled, soundEnabled: boolean; +begin + val(initialVolumeParam, initialVolumeAsInt); + musicEnabled:= musicEnabledParam = '1'; + soundEnabled:= soundEnabledParam = '1'; + setAudio(initialVolumeAsInt,musicEnabled, soundEnabled) +end; + +procedure setMultimediaOptionsWithParameters(screenWidthParam, screenHeightParam, bitsParam: string; + initialVolumeParam, musicEnabledParam, soundEnabledParam: string; + languageFileParam, fullScreenParam: string); +begin + setVideoWithParameters(screenWidthParam,screenHeightParam, bitsParam); + setAudioWithParameters(initialVolumeParam,musicEnabledParam,soundEnabledParam); + setOtherOptions(languageFileParam,fullScreenParam = '1') +end; + +procedure setAltDamageTimerValueAndQuality(altDamage: boolean; timeIterval: LongInt; reducedQuality: boolean); +begin + cAltDamage:= altDamage; + cTimerInterval:= timeIterval; + if (reducedQuality) then //HACK + cReducedQuality:= $FFFFFFFF xor rqLowRes +end; + +procedure setAllOptionsWithParameters(screenWidthParam:string; screenHeightParam:string; bitsParam:string; + initialVolumeParam:string; musicEnabledParam:string; soundEnabledParam:string; + languageFileParam:string; fullScreenParam:string; showFPSParam:string; + altDamageParam:string; timeItervalParam:string; reducedQualityParam: string); +var showFPS, altDamage, reducedQuality: boolean; + timeIterval: LongInt; +begin + setMultimediaOptionsWithParameters(screenWidthParam,screenHeightParam, bitsParam, + initialVolumeParam,musicEnabledParam,soundEnabledParam, + languageFileParam,fullScreenParam); + showFPS := showFPSParam = '1'; + setShowFPS(showFPS); + + altDamage:= altDamageParam = '1'; + val(timeItervalParam, timeIterval); + reducedQuality:= reducedQualityParam = '1'; + setAltDamageTimerValueAndQuality(altDamage,timeIterval,reducedQuality); +end; + +procedure playReplayFileWithParameters(); +var paramIndex: LongInt; + wrongParameter: boolean; +begin + PathPrefix:= ParamStr(1); + recordFileName:= ParamStr(2); + paramIndex:= 3; + wrongParameter:= false; + while (paramIndex <= ParamCount) and not wrongParameter do + begin + if ParamStr(paramIndex) = '--set-video' then +//--set-video [screen width] [screen height] [color dept] + begin + if(ParamCount-paramIndex < 3) then + begin + wrongParameter:= true; + GameType:= gmtSyntax + end; + setVideoWithParameters(ParamStr(paramIndex+1), ParamStr(paramIndex+2), ParamStr(paramIndex+3)); + paramIndex:= paramIndex + 4 + end + else +//--set-audio [volume] [enable music] [enable sounds] + if ParamStr(paramIndex) = '--set-audio' then + begin + if(ParamCount-paramIndex < 3) then + begin + wrongParameter := true; + GameType:= gmtSyntax + end; + setAudioWithParameters(ParamStr(paramIndex+1),ParamStr(paramIndex+2), ParamStr(paramIndex+3)); + paramIndex:= paramIndex + 4 + end + else +// --set-other [language file] [full screen] [show FPS] + if ParamStr(paramIndex) = '--set-other' then + begin + if(ParamCount-paramIndex < 3) then + begin + wrongParameter:= true; + GameType:= gmtSyntax + end; + setOtherOptionsWithParameters(ParamStr(paramIndex+1),ParamStr(paramIndex+2), ParamStr(paramIndex+3)); + paramIndex:= paramIndex + 4 + end + else +//--set-multimedia [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] + if ParamStr(paramIndex) = '--set-multimedia' then + begin + if ParamCount-paramIndex < 8 then + begin + wrongParameter:= true; + GameType:= gmtSyntax + end; + setMultimediaOptionsWithParameters(ParamStr(paramIndex+1),ParamStr(paramIndex+2),ParamStr(paramIndex+3), + ParamStr(paramIndex+4),ParamStr(paramIndex+5),ParamStr(paramIndex+6), + ParamStr(paramIndex+7),ParamStr(paramIndex+8)); + paramIndex:= paramIndex + 9 + end + else +//--set-everything [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality] + if ParamStr(paramIndex) = '--set-everything' then + begin + if ParamCount-paramIndex < 12 then + begin + wrongParameter:= true; + GameType:= gmtSyntax + end; + setAllOptionsWithParameters(ParamStr(paramIndex+1),ParamStr(paramIndex+2),ParamStr(paramIndex+3), + ParamStr(paramIndex+4),ParamStr(paramIndex+5),ParamStr(paramIndex+6), + ParamStr(paramIndex+7),ParamStr(paramIndex+8),ParamStr(paramIndex+9), + ParamStr(paramIndex+10),ParamStr(paramIndex+11),ParamStr(paramIndex+12)); + paramIndex:= paramIndex + 13 + end + else + begin + wrongParameter:= true; + GameType:= gmtSyntax + end + end +end; + diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/CCHandlers.inc --- a/hedgewars/CCHandlers.inc Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/CCHandlers.inc Wed Oct 27 14:02:20 2010 +0200 @@ -162,6 +162,11 @@ TryDo(Gear^.Health > 0, 'Invalid hedgehog health', true); PHedgehog(Gear^.Hedgehog)^.Team:= CurrentTeam; if (GameFlags and gfSharedAmmo) <> 0 then CurrentHedgehog^.AmmoStore:= Clan^.ClanIndex + else if (GameFlags and gfPerHogAmmo) <> 0 then + begin + AddAmmoStore; + CurrentHedgehog^.AmmoStore:= StoreCnt - 1 + end else CurrentHedgehog^.AmmoStore:= TeamsCount - 1; CurrentHedgehog^.Gear:= Gear; CurrentHedgehog^.Name:= id; @@ -290,10 +295,11 @@ begin s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; +if not CurrentTeam^.ExtDriven then SendIPC('L'); +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; -if not CurrentTeam^.ExtDriven then SendIPC('L'); with CurrentHedgehog^.Gear^ do - Message:= Message or gm_Left + Message:= Message or gmLeft end; procedure chLeft_m(var s: shortstring); @@ -302,17 +308,18 @@ if CheckNoTeamOrHH then exit; if not CurrentTeam^.ExtDriven then SendIPC('l'); with CurrentHedgehog^.Gear^ do - Message:= Message and not gm_Left + Message:= Message and not gmLeft end; procedure chRight_p(var s: shortstring); begin s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; +if not CurrentTeam^.ExtDriven then SendIPC('R'); +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; -if not CurrentTeam^.ExtDriven then SendIPC('R'); with CurrentHedgehog^.Gear^ do - Message:= Message or gm_Right + Message:= Message or gmRight end; procedure chRight_m(var s: shortstring); @@ -321,17 +328,18 @@ if CheckNoTeamOrHH then exit; if not CurrentTeam^.ExtDriven then SendIPC('r'); with CurrentHedgehog^.Gear^ do - Message:= Message and not gm_Right + Message:= Message and not gmRight end; procedure chUp_p(var s: shortstring); begin s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; +if not CurrentTeam^.ExtDriven then SendIPC('U'); +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; -if not CurrentTeam^.ExtDriven then SendIPC('U'); with CurrentHedgehog^.Gear^ do - Message:= Message or gm_Up + Message:= Message or gmUp end; procedure chUp_m(var s: shortstring); @@ -340,17 +348,18 @@ if CheckNoTeamOrHH then exit; if not CurrentTeam^.ExtDriven then SendIPC('u'); with CurrentHedgehog^.Gear^ do - Message:= Message and not gm_Up + Message:= Message and not gmUp end; procedure chDown_p(var s: shortstring); begin s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; +if not CurrentTeam^.ExtDriven then SendIPC('D'); +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; -if not CurrentTeam^.ExtDriven then SendIPC('D'); with CurrentHedgehog^.Gear^ do - Message:= Message or gm_Down + Message:= Message or gmDown end; procedure chDown_m(var s: shortstring); @@ -359,17 +368,18 @@ if CheckNoTeamOrHH then exit; if not CurrentTeam^.ExtDriven then SendIPC('d'); with CurrentHedgehog^.Gear^ do - Message:= Message and not gm_Down + Message:= Message and not gmDown end; procedure chPrecise_p(var s: shortstring); begin s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; +if not CurrentTeam^.ExtDriven then SendIPC('Z'); +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; -if not CurrentTeam^.ExtDriven then SendIPC('Z'); with CurrentHedgehog^.Gear^ do - Message:= Message or gm_Precise + Message:= Message or gmPrecise end; procedure chPrecise_m(var s: shortstring); @@ -378,33 +388,36 @@ if CheckNoTeamOrHH then exit; if not CurrentTeam^.ExtDriven then SendIPC('z'); with CurrentHedgehog^.Gear^ do - Message:= Message and not gm_Precise + Message:= Message and not gmPrecise end; procedure chLJump(var s: shortstring); begin s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; +if not CurrentTeam^.ExtDriven then SendIPC('j'); +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; -if not CurrentTeam^.ExtDriven then SendIPC('j'); with CurrentHedgehog^.Gear^ do - Message:= Message or gm_LJump + Message:= Message or gmLJump end; procedure chHJump(var s: shortstring); begin s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; +if not CurrentTeam^.ExtDriven then SendIPC('J'); +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; -if not CurrentTeam^.ExtDriven then SendIPC('J'); with CurrentHedgehog^.Gear^ do - Message:= Message or gm_HJump + Message:= Message or gmHJump end; procedure chAttack_p(var s: shortstring); begin s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; bShowFinger:= false; with CurrentHedgehog^.Gear^ do begin @@ -413,7 +426,7 @@ begin FollowGear:= CurrentHedgehog^.Gear; if not CurrentTeam^.ExtDriven then SendIPC('A'); - Message:= Message or gm_Attack + Message:= Message or gmAttack end end end; @@ -425,8 +438,8 @@ with CurrentHedgehog^.Gear^ do begin if not CurrentTeam^.ExtDriven and - ((Message and gm_Attack) <> 0) then SendIPC('a'); - Message:= Message and not gm_Attack + ((Message and gmAttack) <> 0) then SendIPC('a'); + Message:= Message and not gmAttack end end; @@ -435,8 +448,10 @@ s:= s; // avoid compiler hint if CheckNoTeamOrHH or isPaused then exit; if not CurrentTeam^.ExtDriven then SendIPC('S'); +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; +bShowFinger:= false; with CurrentHedgehog^.Gear^ do - Message:= Message or gm_Switch + Message:= Message or gmSwitch end; procedure chNextTurn(var s: shortstring); @@ -448,9 +463,7 @@ {$IFDEF DEBUGFILE} AddFileLog('Doing SwitchHedgehog: time '+inttostr(GameTicks)); {$ENDIF} -{$IFDEF IPHONEOS} - clearView(); -{$ENDIF} + perfExt_NewTurnBeginning(); end; procedure chSay(var s: shortstring); @@ -477,12 +490,13 @@ procedure chTimer(var s: shortstring); begin if (s[0] <> #1) or (s[1] < '1') or (s[1] > '5') or CheckNoTeamOrHH then exit; -bShowFinger:= false; if not CurrentTeam^.ExtDriven then SendIPC(s); +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; +bShowFinger:= false; with CurrentHedgehog^.Gear^ do begin - Message:= Message or gm_Timer; + Message:= Message or gmTimer; MsgParam:= byte(s[1]) - ord('0') end end; @@ -491,13 +505,14 @@ var slot: LongWord; begin if (s[0] <> #1) or CheckNoTeamOrHH then exit; -bShowFinger:= false; slot:= byte(s[1]) - 49; if slot > cMaxSlotIndex then exit; if not CurrentTeam^.ExtDriven then SendIPC(char(byte(s[1]) + 79)); +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; +bShowFinger:= false; with CurrentHedgehog^.Gear^ do begin - Message:= Message or gm_Slot; + Message:= Message or gmSlot; MsgParam:= slot end end; @@ -512,7 +527,7 @@ with CurrentHedgehog^.Gear^ do begin - Message:= Message or gm_Weapon; + Message:= Message or gmWeapon; MsgParam:= byte(s[1]); end; end; @@ -527,7 +542,7 @@ with CurrentHedgehog^.Gear^ do begin - Message:= Message or gm_Animate; + Message:= Message or gmAnimate; MsgParam:= byte(s[1]) end end; @@ -564,18 +579,11 @@ end; -procedure chNewGrave; -begin -if CheckNoTeamOrHH or isPaused then exit; - -if not CurrentTeam^.ExtDriven then SendIPC('g'); - -AddGear(hwRound(CurrentHedgehog^.Gear^.X), hwRound(CurrentHedgehog^.Gear^.Y), gtGrave, 0, _0, _0, 0) -end; - procedure doPut(putX, putY: LongInt; fromAI: boolean); begin if CheckNoTeamOrHH or isPaused then exit; +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; +bShowFinger:= false; if not CurrentTeam^.ExtDriven and bShowAmmoMenu then begin bSelected:= true; @@ -607,8 +615,8 @@ end; {$IFDEF DEBUGFILE}AddFilelog('put: ' + inttostr(TargetPoint.X) + ', ' + inttostr(TargetPoint.Y));{$ENDIF} State:= State and not gstHHChooseTarget; - if (Ammo^[CurSlot, CurAmmo].Propz and ammoprop_AttackingPut) <> 0 then - Message:= Message or gm_Attack; + if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackingPut) <> 0 then + Message:= Message or gmAttack; end else if CurrentTeam^.ExtDriven then @@ -666,19 +674,22 @@ procedure chAmmoMenu(var s: shortstring); begin s:= s; // avoid compiler hint -if CheckNoTeamOrHH then -bShowAmmoMenu:= true +if CheckNoTeamOrHH then + bShowAmmoMenu:= true else -with CurrentTeam^ do + begin + with CurrentTeam^ do with Hedgehogs[CurrHedgehog] do begin bSelected:= false; if bShowAmmoMenu then bShowAmmoMenu:= false else if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or - ((MultiShootAttacks > 0) and ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_NoRoundEndHint) = 0)) or + ((MultiShootAttacks > 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) = 0)) or ((Gear^.State and gstHHDriven) = 0) then else bShowAmmoMenu:= true - end + end; + if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1 + end end; procedure chFullScr(var s: shortstring); @@ -779,6 +790,7 @@ procedure chPause(var s: shortstring); begin s:= s; // avoid compiler hint +if ReadyTimeLeft > 1 then ReadyTimeLeft:= 1; if gameType <> gmtNet then isPaused:= not isPaused; SDL_ShowCursor(ord(isPaused)) @@ -824,13 +836,13 @@ procedure chChat(var s: shortstring); begin -s:= s; // avoid compiler hint -GameState:= gsChat; -KeyPressChat(27) + s:= s; // avoid compiler hint + GameState:= gsChat; + KeyPressChat(27) end; procedure chHistory(var s: shortstring); begin -s:= s; // avoid compiler hint -uChat.showAll:= not uChat.showAll + s:= s; // avoid compiler hint + uChat.showAll:= not uChat.showAll end; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/CMakeLists.txt Wed Oct 27 14:02:20 2010 +0200 @@ -31,7 +31,7 @@ endif() endif() -#SOURCE AND PROGRAMS SECTION +#SOURCE AND PROGRAMS SECTION set(fpc_tryexe fpc) set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.pas) @@ -59,6 +59,7 @@ uLandTexture.pas uLocale.pas uMisc.pas + uMobile.pas uRandom.pas uScript.pas adler32.pas @@ -74,6 +75,7 @@ GearDrawing.inc HHHandlers.inc SinTable.inc + ArgParsers.inc options.inc ${CMAKE_CURRENT_BINARY_DIR}/config.inc ) diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/GSHandlers.inc Wed Oct 27 14:02:20 2010 +0200 @@ -102,7 +102,9 @@ skipSpeed, skipAngle, skipDecay: hwFloat; i, maxDrops: LongInt; particle: PVisualGear; + isSubmersible: boolean; begin + isSubmersible:= (Gear = CurrentHedgehog^.Gear) and (CurAmmoGear <> nil) and (CurAmmoGear^.AmmoType = amJetpack); // probably needs tweaking. might need to be in a case statement based upon gear type if cWaterLine < hwRound(Gear^.Y) + Gear^.Radius then begin @@ -121,23 +123,35 @@ end else begin - CheckGearDrowning := true; - Gear^.State := gstDrowning; - Gear^.RenderTimer := false; - if (Gear^.Kind <> gtSniperRifleShot) and (Gear^.Kind <> gtShotgunShot) and (Gear^.Kind <> gtDEagleShot) and (Gear^.Kind <> gtSineGunShot) then - Gear^.doStep := @doStepDrowningGear; - if Gear^.Kind = gtHedgehog then + if not isSubmersible then begin - Gear^.State := Gear^.State and (not gstHHDriven); - AddCaption(Format(GetEventString(eidDrowned), PHedgehog(Gear^.Hedgehog)^.Name), - cWhiteColor, capgrpMessage); + CheckGearDrowning := true; + Gear^.State := gstDrowning; + Gear^.RenderTimer := false; + if (Gear^.Kind <> gtSniperRifleShot) and (Gear^.Kind <> gtShotgunShot) and (Gear^.Kind <> gtDEagleShot) and (Gear^.Kind <> gtSineGunShot) then + if Gear^.Kind = gtHedgehog then + begin + if PHedgehog(Gear^.Hedgehog)^.Effects[heResurrectable] then + ResurrectHedgehog(Gear) + else + begin + Gear^.doStep := @doStepDrowningGear; + Gear^.State := Gear^.State and (not gstHHDriven); + AddCaption(Format(GetEventString(eidDrowned), PHedgehog(Gear^.Hedgehog)^.Name), cWhiteColor, capgrpMessage); + end + end + else + Gear^.doStep := @doStepDrowningGear end; - if hwRound(Gear^.Y) < cWaterLine + 64 + Gear^.Radius then + if ((not isSubmersible) and (hwRound(Gear^.Y) < cWaterLine + 64 + Gear^.Radius)) or + (isSubmersible and (hwRound(Gear^.Y) < cWaterLine + 2 + Gear^.Radius) and ((CurAmmoGear^.Pos = 0) and (CurAmmoGear^.dY < _0_01))) then // don't play splash if they are already way past the surface PlaySound(sndSplash) end; - if ((cReducedQuality and rqPlainSplash) = 0) and (hwRound(Gear^.Y) < cWaterLine + 64 + Gear^.Radius) then + if ((cReducedQuality and rqPlainSplash) = 0) and + (((not isSubmersible) and (hwRound(Gear^.Y) < cWaterLine + 64 + Gear^.Radius)) or + (isSubmersible and (hwRound(Gear^.Y) < cWaterLine + 2 + Gear^.Radius) and ((CurAmmoGear^.Pos = 0) and (CurAmmoGear^.dY < _0_01)))) then begin AddVisualGear(hwRound(Gear^.X), cWaterLine, vgtSplash); @@ -153,9 +167,10 @@ end end end; + if isSubmersible and (CurAmmoGear^.Pos = 0) then CurAmmoGear^.Pos := 1000 end else - CheckGearDrowning := false + CheckGearDrowning := false; end; procedure CheckCollision(Gear: PGear); @@ -175,6 +190,7 @@ if _0_4 < Gear^.dY then begin dmg := ModifyDamage(1 + hwRound((hwAbs(Gear^.dY) - _0_4) * 70), Gear); + PlaySound(sndBump); if dmg < 1 then exit; for i:= min(12, (3 + dmg div 10)) downto 0 do @@ -237,8 +253,9 @@ tdX, tdY: hwFloat; collV, collH: LongInt; begin - if Gear^.dX > _0_995 then Gear^.dX := _0_995; - if Gear^.dY > _0_995 then Gear^.dY := _0_995; + // clip velocity at 1.9 - over 1 per pixel, but really shouldn't cause many actual problems. + if Gear^.dX.QWordValue > 8160437862 then Gear^.dX.QWordValue:= 8160437862; + if Gear^.dY.QWordValue > 8160437862 then Gear^.dY.QWordValue:= 8160437862; Gear^.State := Gear^.State and not gstCollision; collV := 0; collH := 0; @@ -401,7 +418,12 @@ if i mod 2 <> 0 then Fire^.State := Fire^.State or gsttmpFlag; end end; - gtGasBomb: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLAutoSound or EXPLPoisoned); + gtGasBomb: + begin + doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLAutoSound); + for i:= 0 to 2 do + AddGear(int64(hwRound(Gear^.X)) - 30 + GetRandom(60), int64(hwRound(Gear^.Y)) - 20 + GetRandom(40), gtPoisonCloud, 0, _0, _0, 0); + end; end; DeleteGear(Gear); exit @@ -688,7 +710,7 @@ if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] <> 0) then inc(Gear^.Damage); if Gear^.Damage > 5 then - if Gear^.Ammo^.AmmoType = amDEagle then + if Gear^.AmmoType = amDEagle then AmmoShove(Gear, 7, 20) else AmmoShove(Gear, Gear^.Timer, 20); @@ -718,7 +740,7 @@ begin if (Gear^.Kind = gtSniperRifleShot) and ((GameFlags and gfLaserSight) = 0) then cLaserSighting := false; - if (Gear^.Ammo^.NumPerTurn <= CurrentHedgehog^.MultiShootAttacks) and + if (Ammoz[Gear^.AmmoType].Ammo.NumPerTurn <= CurrentHedgehog^.MultiShootAttacks) and ((GameFlags and gfArtillery) = 0) then cArtillery := false; Gear^.doStep := @doStepShotIdle end; @@ -747,7 +769,7 @@ if (HHGear^.Angle - 32 >= 0) then dec(HHGear^.Angle,32) end; - if (HHGear^.Message and gm_Attack) <> 0 then + if (HHGear^.Message and gmAttack) <> 0 then begin shell := AddVisualGear(hwRound(Gear^.x), hwRound(Gear^.y), vgtShell); if shell <> nil then @@ -831,12 +853,13 @@ AllInactive := false; HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; dec(Gear^.Timer); - if (Gear^.Timer = 0)or((Gear^.Message and gm_Destroy) <> 0)or((HHGear^.State and gstHHDriven) = + if (Gear^.Timer = 0)or((Gear^.Message and gmDestroy) <> 0)or((HHGear^.State and gstHHDriven) = 0) then begin StopSound(Gear^.SoundChannel); DeleteGear(Gear); AfterAttack; + doStepHedgehogMoving(HHGear); // for gfInfAttack exit end; @@ -849,6 +872,8 @@ if (Gear^.Timer mod 47) = 0 then begin + for i:= 0 to 1 do + AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, vgtDust); i := hwRound(Gear^.X) - Gear^.Radius - LongInt(GetRandom(2)); ei := hwRound(Gear^.X) + Gear^.Radius + LongInt(GetRandom(2)); while i <= ei do @@ -882,14 +907,14 @@ HHGear^.X := Gear^.X; HHGear^.Y := Gear^.Y - int2hwFloat(cHHRadius); - if (Gear^.Message and gm_Attack) <> 0 then + if (Gear^.Message and gmAttack) <> 0 then if (Gear^.State and gsttmpFlag) <> 0 then Gear^.Timer := 1 else else if (Gear^.State and gsttmpFlag) = 0 then Gear^.State := Gear^.State or gsttmpFlag; - if ((Gear^.Message and gm_Left) <> 0) then Gear^.dX := - _0_3 + if ((Gear^.Message and gmLeft) <> 0) then Gear^.dX := - _0_3 else - if ((Gear^.Message and gm_Right) <> 0) then Gear^.dX := _0_3 + if ((Gear^.Message and gmRight) <> 0) then Gear^.dX := _0_3 else Gear^.dX := _0; end; @@ -956,9 +981,9 @@ begin b := true; if Gear^.dX.isNegative then - HHGear^.Message := (HHGear^.Message and (gm_Attack or gm_Up or gm_Down)) or gm_Left + HHGear^.Message := (HHGear^.Message and (gmAttack or gmUp or gmDown)) or gmLeft else - HHGear^.Message := (HHGear^.Message and (gm_Attack or gm_Up or gm_Down)) or gm_Right; + HHGear^.Message := (HHGear^.Message and (gmAttack or gmUp or gmDown)) or gmRight; if ((HHGear^.State and gstMoving) = 0) then begin @@ -999,7 +1024,7 @@ Gear^.dX, Gear^.dY, cHHRadius * 5, cHHRadius * 2 + 7); - if (Gear^.Timer = 0) or ((HHGear^.Message and gm_Attack) <> 0) then + if (Gear^.Timer = 0) or ((HHGear^.Message and gmAttack) <> 0) then begin HHGear^.Message := 0; HHGear^.State := HHGear^.State and (not gstNotKickable); @@ -1049,7 +1074,7 @@ HHGear^.Y := HHGear^.Y + HHGear^.dY; HHGear^.dY := HHGear^.dY + cGravity; - if (Gear^.Message and gm_Attack) <> 0 then + if (Gear^.Message and gmAttack) <> 0 then begin Gear^.X := HHGear^.X; Gear^.Y := HHGear^.Y; @@ -1077,7 +1102,7 @@ begin with HHGear^ do begin - Message := Message and not gm_Attack; + Message := Message and not gmAttack; State := (State or gstMoving) and not gstWinner; end; DeleteGear(Gear) @@ -1087,7 +1112,7 @@ begin with HHGear^ do begin - Message := Message and not gm_Attack; + Message := Message and not gmAttack; State := State or gstMoving; end; RopePoints.Count := 0; @@ -1100,15 +1125,15 @@ if ((HHGear^.State and gstHHDriven) = 0) or (CheckGearDrowning(HHGear)) then - begin + begin PlaySound(sndRopeRelease); DeleteMe; exit - end; - - if (Gear^.Message and gm_Left <> 0) then HHGear^.dX := HHGear^.dX - _0_0002 + end; + + if (Gear^.Message and gmLeft <> 0) then HHGear^.dX := HHGear^.dX - _0_0002 else - if (Gear^.Message and gm_Right <> 0) then HHGear^.dX := HHGear^.dX + _0_0002; + if (Gear^.Message and gmRight <> 0) then HHGear^.dX := HHGear^.dX + _0_0002; if not TestCollisionYwithGear(HHGear, 1) then HHGear^.dY := HHGear^.dY + cGravity; @@ -1131,12 +1156,12 @@ tx := HHGear^.X; ty := HHGear^.Y; - if ((Gear^.Message and gm_Down) <> 0) and (Gear^.Elasticity < Gear^.Friction) then + if ((Gear^.Message and gmDown) <> 0) and (Gear^.Elasticity < Gear^.Friction) then if not (TestCollisionXwithGear(HHGear, hwSign(ropeDx)) or TestCollisionYwithGear(HHGear, hwSign(ropeDy))) then Gear^.Elasticity := Gear^.Elasticity + _0_3; - if ((Gear^.Message and gm_Up) <> 0) and (Gear^.Elasticity > _30) then + if ((Gear^.Message and gmUp) <> 0) and (Gear^.Elasticity > _30) then if not (TestCollisionXwithGear(HHGear, -hwSign(ropeDx)) or TestCollisionYwithGear(HHGear, -hwSign(ropeDy))) then Gear^.Elasticity := Gear^.Elasticity - _0_3; @@ -1159,30 +1184,29 @@ ty := mdY * _0_3; while len > _3 do - begin + begin lx := hwRound(nx); ly := hwRound(ny); - if ((ly and LAND_HEIGHT_MASK) = 0) and ((lx and LAND_WIDTH_MASK) = 0) and (Land[ly, lx] <> 0 - ) then - begin + if ((ly and LAND_HEIGHT_MASK) = 0) and ((lx and LAND_WIDTH_MASK) = 0) and (Land[ly, lx] <> 0) then + begin ny := _1 / Distance(ropeDx, ropeDy); // old rope pos nx := ropeDx * ny; ny := ropeDy * ny; with RopePoints.ar[RopePoints.Count] do - begin + begin X := Gear^.X; Y := Gear^.Y; if RopePoints.Count = 0 then RopePoints.HookAngle := DxDy2Angle(Gear^.dY, Gear^.dX); b := (nx * HHGear^.dY) > (ny * HHGear^.dX); dLen := len - end; + end; with RopePoints.rounded[RopePoints.Count] do - begin + begin X := hwRound(Gear^.X); Y := hwRound(Gear^.Y); - end; + end; Gear^.X := Gear^.X + nx * len; Gear^.Y := Gear^.Y + ny * len; @@ -1192,23 +1216,24 @@ Gear^.Friction := Gear^.Friction - len; haveDivided := true; break - end; + end; nx := nx - tx; ny := ny - ty; + lx := hwRound(nx); + ly := hwRound(ny); // len := len - _0_3 // should be the same as increase step len.QWordValue := len.QWordValue - _0_3.QWordValue; - end; + end; if not haveDivided then if RopePoints.Count > 0 then // check whether the last dividing point could be removed - begin + begin tx := RopePoints.ar[Pred(RopePoints.Count)].X; ty := RopePoints.ar[Pred(RopePoints.Count)].Y; mdX := tx - Gear^.X; mdY := ty - Gear^.Y; - if RopePoints.ar[Pred(RopePoints.Count)].b xor (mdX * (ty - HHGear^.Y) > (tx - HHGear^.X - ) * mdY) then - begin + if RopePoints.ar[Pred(RopePoints.Count)].b xor (mdX * (ty - HHGear^.Y) > (tx - HHGear^.X) * mdY) then + begin dec(RopePoints.Count); Gear^.X := RopePoints.ar[RopePoints.Count].X; Gear^.Y := RopePoints.ar[RopePoints.Count].Y; @@ -1222,48 +1247,48 @@ HHGear^.X := Gear^.X - mdX * Gear^.Elasticity; HHGear^.Y := Gear^.Y - mdY * Gear^.Elasticity; - end - end; + end + end; haveCollision := false; if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then - begin + begin HHGear^.dX := -_0_6 * HHGear^.dX; haveCollision := true - end; + end; if TestCollisionYwithGear(HHGear, hwSign(HHGear^.dY)) then - begin + begin HHGear^.dY := -_0_6 * HHGear^.dY; haveCollision := true - end; + end; if haveCollision - and (Gear^.Message and (gm_Left or gm_Right) <> 0) - and (Gear^.Message and (gm_Up or gm_Down) <> 0) then - begin + and (Gear^.Message and (gmLeft or gmRight) <> 0) + and (Gear^.Message and (gmUp or gmDown) <> 0) then + begin HHGear^.dX := SignAs(hwAbs(HHGear^.dX) + _0_2, HHGear^.dX); HHGear^.dY := SignAs(hwAbs(HHGear^.dY) + _0_2, HHGear^.dY) - end; + end; len := hwSqr(HHGear^.dX) + hwSqr(HHGear^.dY); if len > _0_64 then - begin + begin len := _0_8 / hwSqrt(len); HHGear^.dX := HHGear^.dX * len; HHGear^.dY := HHGear^.dY * len; - end; - - - if (Gear^.Message and gm_Attack) <> 0 then + end; + + + if (Gear^.Message and gmAttack) <> 0 then if (Gear^.State and gsttmpFlag) <> 0 then with PHedgehog(Gear^.Hedgehog)^ do - begin + begin PlaySound(sndRopeRelease); - if Ammo^[CurSlot, CurAmmo].AmmoType <> amParachute then + if CurAmmoType <> amParachute then WaitCollision else DeleteMe - end + end else else if (Gear^.State and gsttmpFlag) = 0 then @@ -1359,14 +1384,14 @@ end; if (Gear^.Elasticity > Gear^.Friction) - or ((Gear^.Message and gm_Attack) = 0) + or ((Gear^.Message and gmAttack) = 0) or ((HHGear^.State and gstHHDriven) = 0) or (HHGear^.Damage > 0) then begin with PHedgehog(Gear^.Hedgehog)^.Gear^ do begin State := State and not gstAttacking; - Message := Message and not gm_Attack + Message := Message and not gmAttack end; DeleteGear(Gear) end @@ -1432,6 +1457,49 @@ dec(Gear^.Timer); end else // gsttmpFlag = 0 + if (TurnTimeLeft = 0) or ((GameFlags and gfInfAttack) <> 0) then Gear^.State := Gear^.State or gsttmpFlag; +end; + +//////////////////////////////////////////////////////////////////////////////// +procedure doStepSMine(Gear: PGear); +begin + DeleteCI(Gear); + // TODO: do real calculation? + if TestCollisionXwithGear(Gear, 2) or TestCollisionYwithGear(Gear, -2) or TestCollisionXwithGear(Gear, -2) or TestCollisionYwithGear(Gear, 2) then + begin + if (hwAbs(Gear^.dX) > _0) or (hwAbs(Gear^.dY) > _0) then + PlaySound(sndRopeAttach); + Gear^.dX:= _0; + Gear^.dY:= _0; + end + else + begin + doStepFallingGear(Gear); + AllInactive := false; + CalcRotationDirAngle(Gear); + end; + AddGearCI(Gear); + + if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Health <> 0) then + if ((Gear^.State and gstAttacking) = 0) then + begin + if ((GameTicks and $1F) = 0) then + if CheckGearNear(Gear, gtHedgehog, 46, 32) <> nil then Gear^.State := Gear^.State or + gstAttacking + end + else // gstAttacking <> 0 + begin + AllInactive := false; + if (Gear^.Timer and $FF) = 0 then PlaySound(sndMineTick); + if Gear^.Timer = 0 then + begin + doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, EXPLAutoSound); + DeleteGear(Gear); + exit + end; + dec(Gear^.Timer); + end + else // gsttmpFlag = 0 if TurnTimeLeft = 0 then Gear^.State := Gear^.State or gsttmpFlag; end; @@ -1542,14 +1610,14 @@ k := Gear^.Kind; exBoom := false; - if (Gear^.Message and gm_Destroy) > 0 then + if (Gear^.Message and gmDestroy) > 0 then begin DeleteGear(Gear); FreeActionsList; SetAllToActive; // something (hh, mine, etc...) could be on top of the case with CurrentHedgehog^ do - if Gear <> nil then Gear^.Message := Gear^.Message and not (gm_LJump or gm_HJump); + if Gear <> nil then Gear^.Message := Gear^.Message and not (gmLJump or gmHJump); exit end; @@ -1718,6 +1786,7 @@ var gX,gY,i: LongInt; sticky: Boolean; + vgt: PVisualGear; begin sticky:= (Gear^.State and gsttmpFlag) <> 0; if not sticky then AllInactive := false; @@ -1725,6 +1794,20 @@ if not TestCollisionYwithGear(Gear, 1) then begin AllInactive := false; + + if ((GameTicks mod 100) = 0) then + begin + vgt:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtFire); + if vgt <> nil then + begin + vgt^.dx:= 0; + vgt^.dy:= 0; + vgt^.FrameTicks:= 1800 div (Gear^.Tag mod 3 + 2); + vgt^.State:= gstTmpFlag; + end; + end; + + if Gear^.dX.QWordValue > _0_01.QWordValue then Gear^.dX := Gear^.dX * _0_995; Gear^.dY := Gear^.dY + cGravity; @@ -1828,7 +1911,7 @@ HHGear: PGear; begin AllInactive := false; - if ((Gear^.Message and gm_Destroy) <> 0) then + if ((Gear^.Message and gmDestroy) <> 0) then begin DeleteGear(Gear); AfterAttack; @@ -1895,7 +1978,7 @@ if TestCollisionYwithGear(HHGear, 1) or ((HHGear^.State and gstHHDriven) = 0) or CheckGearDrowning(HHGear) - or ((Gear^.Message and gm_Attack) <> 0) then + or ((Gear^.Message and gmAttack) <> 0) then begin with HHGear^ do begin @@ -1913,10 +1996,10 @@ if not TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then HHGear^.X := HHGear^.X + cWindSpeed * 200; - if (Gear^.Message and gm_Left) <> 0 then HHGear^.X := HHGear^.X - cMaxWindSpeed * 80 - else if (Gear^.Message and gm_Right) <> 0 then HHGear^.X := HHGear^.X + cMaxWindSpeed * 80; - if (Gear^.Message and gm_Up) <> 0 then HHGear^.Y := HHGear^.Y - cGravity * 40 - else if (Gear^.Message and gm_Down) <> 0 then HHGear^.Y := HHGear^.Y + cGravity * 40; + if (Gear^.Message and gmLeft) <> 0 then HHGear^.X := HHGear^.X - cMaxWindSpeed * 80 + else if (Gear^.Message and gmRight) <> 0 then HHGear^.X := HHGear^.X + cMaxWindSpeed * 80; + if (Gear^.Message and gmUp) <> 0 then HHGear^.Y := HHGear^.Y - cGravity * 40 + else if (Gear^.Message and gmDown) <> 0 then HHGear^.Y := HHGear^.Y + cGravity * 40; HHGear^.Y := HHGear^.Y + cGravity * 100; Gear^.X := HHGear^.X; @@ -1934,7 +2017,7 @@ AfterAttack; HHGear^.State := HHGear^.State and not (gstAttacking or gstAttacked or gstMoving); - HHGear^.Message := HHGear^.Message and not gm_Attack; + HHGear^.Message := HHGear^.Message and not gmAttack; Gear^.doStep := @doStepParachuteWork; @@ -2034,7 +2117,7 @@ sprAmGirder, Gear^.State, true) then begin PlaySound(sndDenied); - HHGear^.Message := HHGear^.Message and not gm_Attack; + HHGear^.Message := HHGear^.Message and not gmAttack; HHGear^.State := HHGear^.State and not gstAttacking; HHGear^.State := HHGear^.State or gstHHChooseTarget; isCursorVisible := true; @@ -2048,7 +2131,7 @@ end; HHGear^.State := HHGear^.State and not (gstAttacking or gstAttacked); - HHGear^.Message := HHGear^.Message and not gm_Attack; + HHGear^.Message := HHGear^.Message and not gmAttack; TargetPoint.X := NoPointX end; @@ -2093,7 +2176,7 @@ TargetPoint.Y - SpritesData[sprHHTelepMask].Height div 2, sprHHTelepMask, 0, false) then begin - HHGear^.Message := HHGear^.Message and not gm_Attack; + HHGear^.Message := HHGear^.Message and not gmAttack; HHGear^.State := HHGear^.State and not gstAttacking; HHGear^.State := HHGear^.State or gstHHChooseTarget; DeleteGear(Gear); @@ -2128,10 +2211,10 @@ begin AllInactive := false; - if ((Gear^.Message and not gm_Switch) <> 0) or (TurnTimeLeft = 0) then + if ((Gear^.Message and not gmSwitch) <> 0) or (TurnTimeLeft = 0) then begin HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; - Msg := Gear^.Message and not gm_Switch; + Msg := Gear^.Message and not gmSwitch; DeleteGear(Gear); OnUsedAmmo(PHedgehog(HHGear^.Hedgehog)^); ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^); @@ -2142,11 +2225,11 @@ exit end; - if (Gear^.Message and gm_Switch) <> 0 then + if (Gear^.Message and gmSwitch) <> 0 then begin HHGear := CurrentHedgehog^.Gear; - HHGear^.Message := HHGear^.Message and not gm_Switch; - Gear^.Message := Gear^.Message and not gm_Switch; + HHGear^.Message := HHGear^.Message and not gmSwitch; + Gear^.Message := Gear^.Message and not gmSwitch; State := HHGear^.State; HHGear^.State := 0; HHGear^.Active := false; @@ -2185,7 +2268,7 @@ with HHGear^ do begin State := State and not gstAttacking; - Message := Message and not gm_Attack + Message := Message and not gmAttack end end; @@ -2236,6 +2319,9 @@ HHGear^.State := HHGear^.State or gstNoDamage; DeleteCI(HHGear); + Gear^.X := HHGear^.X; + Gear^.Y := HHGear^.Y; + i := 2; repeat Gear^.X := Gear^.X + HHGear^.dX; @@ -2417,7 +2503,7 @@ begin Gear^.Tag := 0; Gear^.X := Gear^.X + int2hwFloat(xx); - if not TestCollisionYwithGear(Gear, yyn) then + if not TestCollisionY(Gear, yyn) then begin Gear^.Y := Gear^.Y + int2hwFloat(yyn); NextAngle @@ -2438,7 +2524,7 @@ Gear^.Timer := Gear^.Health*10; Gear^.PortalCounter:= 0; // This is not seconds, but at least it is *some* feedback - if (Gear^.Health = 0) or ((Gear^.Message and gm_Attack) <> 0) then + if (Gear^.Health = 0) or ((Gear^.Message and gmAttack) <> 0) then begin FollowGear := Gear; Gear^.RenderTimer := false; @@ -2490,8 +2576,9 @@ AllInactive := false; HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; - HHGear^.Message := HHGear^.Message and (not gm_Attack); + HHGear^.Message := HHGear^.Message and (not gmAttack); DeleteCI(HHGear); + Gear^.IntersectGear:= nil; FollowGear := Gear; @@ -2607,7 +2694,7 @@ or (not TestCollisionYWithGear(Gear, hwSign(Gear^.dY)) and not TestCollisionXWithGear(Gear, hwSign(Gear^.dX))) // CheckLandValue returns true if the type isn't matched - or not CheckLandValue(hwRound(Gear^.Y), hwRound(Gear^.X), lfIndestructible) then + or not CheckLandValue(hwRound(Gear^.X), hwRound(Gear^.Y), lfIndestructible) then begin //out of time or exited ground StopSound(Gear^.SoundChannel); @@ -2702,7 +2789,7 @@ HHGear: PGear; begin HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; - HHGear^.Message := HHGear^.Message and not (gm_Up or gm_Down); + HHGear^.Message := HHGear^.Message and not (gmUp or gmDown); HHGear^.State := HHGear^.State or gstNotKickable; Gear^.doStep := @doStepBallgunWork end; @@ -2740,13 +2827,13 @@ end else begin - if ((Gear^.Message and gm_Left) <> 0) then + if ((Gear^.Message and gmLeft) <> 0) then begin fChanged := true; Gear^.Angle := (Gear^.Angle + (4096 - cAngleSpeed)) mod 4096 end; - if ((Gear^.Message and gm_Right) <> 0) then + if ((Gear^.Message and gmRight) <> 0) then begin fChanged := true; Gear^.Angle := (Gear^.Angle + cAngleSpeed) mod 4096 @@ -2776,15 +2863,15 @@ else AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace); - if ((HHGear^.Message and gm_Attack) <> 0) and (Gear^.Health <> 0) then + if ((HHGear^.Message and gmAttack) <> 0) and (Gear^.Health <> 0) then begin - HHGear^.Message := HHGear^.Message and not gm_Attack; + HHGear^.Message := HHGear^.Message and not gmAttack; AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtAirBomb, 0, Gear^.dX * _0_5, Gear^.dY * _0_5, 0); dec(Gear^.Health) end; - if ((HHGear^.Message and gm_LJump) <> 0) + if ((HHGear^.Message and gmLJump) <> 0) and ((Gear^.State and gsttmpFlag) = 0) then begin Gear^.State := Gear^.State or gsttmpFlag; @@ -2847,7 +2934,7 @@ AfterAttack; CurAmmoGear := nil; - TurnTimeLeft := 14 * 125; + if (GameFlags and gfInfAttack) = 0 then TurnTimeLeft := 14 * 125; if (TrainingFlags and tfRCPlane) <> 0 then TurnTimeLeft := 0; @@ -2874,37 +2961,71 @@ procedure doStepJetpackWork(Gear: PGear); var HHGear: PGear; - fuel: LongInt; + fuel, i: LongInt; move: hwFloat; + isUnderwater: Boolean; + bubble: PVisualGear; begin + isUnderwater:= cWaterLine < hwRound(Gear^.Y) + Gear^.Radius; + if Gear^.Pos > 0 then dec(Gear^.Pos); AllInactive := false; HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; //dec(Gear^.Timer); - move := _0_1; + move := _0_2; fuel := 50; -(*if (HHGear^.Message and gm_Precise) <> 0 then +(*if (HHGear^.Message and gmPrecise) <> 0 then begin move:= _0_02; fuel:= 5; end;*) - if (HHGear^.Message and gm_Up) <> 0 then - begin - if (not HHGear^.dY.isNegative) or (HHGear^.Y > -_256) then - HHGear^.dY := HHGear^.dY - move; - HHGear^.dY := HHGear^.dY - move; - dec(Gear^.Health, fuel); - Gear^.MsgParam := Gear^.MsgParam or gm_Up; - Gear^.Timer := GameTicks - end; - if (HHGear^.Message and gm_Left) <> 0 then move.isNegative := true; - if (HHGear^.Message and (gm_Left or gm_Right)) <> 0 then - begin - HHGear^.dX := HHGear^.dX + (move * _0_2); - dec(Gear^.Health, fuel div 5); - Gear^.MsgParam := Gear^.MsgParam or (HHGear^.Message and (gm_Left or gm_Right)); - Gear^.Timer := GameTicks - end; + if Gear^.Health > 0 then + begin + if (HHGear^.Message and gmUp) <> 0 then + begin + if (not HHGear^.dY.isNegative) or (HHGear^.Y > -_256) then + begin + if isUnderwater then + begin + HHGear^.dY := HHGear^.dY - (move * _0_7); + for i:= random(10)+10 downto 0 do + begin + bubble := AddVisualGear(hwRound(HHGear^.X) - 8 + random(16), hwRound(HHGear^.Y) + 16 + random(8), vgtBubble); + if bubble <> nil then bubble^.dY:= random(20)/10+0.1; + end + end + else HHGear^.dY := HHGear^.dY - move; + end; + dec(Gear^.Health, fuel); + Gear^.MsgParam := Gear^.MsgParam or gmUp; + Gear^.Timer := GameTicks + end; + move.isNegative := (HHGear^.Message and gmLeft) <> 0; + if (HHGear^.Message and (gmLeft or gmRight)) <> 0 then + begin + HHGear^.dX := HHGear^.dX + (move * _0_1); + if isUnderwater then + begin + for i:= random(5)+5 downto 0 do + begin + bubble := AddVisualGear(hwRound(HHGear^.X)+random(8), hwRound(HHGear^.Y) - 8 + random(16), vgtBubble); + if bubble <> nil then + begin + bubble^.dX:= (random(10)/10 + 0.02) * -1; + if (move.isNegative) then + begin + bubble^.X := bubble^.X + 28; + bubble^.dX *= -1 + end + else bubble^.X := bubble^.X - 28; + end; + end + end; + dec(Gear^.Health, fuel div 5); + Gear^.MsgParam := Gear^.MsgParam or (HHGear^.Message and (gmLeft or gmRight)); + Gear^.Timer := GameTicks + end + end; // erases them all at once :-/ if (Gear^.Timer <> 0) and (GameTicks - Gear^.Timer > 250) then @@ -2915,16 +3036,16 @@ if Gear^.Health < 0 then Gear^.Health := 0; if (GameTicks and $3F) = 0 then - begin + begin //AddCaption('Fuel: '+inttostr(round(Gear^.Health/20))+'%', cWhiteColor, capgrpAmmostate); if Gear^.Tex <> nil then FreeTexture(Gear^.Tex); Gear^.Tex := RenderStringTex(trmsg[sidFuel] + ': ' + inttostr(round(Gear^.Health / 20)) + '%', cWhiteColor, fntSmall) - end; - - if HHGear^.Message and (gm_Attack or gm_Up or gm_Precise or gm_Left or gm_Right) <> 0 then Gear^ + end; + + if HHGear^.Message and (gmAttack or gmUp or gmPrecise or gmLeft or gmRight) <> 0 then Gear^ .State := Gear^.State and not gsttmpFlag; - HHGear^.Message := HHGear^.Message and not (gm_Up or gm_Precise or gm_Left or gm_Right); + HHGear^.Message := HHGear^.Message and not (gmUp or gmPrecise or gmLeft or gmRight); HHGear^.State := HHGear^.State or gstMoving; Gear^.X := HHGear^.X; @@ -2934,15 +3055,16 @@ if ((Gear^.State and gsttmpFlag) = 0) or (HHGear^.dY < _0) then doStepHedgehogMoving(HHGear); - if (Gear^.Health = 0) - or (HHGear^.Damage <> 0) - or CheckGearDrowning(HHGear) - or (TurnTimeLeft = 0) - // allow brief ground touches - to be fair on this, might need another counter - or (((GameTicks and $1FF) = 0) and (not HHGear^.dY.isNegative) and TestCollisionYwithGear( - HHGear, 1)) - or ((Gear^.Message and gm_Attack) <> 0) then - begin + if // (Gear^.Health = 0) + (HHGear^.Damage <> 0) + //or CheckGearDrowning(HHGear) + or (cWaterLine + 512 < hwRound(HHGear^.Y)) + or (TurnTimeLeft = 0) + // allow brief ground touches - to be fair on this, might need another counter + or (((GameTicks and $1FF) = 0) and (not HHGear^.dY.isNegative) and TestCollisionYwithGear( + HHGear, 1)) + or ((Gear^.Message and gmAttack) <> 0) then + begin with HHGear^ do begin Message := 0; @@ -2965,6 +3087,7 @@ var HHGear: PGear; begin + Gear^.Pos:= 0; Gear^.doStep := @doStepJetpackWork; HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; @@ -2973,7 +3096,7 @@ with HHGear^ do begin State := State and not gstAttacking; - Message := Message and not (gm_Attack or gm_Up or gm_Precise or gm_Left or gm_Right); + Message := Message and not (gmAttack or gmUp or gmPrecise or gmLeft or gmRight); if (dY < _0_1) and (dY > -_0_1) then begin Gear^.State := Gear^.State or gsttmpFlag; @@ -3004,12 +3127,12 @@ begin HHGear := CurrentHedgehog^.Gear; - move := _0_1; + move := _0_2; fuel := 50; if Gear^.Pos > 0 then dec(Gear^.Pos, 1) - else if (HHGear^.Message and (gm_Left or gm_Right or gm_Up)) <> 0 then + else if (HHGear^.Message and (gmLeft or gmRight or gmUp)) <> 0 then Gear^.Pos := 500; if HHGear^.dX.isNegative then @@ -3017,20 +3140,19 @@ else Gear^.Tag := 1; - if (HHGear^.Message and gm_Up) <> 0 then + if (HHGear^.Message and gmUp) <> 0 then begin if (not HHGear^.dY.isNegative) or (HHGear^.Y > -_256) then HHGear^.dY := HHGear^.dY - move; - HHGear^.dY := HHGear^.dY - move; dec(Gear^.Health, fuel); - Gear^.MsgParam := Gear^.MsgParam or gm_Up; + Gear^.MsgParam := Gear^.MsgParam or gmUp; end; - if (HHGear^.Message and gm_Left) <> 0 then move.isNegative := true; - if (HHGear^.Message and (gm_Left or gm_Right)) <> 0 then + if (HHGear^.Message and gmLeft) <> 0 then move.isNegative := true; + if (HHGear^.Message and (gmLeft or gmRight)) <> 0 then begin - HHGear^.dX := HHGear^.dX + (move * _0_2); + HHGear^.dX := HHGear^.dX + (move * _0_1); dec(Gear^.Health, fuel div 5); - Gear^.MsgParam := Gear^.MsgParam or (HHGear^.Message and (gm_Left or gm_Right)); + Gear^.MsgParam := Gear^.MsgParam or (HHGear^.Message and (gmLeft or gmRight)); end; if Gear^.Health < 0 then Gear^.Health := 0; @@ -3038,9 +3160,9 @@ for i:= ((500-Gear^.Health) div 250) downto 0 do AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtFeather); - if (HHGear^.Message and gm_Attack <> 0) then + if (HHGear^.Message and gmAttack <> 0) then begin - HHGear^.Message := HHGear^.Message and not gm_Attack; + HHGear^.Message := HHGear^.Message and not gmAttack; if Gear^.FlightTime > 0 then begin AddGear(hwRound(Gear^.X), hwRound(Gear^.Y) + 32, gtEgg, 0, Gear^.dX * _0_5, Gear^.dY, 0) @@ -3050,9 +3172,9 @@ end; end; - if HHGear^.Message and (gm_Up or gm_Precise or gm_Left or gm_Right) <> 0 then + if HHGear^.Message and (gmUp or gmPrecise or gmLeft or gmRight) <> 0 then Gear^.State := Gear^.State and not gsttmpFlag; - HHGear^.Message := HHGear^.Message and not (gm_Up or gm_Precise or gm_Left or gm_Right); + HHGear^.Message := HHGear^.Message and not (gmUp or gmPrecise or gmLeft or gmRight); HHGear^.State := HHGear^.State or gstMoving; Gear^.X := HHGear^.X; @@ -3069,7 +3191,7 @@ // allow brief ground touches - to be fair on this, might need another counter or (((GameTicks and $1FF) = 0) and (not HHGear^.dY.isNegative) and TestCollisionYwithGear( HHGear, 1)) - or ((Gear^.Message and gm_Attack) <> 0) then + or ((Gear^.Message and gmAttack) <> 0) then begin with HHGear^ do begin @@ -3105,7 +3227,7 @@ exit end; HHGear := CurrentHedgehog^.Gear; - HHGear^.Message := HHGear^.Message and not (gm_Up or gm_Precise or gm_Left or gm_Right); + HHGear^.Message := HHGear^.Message and not (gmUp or gmPrecise or gmLeft or gmRight); if abs(hwRound(HHGear^.Y - Gear^.Y)) > 32 then begin if Gear^.Timer = 0 then @@ -3158,7 +3280,7 @@ with HHGear^ do begin State := State and not gstAttacking; - Message := Message and not (gm_Attack or gm_Up or gm_Precise or gm_Left or gm_Right) + Message := Message and not (gmAttack or gmUp or gmPrecise or gmLeft or gmRight) end end; @@ -3176,7 +3298,7 @@ if (Gear^.State and gstCollision) <> 0 then begin - doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 11, EXPLPoisoned, $C000FFC0); + doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 11, EXPLPoisoned, $C0E0FFE0); PlaySound(sndEggBreak); AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg); vg := AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg); @@ -3196,22 +3318,23 @@ //////////////////////////////////////////////////////////////////////////////// procedure doPortalColorSwitch(); -var - flags: LongWord; +var flags: LongWord; + CurWeapon: PAmmo; begin if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) - and ((CurrentHedgehog^.Gear^.Message and gm_Switch) <> 0) then + and ((CurrentHedgehog^.Gear^.Message and gmSwitch) <> 0) then With CurrentHedgehog^ do - if (Ammo^[CurSlot, CurAmmo].AmmoType = amPortalGun) then + if (CurAmmoType = amPortalGun) then begin - CurrentHedgehog^.Gear^.Message := CurrentHedgehog^.Gear^.Message and not gm_Switch; - - flags := Ammo^[CurSlot, CurAmmo].Timer and not 2; + CurrentHedgehog^.Gear^.Message := CurrentHedgehog^.Gear^.Message and not gmSwitch; + + CurWeapon:= GetAmmoEntry(CurrentHedgehog^); + flags := CurWeapon^.Timer and not 2; if (flags and 1) = 0 then - Ammo^[CurSlot, CurAmmo].Timer := flags or 1 + CurWeapon^.Timer := flags or 1 else - Ammo^[CurSlot, CurAmmo].Timer := flags and not 1; + CurWeapon^.Timer := flags and not 1; end; end; @@ -3219,7 +3342,7 @@ var iterator, conPortal: PGear; s, acptRadius, nx, ny, ox, oy, poffs, noffs, pspeed, nspeed: hwFloat; - noTrap, hasdxy: Boolean; + hasdxy: Boolean; begin doPortalColorSwitch(); @@ -3378,13 +3501,13 @@ { // breaks (some) loops if Distance(iterator^.dX, iterator^.dY) > _0_96 then - begin + begin iterator^.dX := iterator^.dX + signAs(cGravity * getRandom(1000),iterator^.dX); iterator^.dY := iterator^.dY + signAs(cGravity * getRandom(1000),iterator^.dY); s := _0_96 / Distance(iterator^.dX, iterator^.dY); iterator^.dX := s * iterator^.dX; iterator^.dY := s * iterator^.dX; - end; + end; } end; end; @@ -3397,20 +3520,24 @@ procedure loadNewPortalBall(oldPortal: PGear; destroyGear: Boolean); var flags: LongWord; + CurWeapon: PAmmo; begin if CurrentHedgehog <> nil then - With CurrentHedgehog^ do - if (Ammo^[CurSlot, CurAmmo].AmmoType = amPortalGun) then + with CurrentHedgehog^ do begin - flags := Ammo^[CurSlot, CurAmmo].Timer; + CurWeapon:= GetAmmoEntry(CurrentHedgehog^); + if (CurAmmoType = amPortalGun) then + begin + flags := CurWeapon^.Timer; if destroyGear xor ((oldPortal^.Tag and 2) = 0) then flags := flags or 1 else flags := flags and not 1; - Ammo^[CurSlot, CurAmmo].Timer := flags and not 2; + CurWeapon^.Timer := flags and not 2; // make the ball visible + end end; if destroyGear then oldPortal^.Timer:= 0; @@ -3472,6 +3599,7 @@ var iterator: PGear; s: hwFloat; + CurWeapon: PAmmo; begin s:= Distance (newPortal^.dX, newPortal^.dY); @@ -3488,6 +3616,7 @@ if CurrentHedgehog <> nil then With CurrentHedgehog^ do begin + CurWeapon:= GetAmmoEntry(CurrentHedgehog^); // let's save the HH's dX's direction so we can decide where the "top" of the portal hole newPortal^.Elasticity.isNegative := CurrentHedgehog^.Gear^.dX.isNegative; // when doing a backjump the dx is the opposite of the facing direction @@ -3495,10 +3624,10 @@ newPortal^.Elasticity.isNegative := not newPortal^.Elasticity.isNegative; // make portal gun look unloaded - Ammo^[CurSlot, CurAmmo].Timer := Ammo^[CurSlot, CurAmmo].Timer or 2; + CurWeapon^.Timer := CurWeapon^.Timer or 2; // set portal to the currently chosen color - if ((Ammo^[CurSlot, CurAmmo].Timer and 1) <> 0) then + if ((CurWeapon^.Timer and 1) <> 0) then newPortal^.Tag := newPortal^.Tag or 2; iterator := GearsList; @@ -3531,10 +3660,11 @@ procedure doStepPiano(Gear: PGear); var r0, r1: LongInt; + odY: hwFloat; begin AllInactive := false; if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^. - Message and gm_Slot) <> 0) then + Message and gmSlot) <> 0) then begin case CurrentHedgehog^.Gear^.MsgParam of 0: PlaySound(sndPiano0); @@ -3547,14 +3677,15 @@ 7: PlaySound(sndPiano7); else PlaySound(sndPiano8); end; + AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtNote); CurrentHedgehog^.Gear^.MsgParam := 0; - CurrentHedgehog^.Gear^.Message := CurrentHedgehog^.Gear^.Message and not gm_Slot; + CurrentHedgehog^.Gear^.Message := CurrentHedgehog^.Gear^.Message and not gmSlot; end; - if ((Gear^.Pos = 3) and ((GameFlags and gfSolidLand) <> 0)) or (Gear^.Pos = 20) then - // bounce up to 20 times (3 times on gameflagged solid land) before dropping past landscape + if (*((Gear^.Pos = 3) and ((GameFlags and gfSolidLand) <> 0)) or*) (Gear^.Pos = 5) then + // bounce up to 10 times (3 times on gameflagged solid land) before dropping past landscape begin - Gear^.dY := Gear^.dY + cGravity * 3; + Gear^.dY := Gear^.dY + cGravity * 2; Gear^.Y := Gear^.Y + Gear^.dY; CheckGearDrowning(Gear); if (Gear^.State and gstDrowning) <> 0 then @@ -3565,13 +3696,15 @@ CurrentHedgehog^.Gear^.Active := true; CurrentHedgehog^.Gear^.X := Gear^.X; CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128; - CurrentHedgehog^.Unplaced := false + CurrentHedgehog^.Unplaced := false; + TurnTimeLeft:= 0 end; ResumeMusic end; exit end; + odY:= Gear^.dY; doStepFallingGear(Gear); if (Gear^.State and gstDrowning) <> 0 then @@ -3582,7 +3715,8 @@ CurrentHedgehog^.Gear^.Active := true; CurrentHedgehog^.Gear^.X := Gear^.X; CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128; - CurrentHedgehog^.Unplaced := false + CurrentHedgehog^.Unplaced := false; + TurnTimeLeft:= 0 end; ResumeMusic end @@ -3593,7 +3727,9 @@ doMakeExplosion(hwRound(Gear^.X) - 30 - r0, hwRound(Gear^.Y) + 40, 40 + r1, 0); doMakeExplosion(hwRound(Gear^.X) + 30 + r1, hwRound(Gear^.Y) + 40, 40 + r0, 0); doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 80 + r0, EXPLAutoSound); - Gear^.dY := -_1; + for r0:= 0 to 4 do + AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtNote); + Gear^.dY := odY * -1 + cGravity * 2; Gear^.Pos := Gear^.Pos + 1; end else @@ -3754,12 +3890,12 @@ if (GameTicks and $FF) = 0 then begin - if (HHGear^.Message and gm_Right) <> 0 then + if (HHGear^.Message and gmRight) <> 0 then begin if HHGear^.dX.isNegative and (Gear^.Tag < 20) then inc(Gear^.Tag) else if Gear^.Tag > 5 then dec(Gear^.Tag); end - else if (HHGear^.Message and gm_Left) <> 0 then + else if (HHGear^.Message and gmLeft) <> 0 then begin if HHGear^.dX.isNegative and (Gear^.Tag > 5) then dec(Gear^.Tag) else if Gear^.Tag < 20 then inc(Gear^.Tag); @@ -3807,9 +3943,230 @@ HHGear: PGear; begin HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; - HHGear^.Message := HHGear^.Message and not (gm_Up or gm_Down or gm_Left or gm_Right); + HHGear^.Message := HHGear^.Message and not (gmUp or gmDown or gmLeft or gmRight); HHGear^.State := HHGear^.State or gstNotKickable; Gear^.doStep := @doStepFlamethrowerWork end; - +procedure doStepPoisonCloud(Gear: PGear); +begin + if Gear^.Timer = 0 then + begin + DeleteGear(Gear); + exit + end; + dec(Gear^.Timer); + Gear^.X:= Gear^.X + Gear^.dX; + Gear^.Y:= Gear^.Y + Gear^.dY; + Gear^.dX := Gear^.dX + cWindSpeed / 4; + Gear^.dY := Gear^.dY + cGravity / 100; + if (GameTicks mod 250) = 0 then + doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLDontDraw or EXPLNoGfx or EXPLNoDamage or EXPLDoNotTouchAny or EXPLPoisoned); + AllInactive:= false; +end; + +//////////////////////////////////////////////////////////////////////////////// +procedure doStepHammer(Gear: PGear); +var HHGear, tmp, tmp2: PGear; + t: PGearArray; + i: LongInt; +begin +HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; +HHGear^.State:= HHGear^.State or gstNoDamage; +DeleteCI(HHGear); + +t:= CheckGearsCollision(Gear); + +for i:= 5 downto 0 do + AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, vgtDust); + +i:= t^.Count; +while i > 0 do + begin + dec(i); + tmp:= t^.ar[i]; + if (tmp^.State and gstNoDamage) = 0 then + if (tmp^.Kind = gtHedgehog) then + begin + //tmp^.State:= tmp^.State or gstFlatened; + ApplyDamage(tmp, tmp^.Health div 3, dsUnknown); + //DrawTunnel(tmp^.X, tmp^.Y - _1, _0, _0_5, cHHRadius * 6, cHHRadius * 3); + tmp2:= AddGear(hwRound(tmp^.X), hwRound(tmp^.Y), gtHammerHit, 0, _0, _0, 0); + tmp2^.Hedgehog:= tmp^.Hedgehog; + SetAllToActive + end + else + begin + end + end; + +HHGear^.State:= HHGear^.State and not gstNoDamage; +Gear^.Timer:= 250; +Gear^.doStep:= @doStepIdle +end; + +//////////////////////////////////////////////////////////////////////////////// +procedure doStepHammerHitWork(Gear: PGear); +var + i, ei: LongInt; + HHGear: PGear; +begin + AllInactive := false; + HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; + dec(Gear^.Timer); + if (HHGear = nil) or (Gear^.Timer = 0) or ((Gear^.Message and gmDestroy) <> 0) then + begin + DeleteGear(Gear); + exit + end; + + if (Gear^.Timer mod 5) = 0 then + begin + AddVisualGear(hwRound(Gear^.X) - 5 + Random(10), hwRound(Gear^.Y) + 12, vgtDust); + + i := hwRound(Gear^.X) - Gear^.Radius - LongInt(GetRandom(2)); + ei := hwRound(Gear^.X) + Gear^.Radius + LongInt(GetRandom(2)); + while i <= ei do + begin + DrawExplosion(i, hwRound(Gear^.Y) + 3, 3); + inc(i, 1) + end; + + if CheckLandValue(hwRound(Gear^.X + Gear^.dX + SignAs(_6,Gear^.dX)), hwRound(Gear^.Y + _1_9) + , lfIndestructible) then + begin + Gear^.X := Gear^.X + Gear^.dX; + Gear^.Y := Gear^.Y + _1_9; + end; + SetAllHHToActive; + end; + if TestCollisionYwithGear(Gear, 1) then + begin + Gear^.dY := _0; + SetLittle(HHGear^.dX); + HHGear^.dY := _0; + end + else + begin + Gear^.dY := Gear^.dY + cGravity; + Gear^.Y := Gear^.Y + Gear^.dY; + if hwRound(Gear^.Y) > cWaterLine then Gear^.Timer := 1 + end; + + Gear^.X := Gear^.X + HHGear^.dX; + HHGear^.X := Gear^.X; + HHGear^.Y := Gear^.Y - int2hwFloat(cHHRadius); +end; + +procedure doStepHammerHit(Gear: PGear); +var + i, y: LongInt; + ar: TRangeArray; + HHGear: PGear; +begin + i := 0; + HHGear := PHedgehog(Gear^.Hedgehog)^.Gear; + + y := hwRound(Gear^.Y) - cHHRadius * 2; + while y < hwRound(Gear^.Y) do + begin + ar[i].Left := hwRound(Gear^.X) - Gear^.Radius - LongInt(GetRandom(2)); + ar[i].Right := hwRound(Gear^.X) + Gear^.Radius + LongInt(GetRandom(2)); + inc(y, 2); + inc(i) + end; + + DrawHLinesExplosions(@ar, 3, hwRound(Gear^.Y) - cHHRadius * 2, 2, Pred(i)); + Gear^.dY := HHGear^.dY; + DeleteCI(HHGear); + + doStepHammerHitWork(Gear); + Gear^.doStep := @doStepHammerHitWork +end; + + +procedure doStepResurrectorWork(Gear: PGear); +var + graves: TPGearArray; + resgear: PGear; + hh: PHedgehog; + i: LongInt; +begin + AllInactive := false; + hh := PHedgehog(Gear^.Hedgehog); + RenderHealth(hh^); + DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy - + cHHRadius - 14 - hh^.HealthTagTex^.h, hh^.HealthTagTex); + DrawCircle(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Radius, 1.5, 0, 0, $FF, + $FF); + + doStepHedgehogMoving(hh^.Gear); + + if ((Gear^.Message and gmUp) <> 0) then begin + if (GameTicks and $F) <> 0 then exit; + end else begin + if (GameTicks and $1FF) <> 0 then exit; + end; + + graves := GearsNear(hh^.Gear, gtGrave, Gear^.Radius); + + if Length(graves) = 0 then begin + StopSound(Gear^.SoundChannel); + Gear^.Timer := 250; + Gear^.doStep := @doStepIdle; + exit; + end; + + if ((Gear^.Message and gmAttack) <> 0) and (hh^.Gear^.Health > 0) then begin + i := getRandom(Length(graves)); + dec(hh^.Gear^.Health); + inc(graves[i]^.Health); +{-for i:= 0 to High(graves) do begin + if hh^.Gear^.Health > 0 then begin + dec(hh^.Gear^.Health); + inc(graves[i]^.Health); + end; + end; -} + end else begin + // now really resurrect the hogs with the hp saved in the graves + for i:= 0 to High(graves) do begin + if graves[i]^.Health > 0 then begin + resgear := AddGear(hwRound(graves[i]^.X), hwRound(graves[i]^.Y), + gtHedgehog, gstWait, _0, _0, 0); + resgear^.Hedgehog := graves[i]^.Hedgehog; + resgear^.Health := graves[i]^.Health; + PHedgehog(graves[i]^.Hedgehog)^.Gear := resgear; + DeleteGear(graves[i]); + RenderHealth(PHedgehog(resgear^.Hedgehog)^); + RecountTeamHealth(Phedgehog(resgear^.Hedgehog)^.Team); + end; + end; + StopSound(Gear^.SoundChannel); + Gear^.Timer := 250; + Gear^.doStep := @doStepIdle; + end; +end; + +procedure doStepResurrector(Gear: PGear); +var + graves: TPGearArray; + hh: PHedgehog; + i: LongInt; +begin + AllInactive := false; + hh := PHedgehog(Gear^.Hedgehog); + graves := GearsNear(hh^.Gear, gtGrave, Gear^.Radius); + + if Length(graves) > 0 then begin + for i:= 0 to High(graves) do begin + PHedgehog(graves[i]^.Hedgehog)^.Gear := nil; + graves[i]^.Health := 0; + end; + Gear^.doStep := @doStepResurrectorWork; + end else begin + StopSound(Gear^.SoundChannel); + Gear^.Timer := 250; + Gear^.doStep := @doStepIdle; + end; +end; + diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/GearDrawing.inc --- a/hedgewars/GearDrawing.inc Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/GearDrawing.inc Wed Oct 27 14:02:20 2010 +0200 @@ -6,6 +6,7 @@ defaultPos, HatVisible: boolean; VertexBuffer: array [0..1] of TVertex2f; HH: PHedgehog; + CurWeapon: PAmmo; begin HH:= PHedgehog(Gear^.Hedgehog); if HH^.Unplaced then exit; @@ -14,6 +15,9 @@ if (Gear^.State and gstHHDeath) <> 0 then begin DrawSprite(sprHHDeath, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 26 + WorldDy, Gear^.Pos); + Tint(HH^.Team^.Clan^.Color); + DrawSprite(sprHHDeath, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 26 + WorldDy, Gear^.Pos + 8); + Tint($FF, $FF, $FF, $FF); exit end else if (Gear^.State and gstHHGone) <> 0 then @@ -80,8 +84,8 @@ dy:= -Cos(Gear^.Angle * pi / cMaxAngle); if cLaserSighting then begin - lx:= GetLaunchX(HH^.Ammo^[HH^.CurSlot, HH^.CurAmmo].AmmoType, hwSign(Gear^.dX) * m, Gear^.Angle); - ly:= GetLaunchY(HH^.Ammo^[HH^.CurSlot, HH^.CurAmmo].AmmoType, Gear^.Angle); + lx:= GetLaunchX(HH^.CurAmmoType, hwSign(Gear^.dX) * m, Gear^.Angle); + ly:= GetLaunchY(HH^.CurAmmoType, Gear^.Angle); // ensure we start outside the hedgehog (he's solid after all) while abs(lx * lx + ly * ly) < (Gear^.radius * Gear^.radius) do @@ -139,8 +143,8 @@ end; end; // draw crosshair - cx:= Round(hwRound(Gear^.X) + dx * 80 + GetLaunchX(HH^.Ammo^[HH^.CurSlot, HH^.CurAmmo].AmmoType, hwSign(Gear^.dX) * m, Gear^.Angle)); - cy:= Round(hwRound(Gear^.Y) + dy * 80 + GetLaunchY(HH^.Ammo^[HH^.CurSlot, HH^.CurAmmo].AmmoType, Gear^.Angle)); + cx:= Round(hwRound(Gear^.X) + dx * 80 + GetLaunchX(HH^.CurAmmoType, hwSign(Gear^.dX) * m, Gear^.Angle)); + cy:= Round(hwRound(Gear^.Y) + dy * 80 + GetLaunchY(HH^.CurAmmoType, Gear^.Angle)); DrawRotatedTex(HH^.Team^.CrosshairTex, 12, 12, cx + WorldDx, cy + WorldDy, 0, hwSign(Gear^.dX) * (Gear^.Angle * 180.0) / cMaxAngle); @@ -195,7 +199,7 @@ begin DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, sx, sy, 0, i, 32, 32, i*DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + hAngle); - if HatTex^.w > 32 then + if HatTex^.w > 64 then begin Tint(HH^.Team^.Clan^.Color); DrawRotatedTextureF(HatTex, 1.0, -1.0, -6.0, sx, sy, 32, i, 32, 32, @@ -225,7 +229,7 @@ hwSign(Gear^.dX), 32, 32); - if HatTex^.w > 32 then + if HatTex^.w > 64 then begin Tint(HH^.Team^.Clan^.Color); DrawTextureF(HatTex, @@ -264,6 +268,20 @@ 0); defaultPos:= false end; + gtHammer: begin + DrawRotatedF(sprHammer, + sx, + sy, + 1, + hwSign(Gear^.dX), + 0); + defaultPos:= false + end; + gtResurrector: begin + DrawRotated(sprHandResurrector, hwRound(Gear^.X) + WorldDx, + hwRound(Gear^.Y) + WorldDy, 0, 0); + defaultPos := false; + end; gtKamikaze: begin if CurAmmoGear^.Pos = 0 then DrawHedgehog(sx, sy, @@ -332,7 +350,7 @@ defaultPos:= false end else - if (Gear^.Message and (gm_Left or gm_Right) <> 0) and (not isCursorVisible) then + if (Gear^.Message and (gmLeft or gmRight) <> 0) and (not isCursorVisible) then begin DrawHedgehog(sx, sy, hwSign(Gear^.dX), @@ -372,7 +390,8 @@ else aangle:= aangle+((240-aangle)*HH^.Timer/10); dec(HH^.Timer) end; - amt:= CurrentHedgehog^.Ammo^[CurrentHedgehog^.CurSlot, CurrentHedgehog^.CurAmmo].AmmoType; + amt:= CurrentHedgehog^.CurAmmoType; + CurWeapon:= GetAmmoEntry(HH^); case amt of amBazooka: DrawRotated(sprHandBazooka, hx, hy, hwSign(Gear^.dX), aangle); amMortar: DrawRotated(sprHandMortar, hx, hy, hwSign(Gear^.dX), aangle); @@ -383,10 +402,10 @@ amShotgun: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle); amDEagle: DrawRotated(sprHandDEagle, hx, hy, hwSign(Gear^.dX), aangle); amSineGun: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle); - amPortalGun: if (HH^.Ammo^[HH^.CurSlot, HH^.CurAmmo].Timer and 2) <> 0 then // Add a new Hedgehog value instead of abusing timer? + amPortalGun: if (CurWeapon^.Timer and 2) <> 0 then // Add a new Hedgehog value instead of abusing timer? DrawRotatedF(sprPortalGun, hx, hy, 0, hwSign(Gear^.dX), aangle) else - DrawRotatedF(sprPortalGun, hx, hy, 1+(HH^.Ammo^[HH^.CurSlot, HH^.CurAmmo].Timer and 1), hwSign(Gear^.dX), aangle); + DrawRotatedF(sprPortalGun, hx, hy, 1+(CurWeapon^.Timer and 1), hwSign(Gear^.dX), aangle); amSniperRifle: DrawRotatedF(sprSniperRifle, hx, hy, 0, hwSign(Gear^.dX), aangle); amBlowTorch: DrawRotated(sprHandBlowTorch, hx, hy, hwSign(Gear^.dX), aangle); amCake: DrawRotated(sprHandCake, hx, hy, hwSign(Gear^.dX), aangle); @@ -398,6 +417,7 @@ amHellishBomb: DrawRotated(sprHandHellish, hx, hy, hwSign(Gear^.dX), aangle); amGasBomb: DrawRotated(sprHandCheese, hx, hy, hwSign(Gear^.dX), aangle); amMine: DrawRotated(sprHandMine, hx, hy, hwSign(Gear^.dX), aangle); + amSMine: DrawRotated(sprHandSMine, hx, hy, hwSign(Gear^.dX), aangle); amSeduction: DrawRotated(sprHandSeduction, hx, hy, hwSign(Gear^.dX), aangle); amVampiric: DrawRotatedF(sprHandVamp, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); amRCPlane: begin @@ -416,6 +436,10 @@ end; amBee: DrawRotatedF(sprHandBee, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); amFlamethrower: DrawRotatedF(sprHandFlamethrower, hx, hy, (RealTicks div 125) mod 4, hwSign(Gear^.dX), aangle); + amResurrector: begin + DrawCircle(hwRound(Gear^.X), hwRound(Gear^.y), 100, 1.5, 0, 0, + $FF, $FF); // I'd rather not like to hardcore 100 here + end; end; case amt of @@ -438,6 +462,12 @@ 0, hwSign(Gear^.dX), 0); + amHammer: DrawRotatedF(sprHammer, + sx, + sy, + 0, + hwSign(Gear^.dX), + 0); else DrawHedgehog(sx, sy, hwSign(Gear^.dX), @@ -525,7 +555,7 @@ hwSign(Gear^.dX), 32, 32); - if HatTex^.w > 32 then + if HatTex^.w > 64 then begin Tint(HH^.Team^.Clan^.Color); DrawTextureF(HatTex, @@ -549,7 +579,7 @@ hwSign(Gear^.dX)*m, 32, 32); - if HatTex^.w > 32 then + if HatTex^.w > 64 then begin Tint(HH^.Team^.Clan^.Color); DrawTextureF(HatTex, @@ -568,7 +598,7 @@ begin (* if (CurAmmoGear = nil) then begin - amt:= CurrentHedgehog^.Ammo^[CurrentHedgehog^.CurSlot, CurrentHedgehog^.CurAmmo].AmmoType; + amt:= CurrentHedgehog^.CurAmmoType; case amt of amJetpack: DrawSprite(sprJetpack, sx-32, sy-32, 0); end @@ -578,9 +608,12 @@ case CurAmmoGear^.Kind of gtJetpack: begin DrawSprite(sprJetpack, sx-32, sy-32, 0); - if (CurAmmoGear^.MsgParam and gm_Up) <> 0 then DrawSprite(sprJetpack, sx-32, sy-32, 1); - if (CurAmmoGear^.MsgParam and gm_Left) <> 0 then DrawSprite(sprJetpack, sx-32, sy-32, 2); - if (CurAmmoGear^.MsgParam and gm_Right) <> 0 then DrawSprite(sprJetpack, sx-32, sy-32, 3); + if cWaterLine > hwRound(Gear^.Y) + Gear^.Radius then + begin + if (CurAmmoGear^.MsgParam and gmUp) <> 0 then DrawSprite(sprJetpack, sx-32, sy-28, 1); + if (CurAmmoGear^.MsgParam and gmLeft) <> 0 then DrawSprite(sprJetpack, sx-28, sy-28, 2); + if (CurAmmoGear^.MsgParam and gmRight) <> 0 then DrawSprite(sprJetpack, sx-36, sy-28, 3) + end; if CurAmmoGear^.Tex <> nil then DrawCentered(sx, sy - 40, CurAmmoGear^.Tex); DrawAltWeapon(Gear, sx, sy) end; @@ -692,6 +725,10 @@ DrawRotated(sprMineOff, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle) else if Gear^.Health <> 0 then DrawRotated(sprMineOn, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle) else DrawRotated(sprMineDead, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle); + gtSMine: if (((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)) and (Gear^.Health <> 0) then + DrawRotated(sprSMineOff, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle) + else if Gear^.Health <> 0 then DrawRotated(sprSMineOn, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle) + else DrawRotated(sprMineDead, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle); gtCase: case Gear^.Pos of posCaseAmmo : begin i:= (GameTicks shr 6) mod 64; @@ -727,7 +764,7 @@ gtDynamite: DrawSprite2(sprDynamite, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, Gear^.Tag and 1, Gear^.Tag shr 1); gtClusterBomb: DrawRotated(sprClusterBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle); gtCluster: DrawSprite(sprClusterParticle, hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy, 0); - gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks div 128 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16); + gtFlame: DrawTextureF(SpritesData[sprFlame].Texture, 2 / (Gear^.Tag mod 3 + 2), hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks shr 7 + LongWord(Gear^.Tag)) mod 8, 1, 16, 16); gtParachute: begin DrawSprite(sprParachute, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 48 + WorldDy, 0); DrawAltWeapon(Gear, hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy) @@ -795,6 +832,16 @@ end; DrawRotatedTextureF(SpritesData[sprPiano].Texture, 1, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 128, 128, 0); end; + gtPoisonCloud: begin + if Gear^.Timer < 1020 then + Tint($C0, $C0, $00, Gear^.Timer div 8) + else if Gear^.Timer > 3980 then + Tint($C0, $C0, $00, (5000 - Gear^.Timer) div 8) + else + Tint($C0, $C0, $00, $C0); + DrawRotatedTextureF(SpritesData[sprSmokeWhite].texture, 3, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 22, 22, (RealTicks shr 36 + Gear^.UID * 100) mod 360); + Tint($FF, $FF, $FF, $FF) + end; end; if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(hwRound(Gear^.X) + 8 + WorldDx, hwRound(Gear^.Y) + 8 + WorldDy, Gear^.Tex); Gear:= Gear^.NextGear diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/HHHandlers.inc Wed Oct 27 14:02:20 2010 +0200 @@ -40,37 +40,43 @@ end end; +// Shouldn't more of this ammo switching stuff be moved to uAmmos ? procedure ChangeAmmo(Gear: PGear); var slot, i: Longword; + ammoidx: LongInt; begin slot:= Gear^.MsgParam; with PHedgehog(Gear^.Hedgehog)^ do begin - Gear^.Message:= Gear^.Message and not gm_Slot; + Gear^.Message:= Gear^.Message and not gmSlot; + ammoidx:= 0; + while (ammoidx < cMaxSlotAmmoIndex) and (Ammo^[slot, ammoidx].AmmoType <> CurAmmoType) do inc(ammoidx); if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or - ((MultiShootAttacks > 0) and ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_NoRoundEndHint) = 0)) or + ((MultiShootAttacks > 0) and (CurAmmoGear <> nil) and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) = 0)) or ((Gear^.State and gstHHDriven) = 0) then exit; - if ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_NoRoundEndHint) <> 0) and (MultiShootAttacks > 0) then OnUsedAmmo(PHedgehog(Gear^.Hedgehog)^); + if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) <> 0) and (MultiShootAttacks > 0) then OnUsedAmmo(PHedgehog(Gear^.Hedgehog)^); MultiShootAttacks:= 0; - Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump); - - if CurSlot = slot then + Gear^.Message:= Gear^.Message and not (gmLJump or gmHJump); + + if Ammoz[CurAmmoType].Slot = slot then begin i:= 0; repeat - inc(CurAmmo); - if (CurAmmo > cMaxSlotAmmoIndex) then + inc(ammoidx); + if (ammoidx > cMaxSlotAmmoIndex) then begin - CurAmmo:= 0; inc(i); - TryDo(i < 2, 'Engine bug: no ammo in current slot', true) + CurAmmoType:= amNothing; + ammoidx:= -1; + //TryDo(i < 2, 'Engine bug: no ammo in current slot', true) end; - until (Ammo^[slot, CurAmmo].Count > 0) and (Team^.Clan^.TurnNumber > Ammoz[Ammo^[slot, CurAmmo].AmmoType].SkipTurns) - end else + until ((Ammo^[slot, ammoidx].Count > 0) and (Team^.Clan^.TurnNumber > Ammoz[Ammo^[slot, ammoidx].AmmoType].SkipTurns)) or (i = 1) + end + else begin i:= 0; // check whether there is ammo in slot @@ -78,31 +84,31 @@ and ((Ammo^[slot, i].Count = 0) or (Team^.Clan^.TurnNumber <= Ammoz[Ammo^[slot, i].AmmoType].SkipTurns)) do inc(i); - if i <= cMaxSlotAmmoIndex then - begin - CurSlot:= slot; - CurAmmo:= i - end - end + if i <= cMaxSlotAmmoIndex then ammoidx:= i + else ammoidx:= -1 + end; + if ammoidx >= 0 then CurAmmoType:= Ammo^[slot, ammoidx].AmmoType; end end; procedure HHSetWeapon(Gear: PGear); var t: LongInt; weap: TAmmoType; + Hedgehog: PHedgehog; begin weap:= TAmmoType(Gear^.MsgParam); +Hedgehog:= PHedgehog(Gear^.Hedgehog); -if PHedgehog(Gear^.Hedgehog)^.Team^.Clan^.TurnNumber <= Ammoz[weap].SkipTurns then exit; // weapon is not activated yet +if Hedgehog^.Team^.Clan^.TurnNumber <= Ammoz[weap].SkipTurns then exit; // weapon is not activated yet Gear^.MsgParam:= Ammoz[weap].Slot; t:= cMaxSlotAmmoIndex; -Gear^.Message:= Gear^.Message and not gm_Weapon; +Gear^.Message:= Gear^.Message and not gmWeapon; -with PHedgehog(Gear^.Hedgehog)^ do - while (Ammo^[CurSlot, CurAmmo].AmmoType <> weap) and (t >= 0) do +with Hedgehog^ do + while (CurAmmoType <> weap) and (t >= 0) do begin ChangeAmmo(Gear); dec(t) @@ -112,12 +118,14 @@ end; procedure HHSetTimer(Gear: PGear); +var CurWeapon: PAmmo; begin -Gear^.Message:= Gear^.Message and not gm_Timer; +Gear^.Message:= Gear^.Message and not gmTimer; +CurWeapon:= GetAmmoEntry(PHedgehog(Gear^.Hedgehog)^); with PHedgehog(Gear^.Hedgehog)^ do - if (Ammo^[CurSlot, CurAmmo].Propz and ammoprop_Timerable) <> 0 then + if (CurWeapon^.Propz and ammoprop_Timerable) <> 0 then begin - Ammo^[CurSlot, CurAmmo].Timer:= 1000 * Gear^.MsgParam; + CurWeapon^.Timer:= 1000 * Gear^.MsgParam; with CurrentTeam^ do ApplyAmmoChanges(Hedgehogs[CurrHedgehog]); end; @@ -127,9 +135,10 @@ procedure Attack(Gear: PGear); var xx, yy, lx, ly: hwFloat; tmpGear: PVisualGear; - tmpGear2: PGear; + CurWeapon: PAmmo; begin bShowFinger:= false; +CurWeapon:= GetAmmoEntry(PHedgehog(Gear^.Hedgehog)^); with Gear^, PHedgehog(Gear^.Hedgehog)^ do begin @@ -138,12 +147,12 @@ (((State and gstMoving) = 0) or // Allow attacks while moving on ammo with AltAttack ((CurAmmoGear <> nil) and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0)) or - ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_AttackInMove) <> 0)) and - ((TargetPoint.X <> NoPointX) or ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_NeedTarget) = 0)) then + ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AttackInMove) <> 0)) and + ((TargetPoint.X <> NoPointX) or ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) = 0)) then begin State:= State or gstAttacking; - if Power = cMaxPower then Message:= Message and not gm_Attack - else if (Ammo^[CurSlot, CurAmmo].Propz and ammoprop_Power) = 0 then Message:= Message and not gm_Attack + if Power = cMaxPower then Message:= Message and not gmAttack + else if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_Power) = 0 then Message:= Message and not gmAttack else begin if Power = 0 then begin @@ -152,9 +161,9 @@ end; inc(Power) end; - if ((Message and gm_Attack) <> 0) then exit; + if ((Message and gmAttack) <> 0) then exit; - if (Ammo^[CurSlot, CurAmmo].Propz and ammoprop_Power) <> 0 then + if (Ammoz[CurAmmoType].Ammo.Propz and ammoprop_Power) <> 0 then begin StopSound(sndThrowPowerUp); PlaySound(sndThrowRelease); @@ -163,17 +172,17 @@ xx:= SignAs(AngleSin(Angle), dX); yy:= -AngleCos(Angle); - lx:= X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(dX), Angle))); - ly:= Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Angle))); + lx:= X + int2hwfloat(round(GetLaunchX(CurAmmoType, hwSign(dX), Angle))); + ly:= Y + int2hwfloat(round(GetLaunchY(CurAmmoType, Angle))); if ((Gear^.State and gstHHHJump) <> 0) and (not cArtillery) then xx:= - xx; - if Ammo^[CurSlot, CurAmmo].AttackVoice <> sndNone then - PlaySound(Ammo^[CurSlot, CurAmmo].AttackVoice, CurrentTeam^.voicepack); - case Ammo^[CurSlot, CurAmmo].AmmoType of - amGrenade: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtAmmo_Bomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, Ammo^[CurSlot, CurAmmo].Timer); + if Ammoz[CurAmmoType].Ammo.AttackVoice <> sndNone then + PlaySound(Ammoz[CurAmmoType].Ammo.AttackVoice, CurrentTeam^.voicepack); + case CurAmmoType of + amGrenade: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtAmmo_Bomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, CurWeapon^.Timer); amMolotov: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtMolotov, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); - amClusterBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtClusterBomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, Ammo^[CurSlot, CurAmmo].Timer); - amGasBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtGasBomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, Ammo^[CurSlot, CurAmmo].Timer); + amClusterBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtClusterBomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, CurWeapon^.Timer); + amGasBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtGasBomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, CurWeapon^.Timer); amBazooka: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtAmmo_Grenade, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); amBee: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtBee, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); amShotgun: begin @@ -184,6 +193,7 @@ amSkip: ParseCommand('/skip', true); amRope: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtRope, 0, xx, yy, 0); amMine: AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtMine, gstWait, SignAs(_0_02, dX), _0, 3000); + amSMine: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtSMine, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); amDEagle: CurAmmoGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0); amSineGun: CurAmmoGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSineGunShot, 0, xx * _0_5, yy * _0_5, 0); amPortalGun: AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtPortal, 0, xx * _0_6, yy * _0_6, 0); @@ -197,17 +207,24 @@ CurAmmoGear:= AddGear(hwRound(lx) + hwSign(dX) * 10, hwRound(ly), gtWhip, 0, SignAs(_1, dX), - _0_8, 0); PlaySound(sndWhipCrack) end; + amHammer: begin + CurAmmoGear:= AddGear(hwRound(lx) + hwSign(dX) * 10, hwRound(ly), gtHammer, 0, SignAs(_1, dX), - _0_8, 0); + PlaySound(sndWhack) + end; amBaseballBat: begin CurAmmoGear:= AddGear(hwRound(lx) + hwSign(dX) * 10, hwRound(ly), gtShover, gsttmpFlag, xx * _0_5, yy * _0_5, 0); PlaySound(sndBaseballBat) // TODO: Only play if something is hit? end; - amParachute: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtParachute, 0, _0, _0, 0); - // we save Ammo^[CurSlot, CurAmmo].Pos (in this case: cursor direction) by using it as (otherwise irrelevant) X value of the new gear. - amAirAttack: AddGear(Ammo^[CurSlot, CurAmmo].Pos, 0, gtAirAttack, 0, _0, _0, 0); - amMineStrike: AddGear(Ammo^[CurSlot, CurAmmo].Pos, 0, gtAirAttack, 1, _0, _0, 0); + amParachute: begin + CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtParachute, 0, _0, _0, 0); + PlaySound(sndParachute) + end; + // we save CurWeapon^.Pos (in this case: cursor direction) by using it as (otherwise irrelevant) X value of the new gear. + amAirAttack: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 0, _0, _0, 0); + amMineStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 1, _0, _0, 0); amBlowTorch: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtBlowTorch, 0, SignAs(_0_5, dX), _0, 0); - amGirder: CurAmmoGear:= AddGear(0, 0, gtGirder, Ammo^[CurSlot, CurAmmo].Pos, _0, _0, 0); - amTeleport: CurAmmoGear:= AddGear(Ammo^[CurSlot, CurAmmo].Pos, 0, gtTeleport, 0, _0, _0, 0); + amGirder: CurAmmoGear:= AddGear(0, 0, gtGirder, CurWeapon^.Pos, _0, _0, 0); + amTeleport: CurAmmoGear:= AddGear(CurWeapon^.Pos, 0, gtTeleport, 0, _0, _0, 0); amSwitch: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtSwitcher, 0, _0, _0, 0); amMortar: begin playSound(sndMortar); @@ -220,9 +237,9 @@ amKamikaze: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtKamikaze, 0, xx * _0_5, yy * _0_5, 0); amCake: CurAmmoGear:= AddGear(hwRound(lx) + hwSign(dX) * 3, hwRound(ly), gtCake, 0, xx, _0, 0); amSeduction: CurAmmoGear:= AddGear(hwRound(lx + xx * cHHRadius * 2), hwRound(ly + yy * cHHRadius * 2), gtSeduction, 0, xx * _0_4, yy * _0_4, 0); - amWatermelon: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtWatermelon, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, Ammo^[CurSlot, CurAmmo].Timer); + amWatermelon: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtWatermelon, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, CurWeapon^.Timer); amHellishBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtHellishBomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); - amNapalm: AddGear(Ammo^[CurSlot, CurAmmo].Pos, 0, gtAirAttack, 2, _0, _0, 0); + amNapalm: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 2, _0, _0, 0); amDrill: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtDrill, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); amBallgun: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtBallgun, 0, xx * _0_5, yy * _0_5, 0); amJetpack: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtJetpack, 0, _0, _0, 0); @@ -251,9 +268,14 @@ PauseMusic end; amFlamethrower: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtFlamethrower, 0, xx * _0_5, yy * _0_5, 0); + amResurrector: begin + CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), + gtResurrector, 0, _0, _0, 0); + CurAmmoGear^.SoundChannel := LoopSound(sndResurrector); + end; end; - uStats.AmmoUsed(Ammo^[CurSlot, CurAmmo].AmmoType); + uStats.AmmoUsed(CurAmmoType); if not (SpeechText = '') then begin @@ -269,56 +291,51 @@ Power:= 0; if (CurAmmoGear <> nil) - and (((Ammo^[CurSlot, CurAmmo].Propz) and ammoprop_AltUse) = 0){check for dropping ammo from rope} then + and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) = 0){check for dropping ammo from rope} then begin - CurAmmoGear^.Ammo:= @(Ammo^[CurSlot, CurAmmo]); - CurAmmoGear^.AmmoType:= CurAmmoGear^.Ammo^.AmmoType; - Message:= Message or gm_Attack; + CurAmmoGear^.AmmoType:= CurAmmoType; + Message:= Message or gmAttack; CurAmmoGear^.Message:= Message end else begin if not CurrentTeam^.ExtDriven and - ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_Power) <> 0) then SendIPC('a'); + ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_Power) <> 0) then SendIPC('a'); AfterAttack; end - end else Message:= Message and not gm_Attack; + end else Message:= Message and not gmAttack; end end; procedure AfterAttack; var s: shortstring; + a: TAmmoType; begin with CurrentHedgehog^.Gear^, CurrentHedgehog^ do begin + a:= CurAmmoType; State:= State and not gstAttacking; - if ((Ammo^[CurSlot, CurAmmo].Propz) and ammoprop_Effect) = 0 then + if (Ammoz[a].Ammo.Propz and ammoprop_Effect) = 0 then begin Inc(MultiShootAttacks); - if (Ammo^[CurSlot, CurAmmo].NumPerTurn >= MultiShootAttacks) then + if (Ammoz[a].Ammo.NumPerTurn >= MultiShootAttacks) then begin - s:= inttostr(Ammo^[CurSlot, CurAmmo].NumPerTurn - MultiShootAttacks + 1); + s:= inttostr(Ammoz[a].Ammo.NumPerTurn - MultiShootAttacks + 1); AddCaption(format(trmsg[sidRemaining], s), cWhiteColor, capgrpAmmostate); end; - if (Ammo^[CurSlot, CurAmmo].NumPerTurn >= MultiShootAttacks) or + if (Ammoz[a].Ammo.NumPerTurn >= MultiShootAttacks) or ((GameFlags and gfMultiWeapon) <> 0) then begin isInMultiShoot:= true end else begin - if ((Ammo^[CurSlot, CurAmmo].Propz) and ammoprop_NoRoundEndHint) = 0 then - begin - OnUsedAmmo(CurrentHedgehog^); - TurnTimeLeft:= Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].TimeAfterTurn; - State:= State or gstAttacked - end - else - begin - OnUsedAmmo(CurrentHedgehog^); - ApplyAmmoChanges(CurrentHedgehog^) - end + OnUsedAmmo(CurrentHedgehog^); + if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEndHint) = 0) and ((GameFlags and gfInfAttack) = 0) then + TurnTimeLeft:= Ammoz[a].TimeAfterTurn; + if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEndHint) = 0) then State:= State or gstAttacked; + if (Ammoz[a].Ammo.Propz and ammoprop_NoRoundEndHint) <> 0 then ApplyAmmoChanges(CurrentHedgehog^) end; end else @@ -326,7 +343,7 @@ OnUsedAmmo(CurrentHedgehog^); ApplyAmmoChanges(CurrentHedgehog^); end; - AttackBar:= 0; + AttackBar:= 0 end end; @@ -397,7 +414,7 @@ i: LongInt; vga: PVisualGear; begin -Gear^.Message:= gm_Destroy; +Gear^.Message:= gmDestroy; PlaySound(sndShotgunReload); case Gear^.Pos of posCaseUtility, @@ -444,24 +461,26 @@ procedure HedgehogStep(Gear: PGear); var PrevdX: LongInt; + CurWeapon: PAmmo; begin +CurWeapon:= GetAmmoEntry(PHedgehog(Gear^.Hedgehog)^); if ((Gear^.State and (gstAttacking or gstMoving)) = 0) then begin if isCursorVisible then with PHedgehog(Gear^.Hedgehog)^ do - with Ammo^[CurSlot, CurAmmo] do + with CurWeapon^ do begin - if (Gear^.Message and gm_Left ) <> 0 then + if (Gear^.Message and gmLeft ) <> 0 then Pos:= (Pos - 1 + Ammoz[AmmoType].PosCount) mod Ammoz[AmmoType].PosCount else - if (Gear^.Message and gm_Right ) <> 0 then + if (Gear^.Message and gmRight ) <> 0 then Pos:= (Pos + 1) mod Ammoz[AmmoType].PosCount else exit; StepTicks:= 200; exit end; - if ((Gear^.Message and gm_Animate) <> 0) then + if ((Gear^.Message and gmAnimate) <> 0) then begin Gear^.Message:= 0; Gear^.State:= Gear^.State or gstAnimation; @@ -470,9 +489,9 @@ Gear^.Pos:= 0 end; - if ((Gear^.Message and gm_LJump ) <> 0) then + if ((Gear^.Message and gmLJump ) <> 0) then begin - Gear^.Message:= Gear^.Message and not gm_LJump; + Gear^.Message:= Gear^.Message and not gmLJump; DeleteCI(Gear); if not TestCollisionYwithGear(Gear, -1) then if not TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) then Gear^.Y:= Gear^.Y - _2 else @@ -488,10 +507,10 @@ end; end; - if ((Gear^.Message and gm_HJump ) <> 0) then + if ((Gear^.Message and gmHJump ) <> 0) then begin DeleteCI(Gear); - Gear^.Message:= Gear^.Message and not gm_HJump; + Gear^.Message:= Gear^.Message and not gmHJump; Gear^.dY:= -_0_2; SetLittle(Gear^.dX); @@ -501,10 +520,10 @@ end; PrevdX:= hwSign(Gear^.dX); - if (Gear^.Message and gm_Left )<>0 then Gear^.dX:= -cLittle else - if (Gear^.Message and gm_Right )<>0 then Gear^.dX:= cLittle else exit; + if (Gear^.Message and gmLeft )<>0 then Gear^.dX:= -cLittle else + if (Gear^.Message and gmRight )<>0 then Gear^.dX:= cLittle else exit; - if (Gear^.Message and (gm_Left or gm_Right)) <> 0 then + if (Gear^.Message and (gmLeft or gmRight)) <> 0 then begin StepSoundTimer:= cHHStepTicks; end; @@ -534,7 +553,7 @@ or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; end; - if (not cArtillery) and ((Gear^.Message and gm_Precise) = 0) and (not TestCollisionXwithGear(Gear, hwSign(Gear^.dX))) then + if (not cArtillery) and ((Gear^.Message and gmPrecise) = 0) and (not TestCollisionXwithGear(Gear, hwSign(Gear^.dX))) then Gear^.X:= Gear^.X + SignAs(_1, Gear^.dX); SetAllHHToActive; @@ -578,22 +597,24 @@ var da: LongWord; begin with PHedgehog(Gear^.Hedgehog)^ do - if (Ammo^[CurSlot, CurAmmo].AmmoType = amRope) + if (CurAmmoType = amRope) and ((Gear^.State and (gstMoving or gstHHJumping)) = gstMoving) then da:= 2 else da:= 1; -if (((Gear^.Message and gm_Precise) = 0) or ((GameTicks mod 5) = 1)) then - if ((Gear^.Message and gm_Up) <> 0) and (Gear^.Angle >= CurMinAngle + da) then dec(Gear^.Angle, da) +if (((Gear^.Message and gmPrecise) = 0) or ((GameTicks mod 5) = 1)) then + if ((Gear^.Message and gmUp) <> 0) and (Gear^.Angle >= CurMinAngle + da) then dec(Gear^.Angle, da) else - if ((Gear^.Message and gm_Down) <> 0) and (Gear^.Angle + da <= CurMaxAngle) then inc(Gear^.Angle, da) + if ((Gear^.Message and gmDown) <> 0) and (Gear^.Angle + da <= CurMaxAngle) then inc(Gear^.Angle, da) end; procedure doStepHedgehog(Gear: PGear); forward; //////////////////////////////////////////////////////////////////////////////// procedure doStepHedgehogMoving(Gear: PGear); -var isFalling: boolean; +var isFalling, isUnderwater: boolean; begin -if Gear^.dX > _0_995 then Gear^.dX:= _0_995; -if Gear^.dY > _0_995 then Gear^.dY:= _0_995; +isUnderwater:= cWaterLine < hwRound(Gear^.Y) + Gear^.Radius; +if Gear^.dX.QWordValue > 8160437862 then Gear^.dX.QWordValue:= 8160437862; +if Gear^.dY.QWordValue > 8160437862 then Gear^.dY.QWordValue:= 8160437862; + if PHedgehog(Gear^.Hedgehog)^.Unplaced then begin Gear^.dY:= _0; @@ -606,8 +627,10 @@ begin if (Gear^.dY.isNegative) and TestCollisionYKick(Gear, -1) then Gear^.dY:= _0; Gear^.State:= Gear^.State or gstMoving; - Gear^.dY:= Gear^.dY + cGravity - end else + if isUnderwater then Gear^.dY:= Gear^.dY + cGravity / _2 + else Gear^.dY:= Gear^.dY + cGravity + end +else begin if ((hwAbs(Gear^.dX) + hwAbs(Gear^.dY)) < _0_55) and ((Gear^.State and gstHHJumping) <> 0) then SetLittle(Gear^.dX); @@ -628,6 +651,12 @@ if (Gear^.State <> 0) then DeleteCI(Gear); +if isUnderwater then + begin + Gear^.dY:= Gear^.dY * _0_999; + Gear^.dX:= Gear^.dX * _0_999; + end; + if (Gear^.State and gstMoving) <> 0 then if TestCollisionXKick(Gear, hwSign(Gear^.dX)) then if not isFalling then @@ -697,7 +726,9 @@ procedure doStepHedgehogDriven(Gear: PGear); var t: PGear; wasJumping: boolean; + Hedgehog: PHedgehog; begin +Hedgehog:= PHedgehog(Gear^.Hedgehog); if not isInMultiShoot then AllInactive:= false else @@ -717,7 +748,7 @@ if (Gear^.State and gstAnimation) <> 0 then begin Gear^.Message:= 0; - if (Gear^.Pos = Wavez[TWave(Gear^.Tag)].VoiceDelay) and (Gear^.Timer = 0) then PlaySound(Wavez[TWave(Gear^.Tag)].Voice, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack); + if (Gear^.Pos = Wavez[TWave(Gear^.Tag)].VoiceDelay) and (Gear^.Timer = 0) then PlaySound(Wavez[TWave(Gear^.Tag)].Voice, Hedgehog^.Team^.voicepack); inc(Gear^.Timer); if Gear^.Timer = Wavez[TWave(Gear^.Tag)].Interval then begin @@ -733,10 +764,10 @@ or (StepTicks = cHHStepTicks) or (CurAmmoGear <> nil) then // we are moving begin - with PHedgehog(Gear^.Hedgehog)^ do + with Hedgehog^ do if (CurAmmoGear = nil) and (Gear^.dY > _0_39) - and (Ammo^[CurSlot, CurAmmo].AmmoType = amParachute) then Gear^.Message:= Gear^.Message or gm_Attack; + and (CurAmmoType = amParachute) then Gear^.Message:= Gear^.Message or gmAttack; // check for case with ammo t:= CheckGearNear(Gear, gtCase, 36, 36); if t <> nil then @@ -744,31 +775,33 @@ end; if (CurAmmoGear = nil) then - if (((Gear^.Message and gm_Attack) <> 0) + if (((Gear^.Message and gmAttack) <> 0) or ((Gear^.State and gstAttacking) <> 0)) then Attack(Gear) // should be before others to avoid desync with '/put' msg and changing weapon msgs else -else with PHedgehog(Gear^.Hedgehog)^ do - if ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) - and ((Gear^.Message and gm_LJump) <> 0) - and (((Ammo^[CurSlot, CurAmmo].Propz) and ammoprop_AltUse) <> 0) then - begin - Gear^.Message:= Gear^.Message and not gm_LJump; - Attack(Gear) - end; +else + with Hedgehog^ do + if ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) + and ((Gear^.Message and gmLJump) <> 0) + and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) then + begin + Gear^.Message:= Gear^.Message and not gmLJump; + Attack(Gear) + end; if (CurAmmoGear = nil) - or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) then + or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) + or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) <> 0) then begin - if ((Gear^.Message and gm_Slot) <> 0) then + if ((Gear^.Message and gmSlot) <> 0) then begin ChangeAmmo(Gear); - ApplyAmmoChanges(PHedgehog(Gear^.Hedgehog)^) + ApplyAmmoChanges(Hedgehog^) end; - if ((Gear^.Message and gm_Weapon) <> 0) then HHSetWeapon(Gear); + if ((Gear^.Message and gmWeapon) <> 0) then HHSetWeapon(Gear); - if ((Gear^.Message and gm_Timer) <> 0) then HHSetTimer(Gear); + if ((Gear^.Message and gmTimer) <> 0) then HHSetTimer(Gear); end; if CurAmmoGear <> nil then @@ -784,7 +817,7 @@ begin wasJumping:= ((Gear^.State and gstHHJumping) <> 0); - if ((Gear^.Message and gm_HJump) <> 0) and + if ((Gear^.Message and gmHJump) <> 0) and wasJumping and ((Gear^.State and gstHHHJump) = 0) then if (not (hwAbs(Gear^.dX) > cLittle)) and (Gear^.dY < -_0_02) then @@ -792,10 +825,10 @@ Gear^.State:= Gear^.State or gstHHHJump; Gear^.dY:= -_0_25; if not cArtillery then Gear^.dX:= -SignAs(_0_02, Gear^.dX); - PlaySound(sndJump2, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack) + PlaySound(sndJump2, Hedgehog^.Team^.voicepack) end; - Gear^.Message:= Gear^.Message and not (gm_LJump or gm_HJump); + Gear^.Message:= Gear^.Message and not (gmLJump or gmHJump); if (not cArtillery) and wasJumping and TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then SetLittle(Gear^.dX); @@ -846,10 +879,14 @@ if not PHedgehog(Gear^.Hedgehog)^.Team^.hasGone then begin - Gear^.State:= Gear^.State or gstHHDeath; - Gear^.doStep:= @doStepHedgehogDead; - // Death message - AddCaption(Format(GetEventString(eidDied), PHedgehog(Gear^.Hedgehog)^.Name), cWhiteColor, capgrpMessage); + if PHedgehog(Gear^.Hedgehog)^.Effects[heResurrectable] then begin + ResurrectHedgehog(Gear); + end else begin + Gear^.State:= Gear^.State or gstHHDeath; + Gear^.doStep:= @doStepHedgehogDead; + // Death message + AddCaption(Format(GetEventString(eidDied), PHedgehog(Gear^.Hedgehog)^.Name), cWhiteColor, capgrpMessage); + end; end else begin @@ -884,7 +921,7 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepHedgehog(Gear: PGear); begin -if (Gear^.Message and gm_Destroy) <> 0 then +if (Gear^.Message and gmDestroy) <> 0 then begin DeleteGear(Gear); exit diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/PascalExports.pas --- a/hedgewars/PascalExports.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/PascalExports.pas Wed Oct 27 14:02:20 2010 +0200 @@ -1,25 +1,35 @@ (* - * PascalExports.pas - * hwengine + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2011 Andrey Korotaev + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License * - * Created by Vittorio on 09/01/10. - * Copyright 2009 __MyCompanyName__. All rights reserved. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA *) - {$INCLUDE "options.inc"} unit PascalExports; interface -uses uKeys, GLunit, uWorld, uMisc, uConsole, uTeams, uConsts, uChat, uGears, uSound, hwengine; +uses uKeys, GLunit, uWorld, uMisc, uConsole, uTeams, uConsts, uChat, + uGears, uSound, hwengine, uAmmos, uLocale; // don't change the order! {$INCLUDE "config.inc"} +type PPByte = ^PByte; implementation - {$IFDEF HWLIBRARY} +var cZoomVal: GLfloat; // retrieve protocol information procedure HW_versionInfo(netProto: PShortInt; versionStr: PPChar); cdecl; export; @@ -34,6 +44,17 @@ leftClick:= true; end; +procedure HW_ammoMenu; cdecl; export; +begin + rightClick:= true; +end; + +procedure HW_zoomSet(value: GLfloat); cdecl; export; +begin + cZoomVal:= value; + ZoomValue:= value; +end; + procedure HW_zoomIn; cdecl; export; begin if wheelDown = false then @@ -48,15 +69,21 @@ procedure HW_zoomReset; cdecl; export; begin - middleClick:= true; + ZoomValue:= cZoomVal; + //middleClick:= true; // center the camera at current hog if CurrentHedgehog <> nil then followGear:= CurrentHedgehog^.Gear; end; -procedure HW_ammoMenu; cdecl; export; +function HW_zoomFactor: GLfloat; cdecl; export; begin - rightClick:= true; + exit( ZoomValue / cDefaultZoomLevel ); +end; + +function HW_zoomLevel: LongInt; cdecl; export; +begin + exit( trunc((ZoomValue - cDefaultZoomLevel) / cZoomDelta) ); end; procedure HW_walkingKeysUp; cdecl; export; @@ -148,18 +175,6 @@ if closeFrontend then alsoShutdownFrontend:= true; end; -procedure HW_setLandscape(landscape: boolean); cdecl; export; -begin - if landscape then - begin - cOffsetY:= 0; - end - else - begin - cOffsetY:= 120; - end; -end; - procedure HW_setCursor(x,y: LongInt); cdecl; export; begin CursorPoint.X:= x; @@ -172,14 +187,69 @@ y^:= CursorPoint.Y; end; -procedure HW_setPianoSound(snd: LongInt); cdecl; export; -var CurSlot, CurAmmo: LongWord; +function HW_isAmmoMenuOpen: boolean; cdecl; export; +begin + exit(bShowAmmoMenu); +end; + +function HW_isAmmoMenuNotAllowed: boolean; cdecl; export; +begin; + exit ( (TurnTimeLeft = 0) or (not CurrentTeam^.ExtDriven and (((CurAmmoGear = nil) or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) ); +end; + +function HW_isPaused: boolean; cdecl; export; +begin + exit( isPaused ); +end; + +function HW_isWaiting: boolean; cdecl; export; +begin + exit( ReadyTimeLeft > 0 ); +end; + +function HW_isWeaponRequiringClick: boolean; cdecl; export; +begin + if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.BotLevel = 0) then + exit( (CurrentHedgehog^.Gear^.State and gstHHChooseTarget) <> 0 ) + else + exit(false); +end; + +function HW_isWeaponTimerable: boolean; cdecl; export; begin - CurSlot:= CurrentHedgehog^.CurSlot; - CurAmmo:= CurrentHedgehog^.CurAmmo; + if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Ammo <> nil) and (CurrentHedgehog^.BotLevel = 0) then + exit( (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_Timerable) <> 0) + else + exit(false); +end; + +function HW_isWeaponSwitch: boolean cdecl; export; +begin + if (CurAmmoGear <> nil) and (CurrentHedgehog^.BotLevel = 0) then + exit(CurAmmoGear^.AmmoType = amSwitch) + else + exit(false) +end; + +function HW_isWeaponRope: boolean cdecl; export; +begin + if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Ammo <> nil) and (CurrentHedgehog^.BotLevel = 0) then + exit (CurrentHedgehog^.CurAmmoType = amRope) + else + exit(false); +end; + +procedure HW_setGrenadeTime(time: LongInt); cdecl; export; +begin + ParseCommand('/timer ' + inttostr(time), true); +end; + +procedure HW_setPianoSound(snd: LongInt); cdecl; export; +begin // this most likely won't work in network game - if (CurrentHedgehog^.Ammo^[CurSlot, CurAmmo].AmmoType = amPiano) then - case snd of + if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Ammo <> nil) and (CurrentHedgehog^.BotLevel = 0) + and (CurrentHedgehog^.CurAmmoType = amPiano) then + case snd of 0: PlaySound(sndPiano0); 1: PlaySound(sndPiano1); 2: PlaySound(sndPiano2); @@ -192,46 +262,76 @@ end; end; -function HW_isAmmoOpen: boolean; cdecl; export; +function HW_getWeaponNameByIndex(whichone: LongInt): PChar; cdecl; export; +begin + exit (str2pchar(trammo[Ammoz[TAmmoType(whichone+1)].NameId])); +end; + +function HW_getWeaponCaptionByIndex(whichone: LongInt): PChar; cdecl; export; begin - exit(bShowAmmoMenu); + exit (str2pchar(trammoc[Ammoz[TAmmoType(whichone+1)].NameId])); +end; + +function HW_getWeaponDescriptionByIndex(whichone: LongInt): PChar; cdecl; export; +begin + exit (str2pchar(trammod[Ammoz[TAmmoType(whichone+1)].NameId])); end; -function HW_isWeaponRequiringClick: boolean; cdecl; export; +function HW_getNumberOfWeapons:LongInt; cdecl; export; +begin + exit(ord(high(TAmmoType))); +end; + +procedure HW_setWeapon(whichone: LongInt); cdecl; export; begin - if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then - exit( (CurrentHedgehog^.Gear^.State and gstHHChooseTarget) <> 0 ) - else - exit(false); + if (not CurrentTeam^.ExtDriven) and (CurrentTeam^.Hedgehogs[0].BotLevel = 0) then + SetWeapon(TAmmoType(whichone+1)); +end; + +function HW_isWeaponAnEffect(whichone: LongInt): boolean; cdecl; export; +begin + exit(Ammoz[TAmmoType(whichone+1)].Ammo.Propz and ammoprop_Effect <> 0) end; -function HW_isWeaponTimerable: boolean; cdecl; export; -var CurSlot, CurAmmo: LongWord; +function HW_getAmmoCounts(counts: PLongInt): LongInt; cdecl; export; +var a : PHHAmmo; + slot, index: LongInt; begin - CurSlot:= CurrentHedgehog^.CurSlot; - CurAmmo:= CurrentHedgehog^.CurAmmo; - exit( (CurrentHedgehog^.Ammo^[CurSlot, CurAmmo].Propz and ammoprop_Timerable) <> 0) + if (CurrentTeam = nil) or + (CurrentHedgehog = nil) or + (CurrentTeam^.ExtDriven) or + (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then + exit(-1); + + a:= CurrentHedgehog^.Ammo; + for slot:= 0 to cMaxSlotIndex do + for index:= 0 to cMaxSlotAmmoIndex do + if a^[slot,index].Count <> 0 then // yes, ammomenu is hell + counts[ord(a^[slot,index].AmmoType)-1]:= a^[slot,index].Count; + exit(0); end; -function HW_isWeaponSwitch: boolean cdecl; export; +procedure HW_getAmmoDelays (skipTurns: PByte); cdecl; export; +var a : TAmmoType; begin - if CurAmmoGear <> nil then - exit(CurAmmoGear^.AmmoType = amSwitch) - else - exit(false) + for a:= Low(TAmmoType) to High(TAmmoType) do + skipTurns[ord(a)-1]:= byte(Ammoz[a].SkipTurns); end; -function HW_isPaused: boolean; cdecl; export; +function HW_getTurnsForCurrentTeam: LongInt; cdecl; export; begin - exit( isPaused ); + exit(CurrentTeam^.Clan^.TurnNumber); end; -procedure HW_setGrenadeTime(time: LongInt); cdecl; export; +function HW_getMaxNumberOfHogs: LongInt; cdecl; export; begin - ParseCommand('/timer ' + inttostr(time), true); + exit(cMaxHHIndex+1); end; -//amSwitch +function HW_getMaxNumberOfTeams: LongInt; cdecl; export; +begin + exit(cMaxTeams); +end; {$ENDIF} end. diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/SDLMain.m --- a/hedgewars/SDLMain.m Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/SDLMain.m Wed Oct 27 14:02:20 2010 +0200 @@ -50,7 +50,7 @@ dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle()); if (dict) appName = [dict objectForKey: @"CFBundleName"]; - + if (![appName length]) appName = [[NSProcessInfo processInfo] processName]; @@ -131,10 +131,10 @@ NSMenuItem *menuItem; NSString *title; NSString *appName; - + appName = getApplicationName(); appleMenu = [[NSMenu alloc] initWithTitle:@""]; - + /* Add menu items */ title = [@"About " stringByAppendingString:appName]; [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; @@ -154,7 +154,7 @@ title = [@"Quit " stringByAppendingString:appName]; [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"]; - + /* Put menu into the menubar */ menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; [menuItem setSubmenu:appleMenu]; @@ -176,17 +176,17 @@ NSMenuItem *menuItem; windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; - + /* "Minimize" item */ menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; [windowMenu addItem:menuItem]; [menuItem release]; - + /* Put menu into the menubar */ windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""]; [windowMenuItem setSubmenu:windowMenu]; [[NSApp mainMenu] addItem:windowMenuItem]; - + /* Tell the application object that this is now the window menu */ [NSApp setWindowsMenu:windowMenu]; @@ -203,7 +203,7 @@ /* Ensure the application object is initialised */ [SDLApplication sharedApplication]; - + #ifdef SDL_USE_CPS { CPSProcessSerNum PSN; @@ -223,10 +223,10 @@ /* Create SDLMain and make it the app delegate */ sdlMain = [[SDLMain alloc] init]; [NSApp setDelegate:sdlMain]; - + /* Start the main event loop */ [NSApp run]; - + [sdlMain release]; [pool release]; } @@ -319,27 +319,27 @@ bufferSize = selfLen + aStringLen - aRange.length; buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar)); - + /* Get first part into buffer */ localRange.location = 0; localRange.length = aRange.location; [self getCharacters:buffer range:localRange]; - + /* Get middle part into buffer */ localRange.location = 0; localRange.length = aStringLen; [aString getCharacters:(buffer+aRange.location) range:localRange]; - + /* Get last part into buffer */ localRange.location = aRange.location + aRange.length; localRange.length = selfLen - localRange.location; [self getCharacters:(buffer+aRange.location+aStringLen) range:localRange]; - + /* Build output string */ result = [NSString stringWithCharacters:buffer length:bufferSize]; - + NSDeallocateMemoryPages(buffer, bufferSize); - + return result; } diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/SDLh.pas --- a/hedgewars/SDLh.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/SDLh.pas Wed Oct 27 14:02:20 2010 +0200 @@ -96,7 +96,7 @@ SDL_SWSURFACE = $00000000; SDL_HWSURFACE = $00000001; SDL_SRCALPHA = $00010000; - + SDL_INIT_TIMER = $00000001; SDL_INIT_AUDIO = $00000010; SDL_INIT_VIDEO = $00000020; @@ -156,7 +156,7 @@ SDL_VIDEORESIZE = 16; // TODO: outdated? no longer in SDL 1.3? {$ENDIF} {*end SDL_Event binding*} - + {$IFDEF SDL13} SDL_ASYNCBLIT = $08000000; SDL_ANYFORMAT = $10000000; @@ -209,12 +209,12 @@ SDL_WINDOW_INPUT_FOCUS = $00000200; //*< window has input focus */ SDL_WINDOW_MOUSE_FOCUS = $00000400; //*< window has mouse focus */ SDL_WINDOW_FOREIGN = $00000800; //*< window not created by SDL */ - + // SDL_WindowEventID (enum) SDL_WINDOWEVENT_NONE = 0; //*< Never used SDL_WINDOWEVENT_SHOWN = 1; //*< Window has been shown SDL_WINDOWEVENT_HIDDEN = 2; //*< Window has been hidden - SDL_WINDOWEVENT_EXPOSED = 3; //*< Window has been exposed and should be redrawn + SDL_WINDOWEVENT_EXPOSED = 3; //*< Window has been exposed and should be redrawn SDL_WINDOWEVENT_MOVED = 4; //*< Window has been moved to data1, data2 SDL_WINDOWEVENT_RESIZED = 5; //*< Window size changed to data1xdata2 SDL_WINDOWEVENT_MINIMIZED = 6; //*< Window has been minimized @@ -233,7 +233,7 @@ MIX_INIT_MOD = $00000002; MIX_INIT_MP3 = $00000004; MIX_INIT_OGG = $00000008; - + {* SDL_TTF *} TTF_STYLE_NORMAL = 0; TTF_STYLE_BOLD = 1; @@ -259,7 +259,7 @@ /////////////////////// TYPE DEFINITIONS /////////////////////// ///////////////////////////////////////////////////////////////// -type +type PSDL_Rect = ^TSDL_Rect; TSDL_Rect = record {$IFDEF SDL13} @@ -357,9 +357,9 @@ {* SDL_Event type definition *} {$IFDEF SDL13} - PSDL_Window = pointer; + PSDL_Window = pointer; PSDL_Texture = pointer; - + TSDL_WindowEvent = record type_: LongInt; windowID: LongInt; @@ -367,7 +367,7 @@ padding1, padding2, padding3: byte; data1, data2: LongInt; end; - + TSDL_KeySym = record scancode, sym, @@ -407,7 +407,7 @@ padding1, padding2: byte; x, y, z, xrel, yrel : LongInt; pressure, pressure_max, pressure_min, - rotation, tilt, cursor: LongInt; + rotation, tilt, cursor: LongInt; {$ELSE} type_: byte; x, y, xrel, yrel : word; @@ -450,7 +450,7 @@ x, y: LongInt; padding1, padding2, padding3: byte; end; - + // implement SDL_ProximityEvent {$ENDIF} @@ -465,10 +465,10 @@ {$IFDEF SDL13} value: LongInt; {$ELSE} - value: word; -{$ENDIF} + value: Smallint; +{$ENDIF} end; - + TSDL_JoyBallEvent = record which: Byte; ball: Byte; @@ -477,7 +477,7 @@ xrel, yrel: LongInt; {$ELSE} type_: Byte; - xrel, yrel: word; + xrel, yrel: Smallint; {$ENDIF} end; @@ -491,7 +491,7 @@ hat: Byte; value: Byte; end; - + TSDL_JoyButtonEvent = record {$IFDEF SDL13} type_: LongInt; @@ -586,7 +586,7 @@ ); {$IFDEF SDL13} - TSDL_ArrayByteOrder = ( // array component order, low byte -> high byte + TSDL_ArrayByteOrder = ( // array component order, low byte -> high byte SDL_ARRAYORDER_NONE, SDL_ARRAYORDER_RGB, SDL_ARRAYORDER_RGBA, @@ -702,8 +702,8 @@ function SDL_SaveBMP_RW(surface: PSDL_Surface; dst: PSDL_RWops; freedst: LongInt): LongInt; cdecl; external SDLLibName; {$IFDEF SDL13} -function SDL_CreateWindow(title: PChar; x,y,w,h, flags: LongInt): PSDL_Window; cdecl; external SDLLibName; -function SDL_CreateRenderer(window: PSDL_Window; index, flags: LongInt): LongInt; cdecl; external SDLLibName; +function SDL_CreateWindow(title: PChar; x,y,w,h, flags: LongInt): PSDL_Window; cdecl; external SDLLibName; +function SDL_CreateRenderer(window: PSDL_Window; index, flags: LongInt): LongInt; cdecl; external SDLLibName; function SDL_SetRenderDrawColor(r,g,b,a: byte): LongInt; cdecl; external SDLLibName; function SDL_DestroyRenderer(window: PSDL_Window): LongInt; cdecl; external SDLLibName; function SDL_DestroyWindow(window: PSDL_Window): LongInt; cdecl; external SDLLibName; @@ -718,6 +718,7 @@ function SDL_GetRelativeMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; function SDL_GetNumMice: LongInt; cdecl; external SDLLibName; function SDL_PixelFormatEnumToMasks(format: TSDL_ArrayByteOrder; bpp: PLongInt; Rmask, Gmask, Bmask, Amask: PLongInt): boolean; cdecl; external SDLLibName; +function SDL_RenderReadPixels(rect: PSDL_Rect; format: LongInt; pixels: pointer; pitch: LongInt): LongInt; cdecl; external SDLLibName; {$ENDIF} function SDL_GetKeyState(numkeys: PLongInt): PByteArray; cdecl; external SDLLibName {$IFDEF SDL13} name 'SDL_GetKeyboardState'{$ENDIF}; @@ -841,13 +842,6 @@ function SDLNet_Read16(buf: pointer): Word; function SDLNet_Read32(buf: pointer): LongWord; -{$IFDEF IPHONEOS} -(* iPhone related calls *) -procedure clearView; cdecl; external; -procedure startSpinning; cdecl; external; -procedure stopSpinning; cdecl; external; -function isPhone: Boolean; cdecl; external; -{$ENDIF} implementation function SDL_MustLock(Surface: PSDL_Surface): Boolean; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/VGSHandlers.inc --- a/hedgewars/VGSHandlers.inc Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/VGSHandlers.inc Wed Oct 27 14:02:20 2010 +0200 @@ -34,9 +34,9 @@ Y:= Y + (dY + tdY + cGravityf * vobFallSpeed) * Steps; Angle:= Angle + dAngle * Steps; - if (round(X) >= -cScreenWidth - 64) and - (round(X) <= cScreenWidth + LAND_WIDTH) and - (round(Y) <= (LAND_HEIGHT + 75)) and + if (round(X) >= cLeftScreenBorder) and + (round(X) <= cRightScreenBorder) and + (round(Y) <= (int64(LAND_HEIGHT) + 75)) and (Timer > 0) and (Timer-Steps > 0) then begin if tdX > 0 then sign := 1 @@ -51,10 +51,10 @@ end else begin - if round(X) < -cScreenWidth - 64 then X:= float(cScreenWidth + LAND_WIDTH) else - if round(X) > cScreenWidth + LAND_WIDTH then X:= float(-cScreenWidth - 64); + if round(X) < cLeftScreenBorder then X:= X + cScreenSpace else + if round(X) > cRightScreenBorder then X:= X - cScreenSpace; // if round(Y) < (LAND_HEIGHT - 1024 - 75) then Y:= Y + float(25); // For if flag is set for flakes rising upwards? - if round(Y) > (LAND_HEIGHT + 75) then Y:= Y - float(1024 + 150); // TODO - configure in theme (jellies for example could use limited range) + if round(Y) > (int64(LAND_HEIGHT) + 75) then Y:= Y - float(1024 + 150); // TODO - configure in theme (jellies for example could use limited range) Timer:= 0; tdX:= 0; tdY:= 0 @@ -77,17 +77,17 @@ var s: Longword; t: float; begin -Gear^.X:= Gear^.X + (cWindSpeedf * 200 + Gear^.dX) * Steps; +Gear^.X:= Gear^.X + (cWindSpeedf * 750 * Gear^.dX) * Steps; // up-and-down-bounce magic s := (GameTicks + Gear^.Timer) mod 4096; t := 8 * AngleSin(s mod 2048).QWordValue / 4294967296; if (s < 2048) then t := -t; -Gear^.Y := LAND_HEIGHT-1184 + Gear^.Timer mod 8 + t; +Gear^.Y := int64(LAND_HEIGHT) - 1184 + Gear^.Timer mod 8 + t; -if round(Gear^.X) < -cScreenWidth - 256 then Gear^.X:= float(cScreenWidth + LAND_WIDTH) else -if round(Gear^.X) > cScreenWidth + LAND_WIDTH then Gear^.X:= float(-cScreenWidth - 256) +if round(Gear^.X) < cLeftScreenBorder then Gear^.X:= Gear^.X + cScreenSpace else +if round(Gear^.X) > cRightScreenBorder then Gear^.X:= Gear^.X - cScreenSpace end; //////////////////////////////////////////////////////////////////////////////// @@ -109,6 +109,24 @@ end; //////////////////////////////////////////////////////////////////////////////// +procedure doStepNote(Gear: PVisualGear; Steps: Longword); +begin +Gear^.X:= Gear^.X + Gear^.dX * Steps; + +Gear^.Y:= Gear^.Y + Gear^.dY * Steps; +Gear^.dY:= Gear^.dY + cGravityf * Steps / 2; + +Gear^.Angle:= Gear^.Angle + (Gear^.Frame + 1) * Steps / 10; +while Gear^.Angle > cMaxAngle do + Gear^.Angle:= Gear^.Angle - cMaxAngle; + +if Gear^.FrameTicks <= Steps then + DeleteVisualGear(Gear) +else + dec(Gear^.FrameTicks, Steps) +end; + +//////////////////////////////////////////////////////////////////////////////// procedure doStepEgg(Gear: PVisualGear; Steps: Longword); begin Gear^.X:= Gear^.X + Gear^.dX * Steps; @@ -126,11 +144,27 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepFire(Gear: PVisualGear; Steps: Longword); +var vgt: PVisualGear; begin Gear^.X:= Gear^.X + Gear^.dX * Steps; Gear^.Y:= Gear^.Y + Gear^.dY * Steps;// + cGravityf * (Steps * Steps); -Gear^.dY:= Gear^.dY + cGravityf * Steps; +if (Gear^.State and gstTmpFlag) = 0 then + begin + Gear^.dY:= Gear^.dY + cGravityf * Steps; + if ((GameTicks mod 200) < Steps + 1) then + begin + vgt:= AddVisualGear(round(Gear^.X), round(Gear^.Y), vgtFire); + if vgt <> nil then + begin + vgt^.dx:= 0; + vgt^.dy:= 0; + vgt^.State:= gstTmpFlag; + end; + end + end +else + inc(Steps, Steps); if Gear^.FrameTicks <= Steps then DeleteVisualGear(Gear) @@ -167,9 +201,13 @@ //////////////////////////////////////////////////////////////////////////////// procedure doStepBubble(Gear: PVisualGear; Steps: Longword); begin - Gear^.X:= Gear^.X + (cWindSpeedf * 100 + Gear^.dX) * Steps; + Gear^.X:= Gear^.X + Gear^.dX * Steps; + Gear^.Y:= Gear^.Y + Gear^.dY * Steps; Gear^.Y:= Gear^.Y - cDrownSpeedf * Steps; + Gear^.dX /= (1.001 * Steps); + Gear^.dY /= (1.001 * Steps); + if (Gear^.FrameTicks <= Steps) or (round(Gear^.Y) < cWaterLine) then DeleteVisualGear(Gear) else @@ -442,7 +480,7 @@ procedure doStepHealthTagWorkUnderWater(Gear: PVisualGear; Steps: Longword); begin -if round(Gear^.Y) < cWaterLine + 10 then +if round(Gear^.Y) < int64(cWaterLine) + 10 then DeleteVisualGear(Gear) else Gear^.Y:= Gear^.Y - 0.08 * Steps; @@ -478,12 +516,16 @@ inc(Gear^.Timer, Steps ); if Gear^.Timer > 64 then begin + if Gear^.State = 0 then + begin + DeleteVisualGear(Gear); + exit; + end; dec(Gear^.State, Gear^.Timer div 65); Gear^.Timer:= Gear^.Timer mod 65; end; Gear^.dX:= Gear^.dX + cWindSpeedf * Steps; Gear^.X:= Gear^.X + Gear^.dX; -if Gear^.State = 0 then DeleteVisualGear(Gear); end; //////////////////////////////////////////////////////////////////////////////// @@ -543,3 +585,19 @@ Gear^.doStep:= @doStepBigExplosionWork; if Steps > 1 then Gear^.doStep(Gear, Steps-1); end; + +procedure doStepChunk(Gear: PVisualGear; Steps: Longword); +begin +Gear^.X:= Gear^.X + Gear^.dX * Steps; + +Gear^.Y:= Gear^.Y + Gear^.dY * Steps; +Gear^.dY:= Gear^.dY + cGravityf * Steps; + +Gear^.Angle:= round(Gear^.Angle + Steps) mod cMaxAngle; + +if round(Gear^.Y) > cWaterLine then + begin + AddVisualGear(round(Gear^.X), round(Gear^.Y), vgtDroplet); + DeleteVisualGear(Gear); + end +end; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/adler32.pas --- a/hedgewars/adler32.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/adler32.pas Wed Oct 27 14:02:20 2010 +0200 @@ -75,7 +75,7 @@ procedure Adler32Update(var adler: longint; Msg: pointer; Len: longint); //-update Adler32 with Msg data const - BASE = 65521; // max. prime < 65536 + BASE = 65521; // max. prime < 65536 NMAX = 5552; // max. n with 255n(n+1)/2 + (n+1)(BASE-1) < 2^32 type LH = packed record diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/hwengine.pas Wed Oct 27 14:02:20 2010 +0200 @@ -29,10 +29,9 @@ program hwengine; {$ENDIF} -uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uKeys, uSound, - uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions, sysutils; - -type arrayofpchar = array[0..9] of PChar; +uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uKeys, uSound, + uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions, uMobile, sysutils; + var isTerminated: boolean = false; alsoShutdownFrontend: boolean = false; @@ -136,7 +135,7 @@ end; /////////////////// -procedure MainLoop; +procedure MainLoop; var PrevTime, CurrTime: Longword; event: TSDL_Event; begin @@ -176,11 +175,11 @@ if isTerminated = false then begin CurrTime:= SDL_GetTicks; - if PrevTime + cTimerInterval <= CurrTime then + if PrevTime + longword(cTimerInterval) <= CurrTime then begin DoTimer(CurrTime - PrevTime); PrevTime:= CurrTime - end + end else SDL_Delay(1); IPCCheckSock(); end; @@ -197,7 +196,7 @@ /////////////// {$IFDEF HWLIBRARY} -procedure Game(gameArgs: arrayofpchar); cdecl; export; +procedure Game(gameArgs: PPChar); cdecl; export; {$ELSE} procedure Game; {$ENDIF} @@ -215,24 +214,23 @@ {$IFDEF DEBUGFILE} cShowFPS:= true; {$ELSE} - cShowFPS:= true; // update me at release time + cShowFPS:= false; {$ENDIF} - cInitVolume:= 100; - - UserNick:= gameArgs[0]; - val(gameArgs[1], ipcPort); - isSoundEnabled:= gameArgs[2] = '1'; - isMusicEnabled:= gameArgs[3] = '1'; + val(gameArgs[0], ipcPort); + val(gameArgs[1], cScreenWidth); + val(gameArgs[2], cScreenHeight); + val(gameArgs[3], cReducedQuality); cLocaleFName:= gameArgs[4]; - cAltDamage:= gameArgs[5] = '1'; - val(gameArgs[6], cScreenHeight); - val(gameArgs[7], cScreenWidth); - recordFileName:= gameArgs[8]; - - val(gameArgs[9], cReducedQuality); + UserNick:= gameArgs[5]; + isSoundEnabled:= gameArgs[6] = '1'; + isMusicEnabled:= gameArgs[7] = '1'; + cAltDamage:= gameArgs[8] = '1'; + val(gameArgs[9], rotationQt); + recordFileName:= gameArgs[10]; cStereoMode:= smNone; // TODO: Enable anaglyph rendering on iPhone? {$ENDIF} + cLogfileBase:= 'game'; initEverything(true); WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')'); @@ -244,7 +242,7 @@ for p:= Succ(Low(TPathType)) to High(TPathType) do if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p]; - + WriteToConsole('Init SDL... '); SDLTry(SDL_Init(SDL_INIT_VIDEO) >= 0, true); WriteLnToConsole(msgOK); @@ -269,23 +267,26 @@ ControllerInit(); // has to happen before InitKbdKeyTable to map keys InitKbdKeyTable(); - if recordFileName = '' then - InitIPC; - WriteLnToConsole(msgGettingConfig); - LoadLocale(Pathz[ptLocale] + '/en.txt'); // Do an initial load with english if cLocaleFName <> 'en.txt' then begin // Try two letter locale first before trying specific locale overrides - if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then + if (Length(cLocaleFName) > 6) and (Copy(cLocaleFName,1,2)+'.txt' <> 'en.txt') then LoadLocale(Pathz[ptLocale] + '/' + Copy(cLocaleFName,1,2)+'.txt'); LoadLocale(Pathz[ptLocale] + '/' + cLocaleFName); end; + WriteLnToConsole(msgGettingConfig); if recordFileName = '' then - SendIPCAndWaitReply('C') // ask for game config + begin + InitIPC; + SendIPCAndWaitReply('C'); // ask for game config + end else + begin LoadRecordFromFile(recordFileName); + perfExt_SaveBeganSynching(); + end; ScriptOnGameInit; @@ -316,13 +317,13 @@ begin Randomize(); - uConsts.initModule; + // uConsts does not need initialization as they are all consts uMisc.initModule; uConsole.initModule; // MUST happen after uMisc uLand.initModule; uIO.initModule; - + if complete then begin uAI.initModule; @@ -341,7 +342,7 @@ //uLandTemplates does not need initialization uLandTexture.initModule; //uLocale does not need initialization - uRandom.initModule; + uRandom.initModule; uScript.initModule; uSound.initModule; uStats.initModule; @@ -381,19 +382,19 @@ //uAIActions does not need to be freed uAI.freeModule; //stub end; - + uIO.freeModule; //stub uLand.freeModule; uConsole.freeModule; uMisc.freeModule; // uMisc closes the debug log. - uConsts.freeModule; //stub end; ///////////////////////// procedure GenLandPreview{$IFDEF HWLIBRARY}(port: LongInt); cdecl; export{$ENDIF}; var Preview: TPreview; begin + cLogfileBase:= 'preview'; initEverything(false); {$IFDEF HWLIBRARY} WriteLnToConsole('Preview connecting on port ' + inttostr(port)); @@ -419,134 +420,38 @@ begin WriteLn('Wrong argument format: correct configurations is'); WriteLn(); - WriteLn(' hwengine [option]'); + WriteLn(' hwengine [options]'); WriteLn(); - WriteLn('where [option] must be specified either as'); + WriteLn('where [options] must be specified either as:'); WriteLn(' --set-video [screen width] [screen height] [color dept]'); WriteLn(' --set-audio [volume] [enable music] [enable sounds]'); WriteLn(' --set-other [language file] [full screen] [show FPS]'); - WriteLn(' --set-multimedia [screen height] [screen width] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen]'); - WriteLn(' --set-everything [screen height] [screen width] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality]'); + WriteLn(' --set-multimedia [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen]'); + WriteLn(' --set-everything [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality]'); WriteLn(); - WriteLn('Read documentation online at http://www.hedgewars.org/node/1465 for more information'); - Write('parsed command: '); + WriteLn('Read documentation online at http://code.google.com/p/hedgewars/wiki/CommandLineOptions for more information'); + WriteLn(); + Write('PARSED COMMAND: '); for i:=0 to ParamCount do Write(ParamStr(i) + ' '); WriteLn(); end; //////////////////// +{$INCLUDE "ArgParsers.inc"} + procedure GetParams; -var i : LongInt; begin - case ParamCount of - 19: begin - val(ParamStr(2), cScreenWidth); - val(ParamStr(3), cScreenHeight); - cBitsStr:= ParamStr(4); - val(cBitsStr, cBits); - val(ParamStr(5), ipcPort); - cFullScreen:= ParamStr(6) = '1'; - isSoundEnabled:= ParamStr(7) = '1'; - //cVSyncInUse:= ParamStr(8) = '1'; //merged with rqFlags - //cWeaponTooltips:= ParamStr(9) = '1'; //merged with rqFlags - cLocaleFName:= ParamStr(10); - val(ParamStr(11), cInitVolume); - val(ParamStr(12), cTimerInterval); - PathPrefix:= ParamStr(13); - cShowFPS:= ParamStr(14) = '1'; - cAltDamage:= ParamStr(15) = '1'; - UserNick:= DecodeBase64(ParamStr(16)); - isMusicEnabled:= ParamStr(17) = '1'; - val(ParamStr(18), cReducedQuality); - val(ParamStr(19), i); - cStereoMode:= TStereoMode(max(0, min(ord(high(TStereoMode)), i))); - end; - 3: begin - val(ParamStr(2), ipcPort); - GameType:= gmtLandPreview; - if ParamStr(3) <> 'landpreview' then - OutError(errmsgShouldntRun, true); - end; - 2: begin - PathPrefix:= ParamStr(1); - recordFileName:= ParamStr(2); - end; - 6: begin - PathPrefix:= ParamStr(1); - recordFileName:= ParamStr(2); - - if ParamStr(3) = '--set-video' then - begin - val(ParamStr(4), cScreenWidth); - val(ParamStr(5), cScreenHeight); - cBitsStr:= ParamStr(6); - val(cBitsStr, cBits); - end + if (ParamCount < 2) then + GameType:= gmtSyntax + else + if (ParamCount = 3) then + internalSetGameTypeLandPreviewFromParameters() + else + if (ParamCount = cDefaultParamNum) then + internalStartGameWithParameters() else - begin - if ParamStr(3) = '--set-audio' then - begin - val(ParamStr(4), cInitVolume); - isMusicEnabled:= ParamStr(5) = '1'; - isSoundEnabled:= ParamStr(6) = '1'; - end - else - begin - if ParamStr(3) = '--set-other' then - begin - cLocaleFName:= ParamStr(4); - cFullScreen:= ParamStr(5) = '1'; - cShowFPS:= ParamStr(6) = '1'; - end - else GameType:= gmtSyntax; - end - end; - end; - 11: begin - PathPrefix:= ParamStr(1); - recordFileName:= ParamStr(2); - - if ParamStr(3) = '--set-multimedia' then - begin - val(ParamStr(4), cScreenWidth); - val(ParamStr(5), cScreenHeight); - cBitsStr:= ParamStr(6); - val(cBitsStr, cBits); - val(ParamStr(7), cInitVolume); - isMusicEnabled:= ParamStr(8) = '1'; - isSoundEnabled:= ParamStr(9) = '1'; - cLocaleFName:= ParamStr(10); - cFullScreen:= ParamStr(11) = '1'; - end - else GameType:= gmtSyntax; - end; - 15: begin - PathPrefix:= ParamStr(1); - recordFileName:= ParamStr(2); - if ParamStr(3) = '--set-everything' then - begin - val(ParamStr(4), cScreenWidth); - val(ParamStr(5), cScreenHeight); - cBitsStr:= ParamStr(6); - val(cBitsStr, cBits); - val(ParamStr(7), cInitVolume); - isMusicEnabled:= ParamStr(8) = '1'; - isSoundEnabled:= ParamStr(9) = '1'; - cLocaleFName:= ParamStr(10); - cFullScreen:= ParamStr(11) = '1'; - cAltDamage:= ParamStr(12) = '1'; - cShowFPS:= ParamStr(13) = '1'; - val(ParamStr(14), cTimerInterval); - if (ParamStr(15) = '1') then //HACK - cReducedQuality:= $FFFFFFFF xor rqLowRes - else - val(ParamStr(15), cReducedQuality); - end - else GameType:= gmtSyntax; - end; - else GameType:= gmtSyntax; - end; + playReplayFileWithParameters(); end; //////////////////////////////////////////////////////////////////////////////// @@ -558,7 +463,7 @@ if GameType = gmtLandPreview then GenLandPreview() else if GameType = gmtSyntax then DisplayUsage() else Game(); - + if GameType = gmtSyntax then ExitCode:= 1 else diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/options.inc --- a/hedgewars/options.inc Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/options.inc Wed Oct 27 14:02:20 2010 +0200 @@ -25,7 +25,7 @@ {$MODE OBJFPC} {$MACRO ON} -{$DEFINE GLunit:=GL,GLext} +{$DEFINE GLunit:=GL,GLext} {$IFDEF IPHONEOS} {$DEFINE SDL13} diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uAI.pas --- a/hedgewars/uAI.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uAI.pas Wed Oct 27 14:02:20 2010 +0200 @@ -71,7 +71,7 @@ if (Targets.ar[i].Score >= 0) and (not StopThinking) then begin with CurrentHedgehog^ do - a:= Ammo^[CurSlot, CurAmmo].AmmoType; + a:= CurAmmoType; aa:= a; repeat if (CanUseAmmo[a]) and @@ -212,7 +212,7 @@ Pop(ticks, Actions, Me^); AddAction(Actions, Me^.Message, aim_push, 250, 0, 0); - if (Me^.Message and gm_Left) <> 0 then AddAction(Actions, aia_WaitXL, hwRound(Me^.X), 0, 0, 0) + if (Me^.Message and gmLeft) <> 0 then AddAction(Actions, aia_WaitXL, hwRound(Me^.X), 0, 0, 0) else AddAction(Actions, aia_WaitXR, hwRound(Me^.X), 0, 0, 0); steps:= 0; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uAIAmmoTests.pas Wed Oct 27 14:02:20 2010 +0200 @@ -71,7 +71,8 @@ (proc: nil; flags: 0), // amMineStrike (proc: nil; flags: 0), // amBlowTorch (proc: nil; flags: 0), // amGirder - (proc: @TestTeleport; flags: amtest_OnTurn), // amTeleport + (proc: nil; flags: 0), // amTeleport + //(proc: @TestTeleport; flags: amtest_OnTurn), // amTeleport (proc: nil; flags: 0), // amSwitch (proc: @TestMortar; flags: 0), // amMortar (proc: nil; flags: 0), // amKamikaze @@ -97,13 +98,16 @@ (proc: nil; flags: 0), // amPiano (proc: @TestGrenade; flags: 0), // amGasBomb (proc: @TestShotgun; flags: 0), // amSineGun - (proc: nil; flags: 0) // amFlamethrower + (proc: nil; flags: 0), // amFlamethrower + (proc: @TestGrenade; flags: 0), // amSMine + (proc: @TestFirePunch; flags: 0), // amHammer + (proc: nil; flags: 0) // amResurrector ); const BadTurn = Low(LongInt) div 4; implementation -uses uMisc, uAIMisc, uLand, uTeams; +uses uMisc, uAIMisc, uLand; function Metric(x1, y1, x2, y2: LongInt): LongInt; begin @@ -121,11 +125,8 @@ t: LongInt; value: LongInt; begin - with PHedgehog(Me^.Hedgehog)^ do - begin - x:= Me^.X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Me^.dX), Me^.Angle))); - y:= Me^.Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Me^.Angle))) - end; + x:= Me^.X; + y:= Me^.Y; dX:= Vx; dY:= -Vy; t:= rTime; @@ -179,11 +180,8 @@ var x, y, dY: hwFloat; t: LongInt; begin - with PHedgehog(Me^.Hedgehog)^ do - begin - x:= Me^.X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Me^.dX), Me^.Angle))); - y:= Me^.Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Me^.Angle))) - end; + x:= Me^.X; + y:= Me^.Y; dY:= -Vy; t:= TestTime; repeat @@ -234,11 +232,8 @@ var x, y, dY: hwFloat; t: LongInt; begin - with PHedgehog(Me^.Hedgehog)^ do - begin - x:= Me^.X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Me^.dX), Me^.Angle))); - y:= Me^.Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Me^.Angle))) - end; + x:= Me^.X; + y:= Me^.Y; dY:= -Vy; t:= TestTime; repeat @@ -289,11 +284,8 @@ var x, y, dY: hwFloat; t: LongInt; begin - with PHedgehog(Me^.Hedgehog)^ do - begin - x:= Me^.X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Me^.dX), Me^.Angle))); - y:= Me^.Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Me^.Angle))) - end; + x:= Me^.X; + y:= Me^.Y; dY:= -Vy; t:= TestTime; repeat @@ -348,11 +340,8 @@ var x, y, dY: hwFloat; t: LongInt; begin - with PHedgehog(Me^.Hedgehog)^ do - begin - x:= Me^.X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Me^.dX), Me^.Angle))); - y:= Me^.Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Me^.Angle))) - end; + x:= Me^.X; + y:= Me^.Y; dY:= -Vy; t:= TestTime; repeat @@ -381,7 +370,7 @@ if valueResult < Score then begin ap.Angle:= DxDy2AttackAngle(Vx, Vy) + AIrndSign(random(Level)); - ap.Power:= hwRound(r * cMaxPower) + AIrndSign(random(Level) * 15); + ap.Power:= hwRound(r * cMaxPower * _0_9) + AIrndSign(random(Level) * 15); ap.Time:= TestTime; ap.ExplR:= 300; ap.ExplX:= EX; @@ -403,11 +392,8 @@ var x, y, dY: hwFloat; value: LongInt; begin - with PHedgehog(Me^.Hedgehog)^ do - begin - x:= Me^.X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Me^.dX), Me^.Angle))); - y:= Me^.Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Me^.Angle))) - end; + x:= Me^.X; + y:= Me^.Y; dY:= -Vy; repeat @@ -491,11 +477,8 @@ ap.ExplR:= 0; ap.Time:= 0; ap.Power:= 1; -with PHedgehog(Me^.Hedgehog)^ do - begin - x:= Me^.X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Me^.dX), Me^.Angle))); - y:= Me^.Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Me^.Angle))) - end; +x:= Me^.X; +y:= Me^.Y; range:= Metric(hwRound(x), hwRound(y), Targ.X, Targ.Y); if ( range < MIN_RANGE ) or ( range > MAX_RANGE ) then exit(BadTurn); Vx:= (int2hwFloat(Targ.X) - x) * _1div1024; @@ -528,11 +511,8 @@ ap.ExplR:= 0; ap.Time:= 0; ap.Power:= 1; -with PHedgehog(Me^.Hedgehog)^ do - begin - x:= Me^.X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Me^.dX), Me^.Angle))); - y:= Me^.Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Me^.Angle))) - end; +x:= Me^.X; +y:= Me^.Y; if Abs(hwRound(Me^.X) - Targ.X) + Abs(hwRound(Me^.Y) - Targ.Y) < 80 then exit(BadTurn); t:= _0_5 / Distance(int2hwFloat(Targ.X) - x, int2hwFloat(Targ.Y) - y); @@ -564,11 +544,8 @@ ap.Time:= 0; ap.Power:= 1; -with PHedgehog(Me^.Hedgehog)^ do - begin - x:= Me^.X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Me^.dX), Me^.Angle))); - y:= Me^.Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Me^.Angle))) - end; +x:= Me^.X; +y:= Me^.Y; if (Targ.X) - hwRound(x) >= 0 then ap.Angle:= cMaxAngle div 4 else ap.Angle:= - cMaxAngle div 4; valueResult:= RateShove(Me, hwRound(x) + 10 * hwSign(int2hwFloat(Targ.X) - x), hwRound(y), 15, 30); @@ -585,11 +562,8 @@ ap.Time:= 0; ap.Power:= 1; ap.Angle:= 0; -with PHedgehog(Me^.Hedgehog)^ do - begin - x:= Me^.X + int2hwfloat(round(GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Me^.dX), Me^.Angle))); - y:= Me^.Y + int2hwfloat(round(GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Me^.Angle))) - end; +x:= Me^.X; +y:= Me^.Y; if (Abs(hwRound(x) - Targ.X) > 25) or (Abs(hwRound(y) - 50 - Targ.Y) > 50) then begin @@ -689,7 +663,7 @@ FillBonuses(true, [gtCase]); if bonuses.Count = 0 then begin if Me^.Health <= 100 then begin - maxTop := Targ.Y - cHHRadius * 2; + maxTop := Targ.Y - cHHRadius * 2; while not TestColl(Targ.X, maxTop, cHHRadius) and (maxTop > topY + cHHRadius * 2 + 1) do dec(maxTop, cHHRadius*2); if not TestColl(Targ.X, maxTop + cHHRadius, cHHRadius) then begin @@ -701,7 +675,7 @@ end else begin failNum := 0; - repeat + repeat i := random(bonuses.Count); inc(failNum); until not TestColl(bonuses.ar[i].X, bonuses.ar[i].Y - cHHRadius - bonuses.ar[i].Radius, cHHRadius) or (failNum = bonuses.Count*2); diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uAIMisc.pas --- a/hedgewars/uAIMisc.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uAIMisc.pas Wed Oct 27 14:02:20 2010 +0200 @@ -76,7 +76,7 @@ var friendlyfactor: LongInt = 300; KnownExplosion: record X, Y, Radius: LongInt - end = (X: 0; Y: 0; Radius: 0); + end = (X: 0; Y: 0; Radius: 0); procedure FillTargets; var i, t: Longword; @@ -195,7 +195,7 @@ MeX:= hwRound(Me^.X); MeY:= hwRound(Me^.Y); // We are still inside the hog. Skip radius test - if ((((x-MeX)*(x-MeX)) + ((y-MeY)*(y-MeY))) < 256) and + if ((((x-MeX)*(x-MeX)) + ((y-MeY)*(y-MeY))) < 256) and ((Land[y, x] and $FF00) = 0) then exit(false); end; exit(TestColl(x, y, r)) @@ -404,8 +404,8 @@ end; continue end; - if (Gear^.Message and gm_Left )<>0 then Gear^.dX:= -cLittle else - if (Gear^.Message and gm_Right )<>0 then Gear^.dX:= cLittle else exit(bRes); + if (Gear^.Message and gmLeft )<>0 then Gear^.dX:= -cLittle else + if (Gear^.Message and gmRight )<>0 then Gear^.dX:= cLittle else exit(bRes); if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then begin if not (TestCollisionXwithXYShift(Gear, _0, -6, hwSign(Gear^.dX)) diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uAmmos.pas --- a/hedgewars/uAmmos.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uAmmos.pas Wed Oct 27 14:02:20 2010 +0200 @@ -42,16 +42,18 @@ procedure DisableSomeWeapons; procedure ResetWeapons; function GetAmmoByNum(num: Longword): PHHAmmo; +function GetAmmoEntry(var Hedgehog: THedgehog): PAmmo; var shoppa: boolean; + StoreCnt: Longword; implementation -uses uMisc, uGears, uWorld, uLocale, uConsole; +uses uMisc, uGears, uWorld, uLocale, uConsole, uMobile; type TAmmoCounts = array[TAmmoType] of Longword; var StoresList: array[0..Pred(cMaxHHs)] of PHHAmmo; - StoreCnt: Longword; ammoLoadout, ammoProbability, ammoDelay, ammoReinforcement: shortstring; + InitialCounts: array[0..Pred(cMaxHHs)] of TAmmoCounts; procedure FillAmmoStore(Ammo: PHHAmmo; var cnts: TAmmoCounts); var mi: array[0..cMaxSlotIndex] of byte; @@ -67,21 +69,19 @@ begin TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true); Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo; - - Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= cnts[a]; - Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].InitialCount:= cnts[a]; - - if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then - Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE; + with Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]] do + begin + Count:= cnts[a]; + if (TotalRounds < 0) and ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then Count:= AMMO_INFINITE; + end; inc(mi[Ammoz[a].Slot]) end - else if (TotalRounds < 0) and ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then + else if (TotalRounds < 0) and ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then begin TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true); Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo; Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE; - Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].InitialCount:= 0; inc(mi[Ammoz[a].Slot]) end @@ -99,7 +99,7 @@ // FIXME - TEMPORARY hardcoded check on shoppa pending creation of crate *type* probability editor substr:= Copy(ammoLoadout,1,15); -if (substr = '000000990000009') or +if (substr = '000000990000009') or (substr = '000000990000000') then shoppa:= true; @@ -137,16 +137,16 @@ end; ammos[a]:= cnt; - if ((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0) and (Ammoz[a].SkipTurns = 0) and (a <> amTeleport) and (a <> amSkip) then + if ((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0) and (Ammoz[a].SkipTurns = 0) and (a <> amTeleport) and (a <> amSkip) then Ammoz[a].SkipTurns:= 1; if ((GameFlags and gfPlaceHog) <> 0) and - (a <> amTeleport) and (a <> amSkip) and + (a <> amTeleport) and (a <> amSkip) and (Ammoz[a].SkipTurns < 10000) then inc(Ammoz[a].SkipTurns,10000) - end else - ammos[a]:= AMMO_INFINITE + end + else ammos[a]:= AMMO_INFINITE; + InitialCounts[Pred(StoreCnt)][a]:= ammos[a]; end; - FillAmmoStore(StoresList[Pred(StoreCnt)], ammos) end; @@ -156,6 +156,18 @@ exit(StoresList[num]) end; +function GetAmmoEntry(var Hedgehog: THedgehog): PAmmo; +var ammoidx, slot: LongWord; +begin +with Hedgehog do + begin + slot:= Ammoz[CurAmmoType].Slot; + ammoidx:= 0; + while (ammoidx < cMaxSlotAmmoIndex) and (Ammo^[slot, ammoidx].AmmoType <> CurAmmoType) do inc(ammoidx); + GetAmmoEntry:= @Ammo^[slot, ammoidx]; + end +end; + procedure AssignStores; var t: LongInt; i: Longword; @@ -165,7 +177,10 @@ begin for i:= 0 to cMaxHHIndex do if Hedgehogs[i].Gear <> nil then + begin Hedgehogs[i].Ammo:= GetAmmoByNum(Hedgehogs[i].AmmoStore); + Hedgehogs[i].CurAmmoType:= amNothing; + end end end; @@ -213,21 +228,26 @@ end; procedure OnUsedAmmo(var Hedgehog: THedgehog); +var CurWeapon: PAmmo; begin +CurWeapon:= GetAmmoEntry(Hedgehog); with Hedgehog do begin + MultiShootAttacks:= 0; - with Ammo^[CurSlot, CurAmmo] do + with CurWeapon^ do if Count <> AMMO_INFINITE then begin dec(Count); if Count = 0 then begin - PackAmmo(Ammo, CurSlot); - SwitchNotHeldAmmo(Hedgehog) + PackAmmo(Ammo, Ammoz[AmmoType].Slot); + //SwitchNotHeldAmmo(Hedgehog); + CurAmmoType:= amNothing end end - end + end; +perfExt_AmmoUpdate; end; function HHHasAmmo(var Hedgehog: THedgehog; Ammo: TAmmoType): boolean; @@ -264,33 +284,37 @@ end; procedure SwitchToFirstLegalAmmo(var Hedgehog: THedgehog); +var slot, ammoidx: LongWord; begin with Hedgehog do begin - CurAmmo:= 0; - CurSlot:= 0; - while (CurSlot <= cMaxSlotIndex) and - ((Ammo^[CurSlot, CurAmmo].Count = 0) or - (Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber >= 0)) + CurAmmoType:= amNothing; + slot:= 0; + ammoidx:= 0; + while (slot <= cMaxSlotIndex) and + ((Ammo^[slot, ammoidx].Count = 0) or + (Ammoz[Ammo^[slot, ammoidx].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber >= 0)) do begin - while (CurAmmo <= cMaxSlotAmmoIndex) and - ((Ammo^[CurSlot, CurAmmo].Count = 0) or - (Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber >= 0)) - do inc(CurAmmo); + while (ammoidx <= cMaxSlotAmmoIndex) and + ((Ammo^[slot, ammoidx].Count = 0) or + (Ammoz[Ammo^[slot, ammoidx].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber >= 0)) + do inc(ammoidx); - if (CurAmmo > cMaxSlotAmmoIndex) then + if (ammoidx > cMaxSlotAmmoIndex) then begin - CurAmmo:= 0; - inc(CurSlot) + ammoidx:= 0; + inc(slot) end end; - TryDo(CurSlot <= cMaxSlotIndex, 'Ammo slot index overflow', true) + TryDo(slot <= cMaxSlotIndex, 'Ammo slot index overflow', true); + CurAmmoType:= Ammo^[slot, ammoidx].AmmoType; end end; procedure ApplyAmmoChanges(var Hedgehog: THedgehog); var s: shortstring; + CurWeapon: PAmmo; begin TargetPoint.X:= NoPointX; @@ -298,13 +322,16 @@ begin Timer:= 10; - if (Ammo^[CurSlot, CurAmmo].Count = 0) then + CurWeapon:= GetAmmoEntry(Hedgehog); + + if (CurWeapon^.Count = 0) then SwitchToFirstLegalAmmo(Hedgehog); - //bad things could happen here in case CurSlot is overflowing - ApplyAngleBounds(Hedgehog, Ammo^[CurSlot, CurAmmo].AmmoType); + CurWeapon:= GetAmmoEntry(Hedgehog); - with Ammo^[CurSlot, CurAmmo] do + ApplyAngleBounds(Hedgehog, CurWeapon^.AmmoType); + + with CurWeapon^ do begin if AmmoType <> amNothing then begin @@ -323,19 +350,19 @@ Gear^.State:= Gear^.State and not gstHHChooseTarget; isCursorVisible:= false end; - if (CurAmmoGear <> nil) and ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) <> 0) then - ShowCrosshair:= (CurAmmoGear^.Ammo^.Propz and ammoprop_NoCrossHair) = 0 + if (CurAmmoGear <> nil) and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) <> 0) then + ShowCrosshair:= (Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_NoCrossHair) = 0 else ShowCrosshair:= (Propz and ammoprop_NoCrosshair) = 0; end - end + end; end; procedure SwitchNotHeldAmmo(var Hedgehog: THedgehog); begin with Hedgehog do - if ((Ammo^[CurSlot, CurAmmo].Propz and ammoprop_DontHold) <> 0) or - (Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber >= 0) then + if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_DontHold) <> 0) or + (Ammoz[CurAmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber >= 0) then SwitchToFirstLegalAmmo(Hedgehog); end; @@ -353,10 +380,10 @@ begin for a:= 0 to cMaxSlotAmmoIndex do with StoresList[i]^[slot, a] do - if (Propz and ammoprop_NotBorder) <> 0 then + if (Propz and ammoprop_NotBorder) <> 0 then begin Count:= 0; - InitialCount:= 0 + InitialCounts[i][AmmoType]:= 0 end; PackAmmo(StoresList[i], slot) @@ -388,20 +415,17 @@ // Restore indefinitely disabled weapons and initial weapon counts. Only used for hog placement right now procedure ResetWeapons; -var i, slot, a: Longword; - t: TAmmoType; +var i, t: Longword; + a: TAmmoType; begin -for i:= 0 to Pred(StoreCnt) do - for slot:= 0 to cMaxSlotIndex do - begin - for a:= 0 to cMaxSlotAmmoIndex do - with StoresList[i]^[slot, a] do - Count:= InitialCount; +for t:= 0 to Pred(TeamsCount) do + with TeamsArray[t]^ do + for i:= 0 to cMaxHHIndex do + if Hedgehogs[i].Gear <> nil then + FillAmmoStore(Hedgehogs[i].Ammo, InitialCounts[Hedgehogs[i].AmmoStore]); - PackAmmo(StoresList[i], slot) - end; -for t:= Low(TAmmoType) to High(TAmmoType) do - if Ammoz[t].SkipTurns >= 10000 then dec(Ammoz[t].SkipTurns,10000); +for a:= Low(TAmmoType) to High(TAmmoType) do + if Ammoz[a].SkipTurns >= 10000 then dec(Ammoz[a].SkipTurns,10000) end; procedure initModule; @@ -411,7 +435,8 @@ ammoLoadout:= ''; ammoProbability:= ''; ammoDelay:= ''; - ammoReinforcement:= '' + ammoReinforcement:= ''; + FillChar(InitialCounts, sizeof(InitialCounts), 0) end; procedure freeModule; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uChat.pas --- a/hedgewars/uChat.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uChat.pas Wed Oct 27 14:02:20 2010 +0200 @@ -29,7 +29,7 @@ procedure DrawChat; procedure KeyPressChat(Key: Longword); -var UserNick: shortstring; +var UserNick: shortstring = ''; ChatReady: boolean; showAll: boolean; @@ -253,11 +253,6 @@ ParseCommand('/taunt ' + char(i), true); exit end; - if (s = '/newgrave') then - begin - ParseCommand('/newgrave', true); - exit - end; end else ParseCommand('/say ' + s, true); @@ -316,7 +311,6 @@ begin lastStr:= 0; visibleCount:= 0; - UserNick:= ''; showAll:= false; ChatReady:= false; missedCount:= 0; @@ -324,7 +318,7 @@ procedure freeModule; begin - + UserNick:= ''; end; end. diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uCollisions.pas --- a/hedgewars/uCollisions.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uCollisions.pas Wed Oct 27 14:02:20 2010 +0200 @@ -387,7 +387,7 @@ for i:= 0 to 8 do begin // using mx,my as temporary value buffer here - + jfr:= 8+li+1; jto:= 8+li-1; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uConsole.pas --- a/hedgewars/uConsole.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uConsole.pas Wed Oct 27 14:02:20 2010 +0200 @@ -37,7 +37,7 @@ procedure doPut(putX, putY: LongInt; fromAI: boolean); implementation -uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uWorld, +uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uWorld, uMobile, uRandom, uAmmos, uStats, uChat, SDLh, uSound, uVisualGears, uScript; const cLineWidth: LongInt = 0; @@ -89,10 +89,11 @@ var Len: LongInt; done: boolean; begin +{$IFNDEF NOCONSOLE} {$IFDEF DEBUGFILE}AddFileLog('Console write: ' + s);{$ENDIF} Write(s); done:= false; - + while not done do begin Len:= cLineWidth - Length(ConsoleLines[CurrLine].s); @@ -106,16 +107,19 @@ end; done:= (Length(s) = 0); end; +{$ENDIF} end; procedure WriteLnToConsole(s: shortstring); begin +{$IFNDEF NOCONSOLE} WriteToConsole(s); WriteLn; inc(CurrLine); if CurrLine = cLinesCount then CurrLine:= 0; PByte(@ConsoleLines[CurrLine].s)^:= 0 +{$ENDIF} end; procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean); @@ -190,11 +194,11 @@ procedure StopMessages(Message: Longword); begin -if (Message and gm_Left) <> 0 then ParseCommand('/-left', true) else -if (Message and gm_Right) <> 0 then ParseCommand('/-right', true) else -if (Message and gm_Up) <> 0 then ParseCommand('/-up', true) else -if (Message and gm_Down) <> 0 then ParseCommand('/-down', true) else -if (Message and gm_Attack) <> 0 then ParseCommand('/-attack', true) +if (Message and gmLeft) <> 0 then ParseCommand('/-left', true) else +if (Message and gmRight) <> 0 then ParseCommand('/-right', true) else +if (Message and gmUp) <> 0 then ParseCommand('/-up', true) else +if (Message and gmDown) <> 0 then ParseCommand('/-down', true) else +if (Message and gmAttack) <> 0 then ParseCommand('/-attack', true) end; {$INCLUDE "CCHandlers.inc"} @@ -204,14 +208,17 @@ CurrLine:= 0; Variables:= nil; isDeveloperMode:= true; - + // initConsole cLineWidth:= cScreenWidth div 10; if cLineWidth > 255 then cLineWidth:= 255; - for i:= 0 to Pred(cLinesCount) do + for i:= 0 to Pred(cLinesCount) do PByte(@ConsoleLines[i])^:= 0; - + + // NOTE: please, keep most frequently used commands on bottom + RegisterVariable('flag' , vtCommand, @chFlag , false); + RegisterVariable('script' , vtCommand, @chScript , false); RegisterVariable('proto' , vtCommand, @chCheckProto , true ); RegisterVariable('spectate', vtBoolean, @fastUntilLag , false); RegisterVariable('capture' , vtCommand, @chCapture , true ); @@ -225,6 +232,7 @@ RegisterVariable('mapgen' , vtLongInt, @cMapGen , false); RegisterVariable('maze_size',vtLongInt, @cMazeSize , false); RegisterVariable('delay' , vtLongInt, @cInactDelay , false); + RegisterVariable('ready' , vtLongInt, @cReadyDelay , false); RegisterVariable('casefreq', vtLongInt, @cCaseFactor , false); RegisterVariable('sd_turns', vtLongInt, @cSuddenDTurns , false); RegisterVariable('damagepct',vtLongInt, @cDamagePercent , false); @@ -257,7 +265,6 @@ RegisterVariable('skip' , vtCommand, @chSkip , false); RegisterVariable('history' , vtCommand, @chHistory , true ); RegisterVariable('chat' , vtCommand, @chChat , true ); - RegisterVariable('newgrave', vtCommand, @chNewGrave , false); RegisterVariable('say' , vtCommand, @chSay , true ); RegisterVariable('hogsay' , vtCommand, @chHogSay , true ); RegisterVariable('team' , vtCommand, @chTeamSay , true ); @@ -298,8 +305,6 @@ RegisterVariable('-cur_l' , vtCommand, @chCurL_m , true ); RegisterVariable('+cur_r' , vtCommand, @chCurR_p , true ); RegisterVariable('-cur_r' , vtCommand, @chCurR_m , true ); - RegisterVariable('flag' , vtCommand, @chFlag , false); - RegisterVariable('script' , vtCommand, @chScript , false); end; procedure freeModule; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uConsts.pas Wed Oct 27 14:02:20 2010 +0200 @@ -33,14 +33,14 @@ HwColor4f = record r, g, b, a: byte end; - + TGameState = (gsLandGen, gsStart, gsGame, gsChat, gsConfirm, gsExit); TGameType = (gmtLocal, gmtDemo, gmtNet, gmtSave, gmtLandPreview, gmtSyntax); TPathType = (ptNone, ptData, ptGraphics, ptThemes, ptCurrTheme, ptTeams, ptMaps, ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts, - ptLocale, ptAmmoMenu, ptHedgehog, ptVoices, ptHats, ptFlags); + ptLocale, ptAmmoMenu, ptHedgehog, ptVoices, ptHats, ptFlags, ptMissionMaps); TSprite = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame, sprLag, sprArrow, sprGrenade, sprTargetP, sprBee, @@ -71,11 +71,12 @@ sprAmTeleport, sprSplash, sprDroplet, sprBirdy, sprHandCake, sprHandConstruction, sprHandGrenade, sprHandMelon, sprHandMortar, sprHandSkip, sprHandCluster, sprHandDynamite, sprHandHellish, sprHandMine, sprHandSeduction, sprHandVamp, - sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg, sprTargetBee, sprHandBee, + sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg, sprTargetBee, sprHandBee, sprFeather, sprPiano, sprHandSineGun, sprPortalGun, sprPortal, - sprCheese, sprHandCheese, sprHandFlamethrower + sprCheese, sprHandCheese, sprHandFlamethrower, sprChunk, sprNote, + sprSMineOff, sprSMineOn, sprHandSMine, sprHammer, sprHandResurrector ); - + // Gears that interact with other Gears and/or Land TGearType = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtGrave, gtBee, // 4 gtShotgunShot, gtPickHammer, gtRope, gtMine, gtCase, // 9 @@ -86,7 +87,8 @@ gtWhip, gtKamikaze, gtCake, gtSeduction, gtWatermelon, gtMelonPiece, // 34 gtHellishBomb, gtWaterUp, gtDrill, gtBallGun, gtBall, gtRCPlane, // 40 gtSniperRifleShot, gtJetpack, gtMolotov, gtExplosives, gtBirdy, // 45 - gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower); // 51 + gtEgg, gtPortal, gtPiano, gtGasBomb, gtSineGunShot, gtFlamethrower, // 51 + gtSMine, gtPoisonCloud, gtHammer, gtHammerHit, gtResurrector); // Gears that are _only_ of visual nature (e.g. background stuff, visual effects, speechbubbles, etc.) TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire, @@ -94,7 +96,7 @@ vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtHealth, vgtShell, vgtDust, vgtSplash, vgtDroplet, vgtSmokeRing, vgtBeeTrace, vgtEgg, vgtFeather, vgtHealthTag, vgtSmokeTrace, vgtEvilTrace, vgtExplosion, - vgtBigExplosion); + vgtBigExplosion, vgtChunk, vgtNote); TGearsType = set of TGearType; @@ -120,24 +122,29 @@ sndMelonImpact, sndDroplet1, sndDroplet2, sndDroplet3, sndEggBreak, sndDrillRocket, sndPoisonCough, sndPoisonMoan, sndBirdyLay, sndWhistle, sndBeeWater, sndPiano0, sndPiano1, sndPiano2, sndPiano3, sndPiano4, sndPiano5, sndPiano6, sndPiano7, sndPiano8, - sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3); + sndSkip, sndSineGun, sndOoff1, sndOoff2, sndOoff3, sndWhack, + sndComeonthen, sndParachute, sndBump, sndResurrector); - TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, - amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, - amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, - amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake, - amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, - amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, - amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, - amPiano, amGasBomb, amSineGun, amFlamethrower); + TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amBee, amShotgun, amPickHammer, // 6 + amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip, // 13 + amBaseballBat, amParachute, amAirAttack, amMineStrike, amBlowTorch, // 18 + amGirder, amTeleport, amSwitch, amMortar, amKamikaze, amCake, // 24 + amSeduction, amWatermelon, amHellishBomb, amNapalm, amDrill, amBallgun, // 30 + amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35 + amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42 + amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48 + amResurrector); - THWFont = (fnt16, fntBig, fntSmall, CJKfnt16, CJKfntBig, CJKfntSmall); + TCrateType = (HealthCrate, AmmoCrate, UtilityCrate); + + THWFont = (fnt16, fntBig, fntSmall {$IFNDEF IPHONEOS}, CJKfnt16, CJKfntBig, CJKfntSmall{$ENDIF}); TCapGroup = (capgrpGameState, capgrpAmmoinfo, capgrpVolume, capgrpMessage, capgrpAmmostate); TStatInfoType = (siGameResult, siMaxStepDamage, siMaxStepKills, siKilledHHs, - siClanHealth, siTeamStats); + siClanHealth, siTeamStats, siPlayerKills, siMaxTeamDamage, + siMaxTeamKills, siMaxTurnSkips ); TWave = (waveRollup, waveSad, waveWave, waveHurrah, waveLemonade, waveShrug, waveJuggle); @@ -157,7 +164,6 @@ Count: LongWord; (* Using for place hedgehogs mode, but for any other situation where the initial count would be needed I guess. For example, say, a mode where the weaponset is reset each turn, or on sudden death *) - InitialCount: LongWord; NumPerTurn: LongWord; Timer: LongWord; Pos: LongWord; @@ -183,10 +189,12 @@ PrevTexture, NextTexture: PTexture; end; - THogEffect = (heInvulnerable, hePoisoned); + THogEffect = (heInvulnerable, heResurrectable, hePoisoned); TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite); -const sfMax = 1000; +const + sfMax = 1000; + cDefaultParamNum = 17; // message constants errmsgCreateSurface = 'Error creating SDL surface'; @@ -196,7 +204,6 @@ errmsgIncorrectUse = 'Incorrect use'; errmsgShouldntRun = 'This program shouldn''t be run manually'; errmsgWrongNumber = 'Wrong parameters number'; - errmsgSlotsOverflow = 'CurSlot overflowed'; msgLoading = 'Loading '; msgOK = 'ok'; @@ -223,8 +230,8 @@ rqLowRes = $00000001; // use half land array rqBlurryLand = $00000002; // downscaled terrain rqNoBackground= $00000004; // don't draw background - rqSimpleRope = $00000008; // avoid drawing rope - rq2DWater = $00000010; // disabe 3D water effect + rqSimpleRope = $00000008; // draw rope using lines only + rq2DWater = $00000010; // disable 3D water effect rqFancyBoom = $00000020; // no fancy explosion effects rqKillFlakes = $00000040; // no flakes rqSlowMenu = $00000080; // ammomenu appears with no animation @@ -259,13 +266,13 @@ cPowerDivisor = 1500; MAXNAMELEN = 192; - + // some opengl headers do not have these macros GL_BGR = $80E0; GL_BGRA = $80E1; GL_CLAMP_TO_EDGE = $812F; GL_TEXTURE_PRIORITY = $8066; - + cSendCursorPosTime : LongWord = 50; cVisibleWater : LongInt = 128; cCursorEdgesDist : LongInt = 100; @@ -301,7 +308,9 @@ cKeyMaxIndex = 1023; + // do not change this value cDefaultZoomLevel = 2.0; + {$IFDEF IPHONEOS} cMaxZoomLevel = 0.5; cMinZoomLevel = 3.5; @@ -313,8 +322,6 @@ {$ENDIF} cSendEmptyPacketTime = 1000; - - // from uTriggers trigTurns = $80000001; // Training Flags @@ -324,28 +331,31 @@ tfSpawnTargets = $00000004; tfIgnoreDelays = $00000008; tfTargetRespawn = $00000010; - - gfAny = $FFFFFFFF; - gfForts = $00000001; - gfMultiWeapon = $00000002; - gfSolidLand = $00000004; - gfBorder = $00000008; - gfDivideTeams = $00000010; - gfLowGravity = $00000020; - gfLaserSight = $00000040; - gfInvulnerable = $00000080; - gfMines = $00000100; - gfVampiric = $00000200; - gfKarma = $00000400; - gfArtillery = $00000800; - gfOneClanMode = $00001000; - gfRandomOrder = $00002000; - gfKing = $00004000; - gfPlaceHog = $00008000; - gfSharedAmmo = $00010000; - gfDisableGirders = $00020000; - gfExplosives = $00040000; - gfDisableLandObjects = $00080000; + + gfAny = $FFFFFFFF; + gfOneClanMode = $00000001; // used in trainings + gfMultiWeapon = $00000002; // used in trainings + gfSolidLand = $00000004; + gfBorder = $00000008; + gfDivideTeams = $00000010; + gfLowGravity = $00000020; + gfLaserSight = $00000040; + gfInvulnerable = $00000080; + gfMines = $00000100; // redundant? same effect as 'landadds 0' + gfVampiric = $00000200; + gfKarma = $00000400; + gfArtillery = $00000800; + gfForts = $00001000; + gfRandomOrder = $00002000; + gfKing = $00004000; + gfPlaceHog = $00008000; + gfSharedAmmo = $00010000; + gfDisableGirders = $00020000; + gfDisableLandObjects = $00040000; + gfAISurvival = $00080000; + gfInfAttack = $00100000; + gfResetWeps = $00200000; + gfPerHogAmmo = $00400000; // NOTE: When adding new game flags, ask yourself // if a "game start notice" would be useful. If so, // add one in uWorld.pas - look for "AddGoal". @@ -370,21 +380,21 @@ gstLoser = $00080000; gstHHGone = $00100000; - gm_Left = $00000001; - gm_Right = $00000002; - gm_Up = $00000004; - gm_Down = $00000008; - gm_Switch = $00000010; - gm_Attack = $00000020; - gm_LJump = $00000040; - gm_HJump = $00000080; - gm_Destroy= $00000100; - gm_Slot = $00000200; // with param - gm_Weapon = $00000400; // with param - gm_Timer = $00000800; // with param - gm_Animate= $00001000; // with param - gm_Precise= $00002000; - gmAllStoppable = gm_Left or gm_Right or gm_Up or gm_Down or gm_Attack or gm_Precise; + gmLeft = $00000001; + gmRight = $00000002; + gmUp = $00000004; + gmDown = $00000008; + gmSwitch = $00000010; + gmAttack = $00000020; + gmLJump = $00000040; + gmHJump = $00000080; + gmDestroy= $00000100; + gmSlot = $00000200; // with param + gmWeapon = $00000400; // with param + gmTimer = $00000800; // with param + gmAnimate= $00001000; // with param + gmPrecise= $00002000; + gmAllStoppable = gmLeft or gmRight or gmUp or gmDown or gmAttack or gmPrecise; cMaxSlotIndex = 9; cMaxSlotAmmoIndex = 5; @@ -403,7 +413,7 @@ ammoprop_Utility = $00001000; ammoprop_Effect = $00002000; ammoprop_NoRoundEndHint=$10000000; - + AMMO_INFINITE = 100; EXPLAllDamageInRadius = $00000001; @@ -413,6 +423,7 @@ EXPLDontDraw = $00000010; EXPLNoGfx = $00000020; EXPLPoisoned = $00000040; + EXPLDoNotTouchAny = $00000080; posCaseAmmo = $00000001; posCaseHealth = $00000002; @@ -427,11 +438,11 @@ htName = $02; htHealth = $04; htTransparent = $08; - + cHHFileName = 'Hedgehog'; cCHFileName = 'Crosshair'; cThemeCFGFilename = 'theme.cfg'; - + FontBorder = 2; cPathz: array[TPathType] of shortstring = ( '', // ptNone @@ -452,19 +463,10 @@ 'Graphics/Hedgehog', // ptHedgehog 'Sounds/voices', // ptVoices 'Graphics/Hats', // ptHats - 'Graphics/Flags' // ptFlags + 'Graphics/Flags', // ptFlags + 'Missions/Maps' // ptMissionMaps ); - -var PathPrefix: shortstring = './'; - Pathz: array[TPathType] of shortstring; - CountTexz: array[1..Pred(AMMO_INFINITE)] of PTexture; - LAND_WIDTH :longint; - LAND_HEIGHT :longint; - LAND_WIDTH_MASK :longWord; - LAND_HEIGHT_MASK :longWord; - cMaxCaptions : LongInt; -const cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13); cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0); @@ -480,7 +482,8 @@ (Handle: nil; Height: 10; style: TTF_STYLE_NORMAL; - Name: 'DejaVuSans-Bold.ttf'), + Name: 'DejaVuSans-Bold.ttf') + {$IFNDEF IPHONEOS}, // remove chinese fonts for now (Handle: nil; Height: 12; style: TTF_STYLE_NORMAL; @@ -493,6 +496,7 @@ Height: 10; style: TTF_STYLE_NORMAL; Name: 'wqy-zenhei.ttc') + {$ENDIF} ); SpritesData: array[TSprite] of record @@ -725,7 +729,7 @@ Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprJetpack (FileName: 'Health'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpHigh; getDimensions: false; getImageDimensions: true),// sprHealth - (FileName: 'amMolotov'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; + (FileName: 'amMolotov'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),//sprHandMolotov (FileName: 'Molotov'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprMolotov @@ -800,8 +804,24 @@ (FileName: 'amCheese'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandCheese (FileName: 'amFlamethrower'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true) // sprHandFlamethrower - ); + Width: 128; Height: 128; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandFlamethrower + (FileName: 'Chunk'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil; + Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprChunk + (FileName: 'Note'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; + Width: 32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprNote + (FileName: 'SMineOff'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; + Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSMineOff + (FileName: 'SMineOn'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; + Width: 8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSMineOn + (FileName: 'amSMine'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; + Width: 64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHandSMine + (FileName: 'amHammer'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; + Width: 128; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; priority: tpMedium; getDimensions: false; getImageDimensions: true), // sprWhip + (FileName: 'amResurrector'; Path: ptHedgehog; AltPath: ptNone; + Texture: nil; Surface: nil; Width: 32; Height: 32; + imageWidth: 0; imageHeight: 0; saveSurf: false; priority: + tpMedium; getDimensions: false; getImageDimensions: true) + ); // sprHandResurrector Wavez: array [TWave] of record Sprite: TSprite; @@ -908,7 +928,7 @@ (FileName: 'Droplet2.ogg'; Path: ptSounds),// sndDroplet2 (FileName: 'Droplet3.ogg'; Path: ptSounds),// sndDroplet3 (FileName: 'egg.ogg'; Path: ptSounds),// sndEggBreak - (FileName: 'pickhammer.ogg'; Path: ptSounds),// sndDrillRocket + (FileName: 'drillgun.ogg'; Path: ptSounds),// sndDrillRocket (FileName: 'PoisonCough.ogg'; Path: ptVoices),// sndPoisonCough (FileName: 'PoisonMoan.ogg'; Path: ptVoices),// sndPoisonMoan (FileName: 'BirdyLay.ogg'; Path: ptSounds),// sndBirdyLay @@ -927,7 +947,12 @@ (FileName: 'shotgunfire.ogg'; Path: ptSounds),// sndSineGun (FileName: 'Ooff1.ogg'; Path: ptVoices),// sndOoff1 (FileName: 'Ooff2.ogg'; Path: ptVoices),// sndOoff2 - (FileName: 'Ooff3.ogg'; Path: ptVoices) // sndOoff3 + (FileName: 'Ooff3.ogg'; Path: ptVoices),// sndOoff3 + (FileName: 'whipcrack.ogg'; Path: ptSounds),// sndWhack + (FileName: 'Comeonthen.ogg'; Path: ptVoices),// sndComeonthen + (FileName: 'parachute.ogg'; Path: ptSounds),// sndParachute + (FileName: 'bump.ogg'; Path: ptSounds),// sndBump + (FileName: 'hogchant3.ogg'; Path: ptSounds) // sndResurrector ); Ammoz: array [TAmmoType] of record @@ -950,7 +975,6 @@ NumberInCase: 0; Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_DontHold or ammoprop_Effect; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -974,7 +998,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 0; Timer: 3000; Pos: 0; @@ -998,7 +1021,6 @@ NumberInCase: 3; Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse; Count: 5; - InitialCount: 5; NumPerTurn: 0; Timer: 3000; Pos: 0; @@ -1022,7 +1044,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_Power or ammoprop_AltUse; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1046,7 +1067,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_Power or ammoprop_NeedTarget or ammoprop_DontHold; Count: 2; - InitialCount: 2; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1070,7 +1090,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_ForwMsgs; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 1; Timer: 0; Pos: 0; @@ -1094,7 +1113,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_AttackInMove or ammoprop_NoCrosshair or ammoprop_DontHold; Count: 2; - InitialCount: 2; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1118,7 +1136,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_DontHold; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1146,7 +1163,6 @@ ammoprop_Utility or ammoprop_AltAttack; Count: 5; - InitialCount: 5; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1170,7 +1186,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_AttackInMove or ammoprop_DontHold or ammoprop_AltUse; Count: 2; - InitialCount: 2; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1194,7 +1209,6 @@ NumberInCase: 2; Ammo: (Propz: 0; Count: 3; - InitialCount: 3; NumPerTurn: 3; Timer: 0; Pos: 0; @@ -1218,7 +1232,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_AttackInMove or ammoprop_DontHold or ammoprop_AltUse; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1242,7 +1255,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_ForwMsgs or ammoprop_AttackInMove; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1266,7 +1278,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_NoCrosshair; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1290,7 +1301,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_DontHold; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1320,7 +1330,6 @@ ammoprop_Utility or ammoprop_AltAttack; Count: 2; - InitialCount: 2; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1348,7 +1357,6 @@ ammoprop_DontHold or ammoprop_NotBorder; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1376,7 +1384,6 @@ ammoprop_DontHold or ammoprop_NotBorder; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1400,7 +1407,6 @@ NumberInCase: 2; Ammo: (Propz: ammoprop_ForwMsgs; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1428,7 +1434,6 @@ ammoprop_Utility or ammoprop_AttackingPut; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1457,7 +1462,6 @@ ammoprop_Utility or ammoprop_DontHold; Count: 2; - InitialCount: 2; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1485,7 +1489,6 @@ ammoprop_Utility or ammoprop_DontHold; Count: 3; - InitialCount: 3; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1509,7 +1512,6 @@ NumberInCase: 4; Ammo: (Propz: 0; Count: 4; - InitialCount: 4; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1533,7 +1535,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold or ammoprop_AttackInMove; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1557,7 +1558,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_NoCrosshair or ammoprop_DontHold; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1581,7 +1581,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1605,7 +1604,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse; Count: 0; - InitialCount: 0; NumPerTurn: 0; Timer: 3000; Pos: 0; @@ -1629,7 +1627,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_Power or ammoprop_AltUse; Count: 0; - InitialCount: 0; NumPerTurn: 0; Timer: 5000; Pos: 0; @@ -1657,7 +1654,6 @@ ammoprop_DontHold or ammoprop_NotBorder; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1681,7 +1677,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_Power or ammoprop_AltUse; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1705,7 +1700,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 0; Timer: 5001; Pos: 0; @@ -1731,7 +1725,6 @@ ammoprop_DontHold or ammoprop_AltAttack}; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1760,7 +1753,6 @@ ammoprop_Utility or ammoprop_Effect; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1789,7 +1781,6 @@ ammoprop_Utility or ammoprop_Effect; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1818,7 +1809,6 @@ ammoprop_Utility or ammoprop_Effect; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1847,7 +1837,6 @@ ammoprop_Utility or ammoprop_Effect; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1876,7 +1865,6 @@ ammoprop_Utility or ammoprop_Effect; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1905,7 +1893,6 @@ ammoprop_Utility or ammoprop_Effect; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1929,7 +1916,6 @@ NumberInCase: 2; Ammo: (Propz: 0; Count: 2; - InitialCount: 2; NumPerTurn: 1; Timer: 0; Pos: 0; @@ -1959,7 +1945,6 @@ ammoprop_Utility or ammoprop_AltAttack; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -1983,7 +1968,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_Power or ammoprop_AltUse; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 0; Timer: 3000; Pos: 0; @@ -2009,7 +1993,6 @@ ammoprop_NoCrosshair or ammoprop_DontHold; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -2036,7 +2019,6 @@ ammoprop_DontHold or ammoprop_Utility; Count: 1; - InitialCount: 1; NumPerTurn: 3; Timer: 0; Pos: 0; @@ -2064,7 +2046,6 @@ ammoprop_DontHold or ammoprop_NotBorder; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -2088,7 +2069,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_Timerable or ammoprop_Power or ammoprop_AltUse; Count: AMMO_INFINITE; - InitialCount: AMMO_INFINITE; NumPerTurn: 0; Timer: 3000; Pos: 0; @@ -2104,7 +2084,7 @@ PosSprite: sprWater; ejectX: 0; ejectY: 0), - + // SineGun (NameId: sidSineGun; NameTex: nil; @@ -2112,7 +2092,6 @@ NumberInCase: 2; Ammo: (Propz: ammoprop_AttackInMove; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 0; Pos: 0; @@ -2136,7 +2115,6 @@ NumberInCase: 1; Ammo: (Propz: ammoprop_ForwMsgs or ammoprop_DontHold; Count: 1; - InitialCount: 1; NumPerTurn: 0; Timer: 5001; Pos: 0; @@ -2151,8 +2129,77 @@ PosCount: 1; PosSprite: sprWater; ejectX: 0; //20; - ejectY: -3) - ); + ejectY: -3), + +// Sticky Mine + (NameId: sidSMine; + NameTex: nil; + Probability: 100; + NumberInCase: 1; + Ammo: (Propz: ammoprop_Power or ammoprop_AltUse; + Count: 1; + NumPerTurn: 1; + Timer: 0; + Pos: 0; + AmmoType: amSMine; + AttackVoice: sndLaugh); + Slot: 4; + TimeAfterTurn: 5000; + minAngle: 0; + maxAngle: 0; + isDamaging: true; + SkipTurns: 0; + PosCount: 1; + PosSprite: sprWater; + ejectX: 0; + ejectY: 0), + +// Hammer + (NameId: sidHammer; + NameTex: nil; + Probability: 0; + NumberInCase: 1; + Ammo: (Propz: ammoprop_NoCrosshair; + Count: 1; + NumPerTurn: 0; + Timer: 0; + Pos: 0; + AmmoType: amHammer; + AttackVoice: sndNone); + Slot: 3; + TimeAfterTurn: 1000; + MinAngle: 0; + maxAngle: 0; + isDamaging: true; + SkipTurns: 0; + PosCount: 1; + PosSprite: sprWater; + ejectX: 0; + ejectY: 0), + + (NameId: sidResurrector; + NameTex: nil; + Probability: 0; + NumberInCase: 1; + Ammo: (Propz: ammoprop_NoCrosshair or ammoprop_NoRoundEndHint; + Count: 1; + NumPerTurn: 0; + Timer: 0; + Pos: 0; + AmmoType: amResurrector; + AttackVoice: sndNone); + Slot: 8; + TimeAfterTurn: 3000; + minAngle: 0; + maxAngle: 0; + isDamaging: true; + SkipTurns: 0; + PosCount: 1; + PosSprite: sprWater; + ejectX: 0; + ejectY: 0) + ); + conversionFormat: TSDL_PixelFormat = ( @@ -2181,48 +2228,7 @@ colorkey: 0; alpha : 255 ); - -procedure initModule; -procedure freeModule; implementation -uses uMisc; - -procedure initModule; -begin - Pathz:= cPathz; - {* REFERENCE - 4096 -> $FFFFF000 - 2048 -> $FFFFF800 - 1024 -> $FFFFFC00 - 512 -> $FFFFFE00 *} - if (cReducedQuality and rqLowRes) <> 0 then - begin - LAND_WIDTH:= 2048; - LAND_HEIGHT:= 1024; - LAND_WIDTH_MASK:= $FFFFF800; - LAND_HEIGHT_MASK:= $FFFFFC00; - end - else - begin - LAND_WIDTH:= 4096; - LAND_HEIGHT:= 2048; - LAND_WIDTH_MASK:= $FFFFF000; - LAND_HEIGHT_MASK:= $FFFFF800 - end; - -{$IFDEF IPHONEOS} - if isPhone() then - cMaxCaptions:= 3 - else -{$ENDIF} - cMaxCaptions:= 4; - -end; - -procedure freeModule; -begin - PathPrefix := './'; -end; end. diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uFloat.pas --- a/hedgewars/uFloat.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uFloat.pas Wed Oct 27 14:02:20 2010 +0200 @@ -22,7 +22,6 @@ interface {$IFDEF FPC} -{$INLINE ON} {$IFDEF ENDIAN_LITTLE} type hwFloat = record isNegative: boolean; @@ -43,26 +42,26 @@ operator + (const z1, z2: hwFloat) z : hwFloat; inline; operator - (const z1, z2: hwFloat) z : hwFloat; inline; -operator - (const z1: hwFloat) z : hwFloat; +operator - (const z1: hwFloat) z : hwFloat; inline; -operator * (const z1, z2: hwFloat) z : hwFloat; +operator * (const z1, z2: hwFloat) z : hwFloat; inline; operator * (const z1: hwFloat; const z2: LongInt) z : hwFloat; inline; -operator / (const z1: hwFloat; z2: hwFloat) z : hwFloat; -operator / (const z1: hwFloat; const z2: LongInt) z : hwFloat; +operator / (const z1: hwFloat; z2: hwFloat) z : hwFloat; inline; +operator / (const z1: hwFloat; const z2: LongInt) z : hwFloat; inline; -operator < (const z1, z2: hwFloat) b : boolean; -operator > (const z1, z2: hwFloat) b : boolean; +operator < (const z1, z2: hwFloat) b : boolean; inline; +operator > (const z1, z2: hwFloat) b : boolean; inline; function cstr(const z: hwFloat): shortstring; -function hwRound(const t: hwFloat): LongInt; -function hwAbs(const t: hwFloat): hwFloat; +function hwRound(const t: hwFloat): LongInt; inline; +function hwAbs(const t: hwFloat): hwFloat; inline; function hwSqr(const t: hwFloat): hwFloat; inline; function hwSqrt(const t: hwFloat): hwFloat; inline; function Distance(const dx, dy: hwFloat): hwFloat; function DistanceI(const dx, dy: LongInt): hwFloat; function AngleSin(const Angle: Longword): hwFloat; function AngleCos(const Angle: Longword): hwFloat; -function SignAs(const num, signum: hwFloat): hwFloat; +function SignAs(const num, signum: hwFloat): hwFloat; inline; {$IFDEF FPC} {$J-} @@ -148,7 +147,7 @@ {$ENDIF} implementation -uses uMisc; +//uses uMisc; {$IFDEF FPC} @@ -348,7 +347,7 @@ function AngleSin(const Angle: Longword): hwFloat; begin {$IFDEF DEBUGFILE} -TryDo((Angle >= 0) and (Angle <= 2048), 'Sin param exceeds limits', true); +//TryDo((Angle >= 0) and (Angle <= 2048), 'Sin param exceeds limits', true); {$ENDIF} AngleSin.isNegative:= false; if Angle < 1024 then AngleSin.QWordValue:= SinTable[Angle] @@ -358,7 +357,7 @@ function AngleCos(const Angle: Longword): hwFloat; begin {$IFDEF DEBUGFILE} -TryDo((Angle >= 0) and (Angle <= 2048), 'Cos param exceeds limits', true); +//TryDo((Angle >= 0) and (Angle <= 2048), 'Cos param exceeds limits', true); {$ENDIF} AngleCos.isNegative:= Angle > 1024; if Angle < 1024 then AngleCos.QWordValue:= SinTable[1024 - Angle] diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uGame.pas --- a/hedgewars/uGame.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uGame.pas Wed Oct 27 14:02:20 2010 +0200 @@ -26,7 +26,7 @@ //////////////////// implementation //////////////////// -uses uMisc, uConsts, uKeys, uTeams, uIO, uAI, uGears, uScript; +uses uMisc, uConsts, uKeys, uTeams, uIO, uAI, uGears, uScript, uSound, uMobile; procedure DoGameTick(Lag: LongInt); var i: LongInt; @@ -65,7 +65,10 @@ SetBinds(CurrentTeam^.Binds); //CurrentHedgehog^.Gear^.Message:= 0; <- produces bugs with further save restoring and demos isSoundEnabled:= isSEBackup; - GameType:= gmtLocal + if isSoundEnabled then playMusic; + GameType:= gmtLocal; + InitIPC; + perfExt_SaveFinishedSynching(); end; end else ProcessGears diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uGears.pas --- a/hedgewars/uGears.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uGears.pas Wed Oct 27 14:02:20 2010 +0200 @@ -22,7 +22,7 @@ interface uses SDLh, uConsts, uFloat, Math; - + type PGear = ^TGear; TGearStepProcedure = procedure (Gear: PGear); @@ -32,8 +32,7 @@ AdvBounce: Longword; Invulnerable: Boolean; RenderTimer: Boolean; - Ammo : PAmmo; - AmmoType : TAmmoType; // Used to track AmmoType at time of Gear creation, since Ammo can be reassigned + AmmoType : TAmmoType; State : Longword; X : hwFloat; Y : hwFloat; @@ -63,6 +62,7 @@ SoundChannel: LongInt; PortalCounter: LongWord // Hopefully temporary, but avoids infinite portal loops in a guaranteed fashion. end; + TPGearArray = Array of PGear; var AllInactive: boolean; PrvInactive: boolean; @@ -77,10 +77,12 @@ PlacingHogs: boolean; // a convenience flag to indicate placement of hogs is still in progress StepSoundTimer: LongInt; StepSoundChannel: LongInt; - + procedure initModule; procedure freeModule; function AddGear(X, Y: LongInt; Kind: TGearType; State: Longword; dX, dY: hwFloat; Timer: LongWord): PGear; +function SpawnCustomCrateAt(x, y: LongInt; crate: TCrateType; content: Longword ): PGear; +procedure ResurrectHedgehog(gear: PGear); procedure ProcessGears; procedure EndTurnCleanup; procedure ApplyDamage(Gear: PGear; Damage: Longword; Source: TDamageSource); @@ -113,12 +115,13 @@ end; rounded: array[0..MAXROPEPOINTS + 2] of TVertex2f; end; - + procedure DeleteGear(Gear: PGear); forward; procedure doMakeExplosion(X, Y, Radius: LongInt; Mask: LongWord); forward; procedure doMakeExplosion(X, Y, Radius: LongInt; Mask, Tint: LongWord); forward; procedure AmmoShove(Ammo: PGear; Damage, Power: LongInt); forward; //procedure AmmoFlameWork(Ammo: PGear); forward; +function GearsNear(Gear: PGear; Kind: TGearType; r: LongInt): TPGearArray; forward; function CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; forward; procedure SpawnBoxOfSmth; forward; procedure AfterAttack; forward; @@ -201,7 +204,12 @@ @doStepPiano, @doStepBomb, @doStepSineGunShot, - @doStepFlamethrower + @doStepFlamethrower, + @doStepSMine, + @doStepPoisonCloud, + @doStepHammer, + @doStepHammerHit, + @doStepResurrector ); procedure InsertGearToList(Gear: PGear); @@ -214,7 +222,7 @@ ptmp:= tmp; tmp:= tmp^.NextGear end; - + if ptmp <> tmp then begin Gear^.NextGear:= ptmp^.NextGear; @@ -313,6 +321,9 @@ gear^.Friction:= _0_999; gear^.Angle:= cMaxAngle div 2; gear^.Z:= cHHZ; + if (GameFlags and gfAISurvival) <> 0 then + if PHedgehog(gear^.Hedgehog)^.BotLevel > 0 then + PHedgehog(gear^.Hedgehog)^.Effects[heResurrectable] := true; end; gtAmmo_Grenade: begin // bazooka gear^.Radius:= 4; @@ -338,6 +349,10 @@ gear^.Radius:= 10; gear^.Timer:= 4000 end; + gtHammerHit: begin + gear^.Radius:= 8; + gear^.Timer:= 125 + end; gtRope: begin gear^.Radius:= 3; gear^.Friction:= _450; @@ -354,6 +369,14 @@ else gear^.Timer:= cMinesTime*1; end; + gtSMine: begin + gear^.Health:= 10; + gear^.State:= gear^.State or gstMoving; + gear^.Radius:= 2; + gear^.Elasticity:= _0_55; + gear^.Friction:= _0_995; + gear^.Timer:= 500; + end; gtCase: begin gear^.ImpactSound:= sndGraveImpact; gear^.nImpactSounds:= 1; @@ -424,6 +447,7 @@ gear^.Friction:= _0_08 end; gtWhip: gear^.Radius:= 20; + gtHammer: gear^.Radius:= 20; gtKamikaze: begin gear^.Health:= 2048; gear^.Radius:= 20 @@ -471,7 +495,7 @@ gtJetpack: begin gear^.Health:= 2000; end; - gtMolotov: begin + gtMolotov: begin gear^.Radius:= 6; end; gtBirdy: begin @@ -480,7 +504,7 @@ gear^.Health := 2000; gear^.FlightTime := 2; end; - gtEgg: begin + gtEgg: begin gear^.Radius:= 4; gear^.Elasticity:= _0_6; gear^.Friction:= _0_96; @@ -508,7 +532,15 @@ gear^.Timer:= 10; gear^.Health:= 500; end; - end; + gtPoisonCloud: begin + gear^.Timer:= 5000; + gear^.dY:= int2hwfloat(-4 + longint(getRandom(8))) / 1000; + end; + gtResurrector: begin + gear^.Radius := 100; + end; + end; + InsertGearToList(gear); AddGear:= gear; @@ -541,8 +573,8 @@ else if Gear^.Kind = gtHedgehog then if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then begin - Gear^.Message:= gm_Destroy; - CurAmmoGear^.Message:= gm_Destroy; + Gear^.Message:= gmDestroy; + CurAmmoGear^.Message:= gmDestroy; exit end else @@ -645,20 +677,24 @@ begin tmp:= 0; if PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] then - inc(tmp, min(ModifyDamage(5,Gear), max(0,Gear^.Health - 1 - Gear^.Damage))); - inc(tmp, min(cHealthDecrease, max(0,Gear^.Health - 1 - Gear^.Damage))); + inc(tmp, ModifyDamage(5, Gear)); + inc(tmp, cHealthDecrease); if PHedgehog(Gear^.Hedgehog)^.King then begin flag:= false; team:= PHedgehog(Gear^.Hedgehog)^.Team; for i:= 0 to Pred(team^.HedgehogsNumber) do - if (team^.Hedgehogs[i].Gear <> nil) and - (not team^.Hedgehogs[i].King) and - (team^.Hedgehogs[i].Gear^.Health > team^.Hedgehogs[i].Gear^.Damage) + if (team^.Hedgehogs[i].Gear <> nil) and + (not team^.Hedgehogs[i].King) and + (team^.Hedgehogs[i].Gear^.Health > team^.Hedgehogs[i].Gear^.Damage) then flag:= true; - if not flag then inc(tmp, min(5, max(0,Gear^.Health - 1 - Gear^.Damage))) + if not flag then inc(tmp, 5) end; - if tmp > 0 then ApplyDamage(Gear, tmp, dsPoison); + if tmp > 0 then + begin + inc(Gear^.Damage, min(tmp, max(0,Gear^.Health - 1 - Gear^.Damage))); + HHHurt(Gear^.Hedgehog, dsPoison); + end end; Gear:= Gear^.NextGear @@ -667,6 +703,7 @@ procedure ProcessGears; const delay: LongWord = 0; + delay2: LongWord = 0; step: (stDelay, stChDmg, stSweep, stTurnReact, stAfterDelay, stChWin, stWater, stChWin2, stHealth, stSpawn, stNTurn) = stDelay; @@ -702,6 +739,8 @@ Gear^.Tex:= RenderStringTex(inttostr(Gear^.Timer div 1000), cWhiteColor, fntSmall); end; Gear^.doStep(Gear); + // might be useful later + //ScriptCall('OnGearStep', Gear^.uid); end end; @@ -757,7 +796,7 @@ inc(step) end; stHealth: begin - if (TotalRounds = cSuddenDTurns - 1) and (cHealthDecrease = 0) then + if (TotalRounds = cSuddenDTurns - 1) and (cHealthDecrease = 0) and not isInMultiShoot then begin cHealthDecrease:= 5; AddCaption(trmsg[sidSuddenDeath], cWhiteColor, capgrpGameState); @@ -794,10 +833,10 @@ // reset to default zoom //ZoomValue:= ZoomDefault; with CurrentHedgehog^ do - if (Gear <> nil) + if (Gear <> nil) and ((Gear^.State and gstAttacked) = 0) and (MultiShootAttacks > 0) then OnUsedAmmo(CurrentHedgehog^); - + EndTurnCleanup; FreeActionsList; // could send -left, -right and similar commands, so should be called before /nextturn @@ -810,6 +849,24 @@ end; step:= Low(step) end; + end +else if ((GameFlags and gfInfAttack) <> 0) then + begin + if delay2 = 0 then + delay2:= cInactDelay * 4 + else + begin + dec(delay2); + + if ((delay2 mod cInactDelay) = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then + CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked; + if delay2 = 0 then + begin + SweepDirty; + CheckNoDamage; + CheckForWin + end + end end; if TurnTimeLeft > 0 then @@ -818,17 +875,26 @@ and not isInMultiShoot then begin if (TurnTimeLeft = 5000) + and (cHedgehogTurnTime >= 10000) and (not PlacingHogs) and (CurrentHedgehog^.Gear <> nil) and ((CurrentHedgehog^.Gear^.State and gstAttacked) = 0) then PlaySound(sndHurry, CurrentTeam^.voicepack); - dec(TurnTimeLeft) + if ReadyTimeLeft > 0 then + begin + if ReadyTimeLeft = 2000 then + PlaySound(sndComeonthen, CurrentTeam^.voicepack); + dec(ReadyTimeLeft) + end + else + dec(TurnTimeLeft) end; if skipFlag then begin TurnTimeLeft:= 0; - skipFlag:= false + skipFlag:= false; + inc(CurrentHedgehog^.Team^.stats.TurnSkips); end; if ((GameTicks and $FFFF) = $FFFF) then @@ -885,7 +951,10 @@ begin t^.PortalCounter:= 0; t:= t^.NextGear - end + end; + + if (GameFlags and gfResetWeps) <> 0 then + ResetWeapons end; procedure ApplyDamage(Gear: PGear; Damage: Longword; Source: TDamageSource); @@ -932,6 +1001,7 @@ end; end; inc(Gear^.Damage, Damage); + ScriptCall('OnGearDamage', Gear^.UID, Damage); end; procedure SetAllToActive; @@ -962,10 +1032,10 @@ begin with PHedgehog(Gear^.Hedgehog)^ do begin - if not (((Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) and ((Gear^.State and gstAttacked) = 0)) then + if not (((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) and ((Gear^.State and gstAttacked) = 0)) then exit; - DrawTexture(round(sx + 16), round(sy + 16), ropeIconTex); - DrawTextureF(SpritesData[sprAMAmmos].Texture, 0.75, round(sx + 30), round(sy + 30), ord(Ammo^[CurSlot, CurAmmo].AmmoType) - 1, 1, 32, 32); + DrawTexture(round(int64(sx) + 16), round(int64(sy) + 16), ropeIconTex); + DrawTextureF(SpritesData[sprAMAmmos].Texture, 0.75, round(int64(sx) + 30), round(int64(sy) + 30), ord(CurAmmoType) - 1, 1, 32, 32); end; end; @@ -1138,7 +1208,6 @@ FindPlace(Gear, false, 0, LAND_WIDTH); end; // No game flag for this for now -// if ((GameFlags and gfExplosives) <> 0) then for i:= 0 to Pred(cExplosives) do begin Gear:= AddGear(0, 0, gtExplosives, 0, _0, _0, 0); @@ -1177,6 +1246,7 @@ dmg, dmgRadius, dmgBase: LongInt; fX, fY: hwFloat; vg: PVisualGear; + i, cnt: LongInt; begin TargetPoint.X:= NoPointX; {$IFDEF DEBUGFILE}if Radius > 4 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');{$ENDIF} @@ -1210,6 +1280,7 @@ case Gear^.Kind of gtHedgehog, gtMine, + gtSMine, gtCase, gtTarget, gtFlame, @@ -1228,7 +1299,7 @@ else Gear^.State:= Gear^.State or gstWinner; end; - if ((Mask and EXPLDoNotTouchHH) = 0) or (Gear^.Kind <> gtHedgehog) then + if ((Mask and EXPLDoNotTouchAny) = 0) and (((Mask and EXPLDoNotTouchHH) = 0) or (Gear^.Kind <> gtHedgehog)) then begin DeleteCI(Gear); Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX); @@ -1237,7 +1308,7 @@ if not Gear^.Invulnerable then Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner); Gear^.Active:= true; - FollowGear:= Gear + if Gear^.Kind <> gtFlame then FollowGear:= Gear end; if ((Mask and EXPLPoisoned) <> 0) and (Gear^.Kind = gtHedgehog) then PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] := true; @@ -1261,7 +1332,13 @@ end; if (Mask and EXPLDontDraw) = 0 then - if (GameFlags and gfSolidLand) = 0 then DrawExplosion(X, Y, Radius); + if (GameFlags and gfSolidLand) = 0 then + begin + cnt:= DrawExplosion(X, Y, Radius) div 1608; // approx 2 16x16 circles to erase per chunk + if cnt > 0 then + for i:= 0 to cnt do + AddVisualGear(X, Y, vgtChunk) + end; uAIMisc.AwareOfExplosion(0, 0, 0) end; @@ -1279,6 +1356,7 @@ case t^.Kind of gtHedgehog, gtMine, + gtSMine, gtCase, gtTarget, gtExplosives: begin @@ -1311,9 +1389,9 @@ begin t:= CheckGearsCollision(Ammo); // Just to avoid hogs on rope dodging fire. -if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope) and - (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.CollisionIndex = -1) and - (sqr(hwRound(Ammo^.X) - hwRound(CurrentHedgehog^.Gear^.X)) + sqr(hwRound(Ammo^.Y) - hwRound(CurrentHedgehog^.Gear^.Y)) <= sqr(cHHRadius + Ammo^.Radius)) then +if (CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtRope) and + (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.CollisionIndex = -1) and + (sqr(hwRound(Ammo^.X) - hwRound(CurrentHedgehog^.Gear^.X)) + sqr(hwRound(Ammo^.Y) - hwRound(CurrentHedgehog^.Gear^.Y)) <= sqr(cHHRadius + Ammo^.Radius)) then begin t^.ar[t^.Count]:= CurrentHedgehog^.Gear; inc(t^.Count) @@ -1329,10 +1407,11 @@ if (Gear^.State and gstNoDamage) = 0 then begin if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then Gear^.FlightTime:= 1; - + case Gear^.Kind of gtHedgehog, gtMine, + gtSMine, gtTarget, gtCase, gtExplosives: begin @@ -1367,7 +1446,7 @@ if not (TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; end; - + if (Ammo^.Kind <> gtFlame) or ((Ammo^.State and gsttmpFlag) = 0) then FollowGear:= Gear end; end @@ -1439,6 +1518,25 @@ end end; +function GearsNear(Gear: PGear; Kind: TGearType; r: LongInt): TPGearArray; +var + t: PGear; +begin + GearsNear := nil; + t := GearsList; + while t <> nil do begin + if (t <> Gear) and (t^.Kind = Kind) then begin + if (Gear^.X - t^.X)*(Gear^.X - t^.X) + (Gear^.Y - + t^.Y)*(Gear^.Y-t^.Y) < int2hwFloat(r)*int2hwFloat(r) then + begin + SetLength(GearsNear, Length(GearsNear)+1); + GearsNear[High(GearsNear)] := t; + end; + end; + t := t^.NextGear; + end; +end; + function CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; var t: PGear; begin @@ -1507,6 +1605,60 @@ CountGears:= count; end; +procedure ResurrectHedgehog(gear: PGear); +var tempTeam : PTeam; +begin + gear^.dX := _0; + gear^.dY := _0; + gear^.State := gstWait; + uStats.HedgehogDamaged(gear); + gear^.Damage := 0; + gear^.Health := 100; + with CurrentHedgehog^ do begin + inc(Team^.stats.AIKills); + if Team^.AIKillsTex <> nil then FreeTexture(Team^.AIKillsTex); + Team^.AIKillsTex := RenderStringTex(inttostr(Team^.stats.AIKills), Team^.Clan^.Color, fnt16); + end; + tempTeam := PHedgehog(gear^.Hedgehog)^.Team; + DeleteCI(gear); + FindPlace(gear, false, 0, LAND_WIDTH); + if gear <> nil then begin + RenderHealth(PHedgehog(gear^.Hedgehog)^); + ScriptCall('onGearResurrect', gear^.uid); + end; + RecountTeamHealth(tempTeam); +end; + +function SpawnCustomCrateAt(x, y: LongInt; crate: TCrateType; content: Longword): PGear; +begin + FollowGear := AddGear(x, y, gtCase, 0, _0, _0, 0); + cCaseFactor := 0; + + if (content > ord(High(TAmmoType))) then content := ord(High(TAmmoType)); + + case crate of + HealthCrate: begin + FollowGear^.Health := 25; + FollowGear^.Pos := posCaseHealth; + AddCaption(GetEventString(eidNewHealthPack), cWhiteColor, capgrpAmmoInfo); + end; + AmmoCrate: begin + FollowGear^.Pos := posCaseAmmo; + FollowGear^.State := content; + AddCaption(GetEventString(eidNewAmmoPack), cWhiteColor, capgrpAmmoInfo); + end; + UtilityCrate: begin + FollowGear^.Pos := posCaseUtility; + FollowGear^.State := content; + AddCaption(GetEventString(eidNewUtilityPack), cWhiteColor, capgrpAmmoInfo); + end; + end; + + if ( (x = 0) and (y = 0) ) then FindPlace(FollowGear, true, 0, LAND_WIDTH); + + SpawnCustomCrateAt := FollowGear; +end; + procedure SpawnBoxOfSmth; var t, aTot, uTot, a, h: LongInt; i: TAmmoType; @@ -1531,19 +1683,19 @@ // FIXME - shoppa is TEMPORARY REMOVE WHEN CRATE PROBABILITY ALLOWS DISABLING OF HEALTH CRATES // Preserving health crate distribution of 35% until that happens if (aTot+uTot) <> 0 then - if not shoppa and ((GameFlags and gfInvulnerable) = 0) then + if not shoppa and ((GameFlags and gfInvulnerable) = 0) then begin h:= 3500; t:= GetRandom(10000); a:= 6500*aTot div (aTot+uTot) end - else + else begin t:= GetRandom(aTot+uTot); h:= 0 end; - + if t= LAND_HEIGHT) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) = 0); + until (y >= cWaterLine) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) = 0); sy:= y; repeat inc(y); - until (y >= LAND_HEIGHT) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) <> 0); - + until (y >= cWaterLine) or (CountNonZeroz(x, y, Gear^.Radius - 1, 1) <> 0); + if (y - sy > Gear^.Radius * 2) and (((Gear^.Kind = gtExplosives) - and (y < LAND_HEIGHT-1) + and (y < cWaterLine) and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 60, 60) = nil) - and (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1) > Gear^.Radius)) + and (CountNonZeroz(x, y+1, Gear^.Radius - 1, Gear^.Radius+1) > Gear^.Radius)) or ((Gear^.Kind <> gtExplosives) - and (y < LAND_HEIGHT) + and (y < cWaterLine) and (CheckGearsNear(x, y - Gear^.Radius, [gtFlame, gtHedgehog, gtMine, gtCase, gtExplosives], 110, 110) = nil))) then begin ar[cnt].X:= x; @@ -1690,6 +1842,7 @@ else begin OutError('Can''t find place for Gear', false); + if Gear^.Kind = gtHedgehog then PHedgehog(Gear^.Hedgehog)^.Effects[heResurrectable] := false; DeleteGear(Gear); Gear:= nil end @@ -1735,7 +1888,7 @@ SpeechType:= 1; TrainingTargetGear:= nil; skipFlag:= false; - + AllInactive:= false; PrvInactive:= false; end; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uIO.pas --- a/hedgewars/uIO.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uIO.pas Wed Oct 27 14:02:20 2010 +0200 @@ -237,6 +237,7 @@ procedure SendIPCTimeInc; const timeinc: shortstring = '#'; begin +{$IFDEF DEBUGFILE}AddFileLog('IPC Send #');{$ENDIF} SendIPCRaw(@timeinc, 2) end; @@ -329,7 +330,6 @@ end; 'w': ParseCommand('setweap ' + headcmd^.str[2], true); 't': ParseCommand('taunt ' + headcmd^.str[2], true); - 'g': ParseCommand('newgrave', true); 'h': ParseCommand('hogsay ' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true); '1'..'5': ParseCommand('timer ' + headcmd^.cmd, true); #128..char(128 + cMaxSlotIndex): ParseCommand('slot ' + char(byte(headcmd^.cmd) - 79), true) @@ -366,7 +366,6 @@ procedure freeModule; begin ipcPort:= 0; - end; end. diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uKeys.pas --- a/hedgewars/uKeys.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uKeys.pas Wed Oct 27 14:02:20 2010 +0200 @@ -71,16 +71,16 @@ rightKey: boolean; leftKey: boolean; preciseKey: boolean; - + backspaceKey: boolean; spaceKey: boolean; enterKey: boolean; tabKey: boolean; - + chatAction: boolean; pauseAction: boolean; - -{$IFDEF IPHONEOS} + +{$IFDEF IPHONEOS} procedure setiPhoneBinds; {$ENDIF} {$ENDIF} @@ -90,7 +90,7 @@ var tkbd, tkbdn: TKeyboardState; KeyNames: array [0..cKeyMaxIndex] of string[15]; - + function KeyNameToCode(name: shortstring): word; var code: Word; begin @@ -247,7 +247,7 @@ inc(k, 1); end; end; - + for t:= 0 to cKeyMaxIndex do tkbd[i]:= tkbdn[i] end; @@ -355,6 +355,7 @@ procedure SetBinds(var binds: TBinds); begin {$IFDEF IPHONEOS} + binds:= binds; // avoid hint CurrentBinds:= DefaultBinds; {$ELSE} CurrentBinds:= binds; @@ -386,7 +387,7 @@ tkbdn[44]:= ord(chatAction); tkbdn[55]:= ord(pauseAction); - + // set to false the keys that only need one stoke leftClick:= false; middleClick:= false; @@ -395,7 +396,7 @@ tabKey:= false; enterKey:= false; backspaceKey:= false; - + chatAction:= false; pauseAction:= false; end; @@ -408,7 +409,7 @@ end; var Controller: array [0..5] of PSDL_Joystick; - + procedure ControllerInit; var i, j: Integer; begin @@ -442,12 +443,12 @@ WriteLnToConsole('* Number of hats: ' + inttostr(ControllerNumHats[j])); WriteLnToConsole('* Number of buttons: ' + inttostr(ControllerNumButtons[j])); ControllerEnabled:= 1; - + if ControllerNumAxes[j] > 20 then ControllerNumAxes[j]:= 20; //if ControllerNumBalls[j] > 20 then ControllerNumBalls[j]:= 20; if ControllerNumHats[j] > 20 then ControllerNumHats[j]:= 20; if ControllerNumButtons[j] > 20 then ControllerNumButtons[j]:= 20; - + // reset all buttons/axes for i:= 0 to pred(ControllerNumAxes[j]) do ControllerAxes[j][i]:= 0; @@ -465,7 +466,7 @@ // enable event generation/controller updating SDL_JoystickEventState(1); end -else +else WriteLnToConsole('Not using any game controller'); end; @@ -500,7 +501,7 @@ coeff:= 5; {$IFDEF HWLIBRARY} // this function is called by HW_allKeysUp so be careful - + // mouse emulation leftClick:= false; middleClick:= false; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uLand.pas --- a/hedgewars/uLand.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uLand.pas Wed Oct 27 14:02:20 2010 +0200 @@ -23,7 +23,7 @@ uses SDLh, uLandTemplates, uFloat, uConsts, GLunit; type - TLandArray = packed array of array of LongWord; + TLandArray = packed array of array of LongWord; TCollisionArray = packed array of array of Word; TPreview = packed array[0..127, 0..31] of byte; TDirtyTag = packed array of array of byte; @@ -31,9 +31,9 @@ var Land: TCollisionArray; LandPixels: TLandArray; LandDirty: TDirtyTag; - hasBorder: boolean; - hasGirders: boolean; - isMap: boolean; + hasBorder: boolean; + hasGirders: boolean; + isMap: boolean; playHeight, playWidth, leftX, rightX, topY, MaxHedgehogs: Longword; // idea is that a template can specify height/width. Or, a map, a height/width by the dimensions of the image. If the map has pixels near top of image, it triggers border. LandBackSurface: PSDL_Surface; digest: shortstring; @@ -52,7 +52,7 @@ function LandBackPixel(x, y: LongInt): LongWord; implementation -uses uConsole, uStore, uMisc, uRandom, uTeams, uLandObjects, Adler32, uIO, uLandTexture; +uses uConsole, uStore, uMisc, uRandom, uTeams, uLandObjects, Adler32, uIO, uLandTexture, sysutils; operator=(const a, b: direction) c: Boolean; begin @@ -66,7 +66,7 @@ procedure LogLandDigest; var s: shortstring; - adler, i, tmp: LongInt; + adler, i: LongInt; begin adler:= 1; for i:= 0 to LAND_HEIGHT-1 do @@ -1125,12 +1125,15 @@ // He said I could add it here only when I swore it would not impact gameplay. Which, as far as I can tell, is true. // I would just like to play with it with my friends if you do not mind. // Can allow for amusing maps. -procedure LoadMask; +procedure LoadMask(mapName: shortstring); var tmpsurf: PSDL_Surface; p: PLongwordArray; x, y, cpX, cpY: Longword; begin tmpsurf:= LoadImage(Pathz[ptMapCurrent] + '/mask', ifAlpha or ifTransparent or ifIgnoreCaps); + if (tmpsurf = nil) and (mapName <> '') then + tmpsurf:= LoadImage(Pathz[ptMissionMaps] + '/' + mapName +'/mask', ifAlpha or ifTransparent or ifIgnoreCaps); + if (tmpsurf <> nil) and (tmpsurf^.w <= LAND_WIDTH) and (tmpsurf^.h <= LAND_HEIGHT) and (tmpsurf^.format^.BytesPerPixel = 4) then begin cpX:= (LAND_WIDTH - tmpsurf^.w) div 2; @@ -1156,7 +1159,7 @@ if SDL_MustLock(tmpsurf) then SDL_UnlockSurface(tmpsurf); end; - if (tmpsurf <> nil) then + if (tmpsurf <> nil) then SDL_FreeSurface(tmpsurf); tmpsurf:= nil; end; @@ -1165,22 +1168,35 @@ var tmpsurf: PSDL_Surface; s: shortstring; f: textfile; + mapName: shortstring = ''; begin isMap:= true; WriteLnToConsole('Loading land from file...'); AddProgress; -tmpsurf:= LoadImage(Pathz[ptMapCurrent] + '/map', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps); +tmpsurf:= LoadImage(Pathz[ptMapCurrent] + '/map', ifAlpha or ifTransparent or ifIgnoreCaps); +if tmpsurf = nil then +begin + mapName:= ExtractFileName(Pathz[ptMapCurrent]); + tmpsurf:= LoadImage(Pathz[ptMissionMaps] + '/' + mapName + '/map', ifAlpha or ifCritical or ifTransparent or ifIgnoreCaps); +end; TryDo((tmpsurf^.w <= LAND_WIDTH) and (tmpsurf^.h <= LAND_HEIGHT), 'Map dimensions too big!', true); // unC0Rr - should this be passed from the GUI? I am not sure which layer does what s:= Pathz[ptMapCurrent] + '/map.cfg'; WriteLnToConsole('Fetching map HH limit'); +{$I-} Assign(f, s); filemode:= 0; // readonly Reset(f); +if IOResult <> 0 then +begin + s:= Pathz[ptMissionMaps] + '/' + mapName + '/map.cfg'; + Assign(f, s); + Reset(f); +end; Readln(f); if not eof(f) then Readln(f, MaxHedgehogs); - +{$I+} if (MaxHedgehogs = 0) then MaxHedgehogs:= 18; playHeight:= tmpsurf^.h; @@ -1198,7 +1214,7 @@ tmpsurf); SDL_FreeSurface(tmpsurf); -LoadMask; +LoadMask(mapname); end; procedure GenMap; @@ -1208,11 +1224,11 @@ LoadThemeConfig; isMap:= false; - + // is this not needed any more? let's hope setlength sets also 0s //if ((GameFlags and gfForts) <> 0) or (Pathz[ptMapCurrent] <> '') then // FillChar(Land,SizeOf(TCollisionArray),0);*) - + if (GameFlags and gfForts) = 0 then if Pathz[ptMapCurrent] <> '' then LoadMap @@ -1292,9 +1308,9 @@ if (GameFlags and gfDisableGirders) <> 0 then hasGirders:= false; if ((GameFlags and gfForts) = 0) - and ((GameFlags and gfDisableLandObjects) = 0) and (Pathz[ptMapCurrent] = '') - then AddObjects; + then AddObjects +else AddProgress(); FreeLandObjects; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uLandGraphics.pas --- a/hedgewars/uLandGraphics.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uLandGraphics.pas Wed Oct 27 14:02:20 2010 +0200 @@ -30,7 +30,7 @@ function SweepDirty: boolean; function Despeckle(X, Y: LongInt): boolean; function CheckLandValue(X, Y: LongInt; LandFlag: Word): boolean; -procedure DrawExplosion(X, Y, Radius: LongInt); +function DrawExplosion(X, Y, Radius: LongInt): Longword; procedure DrawHLinesExplosions(ar: PRangeArray; Radius: LongInt; y, dY: LongInt; Count: Byte); procedure DrawTunnel(X, Y, dX, dY: hwFloat; ticks, HalfWidth: LongInt); procedure FillRoundInLand(X, Y, Radius: LongInt; Value: Longword); @@ -181,17 +181,22 @@ end; -procedure FillLandCircleLinesBG(x, y, dx, dy: LongInt); +function FillLandCircleLinesBG(x, y, dx, dy: LongInt): Longword; var i, t: LongInt; + cnt: Longword; begin +cnt:= 0; t:= y + dy; if (t and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do if ((Land[t, i] and lfBasic) <> 0) then + begin + inc(cnt); if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[t, i]:= LandBackPixel(i, t) else LandPixels[t div 2, i div 2]:= LandBackPixel(i, t) + end else if ((Land[t, i] and lfObject) <> 0) then if (cReducedQuality and rqBlurryLand) = 0 then @@ -203,10 +208,13 @@ if (t and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do if ((Land[t, i] and lfBasic) <> 0) then + begin + inc(cnt); if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[t, i]:= LandBackPixel(i, t) else LandPixels[t div 2, i div 2]:= LandBackPixel(i, t) + end else if ((Land[t, i] and lfObject) <> 0) then if (cReducedQuality and rqBlurryLand) = 0 then @@ -218,10 +226,13 @@ if (t and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do if ((Land[t, i] and lfBasic) <> 0) then + begin + inc(cnt); if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[t, i]:= LandBackPixel(i, t) - else + else LandPixels[t div 2, i div 2]:= LandBackPixel(i, t) + end else if ((Land[t, i] and lfObject) <> 0) then if (cReducedQuality and rqBlurryLand) = 0 then @@ -233,18 +244,20 @@ if (t and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do if ((Land[t, i] and lfBasic) <> 0) then - if (cReducedQuality and rqBlurryLand) = 0 then - LandPixels[t, i]:= LandBackPixel(i, t) - else - LandPixels[t div 2, i div 2]:= LandBackPixel(i, t) - + begin + inc(cnt); + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[t, i]:= LandBackPixel(i, t) + else + LandPixels[t div 2, i div 2]:= LandBackPixel(i, t) + end else if ((Land[t, i] and lfObject) <> 0) then if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[t, i]:= 0 else LandPixels[t div 2, i div 2]:= 0; - +FillLandCircleLinesBG:= cnt; end; procedure FillLandCircleLinesEBC(x, y, dx, dy: LongInt); @@ -271,7 +284,7 @@ if ((Land[t, i] and lfBasic) <> 0) or ((Land[t, i] and lfObject) <> 0) then begin if (cReducedQuality and rqBlurryLand) = 0 then - LandPixels[t, i]:= cExplosionBorderColor + LandPixels[t, i]:= cExplosionBorderColor else LandPixels[t div 2, i div 2]:= cExplosionBorderColor; Land[t, i]:= Land[t, i] or lfDamaged; @@ -300,7 +313,7 @@ if ((Land[t, i] and lfBasic) <> 0) or ((Land[t, i] and lfObject) <> 0) then begin if (cReducedQuality and rqBlurryLand) = 0 then - LandPixels[t, i]:= cExplosionBorderColor + LandPixels[t, i]:= cExplosionBorderColor else LandPixels[t div 2, i div 2]:= cExplosionBorderColor; @@ -310,19 +323,21 @@ end; end; -procedure DrawExplosion(X, Y, Radius: LongInt); +function DrawExplosion(X, Y, Radius: LongInt): Longword; var dx, dy, ty, tx, d: LongInt; + cnt: Longword; begin // draw background land texture begin + cnt:= 0; dx:= 0; dy:= Radius; d:= 3 - 2 * Radius; while (dx < dy) do begin - FillLandCircleLinesBG(x, y, dx, dy); + inc(cnt, FillLandCircleLinesBG(x, y, dx, dy)); if (d < 0) then d:= d + 4 * dx + 6 else begin @@ -331,7 +346,7 @@ end; inc(dx) end; - if (dx = dy) then FillLandCircleLinesBG(x, y, dx, dy); + if (dx = dy) then inc(cnt, FillLandCircleLinesBG(x, y, dx, dy)); end; // draw a hole in land @@ -382,7 +397,8 @@ dx:= min(X + Radius + 1, LAND_WIDTH) - tx; ty:= max(Y - Radius - 1, 0); dy:= min(Y + Radius + 1, LAND_HEIGHT) - ty; -UpdateLandTexture(tx, dx, ty, dy) +UpdateLandTexture(tx, dx, ty, dy); +DrawExplosion:= cnt end; procedure DrawHLinesExplosions(ar: PRangeArray; Radius: LongInt; y, dY: LongInt; Count: Byte); @@ -397,7 +413,7 @@ LandPixels[ty, tx]:= LandBackPixel(tx, ty) else LandPixels[ty div 2, tx div 2]:= LandBackPixel(tx, ty) - else + else if (Land[ty, tx] and lfObject) <> 0 then if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[ty, tx]:= 0 @@ -457,7 +473,7 @@ ty:= hwRound(Y); if ((ty and LAND_HEIGHT_MASK) = 0) and ((tx and LAND_WIDTH_MASK) = 0) and - (((Land[ty, tx] and lfBasic) <> 0) or + (((Land[ty, tx] and lfBasic) <> 0) or ((Land[ty, tx] and lfObject) <> 0)) then begin Land[ty, tx]:= Land[ty, tx] or lfDamaged; @@ -483,7 +499,7 @@ ty:= hwRound(Y); if ((ty and LAND_HEIGHT_MASK) = 0) and ((tx and LAND_WIDTH_MASK) = 0) and - (((Land[ty, tx] and lfBasic) <> 0) or + (((Land[ty, tx] and lfBasic) <> 0) or ((Land[ty, tx] and lfObject) <> 0)) then begin Land[ty, tx]:= Land[ty, tx] or lfDamaged; @@ -509,7 +525,7 @@ LandPixels[ty, tx]:= LandBackPixel(tx, ty) else LandPixels[ty div 2, tx div 2]:= LandBackPixel(tx, ty) - else + else if (Land[ty, tx] and lfObject) <> 0 then if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[ty, tx]:= 0 @@ -527,7 +543,7 @@ ty:= hwRound(Y); if ((ty and LAND_HEIGHT_MASK) = 0) and ((tx and LAND_WIDTH_MASK) = 0) and - (((Land[ty, tx] and lfBasic) <> 0) or + (((Land[ty, tx] and lfBasic) <> 0) or ((Land[ty, tx] and lfObject) <> 0)) then begin Land[ty, tx]:= Land[ty, tx] or lfDamaged; @@ -554,7 +570,7 @@ ty:= hwRound(Y); if ((ty and LAND_HEIGHT_MASK) = 0) and ((tx and LAND_WIDTH_MASK) = 0) and - (((Land[ty, tx] and lfBasic) <> 0) or + (((Land[ty, tx] and lfBasic) <> 0) or ((Land[ty, tx] and lfObject) <> 0)) then begin Land[ty, tx]:= Land[ty, tx] or lfDamaged; @@ -602,10 +618,10 @@ begin for x:= 0 to Pred(w) do if PLongword(@(p^[x * 4]))^ <> 0 then - if ((cpY + y) < Longint(topY)) or - ((cpY + y) > LAND_HEIGHT) or - ((cpX + x) < Longint(leftX)) or - ((cpX + x) > Longint(rightX)) or + if ((cpY + y) <= Longint(topY)) or + ((cpY + y) >= LAND_HEIGHT) or + ((cpX + x) <= Longint(leftX)) or + ((cpX + x) >= Longint(rightX)) or (Land[cpY + y, cpX + x] <> 0) then begin if SDL_MustLock(Image) then @@ -672,13 +688,13 @@ if c < 4 then // 0-3 neighbours begin if (cReducedQuality and rqBlurryLand) = 0 then - if (Land[Y, X] and lfBasic) <> 0 then - LandPixels[Y, X]:= LandBackPixel(X, Y) + if (Land[Y, X] and lfBasic) <> 0 then + LandPixels[Y, X]:= LandBackPixel(X, Y) else LandPixels[Y, X]:= 0 else - if (Land[Y, X] and lfBasic) <> 0 then - LandPixels[Y div 2, X div 2]:= LandBackPixel(X, Y) + if (Land[Y, X] and lfBasic) <> 0 then + LandPixels[Y div 2, X div 2]:= LandBackPixel(X, Y) else LandPixels[Y div 2, X div 2]:= 0; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uLandObjects.pas --- a/hedgewars/uLandObjects.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uLandObjects.pas Wed Oct 27 14:02:20 2010 +0200 @@ -94,7 +94,7 @@ if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x]; - if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then + if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then Land[cpY + y, cpX + x]:= lfObject end; p:= @(p^[Image^.pitch shr 2]) @@ -292,9 +292,9 @@ end end; inc(y, 3); - until y > LAND_HEIGHT - 1 - Height; + until y > int64(LAND_HEIGHT) - 1 - Height; inc(x, getrandom(6) + 3) - until x > LAND_WIDTH - 1 - Width; + until x > int64(LAND_WIDTH) - 1 - Width; bRes:= cnt <> 0; if bRes then begin @@ -341,9 +341,9 @@ end end; inc(y, 12); - until y > LAND_HEIGHT - 1 - Height - 8; + until y > int64(LAND_HEIGHT) - 1 - Height - 8; inc(x, getrandom(12) + 12) - until x > LAND_WIDTH - 1 - Width; + until x > int64(LAND_WIDTH) - 1 - Width; bRes:= cnt <> 0; if bRes then begin @@ -403,7 +403,10 @@ ReadLn(f, cCloudsNumber); // TODO - adjust all the theme cloud numbers. This should not be a permanent fix -cCloudsNumber:= cCloudsNumber * (LAND_WIDTH div 2048); +//cCloudsNumber:= cCloudsNumber * (LAND_WIDTH div 2048); + +// scale number of clouds depending on screen space (two times land width) +cCloudsNumber:= cCloudsNumber * cScreenSpace div LAND_WIDTH; Readln(f, ThemeObjects.Count); for i:= 0 to Pred(ThemeObjects.Count) do @@ -450,12 +453,16 @@ Readln(f, vobCount); if vobCount > 0 then Readln(f, vobFramesCount, vobFrameTicks, vobVelocity, vobFallSpeed); + +// adjust amount of flakes scaled by screen space +vobCount:= longint(vobCount) * cScreenSpace div LAND_WIDTH; + if (cReducedQuality and rqKillFlakes) <> 0 then vobCount:= 0; for i:= 0 to Pred(vobCount) do - AddVisualGear( -cScreenWidth + random(cScreenWidth * 2 + LAND_WIDTH), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake); + AddVisualGear(cLeftScreenBorder + random(cScreenSpace), random(1024+200) - 100 + LAND_HEIGHT, vgtFlake); Close(f); {$I+} @@ -470,16 +477,16 @@ if ThemeObjects.Count = 0 then exit; WriteLnToConsole('Adding theme objects...'); - for i:=0 to ThemeObjects.Count do + for i:=0 to ThemeObjects.Count do ThemeObjects.objs[i].Maxcnt := max(1, (ThemeObjects.objs[i].Maxcnt * MaxHedgehogs) div 18); // Maxcnt is proportional to map size, but allow objects to span even if we're on a tiny map - + repeat t := getrandom(ThemeObjects.Count); b := false; for i:=0 to ThemeObjects.Count do begin ii := (i+t) mod ThemeObjects.Count; - + if ThemeObjects.objs[ii].Maxcnt <> 0 then b := b or TryPut(ThemeObjects.objs[ii]) end; @@ -493,16 +500,16 @@ if SprayObjects.Count = 0 then exit; WriteLnToConsole('Adding spray objects...'); - for i:=0 to SprayObjects.Count do + for i:=0 to SprayObjects.Count do SprayObjects.objs[i].Maxcnt := max(1, (SprayObjects.objs[i].Maxcnt * MaxHedgehogs) div 18); // Maxcnt is proportional to map size, but allow objects to span even if we're on a tiny map - + repeat t := getrandom(SprayObjects.Count); b := false; for i:=0 to SprayObjects.Count do begin ii := (i+t) mod SprayObjects.Count; - + if SprayObjects.objs[ii].Maxcnt <> 0 then b := b or TryPut(SprayObjects.objs[ii], Surface) end; @@ -522,7 +529,7 @@ i:=i+int; until (i>rightX-int); end; -AddThemeObjects(ThemeObjects); +if (GameFlags and gfDisableLandObjects) = 0 then AddThemeObjects(ThemeObjects); AddProgress(); FreeRects(); end; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uLandTexture.pas --- a/hedgewars/uLandTexture.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uLandTexture.pas Wed Oct 27 14:02:20 2010 +0200 @@ -42,7 +42,7 @@ tmpPixels: array [0..TEXSIZE - 1, 0..TEXSIZE - 1] of LongWord; LANDTEXARW: LongWord; LANDTEXARH: LongWord; - + function Pixels(x, y: Longword): Pointer; var ty: Longword; begin @@ -101,7 +101,7 @@ begin shouldUpdate:= false; glBindTexture(GL_TEXTURE_2D, tex^.id); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, TEXSIZE, TEXSIZE, 0, GL_RGBA, GL_UNSIGNED_BYTE, Pixels(x,y)); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, TEXSIZE, TEXSIZE, 0, GL_RGBA, GL_UNSIGNED_BYTE, Pixels(x,y)); end end; @@ -132,10 +132,10 @@ LANDTEXARW:= (LAND_WIDTH div TEXSIZE) div 2; LANDTEXARH:= (LAND_HEIGHT div TEXSIZE) div 2; end; - + SetLength(LandTextures, LANDTEXARW, LANDTEXARH); end; - + procedure freeModule; var x, y: LongInt; begin diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uLocale.pas --- a/hedgewars/uLocale.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uLocale.pas Wed Oct 27 14:02:20 2010 +0200 @@ -29,11 +29,12 @@ sidHellishBomb, sidDrill, sidBallgun, sidNapalm, sidRCPlane, sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime, sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack, - sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, sidSineGun, sidFlamethrower); + sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, sidSineGun, sidFlamethrower, + sidSMine, sidHammer, sidResurrector); TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused, sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync, - sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD); + sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady); TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw, eidNewHealthPack, eidNewAmmoPack, eidNewUtilityPack, eidTurnSkipped, eidHurtSelf, @@ -45,17 +46,16 @@ gidDamageModifier); const MAX_EVENT_STRINGS = 100; -var trammo: array[TAmmoStrId] of ansistring; - trammoc: array[TAmmoStrId] of ansistring; - trammod: array[TAmmoStrId] of ansistring; - trmsg: array[TMsgStrId] of ansistring; - trgoal: array[TGoalStrId] of ansistring; +var trammo: array[TAmmoStrId] of ansistring; // name of the weapon + trammoc: array[TAmmoStrId] of ansistring; // caption of the weapon + trammod: array[TAmmoStrId] of ansistring; // description of the weapon + trmsg: array[TMsgStrId] of ansistring; // message of the event + trgoal: array[TGoalStrId] of ansistring; // message of the goal procedure LoadLocale(FileName: shortstring); -function Format(fmt: shortstring; var arg: shortstring): shortstring; -function Format(fmt: ansistring; var arg: ansistring): ansistring; - -function GetEventString(e: TEventId): ansistring; +function Format(fmt: shortstring; var arg: shortstring): shortstring; +function Format(fmt: ansistring; var arg: ansistring): ansistring; +function GetEventString(e: TEventId): ansistring; implementation uses uMisc, uRandom; @@ -143,4 +143,9 @@ else Format:= copy(fmt, 1, i - 1) + arg + Format(copy(fmt, i + 2, Length(fmt) - i - 1), arg) end; +procedure LoadLocaleWrapper(str: pchar); cdecl; export; +begin + LoadLocale(Strpas(str)); +end; + end. diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uMisc.pas Wed Oct 27 14:02:20 2010 +0200 @@ -17,7 +17,6 @@ *) {$INCLUDE "options.inc"} -{$INLINE ON} unit uMisc; interface @@ -25,6 +24,27 @@ uses SDLh, uConsts, uFloat, GLunit, Math; var +/////// init flags /////// + cScreenWidth : LongInt = 1024; + cScreenHeight : LongInt = 768; + cBits : LongInt = 32; + //ipcPort is in uIO + cFullScreen : boolean = false; + isSoundEnabled : boolean = true; + isMusicEnabled : boolean = false; + cLocaleFName : shortstring = 'en.txt'; + cInitVolume : LongInt = 100; + cTimerInterval : LongInt = 8; + PathPrefix : shortstring = './'; + cShowFPS : boolean = false; + cAltDamage : boolean = true; + cReducedQuality : LongInt = rqNone; + //userNick is in uChat + recordFileName : shortstring = ''; + cReadyDelay : Longword = 0; + cLogfileBase : shortstring = 'debug'; +////////////////////////// + isCursorVisible : boolean; isTerminated : boolean; isInLag : boolean; @@ -35,9 +55,7 @@ isSpeed : boolean; isFirstFrame : boolean; - //isStereoEnabled : boolean; cStereoMode : TStereoMode; - fastUntilLag : boolean; GameState : TGameState; @@ -45,6 +63,7 @@ GameFlags : Longword; TrainingFlags : Longword; TurnTimeLeft : Longword; + ReadyTimeLeft : Longword; cSuddenDTurns : LongInt; cDamagePercent : LongInt; cMineDudPercent : LongWord; @@ -73,26 +92,20 @@ TimeTrialStartTime: Longword; TimeTrialStopTime : Longword; - - // init flags - cScreenWidth : LongInt = 1024; - cScreenHeight : LongInt = 768; - cBits : LongInt = 32; - cBitsStr : string[2] = '32'; - //ipcPort is in uIO - cFullScreen : boolean = false; - isSoundEnabled : boolean = true; - isMusicEnabled : boolean = false; - cLocaleFName : shortstring = 'en.txt'; - cInitVolume : LongInt = 50; - cTimerInterval : LongInt = 8; - //pathPrefix is in uConsts - cShowFPS : boolean = false; - cAltDamage : boolean = true; - cReducedQuality : LongInt = rqNone; - recordFileName : shortstring = ''; - + // originally from uConsts + Pathz: array[TPathType] of shortstring; + CountTexz: array[1..Pred(AMMO_INFINITE)] of PTexture; + LAND_WIDTH : LongInt; + LAND_HEIGHT : LongInt; + LAND_WIDTH_MASK : LongWord; + LAND_HEIGHT_MASK : LongWord; + cMaxCaptions : LongInt; + + cLeftScreenBorder : LongInt; + cRightScreenBorder : LongInt; + cScreenSpace : LongInt; + cCaseFactor : Longword; cLandAdditions : Longword; cExplosives : Longword; @@ -150,10 +163,11 @@ function EnumToStr(const en : TGearType) : shortstring; overload; function EnumToStr(const en : TSound) : shortstring; overload; function EnumToStr(const en : TAmmoType) : shortstring; overload; +function EnumToStr(const en : THogEffect) : shortstring; overload; procedure movecursor(dx, dy: LongInt); -function hwSign(r: hwFloat): LongInt; -function Min(a, b: LongInt): LongInt; -function Max(a, b: LongInt): LongInt; +function hwSign(r: hwFloat): LongInt; inline; +function Min(a, b: LongInt): LongInt; inline; +function Max(a, b: LongInt): LongInt; inline; procedure OutError(Msg: shortstring; isFatalError: boolean); procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean); inline; procedure SDLTry(Assert: boolean; isFatal: boolean); @@ -162,8 +176,10 @@ function DxDy2Angle(const _dY, _dX: hwFloat): GLfloat; function DxDy2Angle32(const _dY, _dX: hwFloat): LongInt; function DxDy2AttackAngle(const _dY, _dX: hwFloat): LongInt; +(* procedure AdjustColor(var Color: Longword); procedure SetKB(n: Longword); +*) procedure SendKB; procedure SetLittle(var r: hwFloat); procedure SendStat(sit: TStatInfoType; s: shortstring); @@ -174,15 +190,15 @@ function toPowerOf2(i: Longword): Longword; inline; function DecodeBase64(s: shortstring): shortstring; function doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface; -function endian(independent: LongWord): LongWord; +function endian(independent: LongWord): LongWord; inline; {$IFDEF DEBUGFILE} procedure AddFileLog(s: shortstring); -function RectToStr(Rect: TSDL_Rect): shortstring; +(* function RectToStr(Rect: TSDL_Rect): shortstring; *) {$ENDIF} procedure MakeScreenshot(filename: shortstring); implementation -uses uConsole, uStore, uIO, uSound, typinfo, sysutils; +uses uConsole, uStore, uIO, uSound, typinfo, sysutils, uMobile; var KBnum: Longword; {$IFDEF DEBUGFILE} @@ -229,6 +245,11 @@ EnumToStr:= GetEnumName(TypeInfo(TAmmoType), ord(en)) end; +function EnumToStr(const en: THogEffect) : shortstring; overload; +begin + EnumToStr := GetEnumName(TypeInfo(THogEffect), ord(en)) +end; + procedure movecursor(dx, dy: LongInt); var x, y: LongInt; begin @@ -260,12 +281,12 @@ begin // obsolete? written in WriteLnToConsole() anyway // {$IFDEF DEBUGFILE}AddFileLog(Msg);{$ENDIF} -WriteLnToConsole(Msg); -if isFatalError then + WriteLnToConsole(Msg); + if isFatalError then begin - SendIPC('E' + GetLastConsoleLine); - SDL_Quit; - halt(1) + SendIPC('E' + GetLastConsoleLine); + SDL_Quit; + halt(1) end end; @@ -279,11 +300,19 @@ if not Assert then OutError(SDL_GetError, isFatal) end; +(* procedure AdjustColor(var Color: Longword); begin Color:= SDL_MapRGB(PixelFormat, (Color shr 16) and $FF, (Color shr 8) and $FF, Color and $FF) end; +procedure SetKB(n: Longword); +begin +KBnum:= n +end; +*) + + function IntToStr(n: LongInt): shortstring; begin str(n, IntToStr) @@ -337,11 +366,6 @@ DxDy2AttackAngle:= trunc(arctan2(dY, dX) * MaxAngleDivPI) end; -procedure SetKB(n: Longword); -begin -KBnum:= n -end; - procedure SendKB; var s: shortstring; begin @@ -358,7 +382,7 @@ end; procedure SendStat(sit: TStatInfoType; s: shortstring); -const stc: array [TStatInfoType] of char = 'rDkKHT'; +const stc: array [TStatInfoType] of char = 'rDkKHTPsSB'; var buf: shortstring; begin buf:= 'i' + stc[sit] + s; @@ -457,11 +481,11 @@ Surface2Tex^.h:= surf^.h; if (surf^.format^.BytesPerPixel <> 4) then -begin + begin TryDo(false, 'Surface2Tex failed, expecting 32 bit surface', true); Surface2Tex^.id:= 0; exit -end; + end; glGenTextures(1, @Surface2Tex^.id); @@ -472,7 +496,7 @@ SDLTry(SDL_LockSurface(surf) >= 0, true); if (not SupportNPOTT) and (not (isPowerOf2(Surf^.w) and isPowerOf2(Surf^.h))) then -begin + begin tw:= toPowerOf2(Surf^.w); th:= toPowerOf2(Surf^.h); @@ -481,33 +505,33 @@ GetMem(tmpp, tw * th * surf^.format^.BytesPerPixel); - fromP4:= Surf^.pixels; - toP4:= tmpp; + fromP4:= Surf^.pixels; + toP4:= tmpp; - for y:= 0 to Pred(Surf^.h) do + for y:= 0 to Pred(Surf^.h) do begin - for x:= 0 to Pred(Surf^.w) do toP4^[x]:= fromP4^[x]; - for x:= Surf^.w to Pred(tw) do toP4^[x]:= 0; - toP4:= @(toP4^[tw]); - fromP4:= @(fromP4^[Surf^.pitch div 4]); + for x:= 0 to Pred(Surf^.w) do toP4^[x]:= fromP4^[x]; + for x:= Surf^.w to Pred(tw) do toP4^[x]:= 0; + toP4:= @(toP4^[tw]); + fromP4:= @(fromP4^[Surf^.pitch div 4]) end; - for y:= Surf^.h to Pred(th) do + for y:= Surf^.h to Pred(th) do begin - for x:= 0 to Pred(tw) do toP4^[x]:= 0; - toP4:= @(toP4^[tw]); + for x:= 0 to Pred(tw) do toP4^[x]:= 0; + toP4:= @(toP4^[tw]) end; glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tw, th, 0, GL_RGBA, GL_UNSIGNED_BYTE, tmpp); FreeMem(tmpp, tw * th * surf^.format^.BytesPerPixel) -end + end else -begin + begin Surface2Tex^.rx:= 1.0; Surface2Tex^.ry:= 1.0; glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, surf^.w, surf^.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, surf^.pixels); -end; + end; ResetVertexArrays(Surface2Tex); @@ -521,11 +545,11 @@ begin if tex <> nil then begin - if tex^.NextTexture <> nil then + if tex^.NextTexture <> nil then tex^.NextTexture^.PrevTexture:= tex^.PrevTexture; - if tex^.PrevTexture <> nil then + if tex^.PrevTexture <> nil then tex^.PrevTexture^.NextTexture:= tex^.NextTexture - else + else TextureList:= tex^.NextTexture; glDeleteTextures(1, @tex^.id); Dispose(tex); @@ -638,11 +662,12 @@ writeln(f, GameTicks: 6, ': ', s); flush(f) end; - +(* function RectToStr(Rect: TSDL_Rect): shortstring; begin RectToStr:= '(x: ' + inttostr(rect.x) + '; y: ' + inttostr(rect.y) + '; w: ' + inttostr(rect.w) + '; h: ' + inttostr(rect.h) + ')' end; +*) {$ENDIF} function doSurfaceConversion(tmpsurf: PSDL_Surface): PSDL_Surface; @@ -659,7 +684,7 @@ exit(tmpsurf); end; -function endian(independent: LongWord): LongWord; +function endian(independent: LongWord): LongWord; inline; begin {$IFDEF ENDIAN_LITTLE} endian:= independent; @@ -675,6 +700,27 @@ procedure initModule; {$IFDEF DEBUGFILE}{$IFNDEF IPHONEOS}var i: LongInt;{$ENDIF}{$ENDIF} begin + Pathz:= cPathz; + {* REFERENCE + 4096 -> $FFFFF000 + 2048 -> $FFFFF800 + 1024 -> $FFFFFC00 + 512 -> $FFFFFE00 *} + if (cReducedQuality and rqLowRes) <> 0 then + begin + LAND_WIDTH:= 2048; + LAND_HEIGHT:= 1024; + LAND_WIDTH_MASK:= $FFFFF800; + LAND_HEIGHT_MASK:= $FFFFFC00; + end + else + begin + LAND_WIDTH:= 4096; + LAND_HEIGHT:= 2048; + LAND_WIDTH_MASK:= $FFFFF000; + LAND_HEIGHT_MASK:= $FFFFF800 + end; + cDrownSpeed.QWordValue := 257698038; // 0.06 cDrownSpeedf := 0.06; cMaxWindSpeed.QWordValue:= 1073742; // 0.00025 @@ -685,7 +731,7 @@ cDamageModifier := _1; TargetPoint := cTargetPointRef; TextureList := nil; - + // int, longint longword and byte CursorMovementX := 0; CursorMovementY := 0; @@ -722,7 +768,7 @@ cCaseFactor := 5; {0..9} cLandAdditions := 4; cExplosives := 2; - + GameState := Low(TGameState); GameType := gmtLocal; zoom := cDefaultZoomLevel; @@ -747,24 +793,36 @@ cVolumeDelta := 0; cHasFocus := true; cInactDelay := 1250; + ReadyTimeLeft := 0; ScreenFade := sfNone; - + {$IFDEF SDL13} SDLwindow := nil; -{$ENDIF} +{$ENDIF} + + // those values still aren't perfect + cLeftScreenBorder:= round(-cMinZoomLevel * cScreenWidth); + cRightScreenBorder:= round(cMinZoomLevel * cScreenWidth + LAND_WIDTH); + cScreenSpace:= cRightScreenBorder - cLeftScreenBorder; + + if isPhone() then + cMaxCaptions:= 3 + else + cMaxCaptions:= 4; + {$IFDEF DEBUGFILE} {$I-} {$IFDEF IPHONEOS} - Assign(f,'../Documents/debug.txt'); + Assign(f,'../Documents/hw-' + cLogfileBase + '.log'); Rewrite(f); {$ELSE} if (ParamStr(1) <> '') and (ParamStr(2) <> '') then - if (ParamCount <> 3) and (ParamCount <> 19) then + if (ParamCount <> 3) and (ParamCount <> cDefaultParamNum) then begin for i:= 0 to 7 do begin - assign(f, ExtractFileDir(ParamStr(2)) + '/debug' + inttostr(i) + '.txt'); + assign(f, ExtractFileDir(ParamStr(2)) + '/' + cLogfileBase + inttostr(i) + '.log'); rewrite(f); if IOResult = 0 then break; end; @@ -774,7 +832,7 @@ begin for i:= 0 to 7 do begin - assign(f, ParamStr(1) + '/debug' + inttostr(i) + '.txt'); + assign(f, ParamStr(1) + '/Logs/' + cLogfileBase + inttostr(i) + '.log'); rewrite(f); if IOResult = 0 then break; end; @@ -797,6 +855,25 @@ flush(f); close(f); {$ENDIF} + + // re-init flags so they will always contain safe values + cScreenWidth := 1024; + cScreenHeight := 768; + cBits := 32; + //ipcPort is in uIO + cFullScreen := false; + isSoundEnabled := true; + isMusicEnabled := false; + cLocaleFName := 'en.txt'; + cInitVolume := 100; + cTimerInterval := 8; + PathPrefix := './'; + cShowFPS := false; + cAltDamage := true; + cReducedQuality := rqNone; + //userNick is in uChat + recordFileName := ''; + cReadyDelay := 5000; end; end. diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uMobile.pas --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hedgewars/uMobile.pas Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,105 @@ +(* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2008 Andrey Korotaev + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + *) + +{$INCLUDE "options.inc"} + +unit uMobile; +interface + +{$IFDEF IPHONEOS} +(* iOS calls written in C/Objc *) +procedure clearView; cdecl; external; +procedure startSpinning; cdecl; external; +procedure stopSpinning; cdecl; external; +procedure replayBegan; cdecl; external; +procedure replayFinished; cdecl; external; +procedure updateVisualsNewTurn; cdecl; external; +function isApplePhone: Boolean; cdecl; external; +{$ENDIF} +function isPhone: Boolean; inline; +procedure doRumble; inline; +procedure perfExt_AddProgress; inline; +procedure perfExt_FinishProgress; inline; +procedure perfExt_AmmoUpdate; // don't inline +procedure perfExt_NewTurnBeginning; inline; +procedure perfExt_SaveBeganSynching; inline; +procedure perfExt_SaveFinishedSynching; inline; + +implementation +uses uTeams, uConsole; + +function isPhone: Boolean; inline; +begin +{$IFDEF IPHONEOS} + exit(isApplePhone()); +{$ENDIF} + exit(false); +end; + +procedure doRumble; inline; +begin + // fill me! +end; + +procedure perfExt_AddProgress; inline; +begin +{$IFDEF IPHONEOS} + startSpinning(); +{$ENDIF} +end; + +procedure perfExt_FinishProgress; inline; +begin +{$IFDEF IPHONEOS} + stopSpinning(); +{$ENDIF} +end; + +procedure perfExt_AmmoUpdate; // don't inline +begin +{$IFDEF IPHONEOS} + if (CurrentTeam^.ExtDriven) or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0) then + exit(); // the other way around throws a compiler error + updateVisualsNewTurn(); +{$ENDIF} +end; + +procedure perfExt_NewTurnBeginning; inline; +begin +{$IFDEF IPHONEOS} + clearView(); + perfExt_AmmoUpdate(); +{$ENDIF} +end; + +procedure perfExt_SaveBeganSynching; inline; +begin +{$IFDEF IPHONEOS} + replayBegan(); +{$ENDIF} +end; + +procedure perfExt_SaveFinishedSynching; inline; +begin +{$IFDEF IPHONEOS} + replayFinished(); +{$ENDIF} +end; + + +end. diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uSHA.pas --- a/hedgewars/uSHA.pas Thu Aug 26 23:59:18 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -(* - * Hedgewars, a free turn based strategy game - * Copyright (c) 2004-2010 Andrey Korotaev - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - *) - -{$INCLUDE "options.inc"} - -unit uSHA; -interface -uses SDLh; - -type TSHA1Context = packed record - H: array[0..4] of LongWord; - Length, CurrLength: Int64; - Buf: array[0..63] of byte; - end; - TSHA1Digest = array[0..4] of LongWord; - -procedure SHA1Init(var Context: TSHA1Context); -procedure SHA1Update(var Context: TSHA1Context; Buf: PByteArray; Length: LongWord); -procedure SHA1UpdateLongwords(var Context: TSHA1Context; Buf: PLongwordArray; Length: LongWord); -function SHA1Final(Context: TSHA1Context): TSHA1Digest; - -implementation - -function rol(x: LongWord; y: Byte): LongWord; -begin - rol:= (X shl y) or (X shr (32 - y)) -end; - -function Ft(t, b, c, d: LongWord): LongWord; -begin -case t of - 0..19: Ft := (b and c) or ((not b) and d); - 20..39: Ft := b xor c xor d; - 40..59: Ft := (b and c) or (b and d) or (c and d); - else Ft := b xor c xor d; - end; -end; - -function Kt(t: Byte): LongWord; -begin - case t of - 0..19: Kt := $5A827999; - 20..39: Kt := $6ED9EBA1; - 40..59: Kt := $8F1BBCDC; - else - Kt := $CA62C1D6 - end; -end; - - -procedure SHA1Hash(var Context: TSHA1Context); -var S: array[0..4 ] of LongWord; - W: array[0..79] of LongWord; - i, t: LongWord; -begin -{$HINTS OFF} -move(Context.H, S, sizeof(S)); -{$HINTS ON} -for i:= 0 to 15 do - SDLNet_Write32(PLongWordArray(@Context.Buf)^[i], @W[i]); - -for i := 16 to 79 do - W[i] := rol(W[i - 3] xor W[i - 8] xor W[i - 14] xor W[i - 16], 1); - -for i := 0 to 79 do - begin - t:= rol(S[0], 5) + Ft(i, S[1], S[2], S[3]) + S[4] + W[i] + Kt(i); - S[4]:= S[3]; - S[3]:= S[2]; - S[2]:= rol(S[1], 30); - S[1]:= S[0]; - S[0]:= t - end; - -for i := 0 to 4 do - Context.H[i]:= Context.H[i] + S[i] -end; - -procedure SHA1Init(var Context: TSHA1Context); -begin - with Context do - begin - Length := 0; - CurrLength:= 0; - H[0]:= $67452301; - H[1]:= $EFCDAB89; - H[2]:= $98BADCFE; - H[3]:= $10325476; - H[4]:= $C3D2E1F0 - end -end; - -procedure SHA1Update(var Context: TSHA1Context; Buf: PByteArray; Length: LongWord); -var i: Longword; -begin -for i:= 0 to Pred(Length) do - begin - Context.Buf[Context.CurrLength]:= Buf^[i]; - inc(Context.CurrLength); - if Context.CurrLength = 64 then - begin - SHA1Hash(Context); - inc(Context.Length, 512); - Context.CurrLength:= 0 - end - end -end; - -procedure SHA1UpdateLongwords(var Context: TSHA1Context; Buf: PLongwordArray; Length: LongWord); -var i: Longword; -begin - for i:= 0 to Pred(Length div 4) do - begin - SDLNet_Write32(Buf^[i], @Context.Buf[Context.CurrLength]); - inc(Context.CurrLength, 4); - if Context.CurrLength = 64 then - begin - SHA1Hash(Context); - inc(Context.Length, 512); - Context.CurrLength:= 0 - end - end -end; - -function SHA1Final(Context: TSHA1Context): TSHA1Digest; -var i: LongWord; -begin - Context.Length:= Context.Length + Context.CurrLength shl 3; - Context.Buf[Context.CurrLength]:= $80; - inc(Context.CurrLength); - - if Context.CurrLength > 56 then - begin - FillChar(Context.Buf[Context.CurrLength], 64 - Context.CurrLength, 0); - Context.CurrLength:= 64; - SHA1Hash(Context); - Context.CurrLength:=0 - end; - - FillChar(Context.Buf[Context.CurrLength], 56 - Context.CurrLength, 0); - - for i:= 56 to 63 do - Context.Buf[i] := (Context.Length shr ((63 - i) * 8)) and $FF; - SHA1Hash(Context); - for i:= 0 to 4 do - SHA1Final[i]:= Context.H[i]; - - FillChar(Context, sizeof(Context), 0) -end; - -end. diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uScript.pas --- a/hedgewars/uScript.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uScript.pas Wed Oct 27 14:02:20 2010 +0200 @@ -1,7 +1,6 @@ (* * Hedgewars, a free turn based strategy game * Copyright (c) 2004-2010 Andrey Korotaev - * Lua integration (c) 2010 Mario Liebisch * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,11 +38,12 @@ procedure freeModule; implementation -{$IFNDEF IPHONEOS} +{$IFNDEF LUA_DISABLED} uses LuaPas in 'LuaPas.pas', uConsole, uMisc, uConsts, + uVisualGears, uGears, uFloat, uWorld, @@ -52,14 +52,14 @@ uTeams, uKeys, uChat; - + var luaState : Plua_State; ScriptAmmoLoadout : shortstring; ScriptAmmoProbability : shortstring; ScriptAmmoDelay : shortstring; ScriptAmmoReinforcement : shortstring; ScriptLoaded : boolean; - + procedure ScriptPrepareAmmoStore; forward; procedure ScriptApplyAmmoStore; forward; procedure ScriptSetAmmo(ammo : TAmmoType; count, propability, delay, reinforcement: Byte); forward; @@ -117,6 +117,73 @@ lc_hidemission:= 0; end; +function lc_campaignlock(L : Plua_State) : LongInt; Cdecl; +begin + if lua_gettop(L) = 1 then + begin + // to be done + end + else + LuaError('Lua: Wrong number of parameters passed to CampaignLock!'); + lc_campaignlock:= 0; +end; + +function lc_campaignunlock(L : Plua_State) : LongInt; Cdecl; +begin + if lua_gettop(L) = 1 then + begin + // to be done + end + else + LuaError('Lua: Wrong number of parameters passed to CampaignUnlock!'); + lc_campaignunlock:= 0; +end; + +function lc_spawnhealthcrate(L: Plua_State) : LongInt; Cdecl; +var gear: PGear; +begin + if lua_gettop(L) <> 2 then begin + LuaError('Lua: Wrong number of parameters passed to SpawnHealthCrate!'); + lua_pushnil(L); + end + else begin + gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), + HealthCrate, 0); + lua_pushnumber(L, gear^.uid); + end; + lc_spawnhealthcrate := 1; +end; + +function lc_spawnammocrate(L: PLua_State): LongInt; Cdecl; +var gear: PGear; +begin + if lua_gettop(L) <> 3 then begin + LuaError('Lua: Wrong number of parameters passed to SpawnAmmoCrate!'); + lua_pushnil(L); + end + else begin + gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), + AmmoCrate, lua_tointeger(L, 3)); + lua_pushnumber(L, gear^.uid); + end; + lc_spawnammocrate := 1; +end; + +function lc_spawnutilitycrate(L: PLua_State): LongInt; Cdecl; +var gear: PGear; +begin + if lua_gettop(L) <> 3 then begin + LuaError('Lua: Wrong number of parameters passed to SpawnUtilityCrate!'); + lua_pushnil(L); + end + else begin + gear := SpawnCustomCrateAt(lua_tointeger(L, 1), lua_tointeger(L, 2), + UtilityCrate, lua_tointeger(L, 3)); + lua_pushnumber(L, gear^.uid); + end; + lc_spawnutilitycrate := 1; +end; + function lc_addgear(L : Plua_State) : LongInt; Cdecl; var gear : PGear; x, y, s, t: LongInt; @@ -178,6 +245,54 @@ lc_getgeartype:= 1 end; +function lc_getgearmessage(L : Plua_State) : LongInt; Cdecl; +var gear : PGear; +begin + if lua_gettop(L) <> 1 then + begin + LuaError('Lua: Wrong number of parameters passed to GetGearMessage!'); + lua_pushnil(L); // return value on stack (nil) + end + else + begin + gear:= GearByUID(lua_tointeger(L, 1)); + if gear <> nil then + lua_pushinteger(L, gear^.message) + else + lua_pushnil(L); + end; + lc_getgearmessage:= 1 +end; + +function lc_setgearmessage(L : Plua_State) : LongInt; Cdecl; +var gear : PGear; +begin + if lua_gettop(L) <> 2 then + LuaError('Lua: Wrong number of parameters passed to SetGearMessage!') + else + begin + gear:= GearByUID(lua_tointeger(L, 1)); + if gear <> nil then + gear^.message:= lua_tointeger(L, 2); + end; + lc_setgearmessage:= 0 +end; + +function lc_gethoglevel(L : Plua_State): LongInt; Cdecl; +var gear : PGear; +begin + if lua_gettop(L) <> 1 then + LuaError('Lua: Wrong number of parameters passed to GetHogLevel!') + else begin + gear := GearByUID(lua_tointeger(L, 1)); + if (gear <> nil) and (gear^.Kind = gtHedgehog) and (gear^.Hedgehog <> nil) then + lua_pushinteger(L, PHedgehog(gear^.Hedgehog)^.BotLevel) + else + lua_pushnil(L); + end; + lc_gethoglevel := 1; +end; + function lc_gethogclan(L : Plua_State) : LongInt; Cdecl; var gear : PGear; begin @@ -220,6 +335,44 @@ lc_gethogname:= 1 end; +function lc_gettimer(L : Plua_State) : LongInt; Cdecl; +var gear : PGear; +begin + if lua_gettop(L) <> 1 then + begin + LuaError('Lua: Wrong number of parameters passed to GetTimer!'); + lua_pushnil(L); // return value on stack (nil) + end + else + begin + gear:= GearByUID(lua_tointeger(L, 1)); + if gear <> nil then + lua_pushnumber(L, gear^.Timer) + else + lua_pushnil(L); + end; + lc_gettimer:= 1 +end; + +function lc_gethealth(L : Plua_State) : LongInt; Cdecl; +var gear : PGear; +begin + if lua_gettop(L) <> 1 then + begin + LuaError('Lua: Wrong number of parameters passed to GetHealth!'); + lua_pushnil(L); // return value on stack (nil) + end + else + begin + gear:= GearByUID(lua_tointeger(L, 1)); + if gear <> nil then + lua_pushnumber(L, gear^.Health) + else + lua_pushnil(L); + end; + lc_gethealth:= 1 +end; + function lc_getx(L : Plua_State) : LongInt; Cdecl; var gear : PGear; begin @@ -315,6 +468,32 @@ lc_followgear:= 0 end; +function lc_hogsay(L : Plua_State) : LongInt; Cdecl; +var gear : PGear; + vgear : PVisualGear; +begin + if lua_gettop(L) <> 3 then + begin + LuaError('Lua: Wrong number of parameters passed to HogSay!'); + end + else + begin + gear:= GearByUID(lua_tointeger(L, 1)); + if gear <> nil then + begin + vgear:= AddVisualGear(0, 0, vgtSpeechBubble); + if vgear <> nil then + begin + vgear^.Text:= lua_tostring(L, 2); + vgear^.Hedgehog:= gear^.Hedgehog; + vgear^.FrameTicks:= lua_tointeger(L, 3); + if (vgear^.FrameTicks < 1) or (vgear^.FrameTicks > 3) then vgear^.FrameTicks:= 1; + end; + end + end; + lc_hogsay:= 0 +end; + function lc_sethealth(L : Plua_State) : LongInt; Cdecl; var gear : PGear; begin @@ -325,11 +504,43 @@ else begin gear:= GearByUID(lua_tointeger(L, 1)); - if gear <> nil then gear^.Health:= lua_tointeger(L, 2) + if gear <> nil then + begin + gear^.Health:= lua_tointeger(L, 2); + SetAllToActive; + end end; lc_sethealth:= 0 end; +function lc_settimer(L : Plua_State) : LongInt; Cdecl; +var gear : PGear; +begin + if lua_gettop(L) <> 2 then + begin + LuaError('Lua: Wrong number of parameters passed to SetTimer!'); + end + else + begin + gear:= GearByUID(lua_tointeger(L, 1)); + if gear <> nil then gear^.Timer:= lua_tointeger(L, 2) + end; + lc_settimer:= 0 +end; + +function lc_seteffect(L : Plua_State) : LongInt; Cdecl; +var gear: PGear; +begin + if lua_gettop(L) <> 3 then + LuaError('Lua: Wrong number of parameters passed to SetEffect!') + else begin + gear := GearByUID(lua_tointeger(L, 1)); + if gear <> nil then + PHedgehog(gear^.Hedgehog)^.Effects[THogEffect(lua_tointeger(L, 2))]:= lua_tointeger(L, 3) <> 0; + end; + lc_seteffect := 0; +end; + function lc_setstate(L : Plua_State) : LongInt; Cdecl; var gear : PGear; begin @@ -340,7 +551,11 @@ else begin gear:= GearByUID(lua_tointeger(L, 1)); - if gear <> nil then gear^.State:= lua_tointeger(L, 2) + if gear <> nil then + begin + gear^.State:= lua_tointeger(L, 2); + SetAllToActive; + end end; lc_setstate:= 0 end; @@ -373,7 +588,11 @@ else begin gear:= GearByUID(lua_tointeger(L, 1)); - if gear <> nil then gear^.Tag:= lua_tointeger(L, 2) + if gear <> nil then + begin + gear^.Tag:= lua_tointeger(L, 2); + SetAllToActive; + end end; lc_settag:= 0 end; @@ -451,6 +670,22 @@ lc_addhog:= 1; end; +function lc_hogturnleft(L : Plua_State) : LongInt; Cdecl; +var gear: PGear; +begin + if lua_gettop(L) <> 2 then + begin + LuaError('Lua: Wrong number of parameters passed to HogTurnLeft!'); + end + else + begin + gear:= GearByUID(lua_tointeger(L, 1)); + if gear <> nil then + gear^.dX.isNegative:= lua_toboolean(L, 2); + end; + lc_hogturnleft:= 0; +end; + function lc_getgearposition(L : Plua_State) : LongInt; Cdecl; var gear: PGear; begin @@ -487,11 +722,37 @@ y:= lua_tointeger(L, 3); gear^.X:= int2hwfloat(x); gear^.Y:= int2hwfloat(y); + SetAllToActive; end end; lc_setgearposition:= 0 end; +function lc_setzoom(L : Plua_State) : LongInt; Cdecl; +begin + if lua_gettop(L) <> 1 then + LuaError('Lua: Wrong number of parameters passed to SetZoom!') + else + begin + ZoomValue:= lua_tonumber(L, 1); + if ZoomValue < cMaxZoomLevel then ZoomValue:= cMaxZoomLevel; + if ZoomValue > cMinZoomLevel then ZoomValue:= cMinZoomLevel; + end; + lc_setzoom:= 0 +end; + +function lc_getzoom(L : Plua_State) : LongInt; Cdecl; +begin + if lua_gettop(L) <> 0 then + begin + LuaError('Lua: Wrong number of parameters passed to GetZoom!'); + lua_pushnil(L) + end + else + lua_pushnumber(L, ZoomValue); + lc_getzoom:= 1 +end; + function lc_setammo(L : Plua_State) : LongInt; Cdecl; var np: LongInt; begin @@ -572,6 +833,7 @@ ScriptSetInteger('LandAdds', cLandAdditions); ScriptSetInteger('Explosives', cExplosives); ScriptSetInteger('Delay', cInactDelay); +ScriptSetInteger('Ready', cReadyDelay); ScriptSetInteger('SuddenDeathTurns', cSuddenDTurns); ScriptSetString('Map', ''); ScriptSetString('Theme', ''); @@ -592,11 +854,12 @@ ParseCommand('$landadds ' + ScriptGetString('LandAdds'), true); ParseCommand('$explosives ' + ScriptGetString('Explosives'), true); ParseCommand('$delay ' + ScriptGetString('Delay'), true); +ParseCommand('$ready ' + ScriptGetString('Ready'), true); ParseCommand('$sd_turns ' + ScriptGetString('SuddenDeathTurns'), true); if ScriptGetString('Map') <> '' then ParseCommand('map ' + ScriptGetString('Map'), true); if ScriptGetString('Theme') <> '' then - ParseCommand('theme ' + ScriptGetString('Theme'), true); + ParseCommand('theme ' + ScriptGetString('Theme'), true); if ScriptExists('onAmmoStoreInit') then begin @@ -611,9 +874,12 @@ procedure ScriptLoad(name : shortstring); var ret : LongInt; begin -ret:= luaL_loadfile(luaState, Str2PChar(name)); +ret:= luaL_loadfile(luaState, Str2PChar(Pathz[ptData] + '/' + name)); if ret <> 0 then - LuaError('Lua: Failed to load ' + name + '(error ' + IntToStr(ret) + ')') + begin + LuaError('Lua: Failed to load ' + name + '(error ' + IntToStr(ret) + ')'); + LuaError('Lua: ' + lua_tostring(luaState, -1)); + end else begin WriteLnToConsole('Lua: ' + name + ' loaded'); @@ -626,6 +892,8 @@ procedure SetGlobals; begin ScriptSetInteger('TurnTimeLeft', TurnTimeLeft); +ScriptSetInteger('GameTime', GameTicks); +ScriptSetInteger('RealTime', RealTicks); if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then ScriptSetInteger('CurrentHedgehog', CurrentHedgehog^.Gear^.UID) else @@ -746,6 +1014,7 @@ var at : TGearType; am : TAmmoType; st : TSound; + he: THogEffect; begin // initialize lua luaState:= lua_open; @@ -755,6 +1024,7 @@ luaopen_base(luaState); luaopen_string(luaState); luaopen_math(luaState); +luaopen_table(luaState); // import some variables ScriptSetInteger('LAND_WIDTH', LAND_WIDTH); @@ -779,7 +1049,28 @@ ScriptSetInteger('gfPlaceHog', gfPlaceHog); ScriptSetInteger('gfSharedAmmo', gfSharedAmmo); ScriptSetInteger('gfDisableGirders', gfDisableGirders); -ScriptSetInteger('gfExplosives', gfExplosives); + +ScriptSetInteger('gmLeft', gmLeft); +ScriptSetInteger('gmRight', gmRight); +ScriptSetInteger('gmUp', gmUp); +ScriptSetInteger('gmDown', gmDown); +ScriptSetInteger('gmSwitch', gmSwitch); +ScriptSetInteger('gmAttack', gmAttack); +ScriptSetInteger('gmLJump', gmLJump); +ScriptSetInteger('gmHJump', gmHJump); +ScriptSetInteger('gmDestroy', gmDestroy); +ScriptSetInteger('gmSlot', gmSlot); +ScriptSetInteger('gmWeapon', gmWeapon); +ScriptSetInteger('gmTimer', gmTimer); +ScriptSetInteger('gmAnimate', gmAnimate); +ScriptSetInteger('gmPrecise', gmPrecise); +ScriptSetInteger('gmAllStoppable', gmAllStoppable); + + +// speech bubbles +ScriptSetInteger('SAY_SAY', 1); +ScriptSetInteger('SAY_THINK', 2); +ScriptSetInteger('SAY_SHOUT', 3); // register gear types for at:= Low(TGearType) to High(TGearType) do @@ -792,9 +1083,15 @@ // register ammo types for am:= Low(TAmmoType) to High(TAmmoType) do ScriptSetInteger(EnumToStr(am), ord(am)); - + +for he:= Low(THogEffect) to High(THogEffect) do + ScriptSetInteger(EnumToStr(he), ord(he)); + // register functions lua_register(luaState, 'AddGear', @lc_addgear); +lua_register(luaState, 'SpawnHealthCrate', @lc_spawnhealthcrate); +lua_register(luaState, 'SpawnAmmoCrate', @lc_spawnammocrate); +lua_register(luaState, 'SpawnUtilityCrate', @lc_spawnutilitycrate); lua_register(luaState, 'WriteLnToConsole', @lc_writelntoconsole); lua_register(luaState, 'GetGearType', @lc_getgeartype); lua_register(luaState, 'EndGame', @lc_endgame); @@ -809,8 +1106,10 @@ lua_register(luaState, 'AddTeam', @lc_addteam); lua_register(luaState, 'AddHog', @lc_addhog); lua_register(luaState, 'SetHealth', @lc_sethealth); +lua_register(luaState, 'SetEffect', @lc_seteffect); lua_register(luaState, 'GetHogClan', @lc_gethogclan); lua_register(luaState, 'GetHogName', @lc_gethogname); +lua_register(luaState, 'GetHogLevel', @lc_gethoglevel); lua_register(luaState, 'GetX', @lc_getx); lua_register(luaState, 'GetY', @lc_gety); lua_register(luaState, 'CopyPV', @lc_copypv); @@ -820,6 +1119,17 @@ lua_register(luaState, 'SetState', @lc_setstate); lua_register(luaState, 'GetState', @lc_getstate); lua_register(luaState, 'SetTag', @lc_settag); +lua_register(luaState, 'SetTimer', @lc_settimer); +lua_register(luaState, 'GetTimer', @lc_gettimer); +lua_register(luaState, 'GetHealth', @lc_gethealth); +lua_register(luaState, 'SetZoom', @lc_setzoom); +lua_register(luaState, 'GetZoom', @lc_getzoom); +lua_register(luaState, 'HogSay', @lc_hogsay); +lua_register(luaState, 'HogTurnLeft', @lc_hogturnleft); +lua_register(luaState, 'CampaignLock', @lc_campaignlock); +lua_register(luaState, 'CampaignUnlock', @lc_campaignunlock); +lua_register(luaState, 'GetGearMessage', @lc_getgearmessage); +lua_register(luaState, 'SetGearMessage', @lc_setgearmessage); ScriptClearStack; // just to be sure stack is empty diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uSound.pas --- a/hedgewars/uSound.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uSound.pas Wed Oct 27 14:02:20 2010 +0200 @@ -77,13 +77,20 @@ procedure InitSound; var i: TSound; + channels: LongInt; begin if not isSoundEnabled then exit; WriteToConsole('Init sound...'); isSoundEnabled:= SDL_InitSubSystem(SDL_INIT_AUDIO) >= 0; +{$IFDEF IPHONEOS} + channels:= 1; +{$ELSE} + channels:= 2; +{$ENDIF} + if isSoundEnabled then - isSoundEnabled:= Mix_OpenAudio(44100, $8010, 2, 1024) = 0; + isSoundEnabled:= Mix_OpenAudio(44100, $8010, channels, 1024) = 0; {$IFDEF SDL_MIXER_NEWER} WriteToConsole('Init SDL_mixer... '); @@ -123,7 +130,7 @@ // make sure all instances of sdl_mixer are unloaded before continuing while Mix_Init(0) <> 0 do Mix_Quit(); -{$ENDIF} +{$ENDIF} Mix_CloseAudio(); end; @@ -136,17 +143,17 @@ if not isSoundEnabled then exit; defVoicepack:= AskForVoicepack('Default'); - + for t:= 0 to cMaxTeams do if voicepacks[t].name <> '' then for i:= Low(TSound) to High(TSound) do voicepacks[t].chunks[i]:= nil; - + for i:= Low(TSound) to High(TSound) do begin defVoicepack^.chunks[i]:= nil; // preload all the big sound files (>32k) that would otherwise lockup the game - if (i in [sndBeeWater, sndBee, sndCake, sndHellishImpact1, sndHellish, sndHomerun, sndMolotov, sndMortar, sndRideOfTheValkyries, sndYoohoo]) + if (i in [sndBeeWater, sndBee, sndCake, sndHellishImpact1, sndHellish, sndHomerun, sndMolotov, sndMortar, sndRideOfTheValkyries, sndYoohoo]) and (Soundz[i].Path <> ptVoices) and (Soundz[i].FileName <> '') then begin s:= Pathz[Soundz[i].Path] + '/' + Soundz[i].FileName; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uStats.pas --- a/hedgewars/uStats.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uStats.pas Wed Oct 27 14:02:20 2010 +0200 @@ -34,6 +34,14 @@ FinishedTurns: Longword; end; +type TTeamStats = record + Kills : Longword; + AIKills : Longword; + TeamKills : Longword; + TurnSkips : Longword; + TeamDamage : Longword; +end; + var TotalRounds: LongInt; FinishedTurnsTotal: LongInt; @@ -82,6 +90,12 @@ inc(CurrentHedgehog^.stats.StepKills); inc(Kills); inc(KillsTotal); + inc(CurrentHedgehog^.Team^.stats.Kills); + if (CurrentHedgehog^.Team^.TeamName = + PHedgehog(Gear^.Hedgehog)^.Team^.TeamName) then begin + inc(CurrentHedgehog^.Team^.stats.TeamKills); + inc(CurrentHedgehog^.Team^.stats.TeamDamage, Gear^.Damage); + end; if CurrentHedgehog^.Team^.Clan = PHedgehog(Gear^.Hedgehog)^.Team^.Clan then inc(KillsClan); end; @@ -185,18 +199,26 @@ var i, t: LongInt; msd, msk: Longword; msdhh, mskhh: PHedgehog; mskcnt: Longword; + maxTeamKills : Longword; + maxTeamKillsName : shortstring; + maxTurnSkips : Longword; + maxTurnSkipsName : shortstring; + maxTeamDamage : Longword; + maxTeamDamageName : shortstring; begin msd:= 0; msdhh:= nil; msk:= 0; mskhh:= nil; mskcnt:= 0; +maxTeamKills := 0; +maxTurnSkips := 0; +maxTeamDamage := 0; for t:= 0 to Pred(TeamsCount) do with TeamsArray[t]^ do - begin + begin if not ExtDriven then SendStat(siTeamStats, GetTeamStatString(TeamsArray[t])); - for i:= 0 to cMaxHHIndex do - begin + for i:= 0 to cMaxHHIndex do begin if Hedgehogs[i].stats.MaxStepDamageGiven > msd then begin msdhh:= @Hedgehogs[i]; @@ -211,13 +233,52 @@ mskhh:= @Hedgehogs[i]; msk:= Hedgehogs[i].stats.MaxStepKills end; - end + end; + + { send player stats for winner teams } + if Clan^.ClanHealth > 0 then begin + SendStat(siPlayerKills, inttostr(Clan^.Color) + ' ' + + inttostr(stats.Kills) + ' ' + TeamName); + end; + + { determine maximum values of TeamKills, TurnSkips, TeamDamage } + if stats.TeamKills > maxTeamKills then begin + maxTeamKills := stats.TeamKills; + maxTeamKillsName := TeamName; + end; + if stats.TurnSkips > maxTurnSkips then begin + maxTurnSkips := stats.TurnSkips; + maxTurnSkipsName := TeamName; end; + if stats.TeamDamage > maxTeamDamage then begin + maxTeamDamage := stats.TeamDamage; + maxTeamDamageName := TeamName; + end; + + end; + +{ now send player stats for loser teams } +for t:= 0 to Pred(TeamsCount) do begin + with TeamsArray[t]^ do begin + if Clan^.ClanHealth = 0 then begin + SendStat(siPlayerKills, inttostr(Clan^.Color) + ' ' + + inttostr(stats.Kills) + ' ' + TeamName); + end; + end; +end; + if msdhh <> nil then SendStat(siMaxStepDamage, inttostr(msd) + ' ' + msdhh^.Name + ' (' + msdhh^.Team^.TeamName + ')'); if mskcnt = 1 then SendStat(siMaxStepKills, inttostr(msk) + ' ' + mskhh^.Name + ' (' + mskhh^.Team^.TeamName + ')'); +if maxTeamKills > 1 then + SendStat(siMaxTeamKills, inttostr(maxTeamKills) + ' ' + maxTeamKillsName); +if maxTurnSkips > 2 then + SendStat(siMaxTurnSkips, inttostr(maxTurnSkips) + ' ' + maxTurnSkipsName); +if maxTeamDamage > 30 then + SendStat(siMaxTeamDamage, inttostr(maxTeamDamage) + ' ' + maxTeamDamageName); + if KilledHHs > 0 then SendStat(siKilledHHs, inttostr(KilledHHs)); end; @@ -226,7 +287,7 @@ TotalRounds:= -1; FinishedTurnsTotal:= -1; end; - + procedure freeModule; begin diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uStore.pas --- a/hedgewars/uStore.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uStore.pas Wed Oct 27 14:02:20 2010 +0200 @@ -20,7 +20,7 @@ unit uStore; interface -uses sysutils, uConsts, uTeams, SDLh, GLunit; +uses sysutils, uConsts, uTeams, SDLh, GLunit, uWorld; var PixelFormat: PSDL_PixelFormat; @@ -62,6 +62,7 @@ procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture); procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real); procedure DrawFillRect(r: TSDL_Rect); +procedure DrawCircle(X, Y, Radius: LongInt; Width: Single; r, g, b, a: Byte); procedure DrawRoundRect(rect: PSDL_Rect; BorderColor, FillColor: Longword; Surface: PSDL_Surface; Clear: boolean); function CheckCJKFont(s: ansistring; font: THWFont): THWFont; function RenderStringTex(s: ansistring; Color: Longword; font: THWFont): PTexture; @@ -84,7 +85,7 @@ procedure Tint(c: Longword); inline; implementation -uses uMisc, uConsole, uLocale; +uses uMisc, uConsole, uLocale, uMobile; type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple); @@ -237,13 +238,13 @@ r.h:= 19; DrawRoundRect(@r, cWhiteColor, cNearBlackColor, texsurf, true); - + // overwrite flag for cpu teams and keep players from using it if (Hedgehogs[0].Gear <> nil) and (Hedgehogs[0].BotLevel > 0) then Flag:= 'cpu' else if Flag = 'cpu' then Flag:= 'hedgewars'; - + flagsurf:= LoadImage(Pathz[ptFlags] + '/' + Flag, ifNone); if flagsurf = nil then flagsurf:= LoadImage(Pathz[ptFlags] + '/hedgewars', ifNone); @@ -251,7 +252,7 @@ copyToXY(flagsurf, texsurf, 2, 2); SDL_FreeSurface(flagsurf); flagsurf:= nil; - + // restore black border pixels inside the flag PLongwordArray(texsurf^.pixels)^[32 * 2 + 2]:= cNearBlackColor; PLongwordArray(texsurf^.pixels)^[32 * 2 + 23]:= cNearBlackColor; @@ -261,6 +262,8 @@ FlagTex:= Surface2Tex(texsurf, false); SDL_FreeSurface(texsurf); + AIKillsTex := RenderStringTex(inttostr(stats.AIKills), Clan^.Color, fnt16); + dec(drY, r.h + 2); DrawHealthY:= drY; for i:= 0 to 7 do @@ -274,27 +277,27 @@ texsurf:= LoadImage(Pathz[ptHats] + '/Reserved/' + Copy(Hat,9,Length(s)-8), ifNone) else texsurf:= LoadImage(Pathz[ptHats] + '/' + Hat, ifNone); - if texsurf <> nil then + if texsurf <> nil then begin - HatTex:= Surface2Tex(texsurf, true); - SDL_FreeSurface(texsurf) + HatTex:= Surface2Tex(texsurf, true); + SDL_FreeSurface(texsurf) end; - texsurf:= nil; + texsurf:= nil; end end; end; MissionIcons:= LoadImage(Pathz[ptGraphics] + '/missions', ifCritical); iconsurf:= SDL_CreateRGBSurface(SDL_SWSURFACE, 28, 28, 32, RMask, GMask, BMask, AMask); - if iconsurf <> nil then + if iconsurf <> nil then begin - r.x:= 0; - r.y:= 0; - r.w:= 28; - r.h:= 28; - DrawRoundRect(@r, cWhiteColor, cNearBlackColor, iconsurf, true); - ropeIconTex:= Surface2Tex(iconsurf, false); - SDL_FreeSurface(iconsurf); - iconsurf:= nil; + r.x:= 0; + r.y:= 0; + r.w:= 28; + r.h:= 28; + DrawRoundRect(@r, cWhiteColor, cNearBlackColor, iconsurf, true); + ropeIconTex:= Surface2Tex(iconsurf, false); + SDL_FreeSurface(iconsurf); + iconsurf:= nil; end; end; @@ -325,7 +328,7 @@ // make black pixel be alpha-transparent for i:= 0 to texsurf^.w * texsurf^.h - 1 do - if PLongwordArray(texsurf^.pixels)^[i] = AMask then PLongwordArray(texsurf^.pixels)^[i]:= 0; + if PLongwordArray(texsurf^.pixels)^[i] = AMask then PLongwordArray(texsurf^.pixels)^[i]:= (RMask or GMask or BMask) and Color; if SDL_MustLock(texsurf) then SDL_UnlockSurface(texsurf); @@ -358,8 +361,9 @@ if TeamsArray[t] <> nil then with TeamsArray[t]^ do begin - if GraveName = '' then GraveName:= 'Simple'; - texsurf:= LoadImage(Pathz[ptGraves] + '/' + GraveName, ifCritical or ifTransparent); + if GraveName = '' then GraveName:= 'Statue'; + texsurf:= LoadImage(Pathz[ptGraves] + '/' + GraveName, ifTransparent); + if texsurf = nil then texsurf:= LoadImage(Pathz[ptGraves] + '/Statue', ifCritical or ifTransparent); GraveTex:= Surface2Tex(texsurf, false); SDL_FreeSurface(texsurf) end @@ -407,30 +411,29 @@ if tmpsurf <> nil then begin if getImageDimensions then - begin + begin imageWidth:= tmpsurf^.w; imageHeight:= tmpsurf^.h - end; + end; if getDimensions then - begin + begin Width:= tmpsurf^.w; Height:= tmpsurf^.h - end; + end; if (ii in [sprSky, sprSkyL, sprSkyR, sprHorizont, sprHorizontL, sprHorizontR]) then - begin + begin Texture:= Surface2Tex(tmpsurf, true); Texture^.Scale:= 2 - end + end else - begin + begin Texture:= Surface2Tex(tmpsurf, false); if (ii = sprWater) and ((cReducedQuality and (rq2DWater or rqClampLess)) = 0) then // HACK: We should include some sprite attribute to define the texture wrap directions - begin glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - end; end; glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, priority); - if saveSurf then Surface:= tmpsurf else SDL_FreeSurface(tmpsurf) + if saveSurf then + Surface:= tmpsurf else SDL_FreeSurface(tmpsurf) end else Surface:= nil @@ -444,6 +447,7 @@ InitHealth; +// TODO: are those textures ever freed? PauseTexture:= RenderStringTex(trmsg[sidPaused], cYellowColor, fntBig); ConfirmTexture:= RenderStringTex(trmsg[sidConfirm], cYellowColor, fntBig); SyncTexture:= RenderStringTex(trmsg[sidSync], cYellowColor, fntBig); @@ -453,29 +457,24 @@ // name of weapons in ammo menu for ai:= Low(TAmmoType) to High(TAmmoType) do with Ammoz[ai] do - begin + begin TryDo(trAmmo[NameId] <> '','No default text/translation found for ammo type #' + intToStr(ord(ai)) + '!',true); tmpsurf:= TTF_RenderUTF8_Blended(Fontz[CheckCJKFont(trAmmo[NameId],fnt16)].Handle, Str2PChar(trAmmo[NameId]), cWhiteColorChannels); TryDo(tmpsurf <> nil,'Name-texture creation for ammo type #' + intToStr(ord(ai)) + ' failed!',true); tmpsurf:= doSurfaceConversion(tmpsurf); NameTex:= Surface2Tex(tmpsurf, false); SDL_FreeSurface(tmpsurf) - end; + end; // number of weapons in ammo menu for i:= Low(CountTexz) to High(CountTexz) do - begin +begin tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(IntToStr(i) + 'x'), cWhiteColorChannels); tmpsurf:= doSurfaceConversion(tmpsurf); CountTexz[i]:= Surface2Tex(tmpsurf, false); SDL_FreeSurface(tmpsurf) - end; +end; -{$IFDEF DUMP} -//not working anymore, where are LandSurface and StoreSurface defined? -//SDL_SaveBMP_RW(LandSurface, SDL_RWFromFile('LandSurface.bmp', 'wb'), 1); -//SDL_SaveBMP_RW(StoreSurface, SDL_RWFromFile('StoreSurface.bmp', 'wb'), 1); -{$ENDIF} AddProgress; {$IFDEF SDL_IMAGE_NEWER} @@ -494,6 +493,13 @@ VertexBuffer, TextureBuffer: array [0..3] of TVertex2f; begin if (SourceTexture^.h = 0) or (SourceTexture^.w = 0) then exit; + +// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs) +if (abs(X) > W) and ((abs(X + W / 2) - W / 2) > cScreenWidth / cScaleFactor) then + exit; +if (abs(Y) > H) and ((abs(Y + H / 2 - (0.5 * cScreenHeight)) - H / 2) > cScreenHeight / cScaleFactor) then + exit; + rr.x:= X; rr.y:= Y; rr.w:= W; @@ -532,6 +538,7 @@ procedure DrawTexture(X, Y: LongInt; Texture: PTexture; Scale: GLfloat); begin + glPushMatrix; glTranslatef(X, Y, 0); glScalef(Scale, Scale, 1); @@ -555,6 +562,12 @@ hw, nx, ny: LongInt; VertexBuffer, TextureBuffer: array [0..3] of TVertex2f; begin +// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs) +if (abs(X) > W) and ((abs(X + dir * OffsetX) - W / 2) * cScaleFactor > cScreenWidth) then + exit; +if (abs(Y) > H) and ((abs(Y + OffsetY - (0.5 * cScreenHeight)) - W / 2) * cScaleFactor > cScreenHeight) then + exit; + glPushMatrix; glTranslatef(X, Y, 0); @@ -636,6 +649,12 @@ procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real); var VertexBuffer: array [0..3] of TVertex2f; begin +// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs) +if (abs(X) > 2 * hw) and ((abs(X) - hw) > cScreenWidth / cScaleFactor) then + exit; +if (abs(Y) > 2 * hh) and ((abs(Y - 0.5 * cScreenHeight) - hh) > cScreenHeight / cScaleFactor) then + exit; + glPushMatrix; glTranslatef(X, Y, 0); @@ -716,8 +735,13 @@ end; procedure DrawCentered(X, Top: LongInt; Source: PTexture); +var scale: GLfloat; begin -DrawTexture(X - Source^.w shr 1, Top, Source) + if (Source^.w + 20) > cScreenWidth then + scale:= cScreenWidth / (Source^.w + 20) + else + scale:= 1.0; + DrawTexture(X - round(Source^.w * scale) div 2, Top, Source, scale) end; procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real); @@ -729,6 +753,11 @@ var l, r, t, b: real; TextureBuffer: array [0..3] of TVertex2f; begin +// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs) +if (abs(X) > 32) and ((abs(X) - 16) * cScaleFactor > cScreenWidth) then + exit; +if (abs(Y) > 32) and ((abs(Y - 0.5 * cScreenHeight) - 16) * cScaleFactor > cScreenHeight) then + exit; t:= Pos * 32 / HHTexture^.h; b:= (Pos + 1) * 32 / HHTexture^.h; @@ -769,6 +798,12 @@ procedure DrawFillRect(r: TSDL_Rect); var VertexBuffer: array [0..3] of TVertex2f; begin +// don't draw anything outside the visible screen space (first check fixes some sprite drawing, e.g. hedgehogs) +if (abs(r.x) > r.w) and ((abs(r.x + r.w / 2) - r.w / 2) * cScaleFactor > cScreenWidth) then + exit; +if (abs(r.y) > r.h) and ((abs(r.y + r.h / 2 - (0.5 * cScreenHeight)) - r.h / 2) * cScaleFactor > cScreenHeight) then + exit; + glDisable(GL_TEXTURE_2D); Tint($00, $00, $00, $80); @@ -789,6 +824,29 @@ glEnable(GL_TEXTURE_2D) end; +procedure DrawCircle(X, Y, Radius: LongInt; Width: Single; r, g, b, a: Byte); +var + i: LongInt; + CircleVertex: array [0..359] of TVertex2f; +begin + for i := 0 to 359 do begin + CircleVertex[i].X := X + Radius*cos(i*pi/180); + CircleVertex[i].Y := Y + Radius*sin(i*pi/180); + end; + glDisable(GL_TEXTURE_2D); + glEnable(GL_LINE_SMOOTH); + glPushMatrix; + glTranslatef(WorldDx, WorldDy, 0); + glLineWidth(Width); + Tint(r, g, b, a); + glVertexPointer(2, GL_FLOAT, 0, @CircleVertex[0]); + glDrawArrays(GL_LINE_LOOP, 0, 360); + Tint($FF, $FF, $FF, $FF); + glPopMatrix; + glEnable(GL_TEXTURE_2D); + glDisable(GL_LINE_SMOOTH); +end; + procedure StoreRelease; var ii: TSprite; begin @@ -820,7 +878,12 @@ u: WideChar; tmpstr: array[0..256] of WideChar; begin -if (font >= CJKfnt16) or (length(s) = 0) then exit(font); + +{$IFNDEF IPHONEOS} +// remove chinese fonts for now +if (font >= CJKfnt16) or (length(s) = 0) then +{$ENDIF} + exit(font); l:= Utf8ToUnicode(@tmpstr, Str2PChar(s), length(s))-1; i:= 0; @@ -1064,20 +1127,7 @@ var tmpsurf: PSDL_Surface; s: shortstring; begin - WriteToConsole(msgLoading + filename + '.png (flags: ' + inttostr(imageFlags)+') '); -{$IFDEF DEBUGFILE} - WriteToConsole('[flag translation:'); - if imageFlags = ifNone then - WriteToConsole(' None') - else - begin - if (imageFlags and ifAlpha) <> 0 then WriteToConsole(' Alpha'); - if (imageFlags and ifCritical) <> 0 then WriteToConsole(' Critical'); - if (imageFlags and ifTransparent) <> 0 then WriteToConsole(' Transparent'); - if (imageFlags and ifIgnoreCaps) <> 0 then WriteToConsole(' IgnoreCaps'); - end; - WriteToConsole('] '); -{$ENDIF} + WriteToConsole(msgLoading + filename + '.png [flags: ' + inttostr(imageFlags) + ']'); s:= filename + '.png'; tmpsurf:= IMG_Load(Str2PChar(s)); @@ -1093,7 +1143,7 @@ SDL_FreeSurface(tmpsurf); OutError(msgFailedSize, (imageFlags and ifCritical) <> 0); // dummy surface to replace non-critical textures that failed to load due to their size - exit(SDL_CreateRGBSurface(SDL_SWSURFACE, 32, 32, 32, RMask, GMask, BMask, AMask)); + exit(SDL_CreateRGBSurface(SDL_SWSURFACE, 2, 2, 32, RMask, GMask, BMask, AMask)); end; tmpsurf:= doSurfaceConversion(tmpsurf); @@ -1109,6 +1159,7 @@ function glLoadExtension(extension : shortstring) : boolean; begin {$IFDEF IPHONEOS} + extension:= extension; // avoid hint glLoadExtension:= false; {$IFDEF DEBUGFILE} AddFileLog('OpenGL - "' + extension + '" skipped') @@ -1125,23 +1176,20 @@ end; procedure SetupOpenGL; +{$IFNDEF IPHONEOS} var vendor: shortstring; {$IFDEF DARWIN} one: LongInt; {$ENDIF} +{$ENDIF} begin - // initialized here because when initModule is called cScreenWidth/Height are not yet set - if (uStore.wScreen = 0) and (uStore.hScreen = 0) then - begin - uStore.wScreen:= cScreenWidth; - uStore.hScreen:= cScreenHeight; - end; {$IFDEF IPHONEOS} SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0); // no double buffering SDL_GL_SetAttribute(SDL_GL_RETAINED_BACKING, 1); {$ELSE} SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + vendor:= LowerCase(shortstring(pchar(glGetString(GL_VENDOR)))); {$IFNDEF SDL13} // this attribute is default in 1.3 and must be enabled in MacOSX if (cReducedQuality and rqDesyncVBlank) <> 0 then @@ -1165,10 +1213,9 @@ glGetIntegerv(GL_MAX_TEXTURE_SIZE, @MaxTextureSize); - vendor:= LowerCase(shortstring(pchar(glGetString(GL_VENDOR)))); {$IFDEF DEBUGFILE} AddFileLog('OpenGL-- Renderer: ' + shortstring(pchar(glGetString(GL_RENDERER)))); - AddFileLog(' |----- Vendor: ' + vendor); + AddFileLog(' |----- Vendor: ' + shortstring(pchar(glGetString(GL_VENDOR)))); AddFileLog(' |----- Version: ' + shortstring(pchar(glGetString(GL_VERSION)))); AddFileLog(' \----- GL_MAX_TEXTURE_SIZE: ' + inttostr(MaxTextureSize)); {$ENDIF} @@ -1239,11 +1286,10 @@ {$ENDIF} // set view port to whole window -{$IFDEF IPHONEOS} - glViewport(0, 0, cScreenHeight, cScreenWidth); -{$ELSE} - glViewport(0, 0, cScreenWidth, cScreenHeight); -{$ENDIF} + if (rotationQt = 0) or (rotationQt = 180) then + glViewport(0, 0, cScreenWidth, cScreenHeight) + else + glViewport(0, 0, cScreenHeight, cScreenWidth); glMatrixMode(GL_MODELVIEW); // prepare default translation/scaling @@ -1261,8 +1307,8 @@ glDisable(GL_DITHER); // enable common states by default as they save a lot glEnable(GL_TEXTURE_2D); - glEnableClientState(GL_VERTEX_ARRAY); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); end; procedure SetScale(f: GLfloat); @@ -1277,7 +1323,7 @@ glPushMatrix; // save default scaling glLoadIdentity; glRotatef(rotationQt, 0, 0, 1); - glScalef(f / wScreen, -f / hScreen, 1.0); + glScalef(f / cScreenWidth, -f / cScreenHeight, 1.0); glTranslatef(0, -cScreenHeight / 2, 0); end; @@ -1295,13 +1341,12 @@ texsurf:= LoadImage(Pathz[ptGraphics] + '/Progress', ifCritical or ifTransparent); ProgrTex:= Surface2Tex(texsurf, false); - + squaresize:= texsurf^.w shr 1; numsquares:= texsurf^.h div squaresize; SDL_FreeSurface(texsurf); -{$IFDEF IPHONEOS} - startSpinning(); -{$ENDIF} + + perfExt_AddProgress(); end; TryDo(ProgrTex <> nil, 'Error - Progress Texure is nil!', true); @@ -1309,12 +1354,12 @@ glClear(GL_COLOR_BUFFER_BIT); if Step < numsquares then r.x:= 0 else r.x:= squaresize; - + r.y:= (Step mod numsquares) * squaresize; r.w:= squaresize; r.h:= squaresize; - - DrawFromRect( -squaresize div 2, (hScreen - squaresize) shr 1, @r, ProgrTex); + + DrawFromRect( -squaresize div 2, (cScreenHeight - squaresize) shr 1, @r, ProgrTex); SDL_GL_SwapBuffers(); {$IFDEF SDL13} @@ -1328,9 +1373,7 @@ begin WriteLnToConsole('Freeing progress surface... '); FreeTexture(ProgrTex); -{$IFDEF IPHONEOS} - stopSpinning(); -{$ENDIF} + perfExt_FinishProgress(); end; procedure flipSurface(Surface: PSDL_Surface; Vertical: Boolean); @@ -1468,7 +1511,7 @@ if w < (i + wa) then w:= i + wa; inc(h, j + ha); end; - + // add borders space inc(w, wa); inc(h, ha + 8); @@ -1498,7 +1541,7 @@ if tmpline <> '' then begin r:= WriteInRect(tmpsurf, FontBorder + 2, r.y + r.h, $ff707070, font, tmpline); - + // render highlighted caption (if there's a ':') tmpline2:= ''; SplitByChar(tmpline, tmpline2, ':'); @@ -1516,7 +1559,7 @@ r.h:= 32; SDL_FillRect(tmpsurf, @r, $ffffffff); SDL_UpperBlit(iconsurf, iconrect, tmpsurf, @r); - + RenderHelpWindow:= Surface2Tex(tmpsurf, true); SDL_FreeSurface(tmpsurf) end; @@ -1539,8 +1582,8 @@ // image region i:= LongInt(atype) - 1; -r.x:= (i shr 5) * 32; -r.y:= (i mod 32) * 32; +r.x:= (i shr 4) * 32; +r.y:= (i mod 16) * 32; r.w:= 32; r.h:= 32; @@ -1558,7 +1601,7 @@ extra:= trmsg[sidNoEndTurn]; extracolor:= LongInt($ff70c770); end -else +else begin extra:= ''; extracolor:= 0; @@ -1588,16 +1631,12 @@ begin PixelFormat:= nil; SDLPrimSurface:= nil; -{$IFDEF IPHONEOS} - rotationQt:= -90; -{$ELSE} + +{$IFNDEF IPHONEOS} rotationQt:= 0; cGPUVendor:= gvUnknown; {$ENDIF} - // really initalized in storeLoad - uStore.wScreen:= 0; - uStore.hScreen:= 0; - + cScaleFactor:= 2.0; SupportNPOTT:= false; Step:= 0; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uTeams.pas Wed Oct 27 14:02:20 2010 +0200 @@ -22,7 +22,8 @@ interface uses uConsts, uKeys, uGears, uRandom, uFloat, uStats, uVisualGears, uCollisions, GLunit, uSound; -type PHHAmmo = ^THHAmmo; +type + PHHAmmo = ^THHAmmo; THHAmmo = array[0..cMaxSlotIndex, 0..cMaxSlotAmmoIndex] of TAmmo; PHedgehog = ^THedgehog; @@ -37,8 +38,8 @@ HealthTagTex, HatTex: PTexture; Ammo: PHHAmmo; + CurAmmoType: TAmmoType; AmmoStore: Longword; - CurSlot, CurAmmo: LongWord; Team: PTeam; MultiShootAttacks: Longword; visStepPos: LongWord; @@ -63,6 +64,7 @@ CrosshairTex, GraveTex, HealthTex, + AIKillsTex, FlagTex: PTexture; Flag: shortstring; GraveName: shortstring; @@ -76,6 +78,7 @@ hasGone: boolean; voicepack: PVoicepack; PlayerHash: shortstring; // md5 hash of player name. For temporary enabling of hats as thank you. Hashed for privacy of players + stats: TTeamStats; end; TClan = record @@ -111,10 +114,10 @@ function CheckForWin: boolean; procedure TeamGone(s: shortstring); procedure TeamGoneEffect(var Team: TTeam); -function GetTeamStatString(p: PTeam): shortstring; +function GetTeamStatString(p: PTeam): shortstring; implementation -uses uMisc, uWorld, uLocale, uAmmos, uChat; +uses uMisc, uWorld, uLocale, uAmmos, uChat, uMobile; const MaxTeamHealth: LongInt = 0; function CheckForWin: boolean; @@ -135,6 +138,7 @@ CheckForWin:= true; TurnTimeLeft:= 0; +ReadyTimeLeft:= 0; if AliveCount = 0 then begin // draw AddCaption(trmsg[sidDraw], cWhiteColor, capgrpGameState); @@ -172,7 +176,7 @@ if (PreviousTeam <> nil) and PlacingHogs and Unplaced then begin Unplaced:= false; - if Gear <> nil then + if Gear <> nil then begin DeleteCI(Gear); FindPlace(Gear, false, 0, LAND_WIDTH); @@ -220,19 +224,21 @@ end until (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil); -CurrentHedgehog:= @(CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog]) +CurrentHedgehog:= @(CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog]); end; procedure AfterSwitchHedgehog; var g: PGear; i, t: LongInt; + CurWeapon: PAmmo; + begin if PlacingHogs then begin PlacingHogs:= false; for t:= 0 to Pred(TeamsCount) do for i:= 0 to cMaxHHIndex do - if (TeamsArray[t]^.Hedgehogs[i].Gear <> nil) and (TeamsArray[t]^.Hedgehogs[i].Unplaced) then + if (TeamsArray[t]^.Hedgehogs[i].Gear <> nil) and (TeamsArray[t]^.Hedgehogs[i].Unplaced) then PlacingHogs:= true; if not PlacingHogs then // Reset various things I mucked with @@ -245,7 +251,8 @@ inc(CurrentTeam^.Clan^.TurnNumber); -SwitchNotHeldAmmo(CurrentHedgehog^); +CurWeapon:= GetAmmoEntry(CurrentHedgehog^); +if CurWeapon^.Count = 0 then CurrentHedgehog^.CurAmmoType:= amNothing; with CurrentHedgehog^ do begin @@ -263,6 +270,11 @@ ResetKbd; cWindSpeed:= rndSign(GetRandom * 2 * cMaxWindSpeed); +// cWindSpeedf:= cWindSpeed.QWordValue / _1.QWordValue throws Internal error 200502052 on fpc 2.5.1 +// see http://mantis.freepascal.org/view.php?id=17714 +cWindSpeedf:= SignAs(cWindSpeed,cWindSpeed).QWordValue / SignAs(_1,_1).QWordValue; +if cWindSpeed.isNegative then + CWindSpeedf := -cWindSpeedf; g:= AddGear(0, 0, gtATSmoothWindCh, 0, _0, _0, 1); g^.Tag:= hwRound(cWindSpeed * 72 / cMaxWindSpeed); {$IFDEF DEBUGFILE}AddFileLog('Wind = '+FloatToStr(cWindSpeed));{$ENDIF} @@ -272,17 +284,29 @@ bShowFinger:= true; -if (CurrentTeam^.ExtDriven or (CurrentHedgehog^.BotLevel > 0)) then - PlaySound(sndIllGetYou, CurrentTeam^.voicepack) -else - PlaySound(sndYesSir, CurrentTeam^.voicepack); - if PlacingHogs then begin if CurrentHedgehog^.Unplaced then TurnTimeLeft:= 15000 else TurnTimeLeft:= 0 end -else TurnTimeLeft:= cHedgehogTurnTime +else TurnTimeLeft:= cHedgehogTurnTime; +if (TurnTimeLeft > 0) and (CurrentHedgehog^.BotLevel = 0) then + begin + if CurrentTeam^.ExtDriven then + PlaySound(sndIllGetYou, CurrentTeam^.voicepack) + else + PlaySound(sndYesSir, CurrentTeam^.voicepack); + if PlacingHogs or (cHedgehogTurnTime < 1000000) then ReadyTimeLeft:= cReadyDelay; + AddCaption(Format(shortstring(trmsg[sidReady]), CurrentTeam^.TeamName), cWhiteColor, capgrpGameState) + end +else + begin + if TurnTimeLeft > 0 then + PlaySound(sndIllGetYou, CurrentTeam^.voicepack); + ReadyTimeLeft:= 0 + end; + +perfExt_NewTurnBeginning(); end; function AddTeam(TeamColor: Longword): PTeam; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uVisualGears.pas --- a/hedgewars/uVisualGears.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uVisualGears.pas Wed Oct 27 14:02:20 2010 +0200 @@ -115,7 +115,9 @@ @doStepSmokeTrace, @doStepSmokeTrace, @doStepExplosion, - @doStepBigExplosion + @doStepBigExplosion, + @doStepChunk, + @doStepNote ); function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType; State: LongWord = 0): PVisualGear; @@ -138,7 +140,8 @@ vgtHealthTag, vgtExplosion, vgtSmokeTrace, - vgtEvilTrace]) then + vgtEvilTrace, + vgtNote]) then begin AddVisualGear:= nil; exit @@ -169,8 +172,7 @@ end; vgtCloud: begin Frame:= random(4); - dx:= 0.000005 * random(10000); - if random(2) = 0 then dx := -dx; + dx:= 0.5 + 0.1 * random(5); // how much the cloud will be affected by wind timer:= random(4096); end; vgtExplPart, @@ -210,7 +212,7 @@ end; vgtBubble: begin dx:= 0.0000038654705 * random(10000); - dy:= 0.001 * (random(85) + 95); + dy:= 0; if random(2) = 0 then dx := -dx; FrameTicks:= 250 + random(1751); Frame:= random(5) @@ -226,7 +228,7 @@ alpha:= 1.0; scale:= 1.0 end; - vgtSmokeWhite, + vgtSmokeWhite, vgtSmoke: begin dx:= 0.0002 * (random(45) + 10); dy:= 0.0002 * (random(45) + 10); @@ -299,6 +301,21 @@ vgtBigExplosion: begin gear^.Angle:= random(360); end; + vgtChunk: begin + gear^.Frame:= random(4); + t:= random(1024); + sp:= 0.001 * (random(85) + 47); + dx:= AngleSin(t).QWordValue/4294967296 * sp; + dy:= AngleCos(t).QWordValue/4294967296 * sp * -2; + if random(2) = 0 then dx := -dx; + end; + vgtNote: begin + dx:= 0.005 * (random(15) + 10); + dy:= -0.001 * (random(40) + 20); + if random(2) = 0 then dx := -dx; + Frame:= random(4); + FrameTicks:= random(2000) + 1500; + end; end; if State <> 0 then gear^.State:= State; @@ -352,7 +369,7 @@ if Gear^.Kind = vgtFlake then begin // Damage calc from doMakeExplosion - dmg:= min(101,Radius + cHHRadius div 2 - (round(abs(Gear^.X - float(X))+abs(Gear^.Y - float(Y))) div 5)); + dmg:= min(101, int64(Radius) + cHHRadius div 2 - (round(abs(Gear^.X - float(X))+abs(Gear^.Y - float(Y))) div 5)); if dmg > 1 then begin Gear^.tdX:= 0.02 * dmg + 0.01; @@ -417,9 +434,12 @@ case Gear^.Kind of vgtExplPart: DrawSprite(sprExplPart, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame); vgtExplPart2: DrawSprite(sprExplPart2, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame); - vgtFire: DrawSprite(sprFlame, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy, (RealTicks div 64 + Gear^.Frame) mod 8); + vgtFire: if (Gear^.State and gstTmpFlag) = 0 then + DrawSprite(sprFlame, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy, (RealTicks shr 6 + Gear^.Frame) mod 8) + else + DrawTextureF(SpritesData[sprFlame].Texture, Gear^.FrameTicks / 900, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, (RealTicks shr 7 + Gear^.Frame) mod 8, 1, 16, 16); vgtBubble: DrawSprite(sprBubbles, round(Gear^.X) + WorldDx - 8, round(Gear^.Y) + WorldDy - 8, Gear^.Frame);//(RealTicks div 64 + Gear^.Frame) mod 8); - vgtSteam: DrawSprite(sprExplPart, round(Gear^.X) + WorldDx - 16, round(Gear^.Y) + WorldDy - 16, 7 - Gear^.Frame); + vgtSteam: DrawSprite(sprSmokeWhite, round(Gear^.X) + WorldDx - 11, round(Gear^.Y) + WorldDy - 11, 7 - Gear^.Frame); vgtAmmo: begin Tint($FF, $FF, $FF, floor(Gear^.alpha * $FF)); DrawTextureF(ropeIconTex, Gear^.scale, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 32, 32); @@ -455,6 +475,8 @@ Tint($FF, $FF, $FF, floor(Gear^.alpha * $FF)); DrawRotatedTextureF(SpritesData[sprSmokeRing].Texture, Gear^.scale, 0, 0, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, 0, 1, 200, 200, Gear^.Angle); end; + vgtChunk: DrawRotatedF(sprChunk, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); + vgtNote: DrawRotatedF(sprNote, round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Frame, 1, Gear^.Angle); end; case Gear^.Kind of vgtSmallDamageTag: DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex); @@ -470,7 +492,7 @@ var i: LongInt; begin for i:= 0 to cCloudsNumber - 1 do - AddVisualGear( - cScreenWidth + i * ((cScreenWidth * 2 + (LAND_WIDTH+256)) div (cCloudsNumber + 1)), LAND_HEIGHT-1184, vgtCloud) + AddVisualGear(cLeftScreenBorder + i * cScreenSpace div (cCloudsNumber + 1), LAND_HEIGHT-1184, vgtCloud) end; procedure initModule; diff -r 793386610068 -r b1c2c2f6fc5e hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Thu Aug 26 23:59:18 2010 +0200 +++ b/hedgewars/uWorld.pas Wed Oct 27 14:02:20 2010 +0200 @@ -39,7 +39,7 @@ cntTicks: LongWord; {$ENDIF} cOffsetY: LongInt; - + procedure initModule; procedure freeModule; @@ -103,7 +103,7 @@ AddGoal:= s; end; begin - missionTimer:= 0; +missionTimer:= 0; if (GameFlags and gfRandomOrder) <> 0 then // shuffle them up a bit begin @@ -197,7 +197,8 @@ Slot, Pos, STurns: LongInt; Ammo: PHHAmmo; begin -if (TurnTimeLeft = 0) or (not CurrentTeam^.ExtDriven and (((CurAmmoGear = nil) or ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) then bShowAmmoMenu:= false; +if (TurnTimeLeft = 0) or (not CurrentTeam^.ExtDriven and (((CurAmmoGear = nil) or ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) then + bShowAmmoMenu:= false; if bShowAmmoMenu then begin FollowGear:= nil; @@ -254,7 +255,7 @@ for i:= 0 to cMaxSlotIndex do if ((i = 0) and (Ammo^[i, 1].Count > 0)) or ((i <> 0) and (Ammo^[i, 0].Count > 0)) then begin - if (cScreenHeight - CursorPoint.Y >= y) and (cScreenHeight - CursorPoint.Y < y + AMSlotSize) then Slot:= i; + if (cScreenHeight - CursorPoint.Y >= y) and (cScreenHeight - CursorPoint.Y <= y + AMSlotSize) then Slot:= i; inc(SlotsNum); DrawSprite(sprAMBorderVertical, x - BORDERSIZE, y, 0); t:= 0; @@ -274,7 +275,7 @@ DrawSprite(sprAMAmmos, x + g * AMSlotSize, y + 1, LongInt(Ammo^[i, t].AmmoType)-1); if (Slot = i) and (CursorPoint.X >= x + g * AMSlotSize) - and (CursorPoint.X < x + (g + 1) * AMSlotSize) then + and (CursorPoint.X <= x + (g + 1) * AMSlotSize) then begin if (STurns < 0) then DrawSprite(sprAMSlot, x + g * AMSlotSize, y, 0); Pos:= t; @@ -288,7 +289,7 @@ DrawSprite(sprAMBorderVertical, x + AMWidth - AMxOffset, y, 1); inc(y, AMSlotSize); end; - + DrawSprite(sprAMCorners, x - BORDERSIZE, y, 2); for i:= 0 to cMaxSlotAmmoIndex do DrawSprite(sprAMBorderHorizontal, x + i * AMSlotSize, y, 1); @@ -310,7 +311,7 @@ for i:= cMaxSlotIndex downto 0 do if ((i = 0) and (Ammo^[i, 1].Count > 0)) or ((i <> 0) and (Ammo^[i, 0].Count > 0)) then begin - if (cScreenHeight - CursorPoint.Y >= y - AMSlotSize) and (cScreenHeight - CursorPoint.Y < y) then Slot:= i; + if (cScreenHeight - CursorPoint.Y >= y - AMSlotSize) and (cScreenHeight - CursorPoint.Y <= y) then Slot:= i; dec(y, AMSlotSize); inc(SlotsNum); DrawSprite(sprAMBorderVertical, x - BORDERSIZE, y, 0); @@ -333,7 +334,7 @@ DrawSprite(sprAMAmmos, x + g * AMSlotSize, y + 1, LongInt(Ammo^[i, t].AmmoType)-1); if (Slot = i) and (CursorPoint.X >= x + g * AMSlotSize) - and (CursorPoint.X < x + (g + 1) * AMSlotSize) then + and (CursorPoint.X <= x + (g + 1) * AMSlotSize) then begin if (STurns < 0) then DrawSprite(sprAMSlot, x + g * AMSlotSize, y, 0); Pos:= t; @@ -346,7 +347,7 @@ DrawSprite(sprAMSlot, x + g * AMSlotSize, y, 1); DrawSprite(sprAMBorderVertical, x + AMWidth - AMxOffset, y, 1); end; - + dec(y, BORDERSIZE); DrawSprite(sprAMCorners, x - BORDERSIZE, y, 0); for i:= 0 to cMaxSlotAmmoIndex + 1 do @@ -357,12 +358,13 @@ if (Pos >= 0) then begin if (Ammo^[Slot, Pos].Count > 0) and (Ammo^[Slot, Pos].AmmoType <> amNothing) then + begin if (amSel <> Ammo^[Slot, Pos].AmmoType) or (WeaponTooltipTex = nil) then begin amSel:= Ammo^[Slot, Pos].AmmoType; RenderWeaponTooltip(amSel) end; - + {$IFDEF IPHONEOS} DrawTexture(cScreenWidth div 2 - (AMWidth - 10) + AMxShift, AMyOffset - 25, Ammoz[Ammo^[Slot, Pos].AmmoType].NameTex); @@ -370,7 +372,6 @@ DrawTexture(cScreenWidth div 2 + AMxOffset - 45, AMyOffset - 25, CountTexz[Ammo^[Slot, Pos].Count]); {$ELSE} DrawTexture(cScreenWidth div 2 - (AMWidth - 10) + AMxShift, cScreenHeight - AMyOffset - 25, Ammoz[Ammo^[Slot, Pos].AmmoType].NameTex); - if Ammo^[Slot, Pos].Count < AMMO_INFINITE then DrawTexture(cScreenWidth div 2 + AMxOffset - 45, cScreenHeight - AMyOffset - 25, CountTexz[Ammo^[Slot, Pos].Count]); {$ENDIF} @@ -383,6 +384,7 @@ FreeWeaponTooltip; exit end; + end end else FreeWeaponTooltip; @@ -409,7 +411,7 @@ lw:= cScreenWidth / cScaleFactor; lh:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 + 16; - + // Water r.y:= OffsetY + WorldDy + cWaterLine; if WorldDy < trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine then @@ -516,14 +518,14 @@ rh:= SpritesData[sprR].Height * SpritesData[spr].Texture^.Scale; dec(Shift, w div 2); DrawTexture(Shift, WorldDy + LAND_HEIGHT + OffsetY - h, SpritesData[spr].Texture, SpritesData[spr].Texture^.Scale); - + i:= Shift - lw; while i >= -sw - lw do begin DrawTexture(i, WorldDy + LAND_HEIGHT + OffsetY - lh, SpritesData[sprL].Texture, SpritesData[sprL].Texture^.Scale); dec(i, lw); end; - + i:= Shift + w; while i <= sw do begin @@ -535,17 +537,16 @@ procedure DrawWorld(Lag: LongInt); -var cc: array[0..3] of GLfloat; begin if not isPaused then begin if ZoomValue < zoom then begin zoom:= zoom - 0.002 * Lag; - if ZoomValue > zoom then + if ZoomValue > zoom then zoom:= ZoomValue - end - else + end + else if ZoomValue > zoom then begin zoom:= zoom + 0.002 * Lag; @@ -706,7 +707,6 @@ s: string[15]; highlight: Boolean; offset, offsetX, offsetY, screenBottom: LongInt; - scale: GLfloat; VertexBuffer: array [0..3] of TVertex2f; begin if (cReducedQuality and rqNoBackground) = 0 then @@ -727,7 +727,7 @@ end; DrawVisualGears(0); - + if (cReducedQuality and rq2DWater) = 0 then begin // Waves @@ -765,8 +765,8 @@ tdy:= - Cos(Gear^.Angle * Pi / cMaxAngle); for i:= (Gear^.Power * 24) div cPowerDivisor downto 0 do DrawSprite(sprPower, - hwRound(Gear^.X) + GetLaunchX(Ammo^[CurSlot, CurAmmo].AmmoType, hwSign(Gear^.dX), Gear^.Angle) + round(WorldDx + tdx * (24 + i * 2)) - 16, - hwRound(Gear^.Y) + GetLaunchY(Ammo^[CurSlot, CurAmmo].AmmoType, Gear^.Angle) + round(WorldDy + tdy * (24 + i * 2)) - 16, + int64(hwRound(Gear^.X)) + GetLaunchX(CurAmmoType, hwSign(Gear^.dX), Gear^.Angle) + round(WorldDx + tdx * (24 + i * 2)) - 16, + int64(hwRound(Gear^.Y)) + GetLaunchY(CurAmmoType, Gear^.Angle) + round(WorldDy + tdy * (24 + i * 2)) - 16, i) end end; @@ -806,7 +806,7 @@ begin with PHedgehog(CurrentHedgehog)^ do begin - if (Ammo^[CurSlot, CurAmmo].AmmoType = amBee) then + if (CurAmmoType = amBee) then DrawRotatedF(sprTargetBee, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360) else DrawRotatedF(sprTargetP, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360); @@ -825,9 +825,13 @@ offsetX:= 48; {$ENDIF} offsetY:= cOffsetY; -if TurnTimeLeft <> 0 then - begin - i:= Succ(Pred(TurnTimeLeft) div 1000); +if ((TurnTimeLeft <> 0) and (TurnTimeLeft < 1000000)) or (ReadyTimeLeft <> 0) then + begin + if ReadyTimeLeft <> 0 then + i:= Succ(Pred(ReadyTimeLeft) div 1000) + else + i:= Succ(Pred(TurnTimeLeft) div 1000); + if i>99 then t:= 112 else if i>9 then t:= 96 else t:= 80; @@ -851,7 +855,7 @@ DrawSprite(sprFrame, -cScreenWidth div 2 + t, 8, 1); dec(t, 32); // 1 ms - DrawSprite(sprBigDigit, -cScreenWidth div 2 + t, 8, i mod 10); + DrawSprite(sprBigDigit, -cScreenWidth div 2 + t, 8, i mod 10); dec(t, 32); i:= i div 10; // 10 ms @@ -914,16 +918,16 @@ with TeamsArray[t]^ do begin highlight:= bShowFinger and (CurrentTeam = TeamsArray[t]) and ((RealTicks mod 1000) < 500); - + if highlight then Tint(Clan^.Color); // draw name DrawTexture(-NameTagTex^.w - 16, cScreenHeight + DrawHealthY, NameTagTex); - + // draw flag DrawTexture(-14, cScreenHeight + DrawHealthY, FlagTex); - + // draw health bar r.x:= 0; r.y:= 0; @@ -935,6 +939,13 @@ inc(r.x, cTeamHealthWidth + 2); r.w:= 3; DrawFromRect(TeamHealthBarWidth + 16, cScreenHeight + DrawHealthY, @r, HealthTex); + + // draw ai kill counter for gfAISurvival + if (GameFlags and gfAISurvival) <> 0 then begin + DrawTexture(TeamHealthBarWidth + 22, cScreenHeight + DrawHealthY, + AIKillsTex); + end; + // if highlighted, draw flag and other contents again to keep their colors // this approach should be faster than drawing all borders one by one tinted or not if highlight then @@ -1003,10 +1014,9 @@ if fastUntilLag then DrawCentered(0, (cScreenHeight shr 1), SyncTexture); if isPaused then DrawCentered(0, (cScreenHeight shr 1), PauseTexture); - -if not isFirstFrame and ((missionTimer <> 0) or isPaused or fastUntilLag or (GameState = gsConfirm)) then +if not isFirstFrame and (missionTimer <> 0) or isPaused or fastUntilLag or (GameState = gsConfirm) then begin - if missionTimer > 0 then dec(missionTimer, Lag); + if (ReadyTimeLeft = 0) and (missionTimer > 0) then dec(missionTimer, Lag); if missionTimer < 0 then missionTimer:= 0; // avoid subtracting below 0 if missionTex <> nil then DrawCentered(0, min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex); @@ -1019,8 +1029,6 @@ offsetX:= 10; {$ENDIF} offsetY:= cOffsetY; - -// don't increment fps when drawing the right frame if (RM = rmDefault) or (RM = rmRightEye) then begin inc(Frames); @@ -1110,7 +1118,7 @@ sfToBlack, sfFromBlack: Tint(0, 0, 0, ScreenFadeValue * 255 div 1000); sfToWhite, sfFromWhite: Tint($FF, $FF, $FF, ScreenFadeValue * 255 div 1000); end; - + VertexBuffer[0].X:= -cScreenWidth; VertexBuffer[0].Y:= cScreenHeight; VertexBuffer[1].X:= -cScreenWidth; @@ -1119,7 +1127,7 @@ VertexBuffer[2].Y:= 0; VertexBuffer[3].X:= cScreenWidth; VertexBuffer[3].Y:= cScreenHeight; - + glDisable(GL_TEXTURE_2D); glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]); @@ -1141,8 +1149,8 @@ with CurrentHedgehog^ do if (Gear <> nil) and ((Gear^.State and gstHHChooseTarget) <> 0) then begin - i:= Ammo^[CurSlot, CurAmmo].Pos; - with Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType] do + i:= GetAmmoEntry(CurrentHedgehog^)^.Pos; + with Ammoz[CurAmmoType] do if PosCount > 1 then DrawSprite(PosSprite, CursorPoint.X - (SpritesData[PosSprite].Width shr 1), cScreenHeight - CursorPoint.Y - (SpritesData[PosSprite].Height shr 1),i); end; @@ -1155,7 +1163,7 @@ procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup); begin //if Group in [capgrpGameState] then WriteLnToConsole(s); - if Captions[Group].Tex <> nil then + if Captions[Group].Tex <> nil then FreeTexture(Captions[Group].Tex); Captions[Group].Tex:= nil; @@ -1183,15 +1191,16 @@ if (not PlacingHogs) and (FollowGear <> nil) and (not isCursorVisible) and (not fastUntilLag) then if abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y) > 4 then - begin + begin FollowGear:= nil; prevPoint:= CursorPoint; exit - end - else begin + end + else + begin CursorPoint.X:= (prevPoint.X * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100 + WorldDx) div 8; CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8; - end; + end; wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater; if WorldDy < wdy then WorldDy:= wdy; @@ -1199,7 +1208,7 @@ if ((CursorPoint.X = prevPoint.X) and (CursorPoint.Y = prevpoint.Y)) then exit; if AMxShift < AMWidth then - begin +begin {$IFDEF IPHONEOS} if CursorPoint.X < cScreenWidth div 2 + AMxShift - AMWidth then CursorPoint.X:= cScreenWidth div 2 + AMxShift - AMWidth; if CursorPoint.X > cScreenWidth div 2 + AMxShift - AMxOffset then CursorPoint.X:= cScreenWidth div 2 + AMxShift - AMxOffset; @@ -1214,50 +1223,56 @@ prevPoint:= CursorPoint; if cHasFocus then SDL_WarpMouse(CursorPoint.X + cScreenWidth div 2, cScreenHeight - CursorPoint.Y); exit - end; +end; if isCursorVisible then - begin +begin if (not CurrentTeam^.ExtDriven) and (GameTicks >= PrevSentPointTime + cSendCursorPosTime) then - begin + begin SendIPCXY('P', CursorPoint.X - WorldDx, cScreenHeight - CursorPoint.Y - WorldDy); PrevSentPointTime:= GameTicks + end; + EdgesDist:= cCursorEdgesDist +end +else + EdgesDist:= cGearScrEdgesDist; + +// this generates the border around the screen that moves the camera when cursor is near it +if isCursorVisible or (FollowGear <> nil) then +begin + if CursorPoint.X < - cScreenWidth div 2 + EdgesDist then + begin + WorldDx:= WorldDx - CursorPoint.X - cScreenWidth div 2 + EdgesDist; + CursorPoint.X:= - cScreenWidth div 2 + EdgesDist + end + else + if CursorPoint.X > cScreenWidth div 2 - EdgesDist then + begin + WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist; + CursorPoint.X:= cScreenWidth div 2 - EdgesDist end; + if CursorPoint.Y < EdgesDist then + begin + WorldDy:= WorldDy + CursorPoint.Y - EdgesDist; + CursorPoint.Y:= EdgesDist + end + else + if CursorPoint.Y > cScreenHeight - EdgesDist then + begin + WorldDy:= WorldDy + CursorPoint.Y - cScreenHeight + EdgesDist; + CursorPoint.Y:= cScreenHeight - EdgesDist + end; +end +else + if cHasFocus then + begin + WorldDx:= WorldDx - CursorPoint.X + prevPoint.X; + WorldDy:= WorldDy + CursorPoint.Y - prevPoint.Y; + CursorPoint.X:= 0; + CursorPoint.Y:= cScreenHeight div 2; end; -if isCursorVisible or (FollowGear <> nil) then - begin - if isCursorVisible then EdgesDist:= cCursorEdgesDist - else EdgesDist:= cGearScrEdgesDist; - if CursorPoint.X < - cScreenWidth div 2 + EdgesDist then - begin - WorldDx:= WorldDx - CursorPoint.X - cScreenWidth div 2 + EdgesDist; - CursorPoint.X:= - cScreenWidth div 2 + EdgesDist - end else - if CursorPoint.X > cScreenWidth div 2 - EdgesDist then - begin - WorldDx:= WorldDx - CursorPoint.X + cScreenWidth div 2 - EdgesDist; - CursorPoint.X:= cScreenWidth div 2 - EdgesDist - end; - if CursorPoint.Y < EdgesDist then - begin - WorldDy:= WorldDy + CursorPoint.Y - EdgesDist; - CursorPoint.Y:= EdgesDist - end else - if CursorPoint.Y > cScreenHeight - EdgesDist then - begin - WorldDy:= WorldDy + CursorPoint.Y - cScreenHeight + EdgesDist; - CursorPoint.Y:= cScreenHeight - EdgesDist - end; - end else - if cHasFocus then - begin - WorldDx:= WorldDx - CursorPoint.X + prevPoint.X; - WorldDy:= WorldDy + CursorPoint.Y - prevPoint.Y; - CursorPoint.X:= 0; - CursorPoint.Y:= cScreenHeight div 2; - end; - +// this moves the camera according to CursorPoint X and Y prevPoint:= CursorPoint; if cHasFocus then SDL_WarpMouse(CursorPoint.X + (cScreenWidth shr 1), cScreenHeight - CursorPoint.Y); if WorldDy > LAND_HEIGHT + 1024 then WorldDy:= LAND_HEIGHT + 1024; @@ -1274,7 +1289,7 @@ if time = 0 then time:= 5000; missionTimer:= time; -if missionTex <> nil then +if missionTex <> nil then FreeTexture(missionTex); missionTex:= nil; @@ -1316,7 +1331,7 @@ Frames:= 0; WorldDx:= -512; WorldDy:= -256; - + FPS:= 0; CountTicks:= 0; SoundTimerTicks:= 0; @@ -1325,7 +1340,7 @@ missionTimer:= 0; missionTex:= nil; cOffsetY:= 0; - + FillChar(Captions, sizeof(Captions), 0) end; diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/CMakeLists.txt --- a/misc/liblua/CMakeLists.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/CMakeLists.txt Wed Oct 27 14:02:20 2010 +0200 @@ -1,9 +1,9 @@ -file(GLOB lua_src *.c *.h) +file(GLOB lua_src *.c *.h) set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}) IF(APPLE) -# set(CMAKE_OSX_ARCHITECTURES "x86_64;i386;ppc7400") - +# set(CMAKE_OSX_ARCHITECTURES "x86_64;i386;ppc7400") + set(build_type STATIC) add_definitions(-DLUA_USE_LINUX) add_library (lua ${build_type} ${lua_src}) diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/lapi.c --- a/misc/liblua/lapi.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/lapi.c Wed Oct 27 14:02:20 2010 +0200 @@ -211,7 +211,7 @@ api_checkvalidindex(L, o); if (idx == LUA_ENVIRONINDEX) { Closure *func = curr_func(L); - api_check(L, ttistable(L->top - 1)); + api_check(L, ttistable(L->top - 1)); func->c.env = hvalue(L->top - 1); luaC_barrier(L, func, L->top - 1); } @@ -771,7 +771,7 @@ #define checkresults(L,na,nr) \ api_check(L, (nr) == LUA_MULTRET || (L->ci->top - L->top >= (nr) - (na))) - + LUA_API void lua_call (lua_State *L, int nargs, int nresults) { StkId func; diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/ldblib.c --- a/misc/liblua/ldblib.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/ldblib.c Wed Oct 27 14:02:20 2010 +0200 @@ -138,7 +138,7 @@ treatstackoption(L, L1, "func"); return 1; /* return table */ } - + static int db_getlocal (lua_State *L) { int arg; diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/ldebug.c --- a/misc/liblua/ldebug.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/ldebug.c Wed Oct 27 14:02:20 2010 +0200 @@ -184,7 +184,7 @@ int i; for (i=0; il.p->sizelineinfo; i++) setbvalue(luaH_setnum(L, t, lineinfo[i]), 1); - sethvalue(L, L->top, t); + sethvalue(L, L->top, t); } incr_top(L); } diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/ldo.c --- a/misc/liblua/ldo.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/ldo.c Wed Oct 27 14:02:20 2010 +0200 @@ -365,7 +365,7 @@ ** The arguments are on the stack, right after the function. ** When returns, all the results are on the stack, starting at the original ** function position. -*/ +*/ void luaD_call (lua_State *L, StkId func, int nResults) { if (++L->nCcalls >= LUAI_MAXCCALLS) { if (L->nCcalls == LUAI_MAXCCALLS) diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/lgc.c --- a/misc/liblua/lgc.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/lgc.c Wed Oct 27 14:02:20 2010 +0200 @@ -310,7 +310,7 @@ traverseproto(g, p); return sizeof(Proto) + sizeof(Instruction) * p->sizecode + sizeof(Proto *) * p->sizep + - sizeof(TValue) * p->sizek + + sizeof(TValue) * p->sizek + sizeof(int) * p->sizelineinfo + sizeof(LocVar) * p->sizelocvars + sizeof(TString *) * p->sizeupvalues; @@ -697,7 +697,7 @@ GCObject *o = obj2gco(uv); o->gch.next = g->rootgc; /* link upvalue into `rootgc' list */ g->rootgc = o; - if (isgray(o)) { + if (isgray(o)) { if (g->gcstate == GCSpropagate) { gray2black(o); /* closed upvalues need barrier */ luaC_barrier(L, uv, uv->v); diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/llimits.h --- a/misc/liblua/llimits.h Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/llimits.h Wed Oct 27 14:02:20 2010 +0200 @@ -107,7 +107,7 @@ #ifndef lua_lock -#define lua_lock(L) ((void) 0) +#define lua_lock(L) ((void) 0) #define lua_unlock(L) ((void) 0) #endif @@ -118,7 +118,7 @@ /* ** macro to control inclusion of some hard tests on stack reallocation -*/ +*/ #ifndef HARDSTACKTESTS #define condhardstacktests(x) ((void)0) #else diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/loadlib.c --- a/misc/liblua/loadlib.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/loadlib.c Wed Oct 27 14:02:20 2010 +0200 @@ -502,7 +502,7 @@ ** 'module' function ** ======================================================= */ - + static void setfenv (lua_State *L) { lua_Debug ar; @@ -632,7 +632,7 @@ lua_setfield(L, -2, "__gc"); /* create `package' table */ luaL_register(L, LUA_LOADLIBNAME, pk_funcs); -#if defined(LUA_COMPAT_LOADLIB) +#if defined(LUA_COMPAT_LOADLIB) lua_getfield(L, -1, "loadlib"); lua_setfield(L, LUA_GLOBALSINDEX, "loadlib"); #endif diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/lobject.h --- a/misc/liblua/lobject.h Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/lobject.h Wed Oct 27 14:02:20 2010 +0200 @@ -337,7 +337,7 @@ typedef struct Table { CommonHeader; - lu_byte flags; /* 1<

C) then pc++ */ -OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */ +OP_TEST,/* A C if not (R(A) <=> C) then pc++ */ +OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */ OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */ OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */ @@ -197,8 +197,8 @@ if R(A) =) R(A)*/ @@ -240,7 +240,7 @@ ** bits 4-5: B arg mode ** bit 6: instruction set register A ** bit 7: operator is a test -*/ +*/ enum OpArgMask { OpArgN, /* argument is not used */ diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/lstate.c --- a/misc/liblua/lstate.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/lstate.c Wed Oct 27 14:02:20 2010 +0200 @@ -36,7 +36,7 @@ lua_State l; global_State g; } LG; - + static void stack_init (lua_State *L1, lua_State *L) { diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/lstrlib.c --- a/misc/liblua/lstrlib.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/lstrlib.c Wed Oct 27 14:02:20 2010 +0200 @@ -636,7 +636,7 @@ lua_pushlstring(L, s, e - s); /* keep original text */ } else if (!lua_isstring(L, -1)) - luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1)); + luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1)); luaL_addvalue(b); /* add result to accumulator */ } diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/ltable.c --- a/misc/liblua/ltable.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/ltable.c Wed Oct 27 14:02:20 2010 +0200 @@ -48,7 +48,7 @@ #define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) - + #define hashstr(t,str) hashpow2(t, (str)->tsv.hash) #define hashboolean(t,p) hashpow2(t, p) @@ -302,7 +302,7 @@ if (nasize > oldasize) /* array part must grow? */ setarrayvector(L, t, nasize); /* create new hash part with appropriate size */ - setnodevector(L, t, nhsize); + setnodevector(L, t, nhsize); if (nasize < oldasize) { /* array part must shrink? */ t->sizearray = nasize; /* re-insert elements from vanishing slice */ @@ -390,11 +390,11 @@ /* -** inserts a new key into a hash table; first, check whether key's main -** position is free. If not, check whether colliding node is in its main -** position or not: if it is not, move colliding node to an empty place and -** put new key in its main position; otherwise (colliding node is in its main -** position), new key goes to an empty position. +** inserts a new key into a hash table; first, check whether key's main +** position is free. If not, check whether colliding node is in its main +** position or not: if it is not, move colliding node to an empty place and +** put new key in its main position; otherwise (colliding node is in its main +** position), new key goes to an empty position. */ static TValue *newkey (lua_State *L, Table *t, const TValue *key) { Node *mp = mainposition(t, key); diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/lua.h --- a/misc/liblua/lua.h Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/lua.h Wed Oct 27 14:02:20 2010 +0200 @@ -245,7 +245,7 @@ -/* +/* ** =============================================================== ** some useful macros ** =============================================================== diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/lualib.h --- a/misc/liblua/lualib.h Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/lualib.h Wed Oct 27 14:02:20 2010 +0200 @@ -41,7 +41,7 @@ /* open all previous libraries */ -LUALIB_API void (luaL_openlibs) (lua_State *L); +LUALIB_API void (luaL_openlibs) (lua_State *L); diff -r 793386610068 -r b1c2c2f6fc5e misc/liblua/lvm.c --- a/misc/liblua/lvm.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/liblua/lvm.c Wed Oct 27 14:02:20 2010 +0200 @@ -125,7 +125,7 @@ callTMres(L, val, tm, t, key); return; } - t = tm; /* else repeat with `tm' */ + t = tm; /* else repeat with `tm' */ } luaG_runerror(L, "loop in gettable"); } @@ -152,7 +152,7 @@ callTM(L, tm, t, key, val); return; } - t = tm; /* else repeat with `tm' */ + t = tm; /* else repeat with `tm' */ } luaG_runerror(L, "loop in settable"); } diff -r 793386610068 -r b1c2c2f6fc5e misc/libopenalbridge/commands.c --- a/misc/libopenalbridge/commands.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/libopenalbridge/commands.c Wed Oct 27 14:02:20 2010 +0200 @@ -34,26 +34,26 @@ ALfloat SourceVelocity[] = { 0.0, 0.0, 0.0 }; ALint state; int i, j; - + if (openal_ready() == AL_TRUE && index < cache_size) { // check if sound has already a source if (the_sounds[index].source_index != -1) { // it has a source, check it's not playing alGetSourcei(Sources[the_sounds[index].source_index], AL_SOURCE_STATE, &state); - if (state != AL_PLAYING && state != AL_PAUSED) { + if (state != AL_PLAYING && state != AL_PAUSED) { // it is not being played, so we can use it safely - needsSource = AL_FALSE; + needsSource = AL_FALSE; } // else it is being played, so we have to allocate a new source for this buffer } - + if (needsSource) { #ifdef DEBUG fprintf(stderr,"(Bridge Debug) - looking for a source for sound %d\n", index); #endif for (i = 0; i < sources_number; i++) { // let's iterate on Sources until we find a source that is not playing - alGetSourcei(Sources[i], AL_SOURCE_STATE, &state); + alGetSourcei(Sources[i], AL_SOURCE_STATE, &state); if (state != AL_PLAYING && state != AL_PAUSED) { // let's iterate on the_sounds until we find the sound using that source for (j = 0; j < cache_size; j++) { @@ -66,11 +66,11 @@ break; } } - + if (i == sources_number) { // this means all sources are busy } - + // set source properties that it will use when it's in playback alSourcei (Sources[i], AL_BUFFER, the_sounds[index].buffer); alSourcef (Sources[i], AL_PITCH, 1.0f); @@ -78,16 +78,16 @@ alSourcefv(Sources[i], AL_POSITION, SourcePosition); alSourcefv(Sources[i], AL_VELOCITY, SourceVelocity); alSourcei (Sources[i], AL_LOOPING, 0); - + if (AL_NO_ERROR != alGetError()) { fprintf(stderr,"(Bridge ERROR) - failed to set Source properties\n"); return; } the_sounds[index].source_index = i; } - + alSourcePlay(Sources[the_sounds[index].source_index]); - + if (AL_NO_ERROR != alGetError()) { fprintf(stderr,"(Bridge Warning) - failed to play sound %d\n", index); return; diff -r 793386610068 -r b1c2c2f6fc5e misc/libopenalbridge/commands.h --- a/misc/libopenalbridge/commands.h Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/libopenalbridge/commands.h Wed Oct 27 14:02:20 2010 +0200 @@ -22,34 +22,34 @@ #ifdef __CPLUSPLUS extern "C" { #endif - + // play, pause, stop a single sound source void openal_pausesound (unsigned int index); void openal_stopsound (unsigned int index); - + // play a sound and set whether it should loop or not (0/1) void openal_playsound (unsigned int index); - + void openal_freesound (unsigned int index); - + // set or unset the looping property for a sound source void openal_toggleloop (unsigned int index); - + // set position and volume of a sound source void openal_setposition (unsigned int index, float x, float y, float z); void openal_setvolume (unsigned int index, float gain); - + // set volume for all sounds (gain interval is [0-1]) void openal_setglobalvolume (float gain); - + // mute or unmute all sounds void openal_togglemute (void); - + // fade effect, void openal_fade (unsigned int index, unsigned short int quantity, al_fade_t direction); - + #ifdef __CPLUSPLUS } #endif -#endif /*_OALB_COMMANDS_H*/ \ No newline at end of file +#endif /*_OALB_COMMANDS_H*/ diff -r 793386610068 -r b1c2c2f6fc5e misc/libopenalbridge/openalbridge.c --- a/misc/libopenalbridge/openalbridge.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/libopenalbridge/openalbridge.c Wed Oct 27 14:02:20 2010 +0200 @@ -38,20 +38,20 @@ ALCcontext *context; ALCdevice *device; int i; - - // reuse old context and resize the existing + + // reuse old context and resize the existing if (openal_ready() == AL_TRUE) { fprintf(stderr,"(Bridge Info) - already initialized\n"); instances_number++; return AL_TRUE; } - + cache_pointer = 0; instances_number++; - + // initial memory size cache_size = 50; - + // open hardware device if present device = alcOpenDevice(NULL); sources_number = 16; @@ -81,7 +81,7 @@ Sources = (ALuint *)Malloc (sizeof(ALuint) * sources_number); alGenSources(sources_number, Sources); - + // set the listener gain, position (on xyz axes), velocity (one value for each axe) and orientation // Position, Velocity and Orientation of the listener ALfloat ListenerPos[] = {0.0, 0.0, 0.0}; @@ -112,7 +112,7 @@ ALCcontext *context; ALCdevice *device; int i; - + if (instances_number == 0) { fprintf(stderr,"(Bridge Warning) - OpenAL not initialized\n"); return; @@ -123,7 +123,7 @@ // release memory only when last session ends return; } - + for (i = 0; i < cache_size; i++) { openal_unloadfile(i); } @@ -148,7 +148,7 @@ ALboolean openal_ready (void) { - if (instances_number >= 1) + if (instances_number >= 1) return AL_TRUE; else return AL_FALSE; @@ -164,12 +164,12 @@ int len, i, index = -1; char *data; FILE *fp; - + if (openal_ready() == AL_FALSE) { fprintf(stderr,"(Bridge Warning) - not initialized\n"); return -1; } - + // if this sound is already loaded return the index from the_sounds len = strlen(filename); for (i = 0; i < cache_size; i++) { @@ -182,19 +182,19 @@ // if we don't have memory available search for a free element if (cache_pointer >= cache_size) if (the_sounds[i].is_used == AL_FALSE) - index = i; + index = i; } if (index == -1 && cache_pointer >= cache_size) { fprintf(stderr,"(Bridge Info) - No free spots found; doubling cache size\n", filename); cache_size *= 2; the_sounds = (al_sound_t *)Realloc (the_sounds, sizeof(al_sound_t) * cache_size); - for (i = cache_size - 50; i < cache_size; i++) + for (i = cache_size - 50; i < cache_size; i++) the_sounds[i] = new_sound_el(); - } else + } else index = ++cache_pointer; - - + + // detect the file format, as written in the first 4 bytes of the header fp = Fopen (filename, "rb"); if (fp == NULL) { @@ -231,13 +231,13 @@ // alGenBuffers happens here sound_data = init_sound_el(filename); - + if (AL_NO_ERROR != alGetError()) { fprintf(stderr,"(Bridge ERROR) - Failed to allocate memory for buffer %d\n", index); free(data); return -5; } - + // copy pcm data in one buffer and free it alBufferData(sound_data.buffer, format, data, bitsize, freq); free(data); @@ -246,7 +246,7 @@ fprintf(stderr,"(Bridge ERROR) - Failed to write data to buffer %d\n", index); return -8; } - + // clear any AL errors beforehand alGetError(); @@ -265,9 +265,9 @@ alGetSourcei (Sources[the_sounds[index].source_index], AL_SOURCE_STATE, &state); if (state == AL_PLAYING || state == AL_PAUSED) openal_stopsound(index); - - // free memory and + + // free memory and alDeleteBuffers (1, &the_sounds[index].buffer); the_sounds[index] = new_sound_el(); } -} \ No newline at end of file +} diff -r 793386610068 -r b1c2c2f6fc5e misc/libopenalbridge/openalbridge.h --- a/misc/libopenalbridge/openalbridge.h Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/libopenalbridge/openalbridge.h Wed Oct 27 14:02:20 2010 +0200 @@ -40,9 +40,9 @@ // unloads data from memory and marks a free spot void openal_unloadfile (unsigned int index); - + /******* other functions continue in commands.h *******/ - + #ifdef __CPLUSPLUS } #endif diff -r 793386610068 -r b1c2c2f6fc5e misc/libopenalbridge/openalbridge_t.h diff -r 793386610068 -r b1c2c2f6fc5e misc/libopenalbridge/tester.c --- a/misc/libopenalbridge/tester.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/libopenalbridge/tester.c Wed Oct 27 14:02:20 2010 +0200 @@ -2,10 +2,10 @@ #include "openalbridge.h" int main (int argc, int **argv) { - + openal_init(); - + openal_close(); - + return 0; -} \ No newline at end of file +} diff -r 793386610068 -r b1c2c2f6fc5e misc/libopenalbridge/wrappers.c --- a/misc/libopenalbridge/wrappers.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/libopenalbridge/wrappers.c Wed Oct 27 14:02:20 2010 +0200 @@ -57,7 +57,7 @@ al_sound_t new_sound_el (void) { al_sound_t sound; - + sound.filename = NULL; sound.buffer = -1; sound.source_index = -1; @@ -68,7 +68,7 @@ al_sound_t init_sound_el (const char *str) { al_sound_t sound; - + sound.filename = str; sound.source_index = -1; sound.is_used = AL_TRUE; diff -r 793386610068 -r b1c2c2f6fc5e misc/uSHA.pas --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/uSHA.pas Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,166 @@ +(* + * Hedgewars, a free turn based strategy game + * Copyright (c) 2004-2010 Andrey Korotaev + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + *) + +{$INCLUDE "options.inc"} + +unit uSHA; +interface +uses SDLh; + +type TSHA1Context = packed record + H: array[0..4] of LongWord; + Length, CurrLength: Int64; + Buf: array[0..63] of byte; + end; + TSHA1Digest = array[0..4] of LongWord; + +procedure SHA1Init(var Context: TSHA1Context); +procedure SHA1Update(var Context: TSHA1Context; Buf: PByteArray; Length: LongWord); +procedure SHA1UpdateLongwords(var Context: TSHA1Context; Buf: PLongwordArray; Length: LongWord); +function SHA1Final(Context: TSHA1Context): TSHA1Digest; + +implementation + +function rol(x: LongWord; y: Byte): LongWord; +begin + rol:= (X shl y) or (X shr (32 - y)) +end; + +function Ft(t, b, c, d: LongWord): LongWord; +begin +case t of + 0..19: Ft := (b and c) or ((not b) and d); + 20..39: Ft := b xor c xor d; + 40..59: Ft := (b and c) or (b and d) or (c and d); + else Ft := b xor c xor d; + end; +end; + +function Kt(t: Byte): LongWord; +begin + case t of + 0..19: Kt := $5A827999; + 20..39: Kt := $6ED9EBA1; + 40..59: Kt := $8F1BBCDC; + else + Kt := $CA62C1D6 + end; +end; + + +procedure SHA1Hash(var Context: TSHA1Context); +var S: array[0..4 ] of LongWord; + W: array[0..79] of LongWord; + i, t: LongWord; +begin +{$HINTS OFF} +move(Context.H, S, sizeof(S)); +{$HINTS ON} +for i:= 0 to 15 do + SDLNet_Write32(PLongWordArray(@Context.Buf)^[i], @W[i]); + +for i := 16 to 79 do + W[i] := rol(W[i - 3] xor W[i - 8] xor W[i - 14] xor W[i - 16], 1); + +for i := 0 to 79 do + begin + t:= rol(S[0], 5) + Ft(i, S[1], S[2], S[3]) + S[4] + W[i] + Kt(i); + S[4]:= S[3]; + S[3]:= S[2]; + S[2]:= rol(S[1], 30); + S[1]:= S[0]; + S[0]:= t + end; + +for i := 0 to 4 do + Context.H[i]:= Context.H[i] + S[i] +end; + +procedure SHA1Init(var Context: TSHA1Context); +begin + with Context do + begin + Length := 0; + CurrLength:= 0; + H[0]:= $67452301; + H[1]:= $EFCDAB89; + H[2]:= $98BADCFE; + H[3]:= $10325476; + H[4]:= $C3D2E1F0 + end +end; + +procedure SHA1Update(var Context: TSHA1Context; Buf: PByteArray; Length: LongWord); +var i: Longword; +begin +for i:= 0 to Pred(Length) do + begin + Context.Buf[Context.CurrLength]:= Buf^[i]; + inc(Context.CurrLength); + if Context.CurrLength = 64 then + begin + SHA1Hash(Context); + inc(Context.Length, 512); + Context.CurrLength:= 0 + end + end +end; + +procedure SHA1UpdateLongwords(var Context: TSHA1Context; Buf: PLongwordArray; Length: LongWord); +var i: Longword; +begin + for i:= 0 to Pred(Length div 4) do + begin + SDLNet_Write32(Buf^[i], @Context.Buf[Context.CurrLength]); + inc(Context.CurrLength, 4); + if Context.CurrLength = 64 then + begin + SHA1Hash(Context); + inc(Context.Length, 512); + Context.CurrLength:= 0 + end + end +end; + +function SHA1Final(Context: TSHA1Context): TSHA1Digest; +var i: LongWord; +begin + Context.Length:= Context.Length + Context.CurrLength shl 3; + Context.Buf[Context.CurrLength]:= $80; + inc(Context.CurrLength); + + if Context.CurrLength > 56 then + begin + FillChar(Context.Buf[Context.CurrLength], 64 - Context.CurrLength, 0); + Context.CurrLength:= 64; + SHA1Hash(Context); + Context.CurrLength:=0 + end; + + FillChar(Context.Buf[Context.CurrLength], 56 - Context.CurrLength, 0); + + for i:= 56 to 63 do + Context.Buf[i] := (Context.Length shr ((63 - i) * 8)) and $FF; + SHA1Hash(Context); + for i:= 0 to 4 do + SHA1Final[i]:= Context.H[i]; + + FillChar(Context, sizeof(Context), 0) +end; + +end. diff -r 793386610068 -r b1c2c2f6fc5e misc/wrapper.c --- a/misc/wrapper.c Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/wrapper.c Wed Oct 27 14:02:20 2010 +0200 @@ -12,9 +12,9 @@ extern void Game (const char **); int SDL_main (int argc, const char **argv) { - + const char **gameArgs = (const char**) malloc(sizeof(char *) * 9); - + gameArgs[0] = "wrapper"; //UserNick gameArgs[1] = "0"; //ipcPort gameArgs[2] = "0"; //isSoundEnabled @@ -24,9 +24,9 @@ gameArgs[6] = "768"; //cScreenHeight gameArgs[7] = "1024"; //cScreenHeight gameArgs[8] = "Save.hws"; //recordFileName - + Game(gameArgs); free(gameArgs); - + return 0; } diff -r 793386610068 -r b1c2c2f6fc5e misc/xfire/xfiregameclient.cpp --- a/misc/xfire/xfiregameclient.cpp Thu Aug 26 23:59:18 2010 +0200 +++ b/misc/xfire/xfiregameclient.cpp Wed Oct 27 14:02:20 2010 +0200 @@ -29,7 +29,7 @@ #ifdef Module32Next #undef Module32Next -#endif +#endif int XfireIsLoaded() @@ -99,7 +99,7 @@ if (snapshot_handle != INVALID_HANDLE_VALUE) { MODULEENTRY32 module_entry; - module_entry.dwSize = sizeof(MODULEENTRY32); + module_entry.dwSize = sizeof(MODULEENTRY32); BOOL result = Module32First(snapshot_handle, &module_entry); char module_name[] = "xfire_toucan"; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Art.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Art.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Brick.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Brick.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Castle.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Castle.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/City.ogg Binary file project_files/HedgewarsMobile/Audio/Music/City.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Compost.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Compost.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Desert.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Desert.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/EarthRise.ogg Binary file project_files/HedgewarsMobile/Audio/Music/EarthRise.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Freeway.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Freeway.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Halloween.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Halloween.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Nature.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Nature.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Olympics.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Olympics.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Rock.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Rock.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/Sheep.ogg Binary file project_files/HedgewarsMobile/Audio/Music/Sheep.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/bath.ogg Binary file project_files/HedgewarsMobile/Audio/Music/bath.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/hell.ogg Binary file project_files/HedgewarsMobile/Audio/Music/hell.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/main theme.ogg Binary file project_files/HedgewarsMobile/Audio/Music/main theme.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/oriental.ogg Binary file project_files/HedgewarsMobile/Audio/Music/oriental.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/pirate.ogg Binary file project_files/HedgewarsMobile/Audio/Music/pirate.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/snow.ogg Binary file project_files/HedgewarsMobile/Audio/Music/snow.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Music/underwater.ogg Binary file project_files/HedgewarsMobile/Audio/Music/underwater.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/1C.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/1C.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/2D.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/2D.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/3E.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/3E.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/4F.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/4F.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/5G.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/5G.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/6A.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/6A.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/7B.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/7B.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/8C.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/8C.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/9D.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/9D.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/BirdyLay.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/BirdyLay.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/CollectCrate.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/CollectCrate.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/Droplet1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/Droplet1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/Droplet2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/Droplet2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/Droplet3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/Droplet3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/Hellish.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/Hellish.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/Whistle.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/Whistle.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/Yoohoo.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/Yoohoo.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/baseballbat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/baseballbat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/bee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/bee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/beewater.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/beewater.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/cake2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/cake2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/denied.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/denied.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/drillgun.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/drillgun.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/egg.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/egg.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/explosion.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/explosion.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/graveimpact.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/graveimpact.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/grenadeimpact.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/grenadeimpact.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/gun.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/gun.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/hell_growl.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/hell_growl.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/hell_ooff.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/hell_ooff.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/hell_ow.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/hell_ow.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/hell_ugh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/hell_ugh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/homerun.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/homerun.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/lowgravity.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/lowgravity.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/melonimpact.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/melonimpact.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/minetick.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/minetick.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/molotov.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/molotov.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/mortar.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/mortar.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/pickhammer.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/pickhammer.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/placed.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/placed.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/rcplane.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/rcplane.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/ride_of_the_valkyries.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/ride_of_the_valkyries.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/ropeattach.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/ropeattach.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/roperelease.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/roperelease.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/ropeshot.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/ropeshot.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/shotgunfire.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/shotgunfire.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/shotgunreload.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/shotgunreload.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/shutterclick.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/shutterclick.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/skip.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/skip.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/sniperreload.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/sniperreload.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/splash.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/splash.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/steam.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/steam.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/steps.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/steps.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/suddendeath.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/suddendeath.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/switchhog.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/switchhog.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/throwpowerup.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/throwpowerup.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/throwrelease.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/throwrelease.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/ufo.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/ufo.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Amazing.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Amazing.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Boring.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Boring.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Brilliant.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Brilliant.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Bugger.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Bugger.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Bungee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Bungee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Byebye.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Byebye.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Comeonthen.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Comeonthen.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Coward.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Coward.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Cutitout.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Cutitout.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Drat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Drat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Enemydown.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Enemydown.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Excellent.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Excellent.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Fire.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Fire.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Firepunch1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Firepunch1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Firstblood.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Firstblood.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Flawless.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Flawless.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Gonnagetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Gonnagetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Grenade.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Grenade.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Hello.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Hello.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Hmm.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Hmm.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Hurry.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Hurry.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Illgetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Illgetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Incoming.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Incoming.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Jump1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Jump1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Jump2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Jump2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Jump3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Jump3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Justyouwait.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Justyouwait.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Kamikaze.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Kamikaze.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Laugh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Laugh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Leavemealone.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Leavemealone.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Melon.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Melon.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Missed.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Missed.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Nooo.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Nooo.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Nutter.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Nutter.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ohdear.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ohdear.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ooff1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ooff1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ooff2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ooff2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ooff3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ooff3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Oops.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Oops.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ouch.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ouch.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ow1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ow1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ow2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ow2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ow3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ow3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ow4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Ow4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Perfect.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Perfect.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Reinforcements.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Reinforcements.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Revenge.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Revenge.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Runaway.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Runaway.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Sameteam.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Sameteam.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Solong.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Solong.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Stupid.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Stupid.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Takecover.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Takecover.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Thisoneismine.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Thisoneismine.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Traitor.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Traitor.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Uh-oh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Uh-oh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Victory.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Victory.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Watchit.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Watchit.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Watchthis.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Watchthis.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Whatthe.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Whatthe.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Whoopsee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Whoopsee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Yessir.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Yessir.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/British/Youllregretthat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/British/Youllregretthat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Amazing.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Amazing.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Boring.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Boring.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Brilliant.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Brilliant.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Bugger.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Bugger.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Bungee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Bungee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Byebye.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Byebye.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Comeonthen.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Comeonthen.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Coward.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Coward.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Cutitout.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Cutitout.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Drat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Drat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Enemydown.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Enemydown.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Excellent.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Excellent.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Fire.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Fire.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch5.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch5.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch6.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firepunch6.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firstblood.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Firstblood.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Flawless.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Flawless.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Gonnagetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Gonnagetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Grenade.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Grenade.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Hello.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Hello.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Hmm.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Hmm.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Hurry.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Hurry.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Illgetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Illgetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Incoming.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Incoming.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Jump1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Jump1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Jump2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Jump2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Jump3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Jump3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Justyouwait.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Justyouwait.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Kamikaze.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Kamikaze.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Laugh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Laugh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Leavemealone.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Leavemealone.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Melon.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Melon.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Missed.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Missed.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Nooo.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Nooo.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Nutter.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Nutter.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ohdear.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ohdear.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ooff1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ooff1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ooff2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ooff2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ooff3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ooff3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Oops.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Oops.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ouch.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ouch.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ow1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ow1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ow2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ow2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ow3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ow3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ow4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Ow4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Perfect.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Perfect.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/PoisonCough.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/PoisonCough.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/PoisonMoan.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/PoisonMoan.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Reinforcements.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Reinforcements.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Revenge.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Revenge.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Runaway.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Runaway.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Sameteam.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Sameteam.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Solong.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Solong.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Stupid.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Stupid.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Takecover.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Takecover.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Thisoneismine.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Thisoneismine.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Traitor.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Traitor.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Uh-oh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Uh-oh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Victory.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Victory.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Watchit.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Watchit.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Watchthis.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Watchthis.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Whatthe.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Whatthe.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Whoopsee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Whoopsee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Yessir.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Yessir.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Youllregretthat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Default/Youllregretthat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Amazing.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Amazing.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Boring.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Boring.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Brilliant.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Brilliant.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Bugger.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Bugger.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Bungee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Bungee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Byebye.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Byebye.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Comeonthen.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Comeonthen.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Coward.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Coward.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Cutitout.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Cutitout.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Drat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Drat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Enemydown.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Enemydown.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Excellent.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Excellent.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Fire.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Fire.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Firepunch1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Firepunch1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Firstblood.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Firstblood.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Flawless.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Flawless.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Gonnagetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Gonnagetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Grenade.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Grenade.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Hello.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Hello.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Hmm.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Hmm.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Hurry.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Hurry.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Illgetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Illgetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Incoming.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Incoming.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Jump1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Jump1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Jump2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Jump2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Jump3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Jump3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Justyouwait.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Justyouwait.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Kamikaze.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Kamikaze.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Laugh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Laugh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Leavemealone.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Leavemealone.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Melon.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Melon.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Missed.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Missed.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Nooo.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Nooo.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Nutter.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Nutter.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ohdear.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ohdear.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ooff1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ooff1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ooff2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ooff2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ooff3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ooff3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Oops.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Oops.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ouch.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ouch.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ow1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ow1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ow2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ow2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ow3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ow3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ow4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Ow4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Perfect.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Perfect.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Reinforcements.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Reinforcements.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Revenge.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Revenge.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Runaway.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Runaway.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Sameteam.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Sameteam.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Solong.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Solong.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Stupid.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Stupid.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Takecover.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Takecover.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Thisoneismine.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Thisoneismine.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Traitor.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Traitor.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Uh-oh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Uh-oh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Victory.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Victory.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Watchit.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Watchit.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Watchthis.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Watchthis.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Whatthe.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Whatthe.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Whoopsee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Whoopsee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Yessir.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Yessir.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Youllregretthat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Mobster/Youllregretthat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Amazing.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Amazing.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Boring.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Boring.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Brilliant.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Brilliant.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Bugger.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Bugger.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Bungee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Bungee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Byebye.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Byebye.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Comeonthen.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Comeonthen.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Coward.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Coward.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Cutitout.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Cutitout.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Drat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Drat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Enemydown.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Enemydown.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Excellent.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Excellent.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Fire.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Fire.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch5.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch5.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch6.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firepunch6.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firstblood.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Firstblood.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Flawless.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Flawless.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Gonnagetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Gonnagetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Grenade.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Grenade.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Hello.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Hello.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Hmm.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Hmm.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Hurry.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Hurry.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Illgetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Illgetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Incoming.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Incoming.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Jump1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Jump1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Jump2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Jump2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Jump3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Jump3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Justyouwait.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Justyouwait.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Kamikaze.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Kamikaze.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Laugh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Laugh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Leavemealone.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Leavemealone.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Melon.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Melon.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Missed.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Missed.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Nooo.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Nooo.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Nutter.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Nutter.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ohdear.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ohdear.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ooff1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ooff1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ooff2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ooff2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ooff3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ooff3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Oops.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Oops.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ouch.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ouch.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ow1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ow1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ow2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ow2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ow3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ow3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ow4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Ow4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Perfect.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Perfect.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Reinforcements.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Reinforcements.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Revenge.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Revenge.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Runaway.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Runaway.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Sameteam.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Sameteam.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Solong.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Solong.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Stupid.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Stupid.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Takecover.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Takecover.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Thisoneismine.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Thisoneismine.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Traitor.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Traitor.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Uh-oh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Uh-oh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Victory.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Victory.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Watchit.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Watchit.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Watchthis.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Watchthis.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Whatthe.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Whatthe.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Whoopsee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Whoopsee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Yessir.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Yessir.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Youllregretthat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Pirate/Youllregretthat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Amazing.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Amazing.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Boring.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Boring.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Brilliant.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Brilliant.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Bugger.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Bugger.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Bungee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Bungee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Byebye.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Byebye.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Comeonthen.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Comeonthen.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Coward.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Coward.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Cutitout.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Cutitout.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Drat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Drat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Enemydown.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Enemydown.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Excellent.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Excellent.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Fire.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Fire.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch5.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch5.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch6.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firepunch6.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firstblood.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Firstblood.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Flawless.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Flawless.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Gonnagetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Gonnagetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Grenade.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Grenade.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Hello.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Hello.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Hmm.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Hmm.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Hurry.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Hurry.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Illgetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Illgetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Incoming.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Incoming.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Jump1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Jump1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Jump2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Jump2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Jump3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Jump3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Justyouwait.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Justyouwait.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Kamikaze.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Kamikaze.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Laugh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Laugh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Leavemealone.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Leavemealone.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Melon.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Melon.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Missed.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Missed.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Nooo.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Nooo.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Nutter.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Nutter.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ohdear.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ohdear.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ooff1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ooff1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ooff2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ooff2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ooff3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ooff3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Oops.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Oops.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ouch.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ouch.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ow1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ow1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ow2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ow2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ow3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ow3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ow4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Ow4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Perfect.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Perfect.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Reinforcements.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Reinforcements.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Revenge.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Revenge.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Runaway.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Runaway.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Sameteam.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Sameteam.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Solong.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Solong.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Stupid.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Stupid.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Takecover.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Takecover.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Thisoneismine.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Thisoneismine.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Traitor.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Traitor.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Uh-oh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Uh-oh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Victory.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Victory.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Watchit.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Watchit.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Watchthis.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Watchthis.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Whatthe.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Whatthe.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Whoopsee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Whoopsee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Yessir.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Yessir.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Youllregretthat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Robot/Youllregretthat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Amazing.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Amazing.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Boring.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Boring.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Brilliant.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Brilliant.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Bugger.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Bugger.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Bungee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Bungee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Byebye.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Byebye.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Comeonthen.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Comeonthen.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Coward.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Coward.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Cutitout.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Cutitout.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Drat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Drat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Enemydown.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Enemydown.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Excellent.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Excellent.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Fire.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Fire.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Firepunch1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Firepunch1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Firstblood.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Firstblood.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Flawless.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Flawless.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Gonnagetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Gonnagetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Grenade.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Grenade.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Hello.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Hello.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Hmm.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Hmm.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Hurry.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Hurry.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Illgetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Illgetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Incoming.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Incoming.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Jump1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Jump1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Jump2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Jump2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Jump3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Jump3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Justyouwait.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Justyouwait.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Kamikaze.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Kamikaze.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Laugh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Laugh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Leavemealone.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Leavemealone.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Melon.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Melon.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Missed.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Missed.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Nooo.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Nooo.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Nutter.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Nutter.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ohdear.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ohdear.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ooff1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ooff1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ooff2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ooff2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ooff3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ooff3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Oops.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Oops.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ouch.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ouch.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ow1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ow1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ow2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ow2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ow3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ow3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ow4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Ow4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Perfect.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Perfect.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Reinforcements.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Reinforcements.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Revenge.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Revenge.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Runaway.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Runaway.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Sameteam.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Sameteam.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Solong.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Solong.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Stupid.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Stupid.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Takecover.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Takecover.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Thisoneismine.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Thisoneismine.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Traitor.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Traitor.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Uh-oh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Uh-oh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Victory.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Victory.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Watchit.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Watchit.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Watchthis.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Watchthis.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Whatthe.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Whatthe.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Whoopsee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Whoopsee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Yessir.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Yessir.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Youllregretthat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Russian/Youllregretthat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Amazing.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Amazing.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Boring.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Boring.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Brilliant.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Brilliant.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Bugger.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Bugger.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Bungee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Bungee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Byebye.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Byebye.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Comeonthen.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Comeonthen.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Coward.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Coward.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Cutitout.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Cutitout.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Drat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Drat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Enemydown.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Enemydown.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Excellent.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Excellent.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Fire.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Fire.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch5.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch5.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch6.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firepunch6.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firstblood.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Firstblood.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Flawless.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Flawless.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/FlawlessPossibility.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/FlawlessPossibility.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Gonnagetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Gonnagetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Grenade.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Grenade.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Hello.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Hello.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Hmm.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Hmm.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Hurry.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Hurry.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Illgetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Illgetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Incoming.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Incoming.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Jump1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Jump1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Jump2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Jump2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Jump3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Jump3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Justyouwait.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Justyouwait.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Kamikaze.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Kamikaze.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Laugh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Laugh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Leavemealone.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Leavemealone.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Melon.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Melon.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Missed.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Missed.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Nooo.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Nooo.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Nutter.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Nutter.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ohdear.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ohdear.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ooff1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ooff1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ooff2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ooff2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ooff3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ooff3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Oops.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Oops.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ouch.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ouch.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ow1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ow1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ow2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ow2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ow3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ow3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ow4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Ow4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Perfect.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Perfect.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Reinforcements.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Reinforcements.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Revenge.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Revenge.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Runaway.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Runaway.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Sameteam.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Sameteam.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Solong.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Solong.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Stupid.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Stupid.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Takecover.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Takecover.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Thisoneismine.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Thisoneismine.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Traitor.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Traitor.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Uh-oh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Uh-oh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Victory.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Victory.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/VictoryPossibility.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/VictoryPossibility.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Watchit.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Watchit.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Watchthis.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Watchthis.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Whatthe.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Whatthe.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Whoopsee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Whoopsee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Yessir.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Yessir.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Youllregretthat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Singer/Youllregretthat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Amazing.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Amazing.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Boring.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Boring.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Brilliant.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Brilliant.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Bugger.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Bugger.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Bungee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Bungee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Byebye.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Byebye.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Comeonthen.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Comeonthen.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Coward.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Coward.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Cutitout.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Cutitout.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Drat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Drat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Enemydown.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Enemydown.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Excellent.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Excellent.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Fire.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Fire.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch5.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch5.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch6.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firepunch6.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firstblood.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Firstblood.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Flawless.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Flawless.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Gonnagetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Gonnagetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Grenade.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Grenade.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Hello.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Hello.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Hmm.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Hmm.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Hurry.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Hurry.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Illgetyou.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Illgetyou.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Incoming.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Incoming.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Jump1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Jump1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Jump2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Jump2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Jump3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Jump3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Justyouwait.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Justyouwait.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Kamikaze.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Kamikaze.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Laugh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Laugh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Leavemealone.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Leavemealone.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Melon.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Melon.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Missed.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Missed.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Nooo.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Nooo.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Nutter.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Nutter.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ohdear.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ohdear.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ooff1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ooff1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ooff2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ooff2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ooff3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ooff3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Oops.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Oops.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ouch.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ouch.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ow1.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ow1.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ow2.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ow2.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ow3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ow3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ow4.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Ow4.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Perfect.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Perfect.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Reinforcements.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Reinforcements.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Revenge.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Revenge.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Runaway.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Runaway.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Sameteam.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Sameteam.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Solong.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Solong.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Stupid.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Stupid.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Takecover.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Takecover.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Thisoneismine.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Thisoneismine.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Traitor.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Traitor.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Uh-oh.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Uh-oh.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Victory.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Victory.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Watchit.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Watchit.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Watchthis.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Watchthis.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Whatthe.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Whatthe.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Whoopsee.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Whoopsee.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Yessir.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Yessir.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Youllregretthat.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/voices/Surfer/Youllregretthat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/warp.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/warp.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Audio/Sounds/whipcrack.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/whipcrack.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/AboutViewController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/AboutViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,38 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 01/08/2010. + */ + + +#import + + +@interface AboutViewController : UIViewController { + UITableView *tableView; + UISegmentedControl *segmentedControl; + NSArray *people; +} + +@property (nonatomic,retain) IBOutlet UITableView *tableView; +@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; +@property (nonatomic,retain) NSArray *people; + +-(IBAction) buttonPressed:(id) sender; +-(IBAction) segmentedControlChanged:(id) sender; + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/AboutViewController.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/AboutViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,106 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 01/08/2010. + */ + + +#import "AboutViewController.h" +#import "CommodityFunctions.h" + +@implementation AboutViewController +@synthesize tableView, segmentedControl, people; + +-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { + return rotationManager(interfaceOrientation); +} + +-(void) viewDidLoad { + self.tableView.backgroundView = nil; + self.tableView.allowsSelection = NO; + + NSString *strPath = [NSString stringWithFormat:@"%@/credits.plist",IFRONTEND_DIRECTORY()]; + NSArray *array = [[NSArray alloc] initWithContentsOfFile:strPath]; + self.people = array; + [array release]; + + [super viewDidLoad]; +} + +-(IBAction) buttonPressed:(id) sender { + playSound(@"backSound"); + [[self parentViewController] dismissModalViewControllerAnimated:YES]; +} + +-(IBAction) segmentedControlChanged:(id) sender { + playSound(@"clickSound"); + [self.tableView setContentOffset:CGPointMake(0, 0) animated:NO]; + [self.tableView reloadData]; +} + +#pragma mark - +#pragma mark Table view data source +-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [[self.people objectAtIndex:self.segmentedControl.selectedSegmentIndex] count]; +} + +-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + static NSString *CellIdentifier = @"Cell"; + + UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (cell == nil) + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; + + // first all the names, then the title (which is offset 5) + cell.textLabel.text = [[self.people objectAtIndex:self.segmentedControl.selectedSegmentIndex] objectAtIndex:[indexPath row]]; + cell.detailTextLabel.text = [[self.people objectAtIndex:(self.segmentedControl.selectedSegmentIndex + 5)] objectAtIndex:[indexPath row]]; + + return cell; +} + +#pragma mark - +#pragma mark Table view delegate +-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + // do nothing +} + +#pragma mark - +#pragma mark Memory Management +-(void) didReceiveMemoryWarning { + self.people = nil; + [super didReceiveMemoryWarning]; +} + +-(void) viewDidUnload { + self.tableView = nil; + self.segmentedControl = nil; + self.people = nil; + [super viewDidUnload]; +} + +-(void) dealloc { + [tableView release]; + [segmentedControl release]; + [people release]; + [super dealloc]; +} + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/AboutViewController.xib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/AboutViewController.xib Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,696 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 292 + + YES + + + 290 + + YES + + + 292 + {{127, 7}, {289, 30}} + + + NO + IBIPadFramework + 2 + 5 + 0 + + YES + Code + Art + Sound + Locale + Special + + + YES + + + + + + + + YES + + + + + + + + YES + {0, 0} + {0, 0} + {0, 0} + {0, 0} + {0, 0} + + + YES + + + + + + + + + {543, 44} + + + IBIPadFramework + + YES + + + + IBIPadFramework + 1 + + 0 + + + IBIPadFramework + + + + + + 274 + {{0, 44}, {543, 577}} + + + NO + IBIPadFramework + + NSImage + background_small.png + + + + + 274 + {{0, 44}, {543, 577}} + + + + 1 + MCAwIDAgMAA + + YES + IBIPadFramework + YES + 1 + 2 + 0 + YES + 44 + 10 + 10 + + + {543, 621} + + + + 3 + MQA + + NO + NO + + 3 + + IBIPadFramework + + + + + YES + + + view + + + + 3 + + + + buttonPressed: + + + + 8 + + + + dataSource + + + + 12 + + + + delegate + + + + 13 + + + + tableView + + + + 14 + + + + segmentedControlChanged: + + + 13 + + 15 + + + + segmentedControl + + + + 16 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + YES + + + + + + + + 5 + + + YES + + + + + + 6 + + + YES + + + + + + + 7 + + + + + 9 + + + + + 10 + + + + + 11 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 10.IBPluginDependency + 11.IBPluginDependency + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 5.IBPluginDependency + 6.IBPluginDependency + 7.IBPluginDependency + 9.IBPluginDependency + + + YES + AboutViewController + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{376, 170}, {543, 621}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 16 + + + + YES + + AboutViewController + UIViewController + + YES + + YES + buttonPressed: + segmentedControlChanged: + + + YES + id + id + + + + YES + + YES + buttonPressed: + segmentedControlChanged: + + + YES + + buttonPressed: + id + + + segmentedControlChanged: + id + + + + + YES + + YES + segmentedControl + tableView + + + YES + UISegmentedControl + UITableView + + + + YES + + YES + segmentedControl + tableView + + + YES + + segmentedControl + UISegmentedControl + + + tableView + UITableView + + + + + IBProjectSource + Classes/AboutViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIBarButtonItem + UIBarItem + + IBFrameworkSource + UIKit.framework/Headers/UIBarButtonItem.h + + + + UIBarItem + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIBarItem.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UINavigationBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UINavigationBar.h + + + + UINavigationItem + NSObject + + + + UIResponder + NSObject + + + + UIScrollView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIScrollView.h + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UISegmentedControl + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UISegmentedControl.h + + + + UITableView + UIScrollView + + IBFrameworkSource + UIKit.framework/Headers/UITableView.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBIPadFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../Hedgewars.xcodeproj + 3 + + background_small.png + {539, 639} + + 117 + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/AmmoMenuViewController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/AmmoMenuViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,55 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 03/10/2010. + */ + + +#import + + +@interface AmmoMenuViewController : UIViewController { + NSArray *buttonsArray; + NSArray *imagesArray; + + UILabel *nameLabel; + UILabel *extraLabel; + UILabel *captionLabel; + + uint8_t *delay; + BOOL *shouldUpdateImage; + CGPoint startingPoint; + BOOL isVisible; +} + +@property (retain) NSArray *buttonsArray; +@property (retain) NSArray *imagesArray; +@property (nonatomic,retain) UILabel *nameLabel; +@property (nonatomic,retain) UILabel *extraLabel; +@property (nonatomic,retain) UILabel *captionLabel; +@property (assign) BOOL isVisible; + +-(void) buttonPressed:(id) sender; +-(void) buttonReleased:(id) sender; +-(void) buttonCancelled:(id) sender; +-(void) appearInView:(UIView *)container; +-(void) disappear; +-(void) updateAmmoVisuals; +-(void) loadLabels; +-(void) loadAmmoStuff:(id) object; + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/AmmoMenuViewController.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/AmmoMenuViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,368 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 03/10/2010. + */ + + +#import "AmmoMenuViewController.h" +#import +#import "CommodityFunctions.h" +#import "UIImageExtra.h" +#import "PascalImports.h" + +#define BTNS_PER_ROW 9 +#define DEFAULT_DESCRIPTION NSLocalizedString(@"Hold your finger on a weapon to see what it does",@"") + +@implementation AmmoMenuViewController +@synthesize imagesArray, buttonsArray, nameLabel, extraLabel, captionLabel, isVisible; + +-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { + return rotationManager(interfaceOrientation); +} + +#pragma mark - +#pragma mark view handling +-(void) viewDidLoad { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateAmmoVisuals) + name:@"updateAmmoVisuals" + object:nil]; + + self.view.frame = CGRectMake(0, 0, 480, 320); + self.view.backgroundColor = [UIColor blackColor]; + self.view.layer.borderColor = [[UIColor whiteColor] CGColor]; + self.view.layer.borderWidth = 1.3f; + [self.view.layer setCornerRadius:10]; + [self.view.layer setMasksToBounds:YES]; + self.view.autoresizingMask = UIViewAutoresizingNone; + + self.isVisible = NO; + delay = (uint8_t *)calloc(HW_getNumberOfWeapons(), sizeof(uint8_t)); + HW_getAmmoDelays(delay); + + shouldUpdateImage = (BOOL *)calloc(HW_getNumberOfWeapons(), sizeof(BOOL)); + + [super viewDidLoad]; +} + +-(void) viewWillAppear:(BOOL)animated { + [self updateAmmoVisuals]; + [super viewWillAppear:animated]; +} + +-(void) appearInView:(UIView *)container { + [self viewWillAppear:YES]; + [container addSubview:self.view]; + if (IS_DUALHEAD() == NO) + self.view.center = CGPointMake(container.center.y, container.center.x); + else { + UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; + if (orientation == UIDeviceOrientationLandscapeLeft || orientation == UIDeviceOrientationLandscapeRight) + self.view.center = CGPointMake(container.center.y, container.center.x); + else + self.view.center = CGPointMake(container.center.x, container.center.y); + } + self.isVisible = YES; +} + +-(void) disappear { + if (self.isVisible) + [self.view removeFromSuperview]; + self.isVisible = NO; +} + +#pragma mark - +#pragma mark drawing +-(void) loadLabels { + int x = 12; + int y = (HW_getNumberOfWeapons()/BTNS_PER_ROW)*44 + 18; + UILabel *name = [[UILabel alloc] initWithFrame:CGRectMake(x, y, 200, 20)]; + name.backgroundColor = [UIColor clearColor]; + name.textColor = UICOLOR_HW_YELLOW_BODER; + name.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]]; + self.nameLabel = name; + [self.view addSubview:self.nameLabel]; + [name release]; + + UILabel *caption = [[UILabel alloc] initWithFrame:CGRectMake(x+200, y, 220, 20)]; + caption.backgroundColor = [UIColor clearColor]; + caption.textColor = [UIColor whiteColor]; + caption.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize]]; + caption.adjustsFontSizeToFitWidth = YES; + caption.minimumFontSize = 8; + self.captionLabel = caption; + [self.view addSubview:self.captionLabel]; + [caption release]; + + UILabel *description = [[UILabel alloc] initWithFrame:CGRectMake(x+2, y+20, 410, 53)]; + description.backgroundColor = [UIColor clearColor]; + description.textColor = [UIColor whiteColor]; + description.text = DEFAULT_DESCRIPTION; + description.font = [UIFont italicSystemFontOfSize:[UIFont systemFontSize]]; + description.adjustsFontSizeToFitWidth = YES; + description.minimumFontSize = 8; + description.numberOfLines = 0; + self.extraLabel = description; + [self.view addSubview:self.extraLabel]; + [description release]; +} + +-(void) loadAmmoStuff:(id) object { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSString *str = [NSString stringWithFormat:@"%@/AmmoMenu/Ammos.png",GRAPHICS_DIRECTORY()]; + UIImage *ammoStoreImage = [[UIImage alloc] initWithContentsOfFile:str]; + + NSMutableArray *imgs = [[NSMutableArray alloc] initWithCapacity:HW_getNumberOfWeapons()]; + NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:HW_getNumberOfWeapons()]; + int i, j, e; + for (i = 0, j = 0, e = 0; i < HW_getNumberOfWeapons(); i++) { + int x, y; + float w, radius; + + // move utilities aside and make 'em rounded + if (HW_isWeaponAnEffect(i)) { + x = 432; + y = 20 + 48*e++; + w = 1.5; + radius = 22; + } else { + x = 10+(j%BTNS_PER_ROW)*44; + y = 10+(j/BTNS_PER_ROW)*44; + if (j / BTNS_PER_ROW % 2 != 0) + x += 20; + w = 1; + radius = 6; + j++; + } + + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; + button.frame = CGRectMake(x, y, 40, 40); + button.tag = i; + button.layer.borderColor = [UICOLOR_HW_YELLOW_TEXT CGColor]; + button.layer.borderWidth = w; + [button.layer setCornerRadius:radius]; + [button.layer setMasksToBounds:YES]; + [button addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchDown]; + [button addTarget:self action:@selector(buttonReleased:) forControlEvents:UIControlEventTouchUpInside]; + [button addTarget:self action:@selector(buttonCancelled:) forControlEvents:UIControlEventTouchUpOutside|UIControlEventTouchCancel]; + [button setTitleColor:UICOLOR_HW_YELLOW_TEXT forState:UIControlStateNormal]; + button.titleLabel.backgroundColor = [UIColor blackColor]; + button.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont smallSystemFontSize]]; + [button.titleLabel.layer setCornerRadius:3]; + [button.titleLabel.layer setMasksToBounds:YES]; + button.titleLabel.layer.borderColor = [[UIColor whiteColor] CGColor]; + button.titleLabel.layer.borderWidth = 1; + [self.view addSubview:button]; + [array addObject:button]; + + int x_src = ((i*32)/(int)ammoStoreImage.size.height)*32; + int y_src = (i*32)%(int)ammoStoreImage.size.height; + UIImage *img = [ammoStoreImage cutAt:CGRectMake(x_src, y_src, 32, 32)]; + [imgs addObject:img]; + } + [self performSelectorOnMainThread:@selector(setButtonsArray:) withObject:array waitUntilDone:NO]; + [array release]; + + [self performSelectorOnMainThread:@selector(setImagesArray:) withObject:imgs waitUntilDone:NO]; + [imgs release]; + [ammoStoreImage release]; + + [self performSelectorOnMainThread:@selector(loadLabels) withObject:nil waitUntilDone:NO]; + + [self performSelectorOnMainThread:@selector(updateAmmoVisuals) withObject:nil waitUntilDone:YES]; + UIActivityIndicatorView *spinner = (UIActivityIndicatorView *)object; + [spinner stopAnimating]; + [pool drain]; +} + +-(void) updateAmmoVisuals { + if (self.buttonsArray == nil || self.imagesArray == nil) { + UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; + spinner.hidesWhenStopped = YES; + spinner.center = self.view.center; + [spinner startAnimating]; + [self.view addSubview:spinner]; + [NSThread detachNewThreadSelector:@selector(loadAmmoStuff:) toTarget:self withObject:spinner]; + [spinner release]; + return; + } + + int *loadout = (int *)calloc(HW_getNumberOfWeapons(), sizeof(int)); + int res = HW_getAmmoCounts(loadout); + int turns = HW_getTurnsForCurrentTeam(); + + if (res == 0) { + self.view.userInteractionEnabled = YES; + + for (int i = 0; i < HW_getNumberOfWeapons(); i++) { + UIButton *button = [self.buttonsArray objectAtIndex:i]; + if (loadout[i] > 0) { + if (delay[i]-turns >= 0) { + button.layer.borderColor = [[UIColor lightGrayColor] CGColor]; + [button setTitle:[NSString stringWithFormat:@" %d ",delay[i]-turns+1] forState:UIControlStateNormal]; + if (button.currentBackgroundImage == nil || shouldUpdateImage[i] == NO) { + UIImage *img = [self.imagesArray objectAtIndex:i]; + [button setBackgroundImage:[img convertToGrayScale] forState:UIControlStateNormal]; + shouldUpdateImage[i] = YES; + } + } else { + button.layer.borderColor = [UICOLOR_HW_YELLOW_TEXT CGColor]; + [button setTitle:nil forState:UIControlStateNormal]; + if (button.currentBackgroundImage == nil || shouldUpdateImage[i] == YES) { + UIImage *img = [self.imagesArray objectAtIndex:i]; + [button setBackgroundImage:img forState:UIControlStateNormal]; + shouldUpdateImage[i] = NO; + } + } + button.enabled = YES; + } else { + if (button.enabled == YES) + [button setBackgroundImage:nil forState:UIControlStateNormal]; + button.layer.borderColor = [[UIColor darkGrayColor] CGColor]; + button.enabled = NO; + shouldUpdateImage[i] = NO; + } + } + } else { + self.view.userInteractionEnabled = NO; + } + + free(loadout); + loadout = NULL; +} + +#pragma mark - +#pragma mark user interaction +-(void) buttonPressed:(id) sender { + UIButton *theButton = (UIButton *)sender; + if (self.nameLabel == nil || self.extraLabel == nil) + [self loadLabels]; + + self.nameLabel.text = [NSString stringWithUTF8String:HW_getWeaponNameByIndex(theButton.tag)]; + // description contains a lot of unnecessary stuff, we clean it by removing .|, !| and ?| + NSString *description = [NSString stringWithUTF8String:HW_getWeaponDescriptionByIndex(theButton.tag)]; + NSArray *elements = [description componentsSeparatedByString:@".|"]; + NSArray *purgedElements = [[elements objectAtIndex:0] componentsSeparatedByString:@"!|"]; + NSArray *morePurgedElements = [[purgedElements objectAtIndex:0] componentsSeparatedByString:@"?|"]; + self.extraLabel.text = [[[morePurgedElements objectAtIndex:0] stringByReplacingOccurrencesOfString:@"|" withString:@" "] stringByAppendingString:@"."]; + if (theButton.currentTitle != nil) + self.captionLabel.text = NSLocalizedString(@"This weapon is locked",@""); + else + self.captionLabel.text = [NSString stringWithUTF8String:HW_getWeaponCaptionByIndex(theButton.tag)]; +} + +-(void) buttonCancelled:(id) sender { + self.nameLabel.text = nil; + self.extraLabel.text = DEFAULT_DESCRIPTION; + self.captionLabel.text = nil; +} + +-(void) buttonReleased:(id) sender { + UIButton *theButton = (UIButton *)sender; + if (self.nameLabel == nil || self.extraLabel == nil) + [self loadLabels]; + + self.nameLabel.text = nil; + self.extraLabel.text = DEFAULT_DESCRIPTION; + self.captionLabel.text = nil; + if (theButton.currentTitle == nil) { + HW_setWeapon(theButton.tag); + playSound(@"clickSound"); + if (IS_DUALHEAD() == NO) + [self disappear]; + } +} + +-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { + /* + NSSet *allTouches = [event allTouches]; + + if ([touches count] == 1) { + self.view.layer.borderWidth = 3.5; + startingPoint = [[[allTouches allObjects] objectAtIndex:0] locationInView:self.view]; + } + */ + if (IS_IPAD() == NO) + [self disappear]; +} + +-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { + //self.view.layer.borderWidth = 1.3; +} + +-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { + /* + NSSet *allTouches = [event allTouches]; + + if ([touches count] == 1) { + CGPoint touchedPoint = [[[allTouches allObjects] objectAtIndex:0] locationInView:self.view]; + CGFloat deltaX = touchedPoint.x - startingPoint.x; + CGFloat deltaY = touchedPoint.y - startingPoint.y; + + //startingPoint = touchedPoint; + self.view.frame = CGRectMake(self.view.frame.origin.x + deltaX, self.view.frame.origin.y + deltaY, + self.view.frame.size.width, self.view.frame.size.height); + } + */ +} + +-(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { + //[self touchesEnded:touches withEvent:event]; +} + +#pragma mark - +#pragma mark memory +-(void) didReceiveMemoryWarning { + self.imagesArray = nil; + self.buttonsArray = nil; + self.nameLabel = nil; + self.extraLabel = nil; + self.captionLabel = nil; + MSG_MEMCLEAN(); + [super didReceiveMemoryWarning]; +} + +-(void) viewDidUnload { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + self.imagesArray = nil; + self.buttonsArray = nil; + self.nameLabel = nil; + self.extraLabel = nil; + self.captionLabel = nil; + free(delay); + delay = NULL; + free(shouldUpdateImage); + shouldUpdateImage = NULL; + MSG_DIDUNLOAD(); + [super viewDidUnload]; +} + +-(void) dealloc { + [nameLabel release]; + [extraLabel release]; + [captionLabel release]; + [imagesArray release]; + [buttonsArray release]; + [super dealloc]; +} + +@end + +void updateVisualsNewTurn (void) { + [[NSNotificationCenter defaultCenter] postNotificationName:@"updateAmmoVisuals" object:nil]; +} diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/CGPointUtils.c --- a/project_files/HedgewarsMobile/Classes/CGPointUtils.c Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/CGPointUtils.c Wed Oct 27 14:02:20 2010 +0200 @@ -8,7 +8,7 @@ */ #include "CGPointUtils.h" -#include +#include "math.h" CGFloat distanceBetweenPoints (CGPoint first, CGPoint second) { diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/CGPointUtils.h --- a/project_files/HedgewarsMobile/Classes/CGPointUtils.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/CGPointUtils.h Wed Oct 27 14:02:20 2010 +0200 @@ -9,12 +9,15 @@ #import -#define degreesToRadian(x) (M_PI * x / 180.0) -#define radiansToDegrees(x) (180.0 * x / M_PI) +#define degreesToRadians(x) ( M_PI * x / 180.0) +#define radiansToDegrees(x) (180.0 * x / M_PI ) -#define HWX(x) (int)(x-screen.size.height/2) -#define HWY(x) (int)(screen.size.width-x) +#define HWX(x) (int)(x-screen.size.height/2)/HW_zoomFactor() +#define HWY(x) (int)(screen.size.width-x)/HW_zoomFactor() + (IS_IPAD()?40:17.5)*HW_zoomLevel()/HW_zoomFactor() + +#define HWXZ(x) (int)(x-screen.size.height/2) +#define HWYZ(x) (int)(screen.size.width-x) CGFloat distanceBetweenPoints (CGPoint first, CGPoint second); CGFloat angleBetweenPoints(CGPoint first, CGPoint second); -CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint lin2End); +CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint line2End); diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/CommodityFunctions.h --- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,50 +1,74 @@ -// -// CommodityFunctions.h -// HedgewarsMobile -// -// Created by Vittorio on 08/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/04/2010. + */ + #import -#define MAX_HOGS 8 +#define DOCUMENTS_FOLDER() [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] +#define SETTINGS_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/settings.plist"] +#define DEBUG_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/hw-game.log"] -#define SETTINGS_FILE() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ - objectAtIndex:0] stringByAppendingString:@"/settings.plist"] -#define DEBUG_FILE() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ - objectAtIndex:0] stringByAppendingString:@"/debug.txt"] - -#define TEAMS_DIRECTORY() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ - objectAtIndex:0] stringByAppendingString:@"/Teams/"] -#define WEAPONS_DIRECTORY() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ - objectAtIndex:0] stringByAppendingString:@"/Weapons/"] -#define SCHEMES_DIRECTORY() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ - objectAtIndex:0] stringByAppendingString:@"/Schemes/"] +#define TEAMS_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Teams/"] +#define WEAPONS_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Weapons/"] +#define SCHEMES_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Schemes/"] +#define SAVES_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Saves/"] #define GRAPHICS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"] #define HATS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"] #define GRAVES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Graves/"] -#define BOTLEVELS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels"] -#define BTN_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Btn"] +#define BOTLEVELS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels/"] +#define BTN_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Btn/"] #define FLAGS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Flags/"] #define FORTS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Forts/"] +#define VOICES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"] #define THEMES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Themes/"] #define MAPS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Maps/"] -#define VOICES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"] +#define MISSIONS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Missions/Maps/"] +#define LOCALE_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Locale/"] +#define IFRONTEND_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Settings/iFrontend/"] #define MSG_MEMCLEAN() DLog(@"has cleaned up some memory"); #define MSG_DIDUNLOAD() DLog(@"unloaded"); -#define CURRENT_AMMOSIZE 46 +#define UICOLOR_HW_YELLOW_BODER [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xC0/255 blue:0 alpha:1] +#define UICOLOR_HW_YELLOW_TEXT [UIColor colorWithRed:(CGFloat)0xF0/255 green:(CGFloat)0xD0/255 blue:0 alpha:1] +#define UICOLOR_HW_DARKBLUE [UIColor colorWithRed:(CGFloat)0x0F/255 green:0 blue:(CGFloat)0x42/255 alpha:1] +#define UICOLOR_HW_ALPHABLUE [UIColor colorWithRed:(CGFloat)0x0F/255 green:0 blue:(CGFloat)0x42/255 alpha:0.58f] + +#define IS_DUALHEAD() ([[UIScreen screens] count] > 1) +#define IS_IPAD() (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + +#define DEFAULT_NETGAME_PORT 46631 + void createTeamNamed (NSString *nameWithoutExt); -void createWeaponNamed (NSString *nameWithoutExt); +void createWeaponNamed (NSString *nameWithoutExt, int type); void createSchemeNamed (NSString *nameWithoutExt); +void print_free_memory (void); +void playSound (NSString *snd); +void popError (const char *title, const char *message); BOOL rotationManager (UIInterfaceOrientation interfaceOrientation); -NSInteger randomPort (); -void popError (const char *title, const char *message); -void print_free_memory (); -BOOL isPhone (); -NSString *modelType (); +BOOL isApplePhone (void); +NSInteger randomPort (void); +NSString *modelType (void); +NSArray *getAvailableColors (void); +UILabel *createBlueLabel (NSString *title, CGRect frame); +UILabel *createLabelWithParams (NSString *title, CGRect frame, CGFloat borderWidth, UIColor *borderColor, UIColor *backgroundColor); diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/CommodityFunctions.m --- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,30 +1,46 @@ -// -// CommodityFunctions.m -// HedgewarsMobile -// -// Created by Vittorio on 08/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/04/2010. + */ + #import "CommodityFunctions.h" #import #import #import #import +#import +#import "AudioToolbox/AudioToolbox.h" +#import "PascalImports.h" void createTeamNamed (NSString *nameWithoutExt) { NSString *teamsDirectory = TEAMS_DIRECTORY(); - + if (![[NSFileManager defaultManager] fileExistsAtPath: teamsDirectory]) { - [[NSFileManager defaultManager] createDirectoryAtPath:teamsDirectory - withIntermediateDirectories:NO - attributes:nil + [[NSFileManager defaultManager] createDirectoryAtPath:teamsDirectory + withIntermediateDirectories:NO + attributes:nil error:NULL]; } - - NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: MAX_HOGS]; - - for (int i = 0; i < MAX_HOGS; i++) { + + NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: HW_getMaxNumberOfHogs()]; + + for (int i = 0; i < HW_getMaxNumberOfHogs(); i++) { NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i]; NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithInt:0],@"level", hogName,@"hogname", @"NoHat",@"hat", nil]; @@ -32,12 +48,12 @@ [hedgehogs addObject:hog]; [hog release]; } - + NSDictionary *theTeam = [[NSDictionary alloc] initWithObjectsAndKeys:@"0",@"hash", @"Statue",@"grave", @"Plane",@"fort", @"Default",@"voicepack", @"hedgewars",@"flag", hedgehogs,@"hedgehogs", nil]; [hedgehogs release]; - + NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", teamsDirectory, nameWithoutExt]; [theTeam writeToFile:teamFile atomically:YES]; @@ -45,25 +61,67 @@ [theTeam release]; } -void createWeaponNamed (NSString *nameWithoutExt) { +void createWeaponNamed (NSString *nameWithoutExt, int type) { NSString *weaponsDirectory = WEAPONS_DIRECTORY(); if (![[NSFileManager defaultManager] fileExistsAtPath: weaponsDirectory]) { - [[NSFileManager defaultManager] createDirectoryAtPath:weaponsDirectory - withIntermediateDirectories:NO - attributes:nil + [[NSFileManager defaultManager] createDirectoryAtPath:weaponsDirectory + withIntermediateDirectories:NO + attributes:nil error:NULL]; } + + NSDictionary *theWeapon = nil; + switch (type) { + case 0: //default + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + @"9391929422199121032235111001201000000211110101010",@"ammostore_initialqt", + @"0405040541600655546554464776576666666155510101110",@"ammostore_probability", + @"0000000000000205500000040007004000000000200000000",@"ammostore_delay", + @"1311110312111111123114111111111111111211111101110",@"ammostore_crate", nil]; + break; + case 1: //crazy + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + @"9999999999999999992999999999999999299999999909990",@"ammostore_initialqt", + @"1111110111111111111111111111111111111111111101110",@"ammostore_probability", + @"0000000000000000000000000000000000000000000000000",@"ammostore_delay", + @"1311110312111111123114111111111111111211110101110",@"ammostore_crate", nil]; + break; + case 2: //pro mode + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + @"9090009000000000000009000000000000000000000000000",@"ammostore_initialqt", + @"0000000000000000000000000000000000000000000000000",@"ammostore_probability", + @"0000000000000205500000040007004000000000200000000",@"ammostore_delay", + @"1111111111111111111111111111111111111111100101110",@"ammostore_crate", nil]; + break; + case 3: //shoppa + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + @"0000009900000000000000000000000000000000000000000",@"ammostore_initialqt", + @"4444410044244402210112121222422000000002000400010",@"ammostore_probability", + @"0000000000000000000000000000000000000000000000000",@"ammostore_delay", + @"1111111111111111111111111111111111111111101101110",@"ammostore_crate", nil]; + break; + case 4: //basketball + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + @"9391929422199121032235111001201000000211110101000",@"ammostore_initialqt", + @"0000000000000000000000000000000000000000000000000",@"ammostore_probability", + @"0000000000000005500000040007004000000000200000000",@"ammostore_delay", + @"1111111111111111111111111111111111111111111101110",@"ammostore_crate", nil]; + break; + case 5: //minefield + theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: + @"0000009900090000000300000000000000000000000000000",@"ammostore_initialqt", + @"0000000000000000000000000000000000000000000000000",@"ammostore_probability", + @"0000000000000205500000040007004000000000200000000",@"ammostore_delay", + @"1111111111111111111111111111111111111111111101110",@"ammostore_crate", nil]; + break; + default: + NSLog(@"Nope"); + break; + } - NSDictionary *theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", - @"9391929422199121032235111001201000000211110111",@"ammostore_initialqt", - @"0405040541600655546554464776576666666155510111",@"ammostore_probability", - @"0000000000000205500000040007004000000000200000",@"ammostore_delay", - @"1311110312111111123114111111111111111211111111",@"ammostore_crate", nil]; - NSString *weaponFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", weaponsDirectory, nameWithoutExt]; - + [theWeapon writeToFile:weaponFile atomically:YES]; [weaponFile release]; [theWeapon release]; @@ -71,58 +129,70 @@ void createSchemeNamed (NSString *nameWithoutExt) { NSString *schemesDirectory = SCHEMES_DIRECTORY(); - + if (![[NSFileManager defaultManager] fileExistsAtPath: schemesDirectory]) { - [[NSFileManager defaultManager] createDirectoryAtPath:schemesDirectory - withIntermediateDirectories:NO - attributes:nil + [[NSFileManager defaultManager] createDirectoryAtPath:schemesDirectory + withIntermediateDirectories:NO + attributes:nil error:NULL]; } - NSArray *theScheme = [[NSArray alloc] initWithObjects: - [NSNumber numberWithBool:NO], //fortmode - [NSNumber numberWithBool:NO], //divideteam - [NSNumber numberWithBool:NO], //solidland - [NSNumber numberWithBool:NO], //addborder - [NSNumber numberWithBool:NO], //lowgravity - [NSNumber numberWithBool:NO], //lasersight - [NSNumber numberWithBool:NO], //invulnerable - [NSNumber numberWithBool:YES], //addmines - [NSNumber numberWithBool:NO], //vampirism - [NSNumber numberWithBool:NO], //karma - [NSNumber numberWithBool:NO], //artillery - [NSNumber numberWithBool:YES], //randomorder - [NSNumber numberWithBool:NO], //king - [NSNumber numberWithBool:NO], //placehedgehogs - [NSNumber numberWithBool:NO], //clansharesammo - [NSNumber numberWithBool:NO], //disablegirders - [NSNumber numberWithBool:NO], //disablelandobjects - [NSNumber numberWithInt:100], //damagemodifier - [NSNumber numberWithInt:45], //turntime - [NSNumber numberWithInt:100], //initialhealth - [NSNumber numberWithInt:15], //suddendeathtimeout - [NSNumber numberWithInt:5], //cratedrops - [NSNumber numberWithInt:3], //minestime - [NSNumber numberWithInt:4], //mines - [NSNumber numberWithInt:0], //dudmines - [NSNumber numberWithInt:2], //explosives - nil]; + NSMutableArray *basicArray = [[NSMutableArray alloc] initWithObjects: + [NSNumber numberWithInt:100], //damagemodifier + [NSNumber numberWithInt:45], //turntime + [NSNumber numberWithInt:100], //initialhealth + [NSNumber numberWithInt:15], //suddendeathtimeout + [NSNumber numberWithInt:5], //cratedrops + [NSNumber numberWithInt:3], //minestime + [NSNumber numberWithInt:4], //mines + [NSNumber numberWithInt:0], //dudmines + [NSNumber numberWithInt:2], //explosives + nil]; + + NSMutableArray *gamemodArray= [[NSMutableArray alloc] initWithObjects: + [NSNumber numberWithBool:NO], //fortmode + [NSNumber numberWithBool:NO], //divideteam + [NSNumber numberWithBool:NO], //solidland + [NSNumber numberWithBool:NO], //addborder + [NSNumber numberWithBool:NO], //lowgravity + [NSNumber numberWithBool:NO], //lasersight + [NSNumber numberWithBool:NO], //invulnerable + [NSNumber numberWithBool:YES], //addmines + [NSNumber numberWithBool:NO], //vampirism + [NSNumber numberWithBool:NO], //karma + [NSNumber numberWithBool:NO], //artillery + [NSNumber numberWithBool:YES], //randomorder + [NSNumber numberWithBool:NO], //king + [NSNumber numberWithBool:NO], //placehedgehogs + [NSNumber numberWithBool:NO], //clansharesammo + [NSNumber numberWithBool:NO], //disablegirders + [NSNumber numberWithBool:NO], //disablelandobjects + [NSNumber numberWithBool:NO], //aisurvival + nil]; + + NSMutableDictionary *theScheme = [[NSMutableDictionary alloc] initWithObjectsAndKeys: + basicArray,@"basic", + gamemodArray,@"gamemod", + nil]; + [gamemodArray release]; + [basicArray release]; NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt]; - + [theScheme writeToFile:schemeFile atomically:YES]; [schemeFile release]; [theScheme release]; } -BOOL rotationManager (UIInterfaceOrientation interfaceOrientation) { +BOOL inline rotationManager (UIInterfaceOrientation interfaceOrientation) { return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) || - (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); + (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); } -NSInteger randomPort () { +NSInteger inline randomPort () { srandom(time(NULL)); - return (random() % 64511) + 1024; + NSInteger res = (random() % 64511) + 1024; + return (res == DEFAULT_NETGAME_PORT) ? randomPort() : res; } void popError (const char *title, const char *message) { @@ -140,36 +210,88 @@ mach_port_t host_port; mach_msg_type_number_t host_size; vm_size_t pagesize; - + host_port = mach_host_self(); host_size = sizeof(vm_statistics_data_t) / sizeof(integer_t); - host_page_size(host_port, &pagesize); - + host_page_size(host_port, &pagesize); + vm_statistics_data_t vm_stat; - + if (host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size) != KERN_SUCCESS) DLog(@"Failed to fetch vm statistics"); - - /* Stats in bytes */ + + /* Stats in bytes */ natural_t mem_used = (vm_stat.active_count + vm_stat.inactive_count + vm_stat.wire_count) * pagesize; natural_t mem_free = vm_stat.free_count * pagesize; natural_t mem_total = mem_used + mem_free; DLog(@"used: %u free: %u total: %u", mem_used, mem_free, mem_total); } -BOOL isPhone () { - return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone); +BOOL inline isApplePhone () { + return (IS_IPAD() == NO); } NSString *modelType () { size_t size; // set 'oldp' parameter to NULL to get the size of the data returned so we can allocate appropriate amount of space - sysctlbyname("hw.machine", NULL, &size, NULL, 0); + sysctlbyname("hw.machine", NULL, &size, NULL, 0); char *name = (char *)malloc(sizeof(char) * size); // get the platform name sysctlbyname("hw.machine", name, &size, NULL, 0); NSString *modelId = [NSString stringWithUTF8String:name]; free(name); - + return modelId; -} \ No newline at end of file +} + +void playSound (NSString *snd) { + //Get the filename of the sound file: + NSString *path = [NSString stringWithFormat:@"%@/%@.wav",[[NSBundle mainBundle] resourcePath],snd]; + + //declare a system sound id + SystemSoundID soundID; + + //Get a URL for the sound file + NSURL *filePath = [NSURL fileURLWithPath:path isDirectory:NO]; + + //Use audio sevices to create the sound + AudioServicesCreateSystemSoundID((CFURLRef)filePath, &soundID); + + //Use audio services to play the sound + AudioServicesPlaySystemSound(soundID); +} + +NSArray inline *getAvailableColors (void) { + return [NSArray arrayWithObjects:[NSNumber numberWithUnsignedInt:0x4376e9], // bluette + [NSNumber numberWithUnsignedInt:0x3e9321], // greeeen + [NSNumber numberWithUnsignedInt:0xa23dbb], // violett + [NSNumber numberWithUnsignedInt:0xff9329], // oranngy + [NSNumber numberWithUnsignedInt:0xdd0000], // reddish + [NSNumber numberWithUnsignedInt:0x737373], // graaaay + [NSNumber numberWithUnsignedInt:0xbba23d], // gold$$$ + [NSNumber numberWithUnsignedInt:0x3da2bb], // cyannnn + nil]; +} + +UILabel *createBlueLabel (NSString *title, CGRect frame) { + return createLabelWithParams(title, frame, 1.5f, UICOLOR_HW_YELLOW_BODER, UICOLOR_HW_DARKBLUE); +} + +UILabel *createLabelWithParams (NSString *title, CGRect frame, CGFloat borderWidth, UIColor *borderColor, UIColor *backgroundColor) { + UILabel *theLabel = [[UILabel alloc] initWithFrame:frame]; + theLabel.backgroundColor = backgroundColor; + + if (title != nil) { + theLabel.text = title; + theLabel.textColor = UICOLOR_HW_YELLOW_TEXT; + theLabel.textAlignment = UITextAlignmentCenter; + theLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]*80/100]; + } + + [theLabel.layer setBorderWidth:borderWidth]; + [theLabel.layer setBorderColor:borderColor.CGColor]; + [theLabel.layer setCornerRadius:8.0f]; + [theLabel.layer setMasksToBounds:YES]; + + return theLabel; +} diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/DetailViewController.h --- a/project_files/HedgewarsMobile/Classes/DetailViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -// -// DetailViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 27/03/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// - -#import - -@class GeneralSettingsViewController; -@class TeamSettingsViewController; -@class WeaponSettingsViewController; -@class SchemeSettingsViewController; - -@interface DetailViewController : UITableViewController { - NSArray *controllerNames; - - GeneralSettingsViewController *generalSettingsViewController; - TeamSettingsViewController *teamSettingsViewController; - WeaponSettingsViewController *weaponSettingsViewController; - SchemeSettingsViewController *schemeSettingsViewController; - UIPopoverController *popoverController; -} - -// used in iphone version --(IBAction) dismissSplitView; - -@property (nonatomic, retain) NSArray *controllerNames; -@property (nonatomic,retain) UIPopoverController *popoverController; - -@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/DetailViewController.m --- a/project_files/HedgewarsMobile/Classes/DetailViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ - // -// DetailViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 27/03/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// - -#import "DetailViewController.h" -#import "SDL_uikitappdelegate.h" -#import "GeneralSettingsViewController.h" -#import "TeamSettingsViewController.h" -#import "WeaponSettingsViewController.h" -#import "SchemeSettingsViewController.h" -#import "CommodityFunctions.h" - -@implementation DetailViewController -@synthesize controllerNames,popoverController; - - --(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { - return rotationManager(interfaceOrientation); -} - --(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{ - self.view.frame = CGRectMake(0, 0, 1024, 1024); -} - --(void) viewDidLoad { - self.title = NSLocalizedString(@"Settings",@""); - - // allocate controllers and store them into the array - NSArray *array= [[NSArray alloc] initWithObjects:NSLocalizedString(@"General",@""), - NSLocalizedString(@"Teams",@""), - NSLocalizedString(@"Weapons",@""), - NSLocalizedString(@"Schemes",@""), - nil]; - self.controllerNames = array; - [array release]; - - // on ipad make the general setting the first view, on iphone add the "Done" button on top left - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - - UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(112, 112, 480, 320)]; - label.text = @"Press the buttons on the left"; - label.font = [UIFont systemFontOfSize:20]; - label.textAlignment = UITextAlignmentCenter; - [self.view addSubview:label]; - [label release]; - - //[self.navigationController pushViewController:nextController animated:NO]; - } else { - self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone - target:self - action:@selector(dismissSplitView)]; - } - - [super viewDidLoad]; -} - - -#pragma mark - -#pragma mark Table view data source --(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { - // don't display - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) - return 0; - else - return 1; -} - --(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return [controllerNames count]; -} - --(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - static NSString *CellIdentifier = @"Cell"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault - reuseIdentifier:CellIdentifier] autorelease]; - } - - NSInteger row = [indexPath row]; - - cell.textLabel.text = [controllerNames objectAtIndex:row]; - cell.imageView.image = [UIImage imageNamed:@"Icon.png"]; - cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - - return cell; -} - -#pragma mark - -#pragma mark Table view delegate --(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - NSInteger row = [indexPath row]; - UIViewController *nextController = nil; - - switch (row) { - case 0: - if (nil == generalSettingsViewController) - generalSettingsViewController = [[GeneralSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped]; - nextController = generalSettingsViewController; - break; - case 1: - if (nil == teamSettingsViewController) - teamSettingsViewController = [[TeamSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped]; - nextController = teamSettingsViewController; - break; - case 2: - if (nil == weaponSettingsViewController) - weaponSettingsViewController = [[WeaponSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped]; - nextController = weaponSettingsViewController; - break; - case 3: - if (nil == schemeSettingsViewController) - schemeSettingsViewController = [[SchemeSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped]; - nextController = schemeSettingsViewController; - break; - } - - nextController.title = [controllerNames objectAtIndex:row]; - [self.navigationController pushViewController:nextController animated:YES]; -} - --(IBAction) dismissSplitView { - [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissModalView" object:nil]; -} - -#pragma mark - -#pragma mark splitview support --(void) splitViewController:(UISplitViewController *)svc popoverController:(UIPopoverController *)pc willPresentViewController:(UIViewController *)aViewController { - if (popoverController != nil) { - [popoverController dismissPopoverAnimated:YES]; - } -} - -// Called when the master view controller is about to be hidden --(void) splitViewController: (UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController - withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController: (UIPopoverController*)pc { - - /* barButtonItem.title = @"Master View"; - UIToolbar *toolbar = self.parentViewController.navigationController.toolbar; - NSMutableArray *items = [[toolbar items] mutableCopy]; - [items insertObject:barButtonItem atIndex:0]; - [toolbar setItems:items animated:YES]; - - [items release]; - - self.popoverController = pc;*/ - barButtonItem.title = aViewController.title; - self.navigationItem.rightBarButtonItem = barButtonItem; -} - -// Called when the master view controller is about to appear --(void) splitViewController: (UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController - invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem { - /*UIToolbar *toolbar = self.parentViewController.navigationController.toolbar; - - NSMutableArray *items = [[toolbar items] mutableCopy]; - [items removeObjectAtIndex:0]; - - [toolbar setItems:items animated:YES]; - - [items release]; - - self.popoverController = nil;*/ - self.navigationItem.rightBarButtonItem = nil; - -} - --(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - // Release any cached data, images, etc that aren't in use. - if (generalSettingsViewController.view.superview == nil) - generalSettingsViewController = nil; - if (teamSettingsViewController.view.superview == nil) - teamSettingsViewController = nil; - if (weaponSettingsViewController.view.superview == nil) - weaponSettingsViewController = nil; - if (schemeSettingsViewController.view.superview == nil) - schemeSettingsViewController = nil; - MSG_MEMCLEAN(); -} - --(void) viewDidUnload { - self.controllerNames = nil; - generalSettingsViewController = nil; - teamSettingsViewController = nil; - weaponSettingsViewController = nil; - schemeSettingsViewController = nil; - MSG_DIDUNLOAD(); - [super viewDidUnload]; -} - --(void) dealloc { - [controllerNames release]; - [generalSettingsViewController release]; - [teamSettingsViewController release]; - [weaponSettingsViewController release]; - [schemeSettingsViewController release]; - [super dealloc]; -} -@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/EditableCellView.h --- a/project_files/HedgewarsMobile/Classes/EditableCellView.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/EditableCellView.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// WeaponCellView.h -// Hedgewars -// -// Created by Vittorio on 03/07/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 03/07/2010. + */ + #import @@ -20,7 +33,8 @@ UILabel *titleLabel; NSInteger minimumCharacters; NSInteger maximumCharacters; - + BOOL respectEditing; + @private NSString *oldValue; } @@ -30,6 +44,7 @@ @property (nonatomic,retain,readonly) UILabel *titleLabel; @property (nonatomic,assign) NSInteger minimumCharacters; @property (nonatomic,assign) NSInteger maximumCharacters; +@property (nonatomic,assign) BOOL respectEditing; @property (nonatomic,retain) NSString *oldValue; -(void) replyKeyboard; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/EditableCellView.m --- a/project_files/HedgewarsMobile/Classes/EditableCellView.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/EditableCellView.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,21 +1,34 @@ -// -// WeaponCellView.m -// Hedgewars -// -// Created by Vittorio on 03/07/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 03/07/2010. + */ + #import "EditableCellView.h" #import "CommodityFunctions.h" @implementation EditableCellView -@synthesize delegate, textField, titleLabel, minimumCharacters, maximumCharacters, oldValue; +@synthesize delegate, textField, titleLabel, minimumCharacters, maximumCharacters, respectEditing, oldValue; -(id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) { delegate = nil; - + textField = [[UITextField alloc] initWithFrame:CGRectZero]; textField.backgroundColor = [UIColor clearColor]; textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]]; @@ -24,20 +37,22 @@ textField.clearsOnBeginEditing = NO; textField.returnKeyType = UIReturnKeyDone; textField.adjustsFontSizeToFitWidth = YES; + textField.userInteractionEnabled = YES; [textField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit]; - + [self.contentView addSubview:textField]; //[textField release]; - + titleLabel = [[UILabel alloc] init]; titleLabel.textAlignment = UITextAlignmentLeft; titleLabel.backgroundColor = [UIColor clearColor]; titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]]; [self.contentView addSubview:titleLabel]; //[titleLabel release]; - + minimumCharacters = 1; maximumCharacters = 64; + respectEditing = NO; oldValue = nil; } return self; @@ -48,12 +63,12 @@ CGRect contentRect = self.contentView.bounds; CGFloat boundsX = contentRect.origin.x; - + int offset = 0; int skew = 0; if (self.imageView != nil) offset += self.imageView.frame.size.width; - + if ([self.titleLabel.text length] == 0) titleLabel.frame = CGRectZero; else { @@ -62,7 +77,7 @@ skew +=2; } - textField.frame = CGRectMake(boundsX+offset+10, skew+10, 250, [UIFont labelFontSize] + 4); + textField.frame = CGRectMake(boundsX+offset+10, skew+10, 300, [UIFont labelFontSize] + 4); } -(void) setSelected:(BOOL)selected animated:(BOOL)animated { @@ -85,25 +100,27 @@ return !([aTextField.text length] > self.maximumCharacters && [string length] > range.length); } -// allow editing only if delegate is set and conformant to protocol +// allow editing only if delegate is set and conformant to protocol, and if editableOnlyWhileEditing -(BOOL) textFieldShouldBeginEditing:(UITextField *)aTextField { - return (delegate != nil) && [delegate respondsToSelector:@selector(saveTextFieldValue:withTag:)]; + return (delegate != nil) && + [delegate respondsToSelector:@selector(saveTextFieldValue:withTag:)] && + (respectEditing) ? ((UITableView*)[self superview]).editing : YES; } // the textfield is being modified, update the navigation controller -(void) textFieldDidBeginEditing:(UITextField *)aTextField{ // don't interact with table below ((UITableView*)[self superview]).scrollEnabled = NO; - + self.oldValue = self.textField.text; - + UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel",@"") style:UIBarButtonItemStylePlain target:self action:@selector(cancel:)]; [(UITableViewController *)delegate navigationItem].leftBarButtonItem = cancelButton; [cancelButton release]; - + UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Save",@"") style:UIBarButtonItemStyleDone target:self @@ -116,18 +133,22 @@ use method below instead that allows some more interaction // don't accept 0-length strings -(BOOL) textFieldShouldEndEditing:(UITextField *)aTextField { - return ([aTextField.text length] > 0); + return ([aTextField.text length] > 0); } */ -(BOOL) textFieldShouldReturn:(UITextField *)aTextField { - return ([aTextField.text length] >= self.minimumCharacters); + return ([aTextField.text length] >= self.minimumCharacters); } // the textfield has been modified, tell the delegate to do something --(void) textFieldDidEndEditing:(UITextField *)aTextField{ +-(void) textFieldDidEndEditing:(UITextField *)aTextField { + // this forces a save when user selects a new field + if ([self.textField.text isEqualToString:self.oldValue] == NO) + [self save:aTextField]; + + // restores default behaviour on caller ((UITableView*)[self superview]).scrollEnabled = YES; - [(UITableViewController *)delegate navigationItem].rightBarButtonItem = [(UITableViewController *)delegate navigationItem].backBarButtonItem; [(UITableViewController *)delegate navigationItem].leftBarButtonItem = nil; } @@ -141,22 +162,31 @@ // the user pressed cancel so hide keyboard -(void) cancel:(id) sender { + // reverts any changes and performs a fake save for removing the keyboard self.textField.text = self.oldValue; [self save:sender]; } -// send the value to the delegate +// send the value to the delegate (called before textFieldDidEndEditing) -(void) save:(id) sender { - if (delegate == nil || ![delegate respondsToSelector:@selector(saveTextFieldValue:withTag:)]) + if (delegate == nil || [delegate respondsToSelector:@selector(saveTextFieldValue:withTag:)] == NO) return; - + // don't save if the textfield is invalid - if (![self textFieldShouldReturn:textField]) + if ([self textFieldShouldReturn:textField] == NO) return; - + [delegate saveTextFieldValue:self.textField.text withTag:self.tag]; [self.textField resignFirstResponder]; self.oldValue = nil; } +// when field is editable only when the tableview is editable, resign responder when exiting editing mode +-(void) willTransitionToState:(UITableViewCellStateMask)state { + if (respectEditing && state == UITableViewCellStateDefaultMask) + [self save:nil]; + + [super willTransitionToState:state]; +} + @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/FlagsViewController.h --- a/project_files/HedgewarsMobile/Classes/FlagsViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/FlagsViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// FlagsViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 08/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/04/2010. + */ + #import @@ -12,12 +25,14 @@ @interface FlagsViewController : UITableViewController { NSDictionary *teamDictionary; - NSArray *flagArray; + NSArray *flagArray; + NSArray *communityArray; NSIndexPath *lastIndexPath; } @property (nonatomic,retain) NSDictionary * teamDictionary; @property (nonatomic,retain) NSArray *flagArray; +@property (nonatomic,retain) NSArray *communityArray; @property (nonatomic,retain) NSIndexPath *lastIndexPath; @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/FlagsViewController.m --- a/project_files/HedgewarsMobile/Classes/FlagsViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/FlagsViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,16 +1,29 @@ -// -// FlagsViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 08/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/04/2010. + */ + #import "FlagsViewController.h" #import "CommodityFunctions.h" @implementation FlagsViewController -@synthesize teamDictionary, flagArray, lastIndexPath; +@synthesize teamDictionary, flagArray, communityArray, lastIndexPath; -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { @@ -23,67 +36,116 @@ -(void) viewDidLoad { [super viewDidLoad]; - self.flagArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FLAGS_DIRECTORY() error:NULL]; + NSMutableArray *array_na = [[NSMutableArray alloc] init]; + NSMutableArray *array_cm = [[NSMutableArray alloc] init]; + for (NSString *name in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FLAGS_DIRECTORY() error:NULL]) { + if ([name hasPrefix:@"cm_"]) { + NSString *processed = [name substringFromIndex:3]; + [array_cm addObject:processed]; + } else + [array_na addObject:name]; + } + + self.flagArray = array_na; + [array_na release]; + self.communityArray = array_cm; + [array_cm release]; + self.title = NSLocalizedString(@"Set team flag",@""); } -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + // reloadData needed because team might change [self.tableView reloadData]; - [self.tableView setContentOffset:CGPointMake(0,0) animated:NO]; + //[self.tableView setContentOffset:CGPointMake(0,0) animated:NO]; } #pragma mark - #pragma mark Table view data source -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { - return 1; + return 2; } -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return [flagArray count]; + if (section == 0) + return [self.flagArray count]; + else + return [self.communityArray count]; } // Customize the appearance of table view cells. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - static NSString *CellIdentifier = @"Cell"; - + NSInteger row = [indexPath row]; + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } - - NSString *flag = [flagArray objectAtIndex:[indexPath row]]; - - NSString *flagFile = [[NSString alloc] initWithFormat:@"%@/%@", FLAGS_DIRECTORY(), flag]; + + NSString *flagName = nil; + NSArray *source = nil; + if ([indexPath section] == 0) { + source = self.flagArray; + flagName = [source objectAtIndex:row]; + } else { + source = self.communityArray; + flagName = [NSString stringWithFormat:@"cm_%@",[source objectAtIndex:row]]; + } + NSString *flagFile = [[NSString alloc] initWithFormat:@"%@/%@", FLAGS_DIRECTORY(), flagName]; UIImage *flagSprite = [[UIImage alloc] initWithContentsOfFile:flagFile]; [flagFile release]; cell.imageView.image = flagSprite; [flagSprite release]; - - cell.textLabel.text = [flag stringByDeletingPathExtension]; - if ([cell.textLabel.text isEqualToString:[self.teamDictionary objectForKey:@"flag"]]) { + + cell.textLabel.text = [[source objectAtIndex:row] stringByDeletingPathExtension]; + if ([[flagName stringByDeletingPathExtension] isEqualToString:[self.teamDictionary objectForKey:@"flag"]]) { cell.accessoryType = UITableViewCellAccessoryCheckmark; self.lastIndexPath = indexPath; } else { cell.accessoryType = UITableViewCellAccessoryNone; } - + return cell; } +-(NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section { + NSString *sectionTitle = nil; + switch (section) { + case 0: + sectionTitle = NSLocalizedString(@"Worldwide", @""); + break; + case 1: + sectionTitle = NSLocalizedString(@"Community", @""); + break; + default: + DLog(@"nope"); + break; + } + return sectionTitle; +} + #pragma mark - #pragma mark Table view delegate -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { int newRow = [indexPath row]; int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; + int newSection = [indexPath section]; + int oldSection = (lastIndexPath != nil) ? [lastIndexPath section] : -1; - if (newRow != oldRow) { + if (newRow != oldRow || newSection != oldSection) { + NSString *flag = nil; + if ([indexPath section] == 0) + flag = [self.flagArray objectAtIndex:newRow]; + else + flag = [NSString stringWithFormat:@"cm_%@",[self.communityArray objectAtIndex:newRow]]; + // if the two selected rows differ update data on the hog dictionary and reload table content - [self.teamDictionary setValue:[[flagArray objectAtIndex:newRow] stringByDeletingPathExtension] forKey:@"flag"]; + [self.teamDictionary setValue:[flag stringByDeletingPathExtension] forKey:@"flag"]; // tell our boss to write this new stuff on disk [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil]; @@ -103,15 +165,16 @@ #pragma mark - #pragma mark Memory management -(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. + self.lastIndexPath = nil; + MSG_MEMCLEAN(); [super didReceiveMemoryWarning]; - // Relinquish ownership any cached data, images, etc that aren't in use. } -(void) viewDidUnload { self.teamDictionary = nil; self.lastIndexPath = nil; self.flagArray = nil; + self.communityArray = nil; MSG_DIDUNLOAD(); [super viewDidUnload]; } @@ -120,6 +183,7 @@ [teamDictionary release]; [lastIndexPath release]; [flagArray release]; + [communityArray release]; [super dealloc]; } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/FortsViewController.h --- a/project_files/HedgewarsMobile/Classes/FortsViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/FortsViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// FortsViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 08/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/04/2010. + */ + #import diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/FortsViewController.m --- a/project_files/HedgewarsMobile/Classes/FortsViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/FortsViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// FortsViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 08/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/04/2010. + */ + #import "FortsViewController.h" #import "CommodityFunctions.h" @@ -25,35 +38,21 @@ [super viewDidLoad]; NSArray *directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FORTS_DIRECTORY() error:NULL]; - NSMutableArray *filteredContents = [[NSMutableArray alloc] initWithCapacity:([directoryContents count] / 2)]; + NSMutableArray *filteredContents = [[NSMutableArray alloc] initWithCapacity:([directoryContents count] / 3)]; // we need to remove the double entries and the L.png suffix for (int i = 0; i < [directoryContents count]; i++) { - if (i % 2) { + if (i % 3 == 1) { NSString *currentName = [directoryContents objectAtIndex:i]; NSString *correctName = [currentName substringToIndex:([currentName length] - 5)]; [filteredContents addObject:correctName]; - } + } } self.fortArray = filteredContents; [filteredContents release]; - - /* - // this creates a scaled down version of the image - NSMutableArray *spriteArray = [[NSMutableArray alloc] initWithCapacity:[fortArray count]]; - for (NSString *fortName in fortArray) { - NSString *fortFile = [[NSString alloc] initWithFormat:@"%@/%@L.png", fortsDirectory, fortName]; - UIImage *fortSprite = [[UIImage alloc] initWithContentsOfFile:fortFile]; - [fortFile release]; - [spriteArray addObject:[fortSprite scaleToSize:CGSizeMake(196,196)]]; - [fortSprite release]; - } - self.fortSprites = spriteArray; - [spriteArray release]; - */ - + // statically set row height instead of using delegate method for performance reasons self.tableView.rowHeight = 200; - + self.title = NSLocalizedString(@"Choose team fort",@""); } @@ -78,32 +77,30 @@ // Customize the appearance of table view cells. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; - + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; } - + NSString *fortName = [fortArray objectAtIndex:[indexPath row]]; cell.textLabel.text = fortName; - - // this creates a scaled down version of the image - // TODO: create preview files, scaling is way too slow! - NSString *fortFile = [[NSString alloc] initWithFormat:@"%@/%@L.png", FORTS_DIRECTORY(), fortName]; + + NSString *fortFile = [[NSString alloc] initWithFormat:@"%@/%@-preview.png", FORTS_DIRECTORY(), fortName]; UIImage *fortSprite = [[UIImage alloc] initWithContentsOfFile:fortFile]; [fortFile release]; - cell.imageView.image = [fortSprite scaleToSize:CGSizeMake(196,196)]; + cell.imageView.image = fortSprite; [fortSprite release]; - - cell.detailTextLabel.text = @"Insert funny description here"; + + //cell.detailTextLabel.text = @"Insert funny description here"; if ([cell.textLabel.text isEqualToString:[self.teamDictionary objectForKey:@"fort"]]) { cell.accessoryType = UITableViewCellAccessoryCheckmark; self.lastIndexPath = indexPath; } else { cell.accessoryType = UITableViewCellAccessoryNone; } - + return cell; } @@ -113,14 +110,14 @@ -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { int newRow = [indexPath row]; int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; - + if (newRow != oldRow) { // if the two selected rows differ update data on the hog dictionary and reload table content [self.teamDictionary setValue:[fortArray objectAtIndex:newRow] forKey:@"fort"]; // tell our boss to write this new stuff on disk [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil]; - + UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath]; newCell.accessoryType = UITableViewCellAccessoryCheckmark; UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath]; @@ -136,9 +133,9 @@ #pragma mark - #pragma mark Memory management -(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. + self.lastIndexPath = nil; + MSG_MEMCLEAN(); [super didReceiveMemoryWarning]; - // Relinquish ownership any cached data, images, etc that aren't in use. } -(void) viewDidUnload { diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/GameConfigViewController.h --- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,24 +1,46 @@ -// -// GameConfigViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 18/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 18/04/2010. + */ + #import +@class HelpPageViewController; +@class MapConfigViewController; @class TeamConfigViewController; -@class MapConfigViewController; @class SchemeWeaponConfigViewController; -@interface GameConfigViewController : UIViewController { - UIViewController *activeController; +@interface GameConfigViewController : UIViewController { + UIView *imgContainer; + HelpPageViewController *helpPage; + MapConfigViewController *mapConfigViewController; TeamConfigViewController *teamConfigViewController; SchemeWeaponConfigViewController *schemeWeaponConfigViewController; } +@property (retain) UIView *imgContainer; +@property (nonatomic,retain) HelpPageViewController *helpPage; +@property (nonatomic,retain) MapConfigViewController *mapConfigViewController; +@property (nonatomic,retain) TeamConfigViewController *teamConfigViewController; +@property (nonatomic,retain) SchemeWeaponConfigViewController *schemeWeaponConfigViewController; + -(IBAction) buttonPressed:(id) sender; -(IBAction) segmentPressed:(id) sender; -(void) startGame:(UIButton *)button; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/GameConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,27 +1,36 @@ - // -// GameConfigViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 18/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 18/04/2010. + */ + #import "GameConfigViewController.h" #import "SDL_uikitappdelegate.h" -#import "CommodityFunctions.h" #import "MapConfigViewController.h" #import "TeamConfigViewController.h" #import "SchemeWeaponConfigViewController.h" +#import "HelpPageViewController.h" +#import "CommodityFunctions.h" +#import "UIImageExtra.h" +#import "PascalImports.h" -// draw background image in uitoolbar -/*@implementation UIToolbar (CustomImage) --(void) drawRect:(CGRect)rect { - UIImage *image = [UIImage imageWithContentsOfFile:@"toolbarBackground.png"]; - [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; -} -@end -*/ @implementation GameConfigViewController +@synthesize imgContainer, helpPage, mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController; -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { @@ -30,10 +39,16 @@ -(IBAction) buttonPressed:(id) sender { // works even if it's not actually a button - UIButton *theButton = (UIButton *)sender; + UIButton *theButton; + if (IS_IPAD()) + theButton = [[(NSNotification *)sender userInfo] objectForKey:@"sender"]; + else + theButton = (UIButton *)sender; + switch (theButton.tag) { case 0: - if ([mapConfigViewController busy]) { + playSound(@"backSound"); + if ([self.mapConfigViewController busy]) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Wait for the Preview",@"") message:NSLocalizedString(@"Before returning the preview needs to be generated",@"") delegate:nil @@ -41,19 +56,26 @@ otherButtonTitles:nil]; [alert show]; [alert release]; - } else { + } else [[self parentViewController] dismissModalViewControllerAnimated:YES]; - - } break; case 1: + playSound(@"clickSound"); theButton.enabled = NO; [self startGame:theButton]; -// [self performSelector:@selector(startGame:) -// withObject:theButton -// afterDelay:0.25]; + break; + case 2: + playSound(@"clickSound"); + if (self.helpPage == nil) + self.helpPage = [[HelpPageViewController alloc] initWithNibName:@"HelpPageLobbyViewController" bundle:nil]; + self.helpPage.view.alpha = 0; + [self.view addSubview:helpPage.view]; + [UIView beginAnimations:@"helplobby" context:NULL]; + self.helpPage.view.alpha = 1; + [UIView commitAnimations]; break; default: + DLog(@"Nope"); break; } } @@ -61,39 +83,45 @@ -(IBAction) segmentPressed:(id) sender { UISegmentedControl *theSegment = (UISegmentedControl *)sender; + playSound(@"selSound"); switch (theSegment.selectedSegmentIndex) { case 0: // this init here is just aestetic as this controller was already set up in viewDidLoad if (mapConfigViewController == nil) { mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil]; + [self.view addSubview:mapConfigViewController.view]; } - activeController = mapConfigViewController; + // this message is compulsory otherwise the table won't be loaded at all + [mapConfigViewController viewWillAppear:NO]; + [self.view bringSubviewToFront:mapConfigViewController.view]; break; case 1: if (teamConfigViewController == nil) { teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; - // this message is compulsory otherwise the table won't be loaded at all + [self.view addSubview:teamConfigViewController.view]; } - activeController = teamConfigViewController; + // this message is compulsory otherwise the table won't be loaded at all + [teamConfigViewController viewWillAppear:NO]; + [self.view bringSubviewToFront:teamConfigViewController.view]; break; case 2: if (schemeWeaponConfigViewController == nil) { schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; + [self.view addSubview:schemeWeaponConfigViewController.view]; } - activeController = schemeWeaponConfigViewController; + // this message is compulsory otherwise the table won't be loaded at all + [schemeWeaponConfigViewController viewWillAppear:NO]; + [self.view bringSubviewToFront:schemeWeaponConfigViewController.view]; + break; + default: + DLog(@"Nope"); break; } - - // this message is compulsory otherwise the table won't be loaded at all - [activeController viewWillAppear:NO]; - [self.view addSubview:activeController.view]; } --(void) startGame:(UIButton *)button { - button.enabled = YES; - +-(BOOL) isEverythingSet { // don't start playing if the preview is in progress - if ([mapConfigViewController busy]) { + if ([self.mapConfigViewController busy]) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Wait for the Preview",@"") message:NSLocalizedString(@"Before playing the preview needs to be generated",@"") delegate:nil @@ -101,11 +129,11 @@ otherButtonTitles:nil]; [alert show]; [alert release]; - return; + return NO; } // play only if there is more than one team - if ([teamConfigViewController.listOfSelectedTeams count] < 2) { + if ([self.teamConfigViewController.listOfSelectedTeams count] < 2) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too few teams playing",@"") message:NSLocalizedString(@"Select at least two teams to play a game",@"") delegate:nil @@ -113,15 +141,15 @@ otherButtonTitles:nil]; [alert show]; [alert release]; - return; + return NO; } // play if there's room for enough hogs in the selected map int hogs = 0; for (NSDictionary *teamData in teamConfigViewController.listOfSelectedTeams) hogs += [[teamData objectForKey:@"number"] intValue]; - - if (hogs > mapConfigViewController.maxHogs) { + + if (hogs > self.mapConfigViewController.maxHogs) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too many hogs",@"") message:NSLocalizedString(@"The map is too small for that many hogs",@"") delegate:nil @@ -129,10 +157,21 @@ otherButtonTitles:nil]; [alert show]; [alert release]; - return; + return NO; } - if ([schemeWeaponConfigViewController.selectedScheme length] == 0 || [schemeWeaponConfigViewController.selectedWeapon length] == 0 ) { + if ([self.teamConfigViewController.listOfSelectedTeams count] > HW_getMaxNumberOfTeams()) { + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too many teams",@"") + message:NSLocalizedString(@"Max six teams are allowed in the same game",@"") + delegate:nil + cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"") + otherButtonTitles:nil]; + [alert show]; + [alert release]; + return NO; + } + + if ([self.schemeWeaponConfigViewController.selectedScheme length] == 0 || [self.schemeWeaponConfigViewController.selectedWeapon length] == 0 ) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Missing detail",@"") message:NSLocalizedString(@"Select one Scheme and one Weapon for this game",@"") delegate:nil @@ -140,43 +179,61 @@ otherButtonTitles:nil]; [alert show]; [alert release]; - return; + return NO; } + + return YES; +} + +-(void) startGame:(UIButton *)button { + button.enabled = YES; + if ([self isEverythingSet] == NO) + return; + // create the configuration file that is going to be sent to engine - NSDictionary *gameDictionary = [NSDictionary dictionaryWithObjectsAndKeys:mapConfigViewController.seedCommand,@"seed_command", - mapConfigViewController.templateFilterCommand,@"templatefilter_command", - mapConfigViewController.mapGenCommand,@"mapgen_command", - mapConfigViewController.mazeSizeCommand,@"mazesize_command", - mapConfigViewController.themeCommand,@"theme_command", - mapConfigViewController.staticMapCommand,@"staticmap_command", - teamConfigViewController.listOfSelectedTeams,@"teams_list", - schemeWeaponConfigViewController.selectedScheme,@"scheme", - schemeWeaponConfigViewController.selectedWeapon,@"weapon", - nil]; - + NSDictionary *gameDictionary = [NSDictionary dictionaryWithObjectsAndKeys: + self.mapConfigViewController.seedCommand,@"seed_command", + self.mapConfigViewController.templateFilterCommand,@"templatefilter_command", + self.mapConfigViewController.mapGenCommand,@"mapgen_command", + self.mapConfigViewController.mazeSizeCommand,@"mazesize_command", + self.mapConfigViewController.themeCommand,@"theme_command", + self.mapConfigViewController.staticMapCommand,@"staticmap_command", + self.mapConfigViewController.missionCommand,@"mission_command", + self.teamConfigViewController.listOfSelectedTeams,@"teams_list", + self.schemeWeaponConfigViewController.selectedScheme,@"scheme", + self.schemeWeaponConfigViewController.selectedWeapon,@"weapon", + [NSNumber numberWithInt:self.interfaceOrientation],@"orientation", + nil]; + // finally launch game and remove this controller DLog(@"sending config %@", gameDictionary); - - if ([[gameDictionary allKeys] count] == 9) { - [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:gameDictionary]; + + if ([[gameDictionary allKeys] count] == 11) { + NSDictionary *allDataNecessary = [NSDictionary dictionaryWithObjectsAndKeys:gameDictionary,@"game_dictionary", @"",@"savefile", + [NSNumber numberWithBool:NO],@"netgame", nil]; + // let's hide all the views while the game is on + UIViewController *dummy = [[UIViewController alloc] init]; + [self presentModalViewController:dummy animated:NO]; + [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; + [self dismissModalViewControllerAnimated:NO]; + [dummy release]; } else { - DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n", - mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController); + DLog(@"gameconfig data not complete!!"); [self.parentViewController dismissModalViewControllerAnimated:YES]; - + // present an alert to the user, with an image on the ipad (too big for the iphone) NSString *msg = NSLocalizedString(@"Something went wrong with your configuration. Please try again.",@""); - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + if (IS_IPAD()) msg = [msg stringByAppendingString:@"\n\n\n\n\n\n\n\n"]; // this makes space for the image - + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Whoops" message:msg delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; - - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { + + if (IS_IPAD()) { UIImageView *deniedImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"denied.png"]]; deniedImg.frame = CGRectMake(25, 80, 240, 160); [alert addSubview:deniedImg]; @@ -188,88 +245,171 @@ } +-(void) loadNiceHogs { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSString *filePath = [NSString stringWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()]; + UIImage *sprite = [[UIImage alloc] initWithContentsOfFile:filePath andCutAt:CGRectMake(96, 0, 32, 32)]; + + NSArray *hatArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:HATS_DIRECTORY() error:NULL]; + int numberOfHats = [hatArray count]; + + if (self.imgContainer != nil) + [self.imgContainer removeFromSuperview]; + + self.imgContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 40)]; + for (int i = 0; i < 1 + random()%20; i++) { + NSString *hat = [hatArray objectAtIndex:random()%numberOfHats]; + + NSString *hatFile = [[NSString alloc] initWithFormat:@"%@/%@", HATS_DIRECTORY(), hat]; + UIImage *hatSprite = [[UIImage alloc] initWithContentsOfFile: hatFile andCutAt:CGRectMake(0, 0, 32, 32)]; + [hatFile release]; + UIImage *hogWithHat = [sprite mergeWith:hatSprite atPoint:CGPointMake(0, 5)]; + [hatSprite release]; + + UIImageView *hog = [[UIImageView alloc] initWithImage:hogWithHat]; + int x = 15*(i+1)+random()%40; + if (x + 32 > 300) + x = i*10; + hog.frame = CGRectMake(x, 30, 32, 32); + [self.imgContainer addSubview:hog]; + [hog release]; + } + [self.view addSubview:self.imgContainer]; + [sprite release]; + [pool drain]; +} + -(void) viewDidLoad { self.view.backgroundColor = [UIColor blackColor]; - + CGRect screen = [[UIScreen mainScreen] bounds]; self.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width); - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - if (mapConfigViewController == nil) - mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil]; - if (teamConfigViewController == nil) - teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStylePlain]; - teamConfigViewController.view.frame = CGRectMake(3, 224, 300, 472); - teamConfigViewController.view.backgroundColor = [UIColor clearColor]; - [mapConfigViewController.view addSubview:teamConfigViewController.view]; - if (schemeWeaponConfigViewController == nil) - schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; - schemeWeaponConfigViewController.view.frame = CGRectMake(362, 224, 300, 472); - [mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view]; - for (UIView *oneView in self.view.subviews) { - if ([oneView isMemberOfClass:[UIToolbar class]]) { - [[oneView viewWithTag:12345] setHidden:YES]; - break; - } - } + if (IS_IPAD()) { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(buttonPressed:) + name:@"buttonPressed" + object:nil]; + srandom(time(NULL)); + + // load other controllers + if (self.mapConfigViewController == nil) + self.mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil]; + + UILabel *leftBackground = createLabelWithParams(nil, CGRectMake(0, 60, 320, 620), 2.7f, UICOLOR_HW_YELLOW_BODER, UICOLOR_HW_ALPHABLUE); + [self.mapConfigViewController.view addSubview:leftBackground]; + [leftBackground release]; + UILabel *middleBackground = createLabelWithParams(nil, CGRectMake(337, 187, 350, 505), 2.7f, UICOLOR_HW_YELLOW_BODER, UICOLOR_HW_ALPHABLUE); + [self.mapConfigViewController.view addSubview:middleBackground]; + [middleBackground release]; + UILabel *rightBackground = createLabelWithParams(nil, CGRectMake(704, 214, 320, 464), 2.7f, UICOLOR_HW_YELLOW_BODER, UICOLOR_HW_ALPHABLUE); + [self.mapConfigViewController.view addSubview:rightBackground]; + [rightBackground release]; + UILabel *topBackground = createLabelWithParams(nil, CGRectMake(714, 14, 300, 190), 2.3f, UICOLOR_HW_YELLOW_BODER, UICOLOR_HW_ALPHABLUE); + [self.mapConfigViewController.view addSubview:topBackground]; + [topBackground release]; + UILabel *bottomLeftBackground = createLabelWithParams(nil, CGRectMake(106, 714, 320, 40), 2.0f, UICOLOR_HW_YELLOW_BODER, UICOLOR_HW_ALPHABLUE); + [self.mapConfigViewController.view addSubview:bottomLeftBackground]; + [bottomLeftBackground release]; + UILabel *bottomRightBackground = createLabelWithParams(NSLocalizedString(@"Max Hogs: ",@""), CGRectMake(594, 714, 320, 40), 2.0f, UICOLOR_HW_YELLOW_BODER, UICOLOR_HW_ALPHABLUE); + bottomRightBackground.font = [UIFont italicSystemFontOfSize:[UIFont labelFontSize]]; + [self.mapConfigViewController.view addSubview:bottomRightBackground]; + [bottomRightBackground release]; + [self.mapConfigViewController.view bringSubviewToFront:self.mapConfigViewController.maxLabel]; + [self.mapConfigViewController.view bringSubviewToFront:self.mapConfigViewController.sizeLabel]; + [self.mapConfigViewController.view bringSubviewToFront:self.mapConfigViewController.segmentedControl]; + [self.mapConfigViewController.view bringSubviewToFront:self.mapConfigViewController.previewButton]; + [self.mapConfigViewController.view bringSubviewToFront:self.mapConfigViewController.slider]; + [self.mapConfigViewController.view bringSubviewToFront:self.mapConfigViewController.tableView]; + + if (self.teamConfigViewController == nil) + self.teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; + [self.mapConfigViewController.view addSubview:self.teamConfigViewController.view]; + if (self.schemeWeaponConfigViewController == nil) + self.schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; + [self.mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view]; + self.mapConfigViewController.view.frame = CGRectMake(0, 0, screen.size.height, screen.size.width); + self.teamConfigViewController.view.frame = CGRectMake(348, 200, 328, 480); + self.schemeWeaponConfigViewController.view.frame = CGRectMake(10, 70, 300, 600); + } else { // this is the visible controller - mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil]; - // this must be loaded & added to auto set default scheme and ammo - schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; - [self.view addSubview:schemeWeaponConfigViewController.view]; + if (self.mapConfigViewController == nil) + self.mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil]; + // this must be loaded & added in order to auto set default scheme and ammo + self.schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped]; + [self.view addSubview:self.schemeWeaponConfigViewController.view]; } - activeController = mapConfigViewController; - - [self.view addSubview:mapConfigViewController.view]; - + [self.view addSubview:self.mapConfigViewController.view]; + [super viewDidLoad]; } -(void) viewWillAppear:(BOOL)animated { - [mapConfigViewController viewWillAppear:animated]; - [teamConfigViewController viewWillAppear:animated]; - [schemeWeaponConfigViewController viewWillAppear:animated]; - // ADD other controllers here - + if (IS_IPAD()) + [NSThread detachNewThreadSelector:@selector(loadNiceHogs) toTarget:self withObject:nil]; + + [self.mapConfigViewController viewWillAppear:animated]; + [self.teamConfigViewController viewWillAppear:animated]; + [self.schemeWeaponConfigViewController viewWillAppear:animated]; + // add other controllers here and below + [super viewWillAppear:animated]; } -(void) viewDidAppear:(BOOL)animated { - [mapConfigViewController viewDidAppear:animated]; - [teamConfigViewController viewDidAppear:animated]; - [schemeWeaponConfigViewController viewDidAppear:animated]; + [self.mapConfigViewController viewDidAppear:animated]; + [self.teamConfigViewController viewDidAppear:animated]; + [self.schemeWeaponConfigViewController viewDidAppear:animated]; [super viewDidAppear:animated]; } +-(void) viewWillDisappear:(BOOL)animated { + [self.mapConfigViewController viewWillDisappear:animated]; + [self.teamConfigViewController viewWillDisappear:animated]; + [self.schemeWeaponConfigViewController viewWillDisappear:animated]; + [super viewWillDisappear:animated]; +} + +-(void) viewDidDisappear:(BOOL)animated { + [self.mapConfigViewController viewDidDisappear:animated]; + [self.teamConfigViewController viewDidDisappear:animated]; + [self.schemeWeaponConfigViewController viewDidDisappear:animated]; + [super viewDidDisappear:animated]; +} + -(void) didReceiveMemoryWarning { - if (activeController.view.superview == nil) - activeController = nil; - // Releases the view if it doesn't have a superview. + if (self.teamConfigViewController.view.superview == nil) + self.teamConfigViewController = nil; + if (self.schemeWeaponConfigViewController.view.superview == nil) + self.schemeWeaponConfigViewController = nil; + if (self.helpPage.view.superview == nil) + self.helpPage = nil; + if (self.mapConfigViewController.view.superview == nil) + self.mapConfigViewController = nil; + + self.imgContainer = nil; + MSG_MEMCLEAN(); [super didReceiveMemoryWarning]; - // Release any cached data, images, etc that aren't in use. - if (mapConfigViewController.view.superview == nil) - mapConfigViewController = nil; - if (teamConfigViewController.view.superview == nil) - teamConfigViewController = nil; - if (schemeWeaponConfigViewController.view.superview == nil) - schemeWeaponConfigViewController = nil; - MSG_MEMCLEAN(); } -(void) viewDidUnload { - activeController = nil; - mapConfigViewController = nil; - teamConfigViewController = nil; - schemeWeaponConfigViewController = nil; + [[NSNotificationCenter defaultCenter] removeObserver:self]; + self.imgContainer = nil; + self.mapConfigViewController = nil; + self.teamConfigViewController = nil; + self.schemeWeaponConfigViewController = nil; + self.helpPage = nil; MSG_DIDUNLOAD(); [super viewDidUnload]; } -(void) dealloc { + [imgContainer release]; [mapConfigViewController release]; [teamConfigViewController release]; [schemeWeaponConfigViewController release]; + [helpPage release]; [super dealloc]; } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/GameSetup.h --- a/project_files/HedgewarsMobile/Classes/GameSetup.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameSetup.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// gameSetup.h -// hwengine -// -// Created by Vittorio on 10/01/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 10/01/2010. + */ + #import #import "SDL_net.h" @@ -12,22 +25,29 @@ @interface GameSetup : NSObject { NSDictionary *systemSettings; NSDictionary *gameConfig; - + NSInteger ipcPort; // Port on which engine will listen TCPsocket csd; // Client socket descriptor + + NSString *savePath; + BOOL isNetGame; + BOOL menuStyle; } @property (nonatomic, retain) NSDictionary *systemSettings; @property (nonatomic, retain) NSDictionary *gameConfig; +@property (nonatomic, retain) NSString *savePath; +@property (assign) BOOL menuStyle; -(id) initWithDictionary:(NSDictionary *)gameDictionary; -(void) engineProtocol; -(void) startThread:(NSString *)selector; -(int) sendToEngine:(NSString *)string; +-(int) sendToEngineNoSave:(NSString *)string; -(void) provideTeamData:(NSString *)teamName forHogs:(NSInteger) numberOfPlayingHogs withHealth:(NSInteger) initialHealth ofColor:(NSNumber *)teamColor; -(void) provideAmmoData:(NSString *)ammostoreName forPlayingTeams:(NSInteger) numberOfTeams; -(NSInteger) provideScheme:(NSString *)schemeName; --(const char **)getSettings; +-(const char **)getSettings:(NSString *)recordFile; @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/GameSetup.m --- a/project_files/HedgewarsMobile/Classes/GameSetup.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameSetup.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,40 +1,71 @@ -// -// gameSetup.m -// hwengine -// -// Created by Vittorio on 10/01/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 10/01/2010. + */ + #import "GameSetup.h" #import "SDL_uikitappdelegate.h" #import "SDL_net.h" #import "PascalImports.h" #import "CommodityFunctions.h" +#import "OverlayViewController.h" -#define BUFFER_SIZE 256 +#define BUFFER_SIZE 255 // like in original frontend @implementation GameSetup - -@synthesize systemSettings, gameConfig; +@synthesize systemSettings, gameConfig, savePath, menuStyle; -(id) initWithDictionary:(NSDictionary *)gameDictionary { if (self = [super init]) { ipcPort = randomPort(); - - // should check they exist and throw and exection if not + + // the general settings file + menu style (read by the overlay) NSDictionary *dictSett = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()]; + self.menuStyle = [[dictSett objectForKey:@"menu"] boolValue]; self.systemSettings = dictSett; [dictSett release]; - - self.gameConfig = gameDictionary; - } + + // this game run settings + self.gameConfig = [gameDictionary objectForKey:@"game_dictionary"]; + + // is it a netgame? + isNetGame = [[gameDictionary objectForKey:@"netgame"] boolValue]; + + // is it a Save? + NSString *path = [gameDictionary objectForKey:@"savefile"]; + // if path is empty it means that you have to create a new file, otherwise read from that file + if ([path isEqualToString:@""] == YES) { + NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; + [outputFormatter setDateFormat:@"yyyy-MM-dd '@' HH.mm"]; + NSString *newDateString = [outputFormatter stringFromDate:[NSDate date]]; + self.savePath = [SAVES_DIRECTORY() stringByAppendingFormat:@"%@.hws", newDateString]; + [outputFormatter release]; + } else + self.savePath = path; + } return self; } -(void) dealloc { [gameConfig release]; [systemSettings release]; + [savePath release]; [super dealloc]; } @@ -47,46 +78,46 @@ addhh is 0 for human, 1-5 for bots (5 is the most stupid) */ - + NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@", TEAMS_DIRECTORY(), teamName]; NSDictionary *teamData = [[NSDictionary alloc] initWithContentsOfFile:teamFile]; [teamFile release]; - - NSString *teamHashColorAndName = [[NSString alloc] initWithFormat:@"eaddteam %@ %@ %@", + + NSString *teamHashColorAndName = [[NSString alloc] initWithFormat:@"eaddteam %@ %@ %@", [teamData objectForKey:@"hash"], [teamColor stringValue], [teamName stringByDeletingPathExtension]]; [self sendToEngine: teamHashColorAndName]; [teamHashColorAndName release]; - + NSString *grave = [[NSString alloc] initWithFormat:@"egrave %@", [teamData objectForKey:@"grave"]]; [self sendToEngine: grave]; [grave release]; - + NSString *fort = [[NSString alloc] initWithFormat:@"efort %@", [teamData objectForKey:@"fort"]]; [self sendToEngine: fort]; [fort release]; - + NSString *voicepack = [[NSString alloc] initWithFormat:@"evoicepack %@", [teamData objectForKey:@"voicepack"]]; [self sendToEngine: voicepack]; [voicepack release]; - + NSString *flag = [[NSString alloc] initWithFormat:@"eflag %@", [teamData objectForKey:@"flag"]]; [self sendToEngine: flag]; [flag release]; - + NSArray *hogs = [teamData objectForKey:@"hedgehogs"]; for (int i = 0; i < numberOfPlayingHogs; i++) { NSDictionary *hog = [hogs objectAtIndex:i]; - - NSString *hogLevelHealthAndName = [[NSString alloc] initWithFormat:@"eaddhh %@ %d %@", + + NSString *hogLevelHealthAndName = [[NSString alloc] initWithFormat:@"eaddhh %@ %d %@", [hog objectForKey:@"level"], initialHealth, [hog objectForKey:@"hogname"]]; [self sendToEngine: hogLevelHealthAndName]; [hogLevelHealthAndName release]; - + NSString *hogHat = [[NSString alloc] initWithFormat:@"ehat %@", [hog objectForKey:@"hat"]]; [self sendToEngine: hogHat]; [hogHat release]; } - + [teamData release]; } @@ -95,120 +126,99 @@ NSString *weaponPath = [[NSString alloc] initWithFormat:@"%@/%@",WEAPONS_DIRECTORY(),ammostoreName]; NSDictionary *ammoData = [[NSDictionary alloc] initWithContentsOfFile:weaponPath]; [weaponPath release]; - NSString *update = @""; - + // if we're loading an older version of ammos fill the engine message with 0s - int diff = CURRENT_AMMOSIZE - [[ammoData objectForKey:@"version"] intValue]; - if (diff != 0) - update = [NSString stringWithCharacters:(const unichar*)"0000000000000000000000000000000000" length:diff]; - + int diff = HW_getNumberOfWeapons() - [[ammoData objectForKey:@"ammostore_initialqt"] length]; + NSString *update = @""; + while ([update length] < diff) + update = [update stringByAppendingString:@"0"]; + NSString *ammloadt = [[NSString alloc] initWithFormat:@"eammloadt %@%@", [ammoData objectForKey:@"ammostore_initialqt"], update]; [self sendToEngine: ammloadt]; [ammloadt release]; - + NSString *ammprob = [[NSString alloc] initWithFormat:@"eammprob %@%@", [ammoData objectForKey:@"ammostore_probability"], update]; [self sendToEngine: ammprob]; [ammprob release]; - + NSString *ammdelay = [[NSString alloc] initWithFormat:@"eammdelay %@%@", [ammoData objectForKey:@"ammostore_delay"], update]; [self sendToEngine: ammdelay]; [ammdelay release]; - + NSString *ammreinf = [[NSString alloc] initWithFormat:@"eammreinf %@%@", [ammoData objectForKey:@"ammostore_crate"], update]; [self sendToEngine: ammreinf]; [ammreinf release]; - - // sent twice so it applies to both teams + + // send this for each team so it applies the same ammostore to all teams NSString *ammstore = [[NSString alloc] initWithString:@"eammstore"]; for (int i = 0; i < numberOfTeams; i++) [self sendToEngine: ammstore]; [ammstore release]; - + [ammoData release]; } // unpacks scheme data from the selected scheme.plist to a sequence of engine commands -(NSInteger) provideScheme:(NSString *)schemeName { NSString *schemePath = [[NSString alloc] initWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),schemeName]; - NSArray *scheme = [[NSArray alloc] initWithContentsOfFile:schemePath]; + NSDictionary *schemeDictionary = [[NSDictionary alloc] initWithContentsOfFile:schemePath]; [schemePath release]; + NSArray *basicArray = [schemeDictionary objectForKey:@"basic"]; + NSArray *gamemodArray = [schemeDictionary objectForKey:@"gamemod"]; + int i = 0; int result = 0; - int i = 0; + int mask = 0x00000004; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x01; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x10; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x04; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x08; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x20; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x40; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x80; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x100; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x200; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x400; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x800; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x2000; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x4000; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x8000; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x10000; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x20000; - if ([[scheme objectAtIndex:i++] boolValue]) - result |= 0x80000; - + // pack the gameflags in a single var and send it + for (NSNumber *value in gamemodArray) { + if ([value boolValue] == YES) + result |= mask; + mask <<= 1; + } NSString *flags = [[NSString alloc] initWithFormat:@"e$gmflags %d",result]; [self sendToEngine:flags]; [flags release]; - - NSString *dmgMod = [[NSString alloc] initWithFormat:@"e$damagepct %d",[[scheme objectAtIndex:i++] intValue]]; + + NSString *dmgMod = [[NSString alloc] initWithFormat:@"e$damagepct %d",[[basicArray objectAtIndex:i++] intValue]]; [self sendToEngine:dmgMod]; [dmgMod release]; - - NSString *turnTime = [[NSString alloc] initWithFormat:@"e$turntime %d",[[scheme objectAtIndex:i++] intValue] * 1000]; + + // support for endless games + NSInteger tentativeTurntime = [[basicArray objectAtIndex:i++] intValue]; + if (tentativeTurntime == 100) + tentativeTurntime = 9999; + NSString *turnTime = [[NSString alloc] initWithFormat:@"e$turntime %d",tentativeTurntime * 1000]; [self sendToEngine:turnTime]; [turnTime release]; - - result = [[scheme objectAtIndex:i++] intValue]; // initial health - - NSString *sdTime = [[NSString alloc] initWithFormat:@"e$sd_turns %d",[[scheme objectAtIndex:i++] intValue]]; + + result = [[basicArray objectAtIndex:i++] intValue]; // initial health + + NSString *sdTime = [[NSString alloc] initWithFormat:@"e$sd_turns %d",[[basicArray objectAtIndex:i++] intValue]]; [self sendToEngine:sdTime]; [sdTime release]; - - NSString *crateDrops = [[NSString alloc] initWithFormat:@"e$casefreq %d",[[scheme objectAtIndex:i++] intValue]]; + + NSString *crateDrops = [[NSString alloc] initWithFormat:@"e$casefreq %d",[[basicArray objectAtIndex:i++] intValue]]; [self sendToEngine:crateDrops]; [crateDrops release]; - - NSString *minesTime = [[NSString alloc] initWithFormat:@"e$minestime %d",[[scheme objectAtIndex:i++] intValue] * 1000]; + + NSString *minesTime = [[NSString alloc] initWithFormat:@"e$minestime %d",[[basicArray objectAtIndex:i++] intValue] * 1000]; [self sendToEngine:minesTime]; [minesTime release]; - - NSString *minesNumber = [[NSString alloc] initWithFormat:@"e$landadds %d",[[scheme objectAtIndex:i++] intValue]]; + + NSString *minesNumber = [[NSString alloc] initWithFormat:@"e$landadds %d",[[basicArray objectAtIndex:i++] intValue]]; [self sendToEngine:minesNumber]; [minesNumber release]; - - NSString *dudMines = [[NSString alloc] initWithFormat:@"e$minedudpct %d",[[scheme objectAtIndex:i++] intValue]]; + + NSString *dudMines = [[NSString alloc] initWithFormat:@"e$minedudpct %d",[[basicArray objectAtIndex:i++] intValue]]; [self sendToEngine:dudMines]; [dudMines release]; - - NSString *explosives = [[NSString alloc] initWithFormat:@"e$explosives %d",[[scheme objectAtIndex:i++] intValue]]; + + NSString *explosives = [[NSString alloc] initWithFormat:@"e$explosives %d",[[basicArray objectAtIndex:i++] intValue]]; [self sendToEngine:explosives]; [explosives release]; - - [scheme release]; + + DLog(@"Sent %d flags and %d modes", [gamemodArray count], i); + [schemeDictionary release]; return result; } @@ -220,11 +230,30 @@ [NSThread detachNewThreadSelector:usage toTarget:self withObject:nil]; } -// wrapper that computes the length of the message and then sends the command string +-(void) dumpRawData:(const uint8_t*)buffer ofSize:(uint8_t) length { + // is it performant to reopen the stream every time? + NSOutputStream *os = [[NSOutputStream alloc] initToFileAtPath:self.savePath append:YES]; + [os open]; + [os write:&length maxLength:1]; + [os write:buffer maxLength:length]; + [os close]; + [os release]; +} + +// wrapper that computes the length of the message and then sends the command string, saving the command on a file -(int) sendToEngine: (NSString *)string { uint8_t length = [string length]; - - SDLNet_TCP_Send(csd, &length , 1); + + [self dumpRawData:(const uint8_t *)[string UTF8String] ofSize:length]; + SDLNet_TCP_Send(csd, &length, 1); + return SDLNet_TCP_Send(csd, [string UTF8String], length); +} + +// wrapper that computes the length of the message and then sends the command string, skipping file writing +-(int) sendToEngineNoSave: (NSString *)string { + uint8_t length = [string length]; + + SDLNet_TCP_Send(csd, &length, 1); return SDLNet_TCP_Send(csd, [string UTF8String], length); } @@ -235,10 +264,9 @@ IPaddress ip; int eProto; BOOL clientQuit; - char buffer[BUFFER_SIZE]; + uint8_t buffer[BUFFER_SIZE]; uint8_t msgSize; - uint16_t gameTicks; - + clientQuit = NO; csd = NULL; @@ -246,67 +274,78 @@ DLog(@"SDLNet_Init: %s", SDLNet_GetError()); clientQuit = YES; } - + // Resolving the host using NULL make network interface to listen if (SDLNet_ResolveHost(&ip, NULL, ipcPort) < 0 && !clientQuit) { DLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError()); clientQuit = YES; } - - // Open a connection with the IP provided (listen on the host's port) + + // Open a connection with the IP provided (listen on the host's port) if (!(sd = SDLNet_TCP_Open(&ip)) && !clientQuit) { DLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), ipcPort); clientQuit = YES; } - + DLog(@"Waiting for a client on port %d", ipcPort); - while (csd == NULL) + while (csd == NULL) csd = SDLNet_TCP_Accept(sd); SDLNet_TCP_Close(sd); - + while (!clientQuit) { msgSize = 0; - memset(buffer, 0, BUFFER_SIZE); + memset(buffer, '\0', BUFFER_SIZE); if (SDLNet_TCP_Recv(csd, &msgSize, sizeof(uint8_t)) <= 0) - clientQuit = YES; + break; if (SDLNet_TCP_Recv(csd, buffer, msgSize) <=0) - clientQuit = YES; - + break; + switch (buffer[0]) { case 'C': DLog(@"sending game config...\n%@",self.gameConfig); - - // local game - [self sendToEngine:@"TL"]; - + + if (isNetGame == YES) + [self sendToEngineNoSave:@"TN"]; + else + [self sendToEngineNoSave:@"TL"]; + NSString *saveHeader = @"TS"; + [self dumpRawData:(const uint8_t *)[saveHeader UTF8String] ofSize:[saveHeader length]]; + // seed info [self sendToEngine:[self.gameConfig objectForKey:@"seed_command"]]; - + // dimension of the map [self sendToEngine:[self.gameConfig objectForKey:@"templatefilter_command"]]; [self sendToEngine:[self.gameConfig objectForKey:@"mapgen_command"]]; [self sendToEngine:[self.gameConfig objectForKey:@"mazesize_command"]]; - + // static land (if set) NSString *staticMap = [self.gameConfig objectForKey:@"staticmap_command"]; if ([staticMap length] != 0) [self sendToEngine:staticMap]; + + // lua script (if set) + NSString *script = [self.gameConfig objectForKey:@"mission_command"]; + if ([script length] != 0) + [self sendToEngine:script]; // theme info [self sendToEngine:[self.gameConfig objectForKey:@"theme_command"]]; - + // scheme (returns initial health) NSInteger health = [self provideScheme:[self.gameConfig objectForKey:@"scheme"]]; - + + // send an ammostore for each team NSArray *teamsConfig = [self.gameConfig objectForKey:@"teams_list"]; + [self provideAmmoData:[self.gameConfig objectForKey:@"weapon"] forPlayingTeams:[teamsConfig count]]; + + // finally add hogs for (NSDictionary *teamData in teamsConfig) { - [self provideTeamData:[teamData objectForKey:@"team"] + [self provideTeamData:[teamData objectForKey:@"team"] forHogs:[[teamData objectForKey:@"number"] intValue] withHealth:health ofColor:[teamData objectForKey:@"color"]]; } - - [self provideAmmoData:[self.gameConfig objectForKey:@"weapon"] forPlayingTeams:[teamsConfig count]]; break; case '?': DLog(@"Ping? Pong!"); @@ -317,10 +356,12 @@ clientQuit = YES; break; case 'e': - sscanf(buffer, "%*s %d", &eProto); + [self dumpRawData:buffer ofSize:msgSize]; + + sscanf((char *)buffer, "%*s %d", &eProto); short int netProto = 0; char *versionStr; - + HW_versionInfo(&netProto, &versionStr); if (netProto == eProto) { DLog(@"Setting protocol version %d (%s)", eProto, versionStr); @@ -328,22 +369,30 @@ DLog(@"ERROR - wrong protocol number: [%s] - expecting %d", &buffer[1], eProto); clientQuit = YES; } - break; case 'i': switch (buffer[1]) { case 'r': - NSLog(@"Winning team: %s", &buffer[2]); + DLog(@"Winning team: %s", &buffer[2]); break; case 'k': - NSLog(@"Best Hedgehog: %s", &buffer[2]); + DLog(@"Best Hedgehog: %s", &buffer[2]); + break; + default: + // TODO: losta stats stuff break; } break; + case 'q': + // game ended, can remove the savefile + [[NSFileManager defaultManager] removeItemAtPath:self.savePath error:nil]; + //[[NSNotificationCenter defaultCenter] postNotificationName:@"removedSave" object:nil]; + // and remove + disable the overlay + [[NSNotificationCenter defaultCenter] postNotificationName:@"remove overlay" object:nil]; + setGameRunning(NO); + break; default: - // empty packet or just statistics -- in either cases gameTicks is sent - gameTicks = SDLNet_Read16 (&buffer[msgSize - 2]); - //DLog(@"engineProtocol - %d: received [%s]", gameTicks, buffer); + [self dumpRawData:buffer ofSize:msgSize]; break; } } @@ -351,9 +400,9 @@ // wait a little to let the client close cleanly [NSThread sleepForTimeInterval:2]; // Close the client socket - SDLNet_TCP_Close(csd); + SDLNet_TCP_Close(csd); SDLNet_Quit(); - + [pool release]; //Invoking this method should be avoided as it does not give your thread a chance to clean up any resources it allocated during its execution. //[NSThread exit]; @@ -362,30 +411,45 @@ #pragma mark - #pragma mark Setting methods // returns an array of c-strings that are read by engine at startup --(const char **)getSettings { +-(const char **)getSettings: (NSString *)recordFile { + NSInteger width, height; NSString *ipcString = [[NSString alloc] initWithFormat:@"%d", ipcPort]; NSString *localeString = [[NSString alloc] initWithFormat:@"%@.txt", [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]]; - CGRect screenBounds = [[UIScreen mainScreen] bounds]; - NSString *wSize = [[NSString alloc] initWithFormat:@"%d", (int) screenBounds.size.width]; - NSString *hSize = [[NSString alloc] initWithFormat:@"%d", (int) screenBounds.size.height]; + NSString *rotation; + if (IS_DUALHEAD()) { + CGRect screenBounds = [[[UIScreen screens] objectAtIndex:1] bounds]; + width = (int) screenBounds.size.width; + height = (int) screenBounds.size.height; + rotation = @"0"; + } else { + CGRect screenBounds = [[UIScreen mainScreen] bounds]; + width = (int) screenBounds.size.height; + height = (int) screenBounds.size.width; + UIDeviceOrientation orientation = (UIDeviceOrientation) [[self.gameConfig objectForKey:@"orientation"] intValue]; + if (orientation == UIDeviceOrientationLandscapeLeft) + rotation = @"-90"; + else + rotation = @"90"; + } + + NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", width]; + NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", height]; const char **gameArgs = (const char**) malloc(sizeof(char *) * 10); NSInteger tmpQuality; - + NSString *modelId = modelType(); if ([modelId hasPrefix:@"iPhone1"] || // = iPhone or iPhone 3G [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"]) // = iPod Touch or iPod Touch 2G tmpQuality = 0x00000001 | 0x00000002 | 0x00000040; // rqLowRes | rqBlurryLand | rqKillFlakes else if ([modelId hasPrefix:@"iPhone2"] || // = iPhone 3GS [modelId hasPrefix:@"iPod3"]) // = iPod Touch 3G - tmpQuality = 0x00000002 | 0x00000040; // rqBlurryLand | rqKillFlakes + tmpQuality = 0x00000002 | 0x00000040; // rqBlurryLand | rqKillFlakes else if ([modelId hasPrefix:@"iPad1"]) // = iPad tmpQuality = 0x00000002; // rqBlurryLand else // = everything else tmpQuality = 0; // full quality - if (![modelId hasPrefix:@"iPad"]) // = disable tooltips unless iPad + if (IS_IPAD() == NO) // = disable tooltips on phone tmpQuality = tmpQuality | 0x00000400; - - gameArgs[9] = [[[NSNumber numberWithInteger:tmpQuality] stringValue] UTF8String]; // prevents using an empty nickname NSString *username; @@ -394,19 +458,21 @@ username = [[NSString alloc] initWithFormat:@"MobileUser-%@",ipcString]; else username = [[NSString alloc] initWithString:originalUsername]; - - gameArgs[0] = [username UTF8String]; //UserNick - gameArgs[1] = [ipcString UTF8String]; //ipcPort - gameArgs[2] = [[[self.systemSettings objectForKey:@"sound"] stringValue] UTF8String]; //isSoundEnabled - gameArgs[3] = [[[self.systemSettings objectForKey:@"music"] stringValue] UTF8String]; //isMusicEnabled - gameArgs[4] = [localeString UTF8String]; //cLocaleFName - gameArgs[5] = [[[self.systemSettings objectForKey:@"alternate"] stringValue] UTF8String]; //cAltDamage - gameArgs[6] = [wSize UTF8String]; //cScreenHeight - gameArgs[7] = [hSize UTF8String]; //cScreenWidth - gameArgs[8] = NULL; //recordFileName - - [wSize release]; - [hSize release]; + + gameArgs[ 0] = [ipcString UTF8String]; //ipcPort + gameArgs[ 1] = [horizontalSize UTF8String]; //cScreenWidth + gameArgs[ 2] = [verticalSize UTF8String]; //cScreenHeight + gameArgs[ 3] = [[[NSNumber numberWithInteger:tmpQuality] stringValue] UTF8String]; //quality + gameArgs[ 4] = "en.txt";//[localeString UTF8String]; //cLocaleFName + gameArgs[ 5] = [username UTF8String]; //UserNick + gameArgs[ 6] = [[[self.systemSettings objectForKey:@"sound"] stringValue] UTF8String]; //isSoundEnabled + gameArgs[ 7] = [[[self.systemSettings objectForKey:@"music"] stringValue] UTF8String]; //isMusicEnabled + gameArgs[ 8] = [[[self.systemSettings objectForKey:@"alternate"] stringValue] UTF8String]; //cAltDamage + gameArgs[ 9] = [rotation UTF8String]; //rotateQt + gameArgs[10] = [recordFile UTF8String]; //recordFileName + + [verticalSize release]; + [horizontalSize release]; [localeString release]; [ipcString release]; [username release]; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.h --- a/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// SettingsViewController.h -// hwengine -// -// Created by Vittorio on 08/01/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/01/2010. + */ + #import #import "EditableCellView.h" diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m --- a/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// SettingsViewController.m -// hwengine -// -// Created by Vittorio on 08/01/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/01/2010. + */ + #import "GeneralSettingsViewController.h" #import "CommodityFunctions.h" @@ -25,7 +38,7 @@ -(void) viewWillAppear:(BOOL)animated { [self.tableView setContentOffset:CGPointMake(0,0) animated:NO]; - + NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()]; self.settingsDictionary = dictionary; [dictionary release]; @@ -34,7 +47,7 @@ } -(void) viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; + [super viewWillDisappear:animated]; [self.settingsDictionary writeToFile:SETTINGS_FILE() atomically:YES]; } @@ -42,7 +55,7 @@ -(void) switchValueChanged:(id) sender { UISwitch *theSwitch = (UISwitch *)sender; UISwitch *theOtherSwitch = nil; - + switch (theSwitch.tag) { case 10: //soundSwitch // this turn off also the switch below @@ -63,6 +76,9 @@ case 30: //alternateSwitch [self.settingsDictionary setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"alternate"]; break; + case 60: //getReady + [self.settingsDictionary setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"menu"]; + break; default: DLog(@"Wrong tag"); break; @@ -85,15 +101,16 @@ -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { switch (section) { case 0: // user and pass - return 2; + return 1; // set 2 here for the password field break; case 1: // audio return 2; break; - case 2: // alternate damage - return 1; + case 2: // other stuff + return 2; break; default: + DLog(@"Nope"); break; } return 0; @@ -103,7 +120,7 @@ NSString *sectionTitle = nil; switch (section) { case 0: - sectionTitle = NSLocalizedString(@"Network Configuration", @""); + sectionTitle = NSLocalizedString(@"Main Configuration", @""); break; case 1: sectionTitle = NSLocalizedString(@"Audio Preferences", @""); @@ -121,49 +138,52 @@ -(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellIdentifier0 = @"Cell0"; static NSString *cellIdentifier1 = @"Cell1"; + static NSString *cellIdentifier2 = @"Cell2"; NSInteger row = [indexPath row]; NSInteger section = [indexPath section]; - + UITableViewCell *cell = nil; EditableCellView *editableCell = nil; - if (section == 0) { - editableCell = (EditableCellView *)[aTableView dequeueReusableCellWithIdentifier:cellIdentifier0]; - if (nil == editableCell) { - editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier0] autorelease]; - editableCell.minimumCharacters = 0; - editableCell.delegate = self; - editableCell.textField.font = [UIFont systemFontOfSize:[UIFont systemFontSize]]; - editableCell.textField.textColor = [UIColor lightGrayColor]; - } - - if (row == 0) { - editableCell.titleLabel.text = NSLocalizedString(@"Nickname","from the settings table"); - editableCell.textField.placeholder = NSLocalizedString(@"Insert your username (if you have one)",@""); - editableCell.textField.text = [self.settingsDictionary objectForKey:@"username"]; - editableCell.textField.secureTextEntry = NO; - editableCell.tag = 40; - } else { - editableCell.titleLabel.text = NSLocalizedString(@"Password","from the settings table"); - editableCell.textField.placeholder = NSLocalizedString(@"Insert your password",@""); - editableCell.textField.text = [self.settingsDictionary objectForKey:@"password"]; - editableCell.textField.secureTextEntry = YES; - editableCell.tag = 50; - } - - editableCell.accessoryView = nil; - cell = editableCell; - } else { - cell = [aTableView dequeueReusableCellWithIdentifier:cellIdentifier1]; - if (nil == cell) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier1] autorelease]; - UISwitch *theSwitch = [[UISwitch alloc] init]; - [theSwitch addTarget:self action:@selector(switchValueChanged:) forControlEvents:UIControlEventValueChanged]; - cell.accessoryView = theSwitch; - [theSwitch release]; - } - - UISwitch *switchContent = (UISwitch *)cell.accessoryView; - if (section == 1) { + UISwitch *switchContent = nil; + switch(section) { + case 0: + editableCell = (EditableCellView *)[aTableView dequeueReusableCellWithIdentifier:cellIdentifier0]; + if (nil == editableCell) { + editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier0] autorelease]; + editableCell.minimumCharacters = 0; + editableCell.delegate = self; + editableCell.textField.font = [UIFont systemFontOfSize:[UIFont systemFontSize]]; + editableCell.textField.textColor = [UIColor lightGrayColor]; + } + + if (row == 0) { + editableCell.titleLabel.text = NSLocalizedString(@"Nickname","from the settings table"); + editableCell.textField.placeholder = NSLocalizedString(@"Insert your username (if you have one)",@""); + editableCell.textField.text = [self.settingsDictionary objectForKey:@"username"]; + editableCell.textField.secureTextEntry = NO; + editableCell.tag = 40; + } else { + editableCell.titleLabel.text = NSLocalizedString(@"Password","from the settings table"); + editableCell.textField.placeholder = NSLocalizedString(@"Insert your password",@""); + editableCell.textField.text = [self.settingsDictionary objectForKey:@"password"]; + editableCell.textField.secureTextEntry = YES; + editableCell.tag = 50; + } + + editableCell.accessoryView = nil; + cell = editableCell; + break; + case 1: + cell = [aTableView dequeueReusableCellWithIdentifier:cellIdentifier1]; + if (nil == cell) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier1] autorelease]; + UISwitch *theSwitch = [[UISwitch alloc] init]; + [theSwitch addTarget:self action:@selector(switchValueChanged:) forControlEvents:UIControlEventValueChanged]; + cell.accessoryView = theSwitch; + [theSwitch release]; + } + + switchContent = (UISwitch *)cell.accessoryView; if (row == 0) { cell.textLabel.text = NSLocalizedString(@"Sound", @""); switchContent.on = [[self.settingsDictionary objectForKey:@"sound"] boolValue]; @@ -173,62 +193,41 @@ switchContent.on = [[self.settingsDictionary objectForKey:@"music"] boolValue]; switchContent.tag = 20; } - } else { - cell.textLabel.text = NSLocalizedString(@"Alternate Damage", @""); - switchContent.on = [[self.settingsDictionary objectForKey:@"alternate"] boolValue]; - switchContent.tag = 30; - } + break; + case 2: + cell = [aTableView dequeueReusableCellWithIdentifier:cellIdentifier2]; + if (nil == cell) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier2] autorelease]; + UISwitch *theSwitch = [[UISwitch alloc] init]; + [theSwitch addTarget:self action:@selector(switchValueChanged:) forControlEvents:UIControlEventValueChanged]; + cell.accessoryView = theSwitch; + [theSwitch release]; + } + + switchContent = (UISwitch *)cell.accessoryView; + if (row == 0) { + cell.textLabel.text = NSLocalizedString(@"Alternate Damage", @""); + cell.detailTextLabel.text = NSLocalizedString(@"Damage popups will notify you on every single hit a hedgehog suffers", @""); + switchContent.on = [[self.settingsDictionary objectForKey:@"alternate"] boolValue]; + switchContent.tag = 30; + } else { + cell.textLabel.text = NSLocalizedString(@"Classic Ammo Menu", @""); + cell.detailTextLabel.text = NSLocalizedString(@"Select which style of ammo menu you prefer",@""); + switchContent.on = [[self.settingsDictionary objectForKey:@"menu"] boolValue]; + switchContent.tag = 60; + } + break; + default: + break; } cell.accessoryType = UITableViewCellAccessoryNone; cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.imageView.image = nil; - + return cell; } -/* --(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - UIView *containerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 50)] autorelease]; - UILabel *headerLabel = [[[UILabel alloc] initWithFrame:CGRectMake(10, 20, 300, 40)] autorelease]; - headerLabel.textColor = [UIColor lightGrayColor]; - headerLabel.shadowColor = [UIColor blackColor]; - headerLabel.shadowOffset = CGSizeMake(0, 1); - headerLabel.font = [UIFont boldSystemFontOfSize:20]; - headerLabel.backgroundColor = [UIColor clearColor]; - - switch (section) { - case kNetworkFields: - headerLabel.text = NSLocalizedString(@"Network Configuration", @""); - break; - case kAudioFields: - headerLabel.text = NSLocalizedString(@"Audio Preferences", @""); - break; - case kOtherFields: - headerLabel.text = NSLocalizedString(@"Other Settings", @""); - break; - default: - NSLog(@"Warning: unset case value in titleForHeaderInSection!"); - headerLabel.text = @"!"; - break; - } - - [containerView addSubview:headerLabel]; - return containerView; -} - --(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - if (kAudioFields == [indexPath section] && 2 == [indexPath row]) - return volumeCell.frame.size.height; - else - return table.rowHeight; -} - --(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { - return 57.0; -} -*/ - #pragma mark - #pragma mark Table view delegate -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/GravesViewController.h --- a/project_files/HedgewarsMobile/Classes/GravesViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/GravesViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,17 +1,30 @@ -// -// GravesViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import @interface GravesViewController : UITableViewController { NSMutableDictionary *teamDictionary; - + NSArray *graveArray; NSIndexPath *lastIndexPath; } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/GravesViewController.m --- a/project_files/HedgewarsMobile/Classes/GravesViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/GravesViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// GravesViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import "GravesViewController.h" #import "CommodityFunctions.h" @@ -26,7 +39,7 @@ // load all the grave names and store them into graveArray self.graveArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:GRAVES_DIRECTORY() error:NULL]; - + self.title = NSLocalizedString(@"Choose hedgehog graves",@""); } @@ -51,14 +64,14 @@ // Customize the appearance of table view cells. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; - + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; - + NSString *grave = [self.graveArray objectAtIndex:[indexPath row]]; cell.textLabel.text = [grave stringByDeletingPathExtension]; - + if ([grave isEqualToString:[self.teamDictionary objectForKey:@"grave"]]) { cell.accessoryType = UITableViewCellAccessoryCheckmark; self.lastIndexPath = indexPath; @@ -69,10 +82,10 @@ NSString *graveFilePath = [[NSString alloc] initWithFormat:@"%@/%@",GRAVES_DIRECTORY(),grave]; // because we also have multi frame graves, let's take the first one only UIImage *graveSprite = [[UIImage alloc] initWithContentsOfFile:graveFilePath andCutAt:CGRectMake(0, 0, 32, 32)]; - [graveFilePath release]; + [graveFilePath release]; cell.imageView.image = graveSprite; [graveSprite release]; - + return cell; } @@ -82,13 +95,13 @@ -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { int newRow = [indexPath row]; int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; - + if (newRow != oldRow) { [teamDictionary setObject:[[graveArray objectAtIndex:newRow] stringByDeletingPathExtension] forKey:@"grave"]; - + // tell our boss to write this new stuff on disk [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil]; - + UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath]; newCell.accessoryType = UITableViewCellAccessoryCheckmark; UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath]; @@ -104,9 +117,9 @@ #pragma mark - #pragma mark Memory management -(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. + self.lastIndexPath = nil; + MSG_MEMCLEAN(); [super didReceiveMemoryWarning]; - // Relinquish ownership any cached data, images, etc that aren't in use. } -(void) viewDidUnload { diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/HelpPageInGameViewController.xib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/HelpPageInGameViewController.xib Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,889 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 292 + + YES + + + 292 + {{0, -1}, {1024, 768}} + + NO + NO + IBIPadFramework + + NSImage + helpingame.png + + + + + 292 + {{79, 473}, {150, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Direction buttons + + Helvetica-Bold + 18 + 16 + + + 1 + MCAwIDAAA + + + 1 + 10 + + + + 292 + {{79, 491}, {203, 85}} + + NO + YES + 7 + NO + IBIPadFramework + With these buttons you can move your hog, aim and control certain weapons. + + Helvetica + 16 + 16 + + + + 1 + 10 + 0 + + + + 292 + {{53, 97}, {186, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Timer + + + + 1 + 10 + + + + 292 + {{53, 118}, {187, 43}} + + NO + YES + 7 + NO + IBIPadFramework + Don't let your turn time run out! + + + + 1 + 10 + 0 + + + + 292 + {{780, 248}, {240, 128}} + + NO + NO + IBIPadFramework + + NSImage + helpright.png + + + + + 292 + {{790, 256}, {109, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Ammo Menu + + + + 1 + 10 + + + + 292 + {{790, 282}, {214, 84}} + + NO + YES + 7 + NO + IBIPadFramework + This menu contains all the weapons you can use. Drag your finger on a weapon for more details on what it does! + + + + 1 + 10 + 0 + + + + 292 + {{780, 97}, {186, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Pause / Open ammos + + + + 1 + 10 + + + + 292 + {{782, 118}, {187, 43}} + + NO + YES + 7 + NO + IBIPadFramework + Tap to pause or open the ammo menu. + + + + 1 + 10 + 0 + + + + 292 + {{418, 73}, {186, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Wind bar + + + + 1 + 10 + + + + 292 + {{418, 89}, {191, 63}} + + NO + YES + 7 + NO + IBIPadFramework + Some weapons are affected by the wind and their direction may shift. + + + + 1 + 10 + 0 + + + + 292 + {{447, 573}, {203, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Teams flags and health + + + + 1 + 10 + + + + 292 + {{447, 592}, {203, 85}} + + NO + YES + 7 + NO + IBIPadFramework + These bars report the team name, the team flags and the global health status of every hog. + + + + 1 + 10 + 4 + + + + 292 + {{741, 501}, {135, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Joypad buttons + + + + 1 + 10 + + + + 292 + {{741, 520}, {211, 85}} + + NO + YES + 7 + NO + IBIPadFramework + Press X to jump forward, Y to jump backwards (double tap to jump twice) and Missile to attack or use items. + + + + 1 + 10 + 0 + + + + 292 + {{67, 238}, {240, 128}} + + NO + NO + IBIPadFramework + + NSImage + helpplain.png + + + + + 292 + {{72, 246}, {229, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Tap to return to game + + + + 1 + 10 + 1 + + + + 292 + {{72, 268}, {229, 87}} + + NO + YES + 7 + NO + IBIPadFramework + Pan to move camera, pinch to zoom, double tap to center hog, and a single touch to interact with weapons and much more! + + + + 1 + 10 + 0 + + + {1024, 768} + + + 3 + MCAwLjQAA + + NO + NO + + 3 + + IBIPadFramework + + + + + YES + + + view + + + + 3 + + + + dismiss + + + 7 + + 16 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 9 + + + + + 10 + + + + + 11 + + + + + 12 + + + + + 13 + + + + + 14 + + + + + 17 + + + + + 18 + + + + + 21 + + + + + 22 + + + + + 23 + + + + + 24 + + + + + 25 + + + + + 26 + + + + + 27 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 10.IBPluginDependency + 11.IBPluginDependency + 12.IBPluginDependency + 13.IBPluginDependency + 14.IBPluginDependency + 17.IBPluginDependency + 18.IBPluginDependency + 2.CustomClassName + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 21.IBPluginDependency + 22.IBPluginDependency + 23.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 27.IBPluginDependency + 5.IBPluginDependency + 6.IBPluginDependency + 7.IBPluginDependency + 8.IBPluginDependency + 9.IBPluginDependency + + + YES + HelpPageViewController + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIControl + {{288, 355}, {1024, 768}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 27 + + + + YES + + HelpPageViewController + UIViewController + + dismiss + id + + + dismiss + + dismiss + id + + + + IBProjectSource + Classes/HelpPageViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBIPadFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../Hedgewars.xcodeproj + 3 + + YES + + YES + helpingame.png + helpplain.png + helpright.png + + + YES + {1024, 768} + {296, 138} + {308, 144} + + + 117 + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.xib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/HelpPageLobbyViewController.xib Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,1106 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 292 + + YES + + + 292 + {{742, 389}, {240, 102}} + + NO + NO + IBIPadFramework + + NSImage + helpabove.png + + + + + 292 + {{753, 408}, {109, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Map theme + + Helvetica-Bold + 18 + 16 + + + 1 + MCAwIDAAA + + + 1 + 10 + + + + 292 + {{753, 425}, {218, 66}} + + NO + YES + 7 + NO + IBIPadFramework + Here you can choose how your map will appear in game. + + Helvetica + 16 + 16 + + + + 1 + 10 + 0 + + + + 292 + {{653, 202}, {240, 146}} + + NO + NO + IBIPadFramework + + + + + 292 + {{664, 221}, {109, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Map type + + + + 1 + 10 + + + + 292 + {{664, 244}, {218, 99}} + + NO + YES + 7 + NO + IBIPadFramework + Choose between a static map or a randomly generated one (might require more time). In a mission you need to perfom some action to win. + + + + 1 + 10 + 0 + + + + 292 + {{494, 20}, {240, 101}} + + NO + NO + IBIPadFramework + + NSImage + helpright.png + + + + + 292 + {{502, 25}, {109, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Map preview + + + + 1 + 10 + + + + 292 + {{502, 46}, {218, 65}} + + NO + YES + 7 + NO + IBIPadFramework + This is a small preview of your next map. Tap to select / generate a new map. + + + + 1 + 10 + 0 + + + + 292 + {{391, 389}, {242, 171}} + + NO + NO + IBIPadFramework + + + + + 292 + {{401, 413}, {109, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Teams + + + + 1 + 10 + + + + 292 + {{400, 434}, {232, 120}} + + NO + YES + 7 + NO + IBIPadFramework + Select which teams are playing! Add hogs by tapping on them and set their color to figure friend and foe teams out. AI teams will appear with a small robot badge next their name. + + + + 1 + 10 + 0 + + + + 292 + {{142, 125}, {240, 104}} + + NO + NO + IBIPadFramework + + NSImage + helpleft.png + + + + + 292 + {{162, 133}, {204, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Schemes and Weapons + + + + 1 + 10 + + + + 292 + {{162, 152}, {210, 71}} + + NO + YES + 7 + NO + IBIPadFramework + Here you can choose which rules and which weapon set will be applied in game. + + + + 1 + 10 + 0 + + + + 292 + {{155, 8}, {278, 50}} + + NO + NO + IBIPadFramework + + + + + 292 + {{177, 6}, {248, 54}} + + NO + YES + 7 + NO + IBIPadFramework + Did you know you can customize almost everything in the settings page? + + Helvetica-Oblique + 14 + 16 + + + + 1 + 10 + 0 + + + + 292 + {{686, 583}, {240, 117}} + + NO + NO + IBIPadFramework + + NSImage + helpbottom.png + + + + + 292 + {{697, 592}, {138, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Max hedgehogs + + + + 1 + 10 + + + + 292 + {{697, 609}, {218, 73}} + + NO + YES + 7 + NO + IBIPadFramework + This number is the maximum size for all the hogs playing (in every team). + + + + 1 + 10 + 0 + + + + 292 + {{20, 587}, {240, 109}} + + NO + NO + IBIPadFramework + + + + + 292 + {{30, 592}, {138, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Size slider + + + + 1 + 10 + + + + 292 + {{30, 608}, {218, 73}} + + NO + YES + 7 + NO + IBIPadFramework + For Random and Maze maps you can decide to generate only maps of a certain size. + + + + 1 + 10 + 0 + + + + 292 + {{45, 318}, {240, 128}} + + NO + NO + IBIPadFramework + + NSImage + helpplain.png + + + + + 292 + {{50, 326}, {229, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Tap anywhere to dismiss + + + + 1 + 10 + 1 + + + + 292 + {{52, 348}, {224, 87}} + + NO + YES + 7 + NO + IBIPadFramework + Still confused? Don't worry, it's really simple! Try a couple of games and everything will become clear to you. + + + + 1 + 10 + 0 + + + + 292 + {{344, 635}, {240, 61}} + + NO + NO + IBIPadFramework + + + + + 292 + {{353, 637}, {138, 22}} + + NO + YES + 7 + NO + IBIPadFramework + Start button + + + + 1 + 10 + + + + 292 + {{354, 650}, {218, 46}} + + NO + YES + 7 + NO + IBIPadFramework + This button starts the game. + + + + 1 + 10 + 0 + + + {1024, 768} + + + 3 + MCAwLjQAA + + NO + NO + + 3 + + IBIPadFramework + + + + + YES + + + view + + + + 3 + + + + dismiss + + + 7 + + 16 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + + + + + 7 + + + + + 8 + + + + + 25 + + + + + 26 + + + + + 27 + + + + + 28 + + + + + 29 + + + + + 30 + + + + + 34 + + + + + 35 + + + + + 36 + + + + + 37 + + + + + 38 + + + + + 39 + + + + + 40 + + + + + 41 + + + + + 42 + + + + + 43 + + + + + 44 + + + + + 45 + + + + + 49 + + + + + 50 + + + + + 51 + + + + + 52 + + + + + 53 + + + + + 54 + + + + + 58 + + + + + 59 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 2.CustomClassName + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 27.IBPluginDependency + 28.IBPluginDependency + 29.IBPluginDependency + 30.IBPluginDependency + 34.IBPluginDependency + 35.IBPluginDependency + 36.IBPluginDependency + 37.IBPluginDependency + 38.IBPluginDependency + 39.IBPluginDependency + 40.IBPluginDependency + 41.IBPluginDependency + 42.IBPluginDependency + 43.IBPluginDependency + 44.IBPluginDependency + 45.IBPluginDependency + 49.IBPluginDependency + 50.IBPluginDependency + 51.IBPluginDependency + 52.IBPluginDependency + 53.IBPluginDependency + 54.IBPluginDependency + 58.IBPluginDependency + 59.IBPluginDependency + 6.IBPluginDependency + 7.IBPluginDependency + 8.IBPluginDependency + + + YES + HelpPageViewController + UIResponder + UIControl + {{273, 125}, {1024, 768}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 59 + + + + YES + + HelpPageViewController + UIViewController + + dismiss + id + + + dismiss + + dismiss + id + + + + IBProjectSource + Classes/HelpPageViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBIPadFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../Hedgewars.xcodeproj + 3 + + YES + + YES + helpabove.png + helpbottom.png + helpleft.png + helpplain.png + helpright.png + + + YES + {295, 156} + {295, 156} + {308, 144} + {296, 138} + {308, 144} + + + 117 + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/HelpPageViewController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/HelpPageViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,31 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 30/08/2010. + */ + + +#import + + +@interface HelpPageViewController : UIViewController { + +} + +-(IBAction) dismiss; + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/HelpPageViewController.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/HelpPageViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,55 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 30/08/2010. + */ + + +#import "HelpPageViewController.h" +#import "CommodityFunctions.h" + +@implementation HelpPageViewController + + +-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { + return rotationManager(interfaceOrientation); +} + +-(void) didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + // Release any cached data, images, etc that aren't in use. +} + +-(void) viewDidUnload { + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + +-(void) dealloc { + [super dealloc]; +} + +-(IBAction) dismiss { + [UIView beginAnimations:@"helpingame" context:NULL]; + self.view.alpha = 0; + [UIView commitAnimations]; + [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1]; +} + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/HogButtonView.h --- a/project_files/HedgewarsMobile/Classes/HogButtonView.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/HogButtonView.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// HogButtonView.h -// HedgewarsMobile -// -// Created by Vittorio on 20/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 20/04/2010. + */ + #import diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/HogButtonView.m --- a/project_files/HedgewarsMobile/Classes/HogButtonView.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/HogButtonView.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,14 +1,28 @@ -// -// HogButtonView.m -// HedgewarsMobile -// -// Created by Vittorio on 20/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 20/04/2010. + */ + #import "HogButtonView.h" #import "CommodityFunctions.h" #import "UIImageExtra.h" +#import "PascalImports.h" @implementation HogButtonView @synthesize singleHog, numberOfHogs, ownerDictionary; @@ -16,11 +30,11 @@ -(id) initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { self.backgroundColor = [UIColor clearColor]; - + NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()]; UIImage *normalHogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)]; [normalHogFile release]; - + self.singleHog = normalHogSprite; [normalHogSprite release]; [self addTarget:self action:@selector(addOne) forControlEvents:UIControlEventTouchUpInside]; @@ -29,6 +43,7 @@ } -(void) addOne { + playSound(@"clickSound"); self.highlighted = NO; NSInteger number = self.numberOfHogs; number++; @@ -37,21 +52,21 @@ -(void) drawManyHogs:(NSInteger) hogs { if (numberOfHogs != hogs) { - if (hogs <= MAX_HOGS && hogs >= 1) + if (hogs <= HW_getMaxNumberOfHogs() && hogs >= 1) numberOfHogs = hogs; else { - if (hogs > MAX_HOGS) + if (hogs > HW_getMaxNumberOfHogs()) numberOfHogs = 1; else - numberOfHogs = MAX_HOGS; + numberOfHogs = HW_getMaxNumberOfHogs(); } [ownerDictionary setObject:[NSNumber numberWithInt:numberOfHogs] forKey:@"number"]; - + UIImage *teamHogs = [[[UIImage alloc] init] autorelease]; for (int i = 0; i < numberOfHogs; i++) { teamHogs = [singleHog mergeWith:teamHogs - atPoint:CGPointMake(8, 0) - atSize:CGSizeMake(88, 32)]; + atPoint:CGPointMake(8, 0) + ofSize:CGSizeMake(88, 32)]; } [self setImage:teamHogs forState:UIControlStateNormal]; } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/HogHatViewController.h --- a/project_files/HedgewarsMobile/Classes/HogHatViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/HogHatViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// HogHatViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import @@ -12,7 +25,7 @@ @interface HogHatViewController : UITableViewController { NSDictionary *teamDictionary; NSInteger selectedHog; - + NSArray *hatArray; UIImage *normalHogSprite; NSIndexPath *lastIndexPath; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/HogHatViewController.m --- a/project_files/HedgewarsMobile/Classes/HogHatViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/HogHatViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// HogHatViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import "HogHatViewController.h" #import "CommodityFunctions.h" @@ -18,17 +31,16 @@ return rotationManager(interfaceOrientation); } - #pragma mark - #pragma mark View lifecycle -- (void)viewDidLoad { +-(void) viewDidLoad { [super viewDidLoad]; // load all the hat file names and store them into hatArray NSString *hatsDirectory = HATS_DIRECTORY(); NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:hatsDirectory error:NULL]; self.hatArray = array; - + // load the base hog image, drawing will occure in cellForRow... NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()]; UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)]; @@ -39,9 +51,9 @@ self.title = NSLocalizedString(@"Change hedgehog's hat",@""); } -- (void)viewWillAppear:(BOOL)animated { +-(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - + // this updates the hog name and its hat [self.tableView reloadData]; // this moves the tableview to the top @@ -60,24 +72,24 @@ } // Customize the appearance of table view cells. -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + static NSString *CellIdentifier = @"Cell"; - + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) + if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; - + NSDictionary *hog = [[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog]; NSString *hat = [hatArray objectAtIndex:[indexPath row]]; cell.textLabel.text = [hat stringByDeletingPathExtension]; - + NSString *hatFile = [[NSString alloc] initWithFormat:@"%@/%@", HATS_DIRECTORY(), hat]; UIImage *hatSprite = [[UIImage alloc] initWithContentsOfFile: hatFile andCutAt:CGRectMake(0, 0, 32, 32)]; [hatFile release]; - cell.imageView.image = [self.normalHogSprite mergeWith:hatSprite atPoint:CGPointMake(0, -5)]; + cell.imageView.image = [self.normalHogSprite mergeWith:hatSprite atPoint:CGPointMake(0, 5)]; [hatSprite release]; - + if ([hat isEqualToString:[hog objectForKey:@"hat"]]) { cell.accessoryType = UITableViewCellAccessoryCheckmark; self.lastIndexPath = indexPath; @@ -91,30 +103,30 @@ #pragma mark - #pragma mark Table view delegate -- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { +-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { int newRow = [indexPath row]; int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; - + if (newRow != oldRow) { // if the two selected rows differ update data on the hog dictionary and reload table content // TODO: maybe this section could be cleaned up NSDictionary *oldHog = [[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog]; - + NSMutableDictionary *newHog = [[NSMutableDictionary alloc] initWithDictionary: oldHog]; [newHog setObject:[[hatArray objectAtIndex:newRow] stringByDeletingPathExtension] forKey:@"hat"]; [[teamDictionary objectForKey:@"hedgehogs"] replaceObjectAtIndex:selectedHog withObject:newHog]; [newHog release]; - + // tell our boss to write this new stuff on disk [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil]; - + UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath]; newCell.accessoryType = UITableViewCellAccessoryCheckmark; UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath]; oldCell.accessoryType = UITableViewCellAccessoryNone; self.lastIndexPath = indexPath; [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; - } + } [aTableView deselectRowAtIndexPath:indexPath animated:YES]; [self.navigationController popViewControllerAnimated:YES]; } @@ -122,13 +134,13 @@ #pragma mark - #pragma mark Memory management -- (void)didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. +-(void) didReceiveMemoryWarning { + self.lastIndexPath = nil; + MSG_MEMCLEAN(); [super didReceiveMemoryWarning]; - // Relinquish ownership any cached data, images, etc that aren't in use. } -- (void)viewDidUnload { +-(void) viewDidUnload { self.lastIndexPath = nil; self.normalHogSprite = nil; self.teamDictionary = nil; @@ -137,7 +149,7 @@ [super viewDidUnload]; } -- (void)dealloc { +-(void) dealloc { [hatArray release]; [teamDictionary release]; [normalHogSprite release]; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/InGameMenuViewController.h --- a/project_files/HedgewarsMobile/Classes/InGameMenuViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/InGameMenuViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// popupMenuViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 25/03/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 25/03/2010. + */ + #import diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/InGameMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/InGameMenuViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,16 +1,30 @@ - // -// popupMenuViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 25/03/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 25/03/2010. + */ + #import "SDL_uikitappdelegate.h" #import "InGameMenuViewController.h" #import "PascalImports.h" #import "CommodityFunctions.h" #import "SDL_sysvideo.h" +#import "SDL_uikitkeyboard.h" @implementation InGameMenuViewController @synthesize menuList; @@ -21,29 +35,44 @@ } -(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. + self.menuList = nil; [super didReceiveMemoryWarning]; } -(void) viewDidLoad { NSArray *array = [[NSArray alloc] initWithObjects: - NSLocalizedString(@"Return to Game", @""), - NSLocalizedString(@"Chat", @""), + NSLocalizedString(@"Show Help", @""), + NSLocalizedString(@"Tag", @""), NSLocalizedString(@"End Game", @""), nil]; self.menuList = array; [array release]; - + // save the sdl window (!= uikit window) for future reference - SDL_VideoDevice *_this = SDL_GetVideoDevice(); - SDL_VideoDisplay *display = &_this->displays[0]; - sdlwindow = display->windows; - + SDL_VideoDevice *videoDevice = SDL_GetVideoDevice(); + if (videoDevice) { + SDL_VideoDisplay *display = &videoDevice->displays[0]; + if (display) + sdlwindow = display->windows; + } [super viewDidLoad]; } +-(void) viewWillAppear:(BOOL)animated { + if (sdlwindow == NULL) { + SDL_VideoDevice *_this = SDL_GetVideoDevice(); + if (_this) { + SDL_VideoDisplay *display = &_this->displays[0]; + if (display) + sdlwindow = display->windows; + } + } + [super viewWillAppear:animated]; +} + -(void) viewDidUnload { self.menuList = nil; + sdlwindow = NULL; MSG_DIDUNLOAD(); [super viewDidUnload]; } @@ -59,7 +88,7 @@ CGRect screen = [[UIScreen mainScreen] bounds]; self.view.backgroundColor = [UIColor clearColor]; self.view.frame = CGRectMake(screen.size.height, 0, 200, 170); - + [UIView beginAnimations:@"showing popover" context:NULL]; [UIView setAnimationDuration:0.35]; self.view.frame = CGRectMake(screen.size.height-200, 0, 200, 170); @@ -72,9 +101,9 @@ [UIView setAnimationDuration:0.35]; self.view.frame = CGRectMake(screen.size.height, 0, 200, 170); [UIView commitAnimations]; - + [self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.35]; - + [self removeChat]; } @@ -90,26 +119,26 @@ -(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellIdentifier = @"CellIdentifier"; - + UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:cellIdentifier]; if (nil == cell) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier] autorelease]; } cell.textLabel.text = [menuList objectAtIndex:[indexPath row]]; - - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + + if (IS_IPAD()) cell.textLabel.textAlignment = UITextAlignmentCenter; - + return cell; } -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIActionSheet *actionSheet; - + switch ([indexPath row]) { case 0: - HW_pause(); + [[NSNotificationCenter defaultCenter] postNotificationName:@"show help ingame" object:nil]; break; case 1: if (SDL_iPhoneKeyboardIsShown(sdlwindow)) @@ -121,7 +150,7 @@ break; case 2: // expand the view (and table) so that the actionsheet can be selected on the iPhone - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + if (IS_IPAD()) { CGRect screen = [[UIScreen mainScreen] bounds]; [self.tableView deselectRowAtIndexPath:indexPath animated:NO]; [UIView beginAnimations:@"table width more" context:NULL]; @@ -136,13 +165,13 @@ otherButtonTitles:nil]; [actionSheet showInView:self.view]; [actionSheet release]; - + break; default: DLog(@"Warning: unset case value in section!"); break; } - + [aTableView deselectRowAtIndexPath:indexPath animated:YES]; } @@ -156,16 +185,16 @@ #pragma mark - #pragma mark actionSheet methods -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex { - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){ + if (IS_IPAD()){ CGRect screen = [[UIScreen mainScreen] bounds]; [UIView beginAnimations:@"table width less" context:NULL]; [UIView setAnimationDuration:0.2]; self.view.frame = CGRectMake(screen.size.height-200, 0, 200, 170); [UIView commitAnimations]; } - + if ([actionSheet cancelButtonIndex] != buttonIndex) - HW_terminate(NO); + [[NSNotificationCenter defaultCenter] postNotificationName:@"remove overlay" object:nil]; } @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/LevelViewController.h --- a/project_files/HedgewarsMobile/Classes/LevelViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/LevelViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,20 +1,35 @@ -// -// LevelViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import @interface LevelViewController : UITableViewController { NSDictionary *teamDictionary; - + NSArray *levelArray; NSArray *levelSprites; NSIndexPath *lastIndexPath; + + NSInteger numberOfSections; } @property (nonatomic,retain) NSDictionary *teamDictionary; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/LevelViewController.m --- a/project_files/HedgewarsMobile/Classes/LevelViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/LevelViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// LevelViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import "LevelViewController.h" #import "CommodityFunctions.h" @@ -21,11 +34,11 @@ #pragma mark - #pragma mark View lifecycle -- (void)viewDidLoad { +-(void) viewDidLoad { [super viewDidLoad]; + srandom(time(NULL)); NSArray *array = [[NSArray alloc] initWithObjects: - NSLocalizedString(@"Human",@""), NSLocalizedString(@"Brutal",@""), NSLocalizedString(@"Aggressive",@""), NSLocalizedString(@"Bully",@""), @@ -34,127 +47,146 @@ nil]; self.levelArray = array; [array release]; - + self.title = NSLocalizedString(@"Set difficulty level",@""); } -- (void)viewWillAppear:(BOOL)animated { +-(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + + if ([[[[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0] objectForKey:@"level"] intValue] == 0) + numberOfSections = 1; + else + numberOfSections = 2; + [self.tableView reloadData]; // this moves the tableview to the top [self.tableView setContentOffset:CGPointMake(0,0) animated:NO]; } +-(void) viewWillDisappear:(BOOL)animated { + // stuff like checking that at least 1 field was selected +} + #pragma mark - #pragma mark Table view data source -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { - return 1; + return numberOfSections; } --(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return [self.levelArray count]; +-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger) section { + if (section == 0) + return 1; + else + return 5; } // Customize the appearance of table view cells. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - static NSString *CellIdentifier = @"Cell"; - + static NSString *CellIdentifier0 = @"Cell0"; + static NSString *CellIdentifier1 = @"Cell1"; + NSInteger row = [indexPath row]; - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; + NSInteger section = [indexPath section]; + UITableViewCell *cell; + + if (section == 0) { + cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier0]; + if (cell == nil) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier0] autorelease]; + UISwitch *theSwitch = [[UISwitch alloc] init]; + if (numberOfSections == 1) + theSwitch.on = NO; + else + theSwitch.on = YES; + [theSwitch addTarget:self action:@selector(switchValueChanged:) forControlEvents:UIControlEventValueChanged]; + cell.accessoryView = theSwitch; + [theSwitch release]; + } + cell.textLabel.text = NSLocalizedString(@"Hogs controlled by AI",@""); + } else { + cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1]; + if (cell == nil) + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease]; + + cell.textLabel.text = [levelArray objectAtIndex:row]; + NSDictionary *hog = [[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0]; + if ([[hog objectForKey:@"level"] intValue] == row+1) { + cell.accessoryType = UITableViewCellAccessoryCheckmark; + self.lastIndexPath = indexPath; + } else { + cell.accessoryType = UITableViewCellAccessoryNone; + } + + NSString *botlevelPath = [[NSString alloc] initWithFormat:@"%@/%d.png",BOTLEVELS_DIRECTORY(),row+1]; + UIImage *levelImage = [[UIImage alloc] initWithContentsOfFile:botlevelPath]; + [botlevelPath release]; + cell.imageView.image = levelImage; + [levelImage release]; } - cell.textLabel.text = [levelArray objectAtIndex:row]; - NSDictionary *hog = [[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0]; - if ([[hog objectForKey:@"level"] intValue] == row) { - cell.accessoryType = UITableViewCellAccessoryCheckmark; - self.lastIndexPath = indexPath; - } else { - cell.accessoryType = UITableViewCellAccessoryNone; - } - - NSString *botlevelPath = [[NSString alloc] initWithFormat:@"%@/%d.png",BOTLEVELS_DIRECTORY(),row]; - UIImage *levelImage = [[UIImage alloc] initWithContentsOfFile:botlevelPath]; - [botlevelPath release]; - cell.imageView.image = levelImage; - [levelImage release]; - return cell; } - -/* -// Override to support conditional editing of the table view. -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { - // Return NO if you do not want the specified item to be editable. - return YES; -} -*/ - - -/* -// Override to support editing the table view. -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { +-(void) switchValueChanged:(id) sender { + UISwitch *theSwitch = (UISwitch *)sender; + NSIndexSet *sections = [[NSIndexSet alloc] initWithIndex:1]; + NSMutableArray *hogs = [self.teamDictionary objectForKey:@"hedgehogs"]; + NSInteger level; - if (editingStyle == UITableViewCellEditingStyleDelete) { - // Delete the row from the data source - [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES]; - } - else if (editingStyle == UITableViewCellEditingStyleInsert) { - // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view - } -} -*/ - + if (theSwitch.on) { + numberOfSections = 2; + [self.tableView insertSections:sections withRowAnimation:UITableViewRowAnimationFade]; + level = random() % [levelArray count]; + } else { + numberOfSections = 1; + [self.tableView deleteSections:sections withRowAnimation:UITableViewRowAnimationFade]; + level = 0; + } -/* -// Override to support rearranging the table view. -- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { -} -*/ - + DLog(@"New level is %d",level); + for (NSMutableDictionary *hog in hogs) + [hog setObject:[NSNumber numberWithInt:0] forKey:@"level"]; -/* -// Override to support conditional rearranging of the table view. -- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { - // Return NO if you do not want the item to be re-orderable. - return YES; + [self.tableView reloadData]; + [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil]; + + [sections release]; } -*/ #pragma mark - #pragma mark Table view delegate -- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { +-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { int newRow = [indexPath row]; - int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; - - if (newRow != oldRow) { - NSMutableArray *hogs = [teamDictionary objectForKey:@"hedgehogs"]; - - for (NSMutableDictionary *hog in hogs) { - [hog setObject:[NSNumber numberWithInt:newRow] forKey:@"level"]; + int oldRow = (self.lastIndexPath != nil) ? [self.lastIndexPath row] : -1; + + if ([indexPath section] != 0) { + if (newRow != oldRow) { + NSMutableArray *hogs = [self.teamDictionary objectForKey:@"hedgehogs"]; + + for (NSMutableDictionary *hog in hogs) + [hog setObject:[NSNumber numberWithInt:newRow+1] forKey:@"level"]; + + // tell our boss to write this new stuff on disk + [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil]; + [self.tableView reloadData]; + + self.lastIndexPath = indexPath; + [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; } - - // tell our boss to write this new stuff on disk - [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil]; - [self.tableView reloadData]; - - self.lastIndexPath = indexPath; - [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; + [self.navigationController popViewControllerAnimated:YES]; } [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; - [self.navigationController popViewControllerAnimated:YES]; } #pragma mark - #pragma mark Memory management -(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. + self.lastIndexPath = nil; + MSG_MEMCLEAN(); [super didReceiveMemoryWarning]; - // Relinquish ownership any cached data, images, etc that aren't in use. } -(void) viewDidUnload { diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/MainMenuViewController.h --- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,23 +1,43 @@ -// -// MainMenuViewController.h -// hwengine -// -// Created by Vittorio on 08/01/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/01/2010. + */ + #import +@class GameConfigViewController; @class SplitViewRootController; -@class GameConfigViewController; +@class AboutViewController; +@class SavedGamesViewController; -@interface MainMenuViewController : UIViewController { - UILabel *versionLabel; +@interface MainMenuViewController : UIViewController { + GameConfigViewController *gameConfigViewController; SplitViewRootController *settingsViewController; - GameConfigViewController *gameConfigViewController; + AboutViewController *aboutViewController; + SavedGamesViewController *savedGamesViewController; } -@property (nonatomic,retain) IBOutlet UILabel *versionLabel; +@property (nonatomic,retain) GameConfigViewController *gameConfigViewController; +@property (nonatomic,retain) SplitViewRootController *settingsViewController; +@property (nonatomic,retain) AboutViewController *aboutViewController; +@property (nonatomic,retain) SavedGamesViewController *savedGamesViewController; -(IBAction) switchViews:(id)sender; + @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/MainMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,142 +1,194 @@ -// -// MainMenuViewController.m -// hwengine -// -// Created by Vittorio on 08/01/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/01/2010. + */ + #import "MainMenuViewController.h" +#import "CommodityFunctions.h" #import "SDL_uikitappdelegate.h" #import "PascalImports.h" #import "GameConfigViewController.h" #import "SplitViewRootController.h" -#import "CommodityFunctions.h" -#import "SDL_mixer.h" +#import "AboutViewController.h" +#import "SavedGamesViewController.h" @implementation MainMenuViewController -@synthesize versionLabel; +@synthesize gameConfigViewController, settingsViewController, aboutViewController, savedGamesViewController; -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { return rotationManager(interfaceOrientation); } -- (void)didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - if (settingsViewController.view.superview == nil) - settingsViewController = nil; - if (gameConfigViewController.view.superview == nil) - gameConfigViewController = nil; - MSG_MEMCLEAN(); -} - // using a different thread for audio 'cos it's slow -(void) initAudioThread { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 1, 512); + // do somthing in the future [pool release]; } --(void) viewDidLoad { - [NSThread detachNewThreadSelector:@selector(initAudioThread) - toTarget:self - withObject:nil]; +// check if some configuration files are already set; if they are present it means that the current copy must be updated +-(void) createNecessaryFiles { + NSError *err = nil; + NSString *directoryToCheck, *fileToCheck, *fileToUpdate; + NSString *resDir = [[NSBundle mainBundle] resourcePath]; + DLog(@"Creating necessary files"); + + // create an empty saves directory by deleting the previous one (saves are incompatible between releases) + if ([[NSFileManager defaultManager] fileExistsAtPath:SAVES_DIRECTORY()]) + [[NSFileManager defaultManager] removeItemAtPath:SAVES_DIRECTORY() error:NULL]; + [[NSFileManager defaultManager] createDirectoryAtPath:SAVES_DIRECTORY() withIntermediateDirectories:NO attributes:nil error:NULL]; + + // if the settings file is already present, we merge current preferences with the update + directoryToCheck = [NSString stringWithFormat:@"%@/Settings/settings.plist",resDir]; + if ([[NSFileManager defaultManager] fileExistsAtPath:SETTINGS_FILE()]) { + NSDictionary *settings = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()]; + NSMutableDictionary *update = [[NSMutableDictionary alloc] initWithContentsOfFile:directoryToCheck]; + [update addEntriesFromDictionary:settings]; + [settings release]; + [update writeToFile:SETTINGS_FILE() atomically:YES]; + [update release]; + } else + [[NSFileManager defaultManager] copyItemAtPath:directoryToCheck toPath:SETTINGS_FILE() error:&err]; - char *ver; - HW_versionInfo(NULL, &ver); - NSString *versionNumber = [[NSString alloc] initWithCString:ver]; - self.versionLabel.text = versionNumber; - [versionNumber release]; - - // listen to request to remove the modalviewcontroller - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(dismissModalViewController) - name: @"dismissModalView" - object:nil]; + // if the teams are already present we merge the old teams if they still exist + directoryToCheck = [NSString stringWithFormat:@"%@/Settings/Teams",resDir]; + if ([[NSFileManager defaultManager] fileExistsAtPath:TEAMS_DIRECTORY()]) { + for (NSString *str in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:directoryToCheck error:&err]) { + fileToCheck = [NSString stringWithFormat:@"%@/%@",TEAMS_DIRECTORY(),str]; + fileToUpdate = [NSString stringWithFormat:@"%@/Settings/Teams/%@",resDir,str]; + if ([[NSFileManager defaultManager] fileExistsAtPath:fileToCheck]) { + NSDictionary *team = [[NSDictionary alloc] initWithContentsOfFile:fileToCheck]; + NSMutableDictionary *update = [[NSMutableDictionary alloc] initWithContentsOfFile:fileToUpdate]; + [update addEntriesFromDictionary:team]; + [team release]; + [update writeToFile:fileToCheck atomically:YES]; + [update release]; + } + } + } else + [[NSFileManager defaultManager] copyItemAtPath:directoryToCheck toPath:TEAMS_DIRECTORY() error:&err]; - // initialize some files the first time we load the game - if (!([[NSFileManager defaultManager] fileExistsAtPath:SETTINGS_FILE()])) - [NSThread detachNewThreadSelector:@selector(checkFirstRun) toTarget:self withObject:nil]; + // the same holds for schemes (but they're arrays) + directoryToCheck = [NSString stringWithFormat:@"%@/Settings/Schemes",resDir]; + if ([[NSFileManager defaultManager] fileExistsAtPath:SCHEMES_DIRECTORY()]) { + for (NSString *str in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:directoryToCheck error:nil]) { + fileToCheck = [NSString stringWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),str]; + fileToUpdate = [NSString stringWithFormat:@"%@/Settings/Schemes/%@",resDir,str]; + if ([[NSFileManager defaultManager] fileExistsAtPath:fileToCheck]) { + NSArray *scheme = [[NSArray alloc] initWithContentsOfFile:fileToCheck]; + NSArray *update = [[NSArray alloc] initWithContentsOfFile:fileToUpdate]; + if ([update count] > [scheme count]) + [update writeToFile:fileToCheck atomically:YES]; + [update release]; + [scheme release]; + } + } + } else + [[NSFileManager defaultManager] copyItemAtPath:directoryToCheck toPath:SCHEMES_DIRECTORY() error:&err]; - [super viewDidLoad]; + // we create weapons the first time only, they are autoupdated each time + if ([[NSFileManager defaultManager] fileExistsAtPath:WEAPONS_DIRECTORY()] == NO) { + [[NSFileManager defaultManager] createDirectoryAtPath:WEAPONS_DIRECTORY() + withIntermediateDirectories:YES + attributes:nil + error:&err]; + createWeaponNamed(@"Default", 0); + createWeaponNamed(@"Crazy", 1); + createWeaponNamed(@"Pro mode", 2); + createWeaponNamed(@"Shoppa", 3); + createWeaponNamed(@"Basketball", 4); + createWeaponNamed(@"Minefield", 5); + } + + if (err != nil) + DLog(@"%@", err); + else + DLog(@"Success"); } -// this is called to verify whether it's the first time the app is launched -// if it is it blocks user interaction with an alertView until files are created --(void) checkFirstRun { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - DLog(@"First time run, creating settings files at %@", SETTINGS_FILE()); - - // show a popup with an indicator to make the user wait - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Please wait",@"") - message:nil - delegate:nil - cancelButtonTitle:nil - otherButtonTitles:nil]; - [alert show]; - - UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] - initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; - indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height - 50); - [indicator startAnimating]; - [alert addSubview:indicator]; - [indicator release]; - - // create default files (teams/weapons/scheme) - createTeamNamed(@"Pirates"); - createTeamNamed(@"Ninjas"); - createWeaponNamed(@"Default"); - createSchemeNamed(@"Default"); - - // create settings.plist - NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init]; +#pragma mark - +-(void) viewDidLoad { + [super viewDidLoad]; + + // listen to request to remove the modalviewcontroller (needed due to the splitcontroller) + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(dismissModalViewController) + name: @"dismissModalView" + object:nil]; - [saveDict setObject:@"" forKey:@"username"]; - [saveDict setObject:@"" forKey:@"password"]; - [saveDict setObject:[NSNumber numberWithBool:YES] forKey:@"music"]; - [saveDict setObject:[NSNumber numberWithBool:YES] forKey:@"sound"]; - [saveDict setObject:[NSNumber numberWithBool:NO] forKey:@"alternate"]; + // get the app's version + NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleVersionKey]; + + // get the version number that we've been tracking + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; + NSString *trackingVersion = [userDefaults stringForKey:@"HedgeVersion"]; - [saveDict writeToFile:SETTINGS_FILE() atomically:YES]; - [saveDict release]; - - // ok let the user take control - [alert dismissWithClickedButtonIndex:0 animated:YES]; - [alert release]; + if (trackingVersion == nil || [trackingVersion isEqualToString:version] == NO) { + [userDefaults setObject:version forKey:@"HedgeVersion"]; + [userDefaults synchronize]; + [self createNecessaryFiles]; + } +} - [pool release]; - - // TODO: instead of this useless runtime initialization, check that all ammos remain compatible with engine -} #pragma mark - -(IBAction) switchViews:(id) sender { UIButton *button = (UIButton *)sender; UIAlertView *alert; - NSString *debugStr; + NSString *xib = nil; + NSString *debugStr = nil; + playSound(@"clickSound"); switch (button.tag) { case 0: - gameConfigViewController = [[GameConfigViewController alloc] initWithNibName:@"GameConfigViewController" bundle:nil]; + if (nil == self.gameConfigViewController) { + if (IS_IPAD()) + xib = nil; + else + xib = @"GameConfigViewController"; + + GameConfigViewController *gcvc = [[GameConfigViewController alloc] initWithNibName:xib bundle:nil]; + gcvc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; + self.gameConfigViewController = gcvc; + [gcvc release]; + } - [self presentModalViewController:gameConfigViewController animated:YES]; + [self presentModalViewController:self.gameConfigViewController animated:YES]; break; case 2: - if (nil == settingsViewController) { - settingsViewController = [[SplitViewRootController alloc] initWithNibName:nil bundle:nil]; - settingsViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; + if (nil == self.settingsViewController) { + SplitViewRootController *svrc = [[SplitViewRootController alloc] initWithNibName:nil bundle:nil]; + svrc.modalTransitionStyle = UIModalTransitionStyleCoverVertical; + self.settingsViewController = svrc; + [svrc release]; } - - [self presentModalViewController:settingsViewController animated:YES]; + + [self presentModalViewController:self.settingsViewController animated:YES]; break; case 3: +#ifdef DEBUG debugStr = [[NSString alloc] initWithContentsOfFile:DEBUG_FILE()]; UITextView *scroll = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)]; scroll.text = debugStr; [debugStr release]; scroll.editable = NO; - + UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; [btn addTarget:scroll action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside]; btn.backgroundColor = [UIColor blackColor]; @@ -144,6 +196,28 @@ [scroll addSubview:btn]; [self.view addSubview:scroll]; [scroll release]; +#else + if (nil == self.aboutViewController) { + AboutViewController *about = [[AboutViewController alloc] initWithNibName:@"AboutViewController" bundle:nil]; + about.modalTransitionStyle = UIModalTransitionStyleCoverVertical; + about.modalPresentationStyle = UIModalPresentationFormSheet; + self.aboutViewController = about; + [about release]; + } + + [self presentModalViewController:self.aboutViewController animated:YES]; +#endif + break; + case 4: + if (nil == self.savedGamesViewController) { + SavedGamesViewController *savedgames = [[SavedGamesViewController alloc] initWithNibName:@"SavedGamesViewController" bundle:nil]; + savedgames.modalTransitionStyle = UIModalTransitionStyleCoverVertical; + savedgames.modalPresentationStyle = UIModalPresentationPageSheet; + self.savedGamesViewController = savedgames; + [savedgames release]; + } + + [self presentModalViewController:self.savedGamesViewController animated:YES]; break; default: alert = [[UIAlertView alloc] initWithTitle:@"Not Yet Implemented" @@ -157,24 +231,39 @@ } } -// allows child controllers to return to the main controller +// must be kept for compatibility with the settings page -(void) dismissModalViewController { [self dismissModalViewControllerAnimated:YES]; } - -(void) viewDidUnload { - self.versionLabel = nil; - gameConfigViewController = nil; - settingsViewController = nil; + [[NSNotificationCenter defaultCenter] removeObserver:self]; + self.gameConfigViewController = nil; + self.settingsViewController = nil; + self.aboutViewController = nil; + self.savedGamesViewController = nil; MSG_DIDUNLOAD(); [super viewDidUnload]; } +-(void) didReceiveMemoryWarning { + if (self.settingsViewController.view.superview == nil) + self.settingsViewController = nil; + if (self.gameConfigViewController.view.superview == nil) + self.gameConfigViewController = nil; + if (self.aboutViewController.view.superview == nil) + self.aboutViewController = nil; + if (self.savedGamesViewController.view.superview == nil) + self.savedGamesViewController = nil; + MSG_MEMCLEAN(); + [super didReceiveMemoryWarning]; +} + -(void) dealloc { - [versionLabel release]; [settingsViewController release]; [gameConfigViewController release]; + [aboutViewController release]; + [savedGamesViewController release]; [super dealloc]; } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/MapConfigViewController.h --- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,20 +1,32 @@ -// -// MapConfigViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 22/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 22/04/2010. + */ + #import -#import "SDL_net.h" +#import "MapPreviewButtonView.h" -@interface MapConfigViewController : UIViewController { - TCPsocket sd, csd; +@interface MapConfigViewController : UIViewController { NSInteger oldValue; //slider NSInteger oldPage; //segmented control BOOL busy; - + // objects read (mostly) by parent view NSInteger maxHogs; NSString *seedCommand; @@ -23,31 +35,33 @@ NSString *mazeSizeCommand; NSString *themeCommand; NSString *staticMapCommand; - + NSString *missionCommand; + // various widgets in the view - UIButton *previewButton; + MapPreviewButtonView *previewButton; UITableView *tableView; UILabel *maxLabel; UILabel *sizeLabel; UISegmentedControl *segmentedControl; UISlider *slider; - + // internal objects NSIndexPath *lastIndexPath; - NSArray *themeArray; - NSArray *mapArray; + NSArray *dataSourceArray; } -@property (nonatomic) NSInteger maxHogs; -@property (nonatomic) BOOL busy; + +@property (nonatomic,assign) NSInteger maxHogs; +@property (nonatomic,assign) BOOL busy; @property (nonatomic,retain) NSString *seedCommand; @property (nonatomic,retain) NSString *templateFilterCommand; @property (nonatomic,retain) NSString *mapGenCommand; @property (nonatomic,retain) NSString *mazeSizeCommand; @property (nonatomic,retain) NSString *themeCommand; @property (nonatomic,retain) NSString *staticMapCommand; +@property (nonatomic,retain) NSString *missionCommand; -@property (nonatomic,retain) IBOutlet UIButton *previewButton; +@property (nonatomic,retain) IBOutlet MapPreviewButtonView *previewButton; @property (nonatomic,retain) IBOutlet UITableView *tableView; @property (nonatomic,retain) IBOutlet UILabel *maxLabel; @property (nonatomic,retain) IBOutlet UILabel *sizeLabel; @@ -55,18 +69,19 @@ @property (nonatomic,retain) IBOutlet UISlider *slider; @property (nonatomic,retain) NSIndexPath *lastIndexPath; -@property (nonatomic,retain) NSArray *themeArray; -@property (nonatomic,retain) NSArray *mapArray; +@property (nonatomic,retain) NSArray *dataSourceArray; --(IBAction) updatePreview; +-(IBAction) buttonPressed:(id) sender; + +-(IBAction) mapButtonPressed; -(IBAction) sliderChanged:(id) sender; -(IBAction) sliderEndedChanging:(id) sender; -(IBAction) segmentedControlChanged:(id) sender; + -(void) turnOnWidgets; -(void) turnOffWidgets; -(void) setLabelText:(NSString *)str; --(void) setButtonImage:(UIImage *)img; - --(const uint8_t *)engineProtocol:(NSInteger) port; +-(void) updatePreview; +-(void) loadDataSourceArray; @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/MapConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,234 +1,79 @@ -// -// MapConfigViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 22/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 22/04/2010. + */ + #import "MapConfigViewController.h" #import "PascalImports.h" #import "CommodityFunctions.h" #import "UIImageExtra.h" -#import "SDL_net.h" -#import -#define INDICATOR_TAG 7654 +#define scIndex self.segmentedControl.selectedSegmentIndex +#define isRandomness() (segmentedControl.selectedSegmentIndex == 0 || segmentedControl.selectedSegmentIndex == 2) @implementation MapConfigViewController @synthesize previewButton, maxHogs, seedCommand, templateFilterCommand, mapGenCommand, mazeSizeCommand, themeCommand, staticMapCommand, - tableView, maxLabel, sizeLabel, segmentedControl, slider, lastIndexPath, themeArray, mapArray, busy; + missionCommand, tableView, maxLabel, sizeLabel, segmentedControl, slider, lastIndexPath, dataSourceArray, busy; -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return rotationManager(interfaceOrientation); } -#pragma mark - -#pragma mark Preview Handling --(int) sendToEngine: (NSString *)string { - unsigned char length = [string length]; - - SDLNet_TCP_Send(csd, &length , 1); - return SDLNet_TCP_Send(csd, [string UTF8String], length); +-(IBAction) mapButtonPressed { + playSound(@"clickSound"); + [self updatePreview]; } --(const uint8_t *)engineProtocol:(NSInteger) port { - IPaddress ip; - BOOL serverQuit = NO; - static uint8_t map[128*32]; - - if (SDLNet_Init() < 0) { - DLog(@"SDLNet_Init: %s", SDLNet_GetError()); - serverQuit = YES; - } - - // Resolving the host using NULL make network interface to listen - if (SDLNet_ResolveHost(&ip, NULL, port) < 0) { - DLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError()); - serverQuit = YES; - } - - // Open a connection with the IP provided (listen on the host's port) - if (!(sd = SDLNet_TCP_Open(&ip))) { - DLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), port); - serverQuit = YES; - } - - // launch the preview here so that we're sure the tcp channel is open - pthread_t thread_id; - pthread_create(&thread_id, NULL, (void *)GenLandPreview, (void *)port); - pthread_detach(thread_id); - - DLog(@"Waiting for a client on port %d", port); - while (!serverQuit) { - /* This check the sd if there is a pending connection. - * If there is one, accept that, and open a new socket for communicating */ - csd = SDLNet_TCP_Accept(sd); - if (NULL != csd) { - DLog(@"Client found"); - - [self sendToEngine:self.seedCommand]; - [self sendToEngine:self.templateFilterCommand]; - [self sendToEngine:self.mapGenCommand]; - [self sendToEngine:self.mazeSizeCommand]; - [self sendToEngine:@"!"]; - - memset(map, 0, 128*32); - SDLNet_TCP_Recv(csd, map, 128*32); - SDLNet_TCP_Recv(csd, &maxHogs, sizeof(uint8_t)); - - SDLNet_TCP_Close(csd); - serverQuit = YES; - } - } - - SDLNet_TCP_Close(sd); - SDLNet_Quit(); - return map; -} - --(void) drawingThread { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - // select the port for IPC and launch the preview generation through engineProtocol: - int port = randomPort(); - const uint8_t *map = [self engineProtocol:port]; - uint8_t mapExp[128*32*8]; - - // draw the buffer (1 pixel per component, 0= transparent 1= color) - int k = 0; - for (int i = 0; i < 32*128; i++) { - unsigned char byte = map[i]; - for (int j = 0; j < 8; j++) { - // select the color based on the leftmost bit - if ((byte & 0x80) != 0) - mapExp[k] = 100; - else - mapExp[k] = 255; - // shift to next bit - byte <<= 1; - k++; - } - } - CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceGray(); - CGContextRef bitmapImage = CGBitmapContextCreate(mapExp, 256, 128, 8, 256, colorspace, kCGImageAlphaNone); - CGColorSpaceRelease(colorspace); - - CGImageRef previewCGImage = CGBitmapContextCreateImage(bitmapImage); - CGContextRelease(bitmapImage); - UIImage *previewImage = [[UIImage alloc] initWithCGImage:previewCGImage]; - CGImageRelease(previewCGImage); - previewCGImage = nil; - - // set the preview image (autoreleased) in the button and the maxhog label on the main thread to prevent a leak - [self performSelectorOnMainThread:@selector(setButtonImage:) withObject:[previewImage makeRoundCornersOfSize:CGSizeMake(12, 12)] waitUntilDone:NO]; - [previewImage release]; - [self performSelectorOnMainThread:@selector(setLabelText:) withObject:[NSString stringWithFormat:@"%d", maxHogs] waitUntilDone:NO]; - - // restore functionality of button and remove the spinning wheel on the main thread to prevent a leak - [self performSelectorOnMainThread:@selector(turnOnWidgets) withObject:nil waitUntilDone:NO]; - - [pool release]; - //Invoking this method should be avoided as it does not give your thread a chance to clean up any resources it allocated during its execution. - //[NSThread exit]; - - /* - // http://developer.apple.com/mac/library/qa/qa2001/qa1037.html - UIGraphicsBeginImageContext(CGSizeMake(256,128)); - CGContextRef context = UIGraphicsGetCurrentContext(); - UIGraphicsPushContext(context); - - CGContextSetRGBFillColor(context, 0.5, 0.5, 0.7, 1.0); - CGContextFillRect(context,CGRectMake(xc,yc,1,1)); - - UIGraphicsPopContext(); - UIImage *previewImage = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - */ -} - --(IBAction) updatePreview { +-(void) updatePreview { // don't generate a new preview while it's already generating one if (busy) return; - + // generate a seed CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); NSString *seed = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid); CFRelease(uuid); NSString *seedCmd = [[NSString alloc] initWithFormat:@"eseed {%@}", seed]; - [seed release]; self.seedCommand = seedCmd; [seedCmd release]; - + + if (self.dataSourceArray == nil) + [self loadDataSourceArray]; + NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; NSIndexPath *theIndex; - if (segmentedControl.selectedSegmentIndex != 1) { - // remove the current preview and title - [self.previewButton setImage:nil forState:UIControlStateNormal]; - [self.previewButton setTitle:nil forState:UIControlStateNormal]; - - // don't display preview on slower device, too slow and memory hog - NSString *modelId = modelType(); - if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"]) { - busy = NO; - [self.previewButton setTitle:NSLocalizedString(@"Preview not available",@"") forState:UIControlStateNormal]; - } else { - // prevent other events and add an activity while the preview is beign generated - [self turnOffWidgets]; - - // add a very nice spinning wheel - UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] - initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; - indicator.center = CGPointMake(previewButton.bounds.size.width / 2, previewButton.bounds.size.height / 2); - indicator.tag = INDICATOR_TAG; - [indicator startAnimating]; - [self.previewButton addSubview:indicator]; - [indicator release]; - - // let's draw in a separate thread so the gui can work; at the end it restore other widgets - [NSThread detachNewThreadSelector:@selector(drawingThread) toTarget:self withObject:nil]; - } - - theIndex = [NSIndexPath indexPathForRow:(random()%[self.themeArray count]) inSection:0]; + if (isRandomness()) { + // prevent other events and add an activity while the preview is beign generated + [self turnOffWidgets]; + [self.previewButton updatePreviewWithSeed:seed]; + theIndex = [NSIndexPath indexPathForRow:(random()%[source count]) inSection:0]; } else { - theIndex = [NSIndexPath indexPathForRow:(random()%[self.mapArray count]) inSection:0]; + theIndex = [NSIndexPath indexPathForRow:(random()%[source count]) inSection:0]; + // the preview for static maps is loaded in didSelectRowAtIndexPath } - [self.tableView reloadData]; + [seed release]; + + // perform as if user clicked on an entry [self tableView:self.tableView didSelectRowAtIndexPath:theIndex]; [self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionNone animated:YES]; } -// instead of drawing a random map we load an image; this function is called by didSelectRowAtIndexPath only --(void) updatePreviewWithMap:(NSInteger) index { - // change the preview button - NSString *fileImage = [[NSString alloc] initWithFormat:@"%@/%@/preview.png", MAPS_DIRECTORY(),[self.mapArray objectAtIndex:index]]; - UIImage *image = [[UIImage alloc] initWithContentsOfFile:fileImage]; - [fileImage release]; - [self.previewButton setImage:[image makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:UIControlStateNormal]; - [image release]; - - // update label - maxHogs = 18; - NSString *fileCfg = [[NSString alloc] initWithFormat:@"%@/%@/map.cfg", MAPS_DIRECTORY(),[self.mapArray objectAtIndex:index]]; - NSString *contents = [[NSString alloc] initWithContentsOfFile:fileCfg encoding:NSUTF8StringEncoding error:NULL]; - [fileCfg release]; - NSArray *split = [contents componentsSeparatedByString:@"\n"]; - [contents release]; - - // set the theme and map here - self.themeCommand = [NSString stringWithFormat:@"etheme %@", [split objectAtIndex:0]]; - self.staticMapCommand = [NSString stringWithFormat:@"emap %@", [self.mapArray objectAtIndex:index]]; - - // if the number is not set we keep 18 standard; - // sometimes it's not set but there are trailing characters, we get around them with the second equation - if ([split count] > 1 && [[split objectAtIndex:1] intValue] > 0) - maxHogs = [[split objectAtIndex:1] intValue]; - NSString *max = [[NSString alloc] initWithFormat:@"%d",maxHogs]; - self.maxLabel.text = max; - [max release]; -} - -(void) turnOffWidgets { busy = YES; self.previewButton.alpha = 0.5f; @@ -244,35 +89,21 @@ self.segmentedControl.enabled = YES; self.slider.enabled = YES; busy = NO; - - UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)[self.previewButton viewWithTag:INDICATOR_TAG]; - if (indicator) { - [indicator stopAnimating]; - [indicator removeFromSuperview]; - } } - + -(void) setLabelText:(NSString *)str { + self.maxHogs = [str intValue]; self.maxLabel.text = str; } --(void) setButtonImage:(UIImage *)img { - [self.previewButton setBackgroundImage:img forState:UIControlStateNormal]; -} - --(void) restoreBackgroundImage { - // white rounded rectangle as background image for previewButton - UIGraphicsBeginImageContext(CGSizeMake(256,128)); - CGContextRef context = UIGraphicsGetCurrentContext(); - UIGraphicsPushContext(context); - - CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0); - CGContextFillRect(context,CGRectMake(0,0,256,128)); - - UIGraphicsPopContext(); - UIImage *bkgImg = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - [self.previewButton setBackgroundImage:[bkgImg makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:UIControlStateNormal]; +-(NSDictionary *)getDataForEngine { + NSDictionary *dictForEngine = [NSDictionary dictionaryWithObjectsAndKeys: + self.seedCommand,@"seedCommand", + self.templateFilterCommand,@"templateFilterCommand", + self.mapGenCommand,@"mapGenCommand", + self.mazeSizeCommand,@"mazeSizeCommand", + nil]; + return dictForEngine; } #pragma mark - @@ -282,64 +113,107 @@ } -(NSInteger) tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger) section { - if (self.segmentedControl.selectedSegmentIndex != 1) - return [themeArray count]; - else - return [mapArray count]; + if (self.dataSourceArray == nil) + [self loadDataSourceArray]; + return [[self.dataSourceArray objectAtIndex:scIndex] count]; } -(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; NSInteger row = [indexPath row]; - + UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) + if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; - - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - cell.textLabel.textColor = [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xCB/255 blue:0 alpha:1 ]; - } - - if (self.segmentedControl.selectedSegmentIndex != 1) { - // the % prevents a strange bug that occurs sporadically - NSString *themeName = [self.themeArray objectAtIndex:row % [self.themeArray count]]; - cell.textLabel.text = themeName; - UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/icon.png",THEMES_DIRECTORY(),themeName]]; + + if (IS_IPAD()) + cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT; + + if (self.dataSourceArray == nil) + [self loadDataSourceArray]; + NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; + + NSString *labelString = [source objectAtIndex:row]; + cell.textLabel.text = labelString; + cell.textLabel.adjustsFontSizeToFitWidth = YES; + cell.textLabel.minimumFontSize = 7; + + if (isRandomness()) { + UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/icon.png",THEMES_DIRECTORY(),labelString]]; cell.imageView.image = image; [image release]; - } else { - cell.textLabel.text = [self.mapArray objectAtIndex:row]; + } else cell.imageView.image = nil; - } - - if (row == [self.lastIndexPath row]) - cell.accessoryType = UITableViewCellAccessoryCheckmark; - else - cell.accessoryType = UITableViewCellAccessoryNone; + if (row == [self.lastIndexPath row]) { + UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; + cell.accessoryView = checkbox; + [checkbox release]; + } else + cell.accessoryView = nil; + + cell.backgroundColor = [UIColor blackColor]; return cell; } +// this set details for a static map (called by didSelectRowAtIndexPath) +-(void) setDetailsForStaticMap:(NSInteger) index { + if (self.dataSourceArray == nil) + [self loadDataSourceArray]; + NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; + + NSString *fileCfg = [[NSString alloc] initWithFormat:@"%@/%@/map.cfg", + (scIndex == 1) ? MAPS_DIRECTORY() : MISSIONS_DIRECTORY(),[source objectAtIndex:index]]; + NSString *contents = [[NSString alloc] initWithContentsOfFile:fileCfg encoding:NSUTF8StringEncoding error:NULL]; + [fileCfg release]; + NSArray *split = [contents componentsSeparatedByString:@"\n"]; + [contents release]; + + // if the number is not set we keep 18 standard; + // sometimes it's not set but there are trailing characters, we get around them with the second equation + if ([split count] > 1 && [[split objectAtIndex:1] intValue] > 0) + maxHogs = [[split objectAtIndex:1] intValue]; + else + maxHogs = 18; + NSString *max = [[NSString alloc] initWithFormat:@"%d",maxHogs]; + self.maxLabel.text = max; + [max release]; + + self.themeCommand = [NSString stringWithFormat:@"etheme %@", [split objectAtIndex:0]]; + self.staticMapCommand = [NSString stringWithFormat:@"emap %@", [source objectAtIndex:index]]; + + if (scIndex != 3) + self.missionCommand = @""; + else + self.missionCommand = [NSString stringWithFormat:@"escript Missions/Maps/%@/map.lua",[source objectAtIndex:index]]; +} #pragma mark - #pragma mark Table view delegate -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { int newRow = [indexPath row]; int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; - + if (newRow != oldRow) { - if (self.segmentedControl.selectedSegmentIndex != 1) { - NSString *theme = [self.themeArray objectAtIndex:newRow]; - self.themeCommand = [NSString stringWithFormat:@"etheme %@", theme]; + if (self.dataSourceArray == nil) + [self loadDataSourceArray]; + NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; + if (isRandomness()) { + // just change the theme, don't update preview + self.themeCommand = [NSString stringWithFormat:@"etheme %@", [source objectAtIndex:newRow]]; } else { - // theme and map are set in the function below - [self updatePreviewWithMap:newRow]; + NSString *fileImage = [NSString stringWithFormat:@"%@/%@/preview.png", + (scIndex == 1) ? MAPS_DIRECTORY() : MISSIONS_DIRECTORY(),[source objectAtIndex:newRow]]; + [self.previewButton updatePreviewWithFile:fileImage]; + [self setDetailsForStaticMap:newRow]; } - - UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath]; - newCell.accessoryType = UITableViewCellAccessoryCheckmark; + + UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath]; + UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; + newCell.accessoryView = checkbox; + [checkbox release]; UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:self.lastIndexPath]; - oldCell.accessoryType = UITableViewCellAccessoryNone; + oldCell.accessoryView = nil; self.lastIndexPath = indexPath; [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; @@ -355,7 +229,7 @@ NSString *labelText; NSString *templateCommand; NSString *mazeCommand; - + switch ((int)(self.slider.value*100)) { case 0: if (self.segmentedControl.selectedSegmentIndex == 0) { @@ -417,7 +291,7 @@ mazeCommand = nil; break; } - + self.sizeLabel.text = labelText; self.templateFilterCommand = templateCommand; self.mazeSizeCommand = mazeCommand; @@ -430,128 +304,143 @@ [self updatePreview]; oldValue = num; } + playSound(@"clickSound"); } -// perform actions based on the activated section, then call updatePreview to visually update the selection -// updatePreview will call didSelectRowAtIndexPath which will call the right update routine) +// perform actions based on the activated section, then call updatePreview to visually update the selection // and if necessary update the table with a slide animation -(IBAction) segmentedControlChanged:(id) sender { - NSString *mapgen, *staticmap; + NSString *mapgen, *staticmap, *mission; NSInteger newPage = self.segmentedControl.selectedSegmentIndex; - + + playSound(@"selSound"); switch (newPage) { case 0: // Random mapgen = @"e$mapgen 0"; staticmap = @""; + mission = @""; [self sliderChanged:nil]; self.slider.enabled = YES; break; - + case 1: // Map + case 3: // Mission mapgen = @"e$mapgen 0"; - // dummy value, everything is set by -updatePreview -> -didSelectRowAtIndexPath -> -updatePreviewWithMap + // dummy values, these are set by -updatePreview -> -didSelectRowAtIndexPath -> -setDetailsForStaticMap staticmap = @"map Bamboo"; + mission = @""; self.slider.enabled = NO; - self.sizeLabel.text = @"."; - [self restoreBackgroundImage]; + self.sizeLabel.text = NSLocalizedString(@"No filter",@""); break; - + case 2: // Maze mapgen = @"e$mapgen 1"; staticmap = @""; + mission = @""; [self sliderChanged:nil]; self.slider.enabled = YES; break; - + default: mapgen = nil; staticmap = nil; + mission = nil; break; } self.mapGenCommand = mapgen; self.staticMapCommand = staticmap; - [self updatePreview]; - + self.missionCommand = mission; + // nice animation for updating the table when appropriate (on iphone) - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) - if (((oldPage == 0 || oldPage == 2) && newPage == 1) || - (oldPage == 1 && (newPage == 0 || newPage == 2))) { - [UIView beginAnimations:@"moving out table" context:NULL]; + if (IS_IPAD()) + if (((oldPage == 0 || oldPage == 2) && (newPage == 1 || newPage == 3)) || + ((oldPage == 1 || oldPage == 3) && (newPage == 0 || newPage == 2)) || + ((oldPage == 1 && newPage == 3) || (oldPage == 3 || newPage == 1))) { self.tableView.frame = CGRectMake(480, 0, 185, 276); + [UIView beginAnimations:@"moving in table" context:NULL]; + self.tableView.frame = CGRectMake(295, 0, 185, 276); [UIView commitAnimations]; - [self performSelector:@selector(moveTable) withObject:nil afterDelay:0.2]; } + + [self.tableView reloadData]; + [self updatePreview]; oldPage = newPage; } -// update data when table is not visible and then show it --(void) moveTable { - [self.tableView reloadData]; +#pragma mark - +#pragma mark calls the parent's function that checks the parameters and starts the game +-(IBAction) buttonPressed:(id) sender { + [[NSNotificationCenter defaultCenter] postNotificationName:@"buttonPressed" object:nil userInfo:[NSDictionary dictionaryWithObject:sender forKey:@"sender"]]; +} + +-(void) loadDataSourceArray { + // themes.cfg contains all the user-selectable themes + NSString *string = [[NSString alloc] initWithContentsOfFile:[THEMES_DIRECTORY() stringByAppendingString:@"/themes.cfg"] + encoding:NSUTF8StringEncoding + error:NULL]; + NSMutableArray *themeArray = [[NSMutableArray alloc] initWithArray:[string componentsSeparatedByString:@"\n"]]; + [string release]; + // remove a trailing "" element + [themeArray removeLastObject]; + NSArray *mapArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MAPS_DIRECTORY() error:NULL]; + NSArray *missionArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MISSIONS_DIRECTORY() error:NULL]; - [UIView beginAnimations:@"moving in table" context:NULL]; - self.tableView.frame = CGRectMake(295, 0, 185, 276); - [UIView commitAnimations]; + NSArray *array = [[NSArray alloc] initWithObjects:themeArray,mapArray,themeArray,missionArray,nil]; + self.dataSourceArray = array; + [array release]; + [themeArray release]; } #pragma mark - #pragma mark view management -(void) viewDidLoad { [super viewDidLoad]; - + srandom(time(NULL)); - + CGSize screenSize = [[UIScreen mainScreen] bounds].size; self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44); - - // themes.cfg contains all the user-selectable themes - NSString *string = [[NSString alloc] initWithContentsOfFile:[THEMES_DIRECTORY() stringByAppendingString:@"/themes.cfg"] - encoding:NSUTF8StringEncoding - error:NULL]; - NSMutableArray *array = [[NSMutableArray alloc] initWithArray:[string componentsSeparatedByString:@"\n"]]; - [string release]; - // remove a trailing "" element - [array removeLastObject]; - self.themeArray = array; - [array release]; - self.mapArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MAPS_DIRECTORY() error:NULL]; - - self.tableView.rowHeight = 42; - busy = NO; - - // draw a white background - [self restoreBackgroundImage]; // initialize some "default" values self.sizeLabel.text = NSLocalizedString(@"All",@""); self.slider.value = 0.05f; + oldValue = 5; - // on slower device we show directly the static map - NSString *modelId = modelType(); - if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"]) - self.segmentedControl.selectedSegmentIndex = 1; - else - self.segmentedControl.selectedSegmentIndex = 0; + busy = NO; + [self loadDataSourceArray]; + self.lastIndexPath = [NSIndexPath indexPathForRow:-1 inSection:0]; + + // select a map at first because it's faster - done in IB + oldPage = 1; + if (self.segmentedControl.selectedSegmentIndex == 1) { + self.slider.enabled = NO; + self.sizeLabel.text = NSLocalizedString(@"No filter",@""); + } self.templateFilterCommand = @"e$template_filter 0"; self.mazeSizeCommand = @"e$maze_size 0"; self.mapGenCommand = @"e$mapgen 0"; self.staticMapCommand = @""; - - self.lastIndexPath = [NSIndexPath indexPathForRow:0 inSection:0]; - - oldValue = 5; - oldPage = 0; + self.missionCommand = @""; + + if (IS_IPAD()) { + [self.tableView setBackgroundView:nil]; + self.view.backgroundColor = [UIColor clearColor]; + self.tableView.separatorColor = UICOLOR_HW_YELLOW_BODER; + self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + self.tableView.rowHeight = 45; + } +} + +-(void) viewWillAppear:(BOOL)animated { + if (self.dataSourceArray == nil) + [self loadDataSourceArray]; + [super viewWillAppear:animated]; } -(void) viewDidAppear:(BOOL) animated { + [self updatePreview]; [super viewDidAppear:animated]; - [self updatePreview]; -} - -#pragma mark - -#pragma mark memory --(void) didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; } -(void) viewDidUnload { @@ -562,22 +451,36 @@ self.mazeSizeCommand = nil; self.themeCommand = nil; self.staticMapCommand = nil; - + self.missionCommand = nil; + self.previewButton = nil; self.tableView = nil; self.maxLabel = nil; self.sizeLabel = nil; self.segmentedControl = nil; self.slider = nil; - + self.lastIndexPath = nil; - self.themeArray = nil; - self.mapArray = nil; - + self.dataSourceArray = nil; + MSG_DIDUNLOAD(); [super viewDidUnload]; } +-(void) didReceiveMemoryWarning { + self.dataSourceArray = nil; + + self.previewButton = nil; + self.tableView = nil; + self.maxLabel = nil; + self.sizeLabel = nil; + self.segmentedControl = nil; + self.slider = nil; + + MSG_MEMCLEAN(); + [super didReceiveMemoryWarning]; +} + -(void) dealloc { [seedCommand release]; [templateFilterCommand release]; @@ -585,20 +488,19 @@ [mazeSizeCommand release]; [themeCommand release]; [staticMapCommand release]; - + [missionCommand release]; + [previewButton release]; [tableView release]; [maxLabel release]; [sizeLabel release]; [segmentedControl release]; [slider release]; - + [lastIndexPath release]; - [themeArray release]; - [mapArray release]; - + [dataSourceArray release]; + [super dealloc]; } - @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/MapPreviewButtonView.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.h Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,49 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 26/09/2010. + */ + + +#import +#import "SDL_net.h" + +@protocol MapPreviewViewDelegate + +-(void) turnOnWidgets; +-(void) setLabelText:(NSString *)string; +-(NSDictionary *)getDataForEngine; + +@end + +@interface MapPreviewButtonView : UIButton { + id delegate; + TCPsocket sd, csd; + NSInteger maxHogs; +} + +@property (nonatomic,assign) id delegate; + + +-(void) setBackgroundImageRounded:(UIImage *)image forState:(UIControlState)state; +-(void) setImageRounded:(UIImage *)image forState:(UIControlState)state; +-(void) setImageRoundedForNormalState:(UIImage *)image; +-(void) updatePreviewWithSeed:(NSString *)seed; +-(void) updatePreviewWithFile:(NSString *)filePath; +-(NSDictionary *)getDataForEngine; + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,246 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 26/09/2010. + */ + + +#import "MapPreviewButtonView.h" +#import "MapConfigViewController.h" +#import "UIImageExtra.h" +#import + +#define INDICATOR_TAG 7654 + +@implementation MapPreviewButtonView +@synthesize delegate; + +-(id) initWithFrame:(CGRect)frame { + if ((self = [super initWithFrame:frame])) { + delegate = nil; + [self setBackgroundImageRounded:[UIImage whiteImage:frame.size] forState:UIControlStateNormal]; + } + return self; +} + +-(id) initWithCoder:(NSCoder *)aDecoder { + if ((self = [super initWithCoder:aDecoder])) { + delegate = nil; + [self setBackgroundImageRounded:[UIImage whiteImage:self.frame.size] forState:UIControlStateNormal]; + } + return self; +} + +-(void) dealloc { + self.delegate = nil; + [super dealloc]; +} + +#pragma mark - +#pragma mark image wrappers +-(void) setBackgroundImageRounded:(UIImage *)image forState:(UIControlState)state { + [self setBackgroundImage:[image makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:UIControlStateNormal]; +} + +-(void) setImageRounded:(UIImage *)image forState:(UIControlState)state { + [self setImage:[image makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:UIControlStateNormal]; +} + +-(void) setImageRoundedForNormalState:(UIImage *)image { + [self setImageRounded:image forState:UIControlStateNormal]; +} + +#pragma mark - +#pragma mark preview +-(int) sendToEngine:(NSString *)string { + unsigned char length = [string length]; + + SDLNet_TCP_Send(csd, &length, 1); + return SDLNet_TCP_Send(csd, [string UTF8String], length); +} + +-(const uint8_t *)engineProtocol { + IPaddress ip; + BOOL serverQuit = NO; + static uint8_t map[128*32]; + int port = randomPort(); + + if (SDLNet_Init() < 0) { + DLog(@"SDLNet_Init: %s", SDLNet_GetError()); + serverQuit = YES; + } + + // Resolving the host using NULL make network interface to listen + if (SDLNet_ResolveHost(&ip, NULL, port) < 0) { + DLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError()); + serverQuit = YES; + } + + // Open a connection with the IP provided (listen on the host's port) + if (!(sd = SDLNet_TCP_Open(&ip))) { + DLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), port); + serverQuit = YES; + } + + // launch the preview here so that we're sure the tcp channel is open + pthread_t thread_id; + pthread_create(&thread_id, NULL, (void *)GenLandPreview, (void *)port); + pthread_detach(thread_id); + + DLog(@"Waiting for a client on port %d", port); + while (!serverQuit) { + /* This check the sd if there is a pending connection. + * If there is one, accept that, and open a new socket for communicating */ + csd = SDLNet_TCP_Accept(sd); + if (NULL != csd) { + DLog(@"Client found"); + + NSDictionary *dictForEngine = [self getDataForEngine]; + [self sendToEngine:[dictForEngine objectForKey:@"seedCommand"]]; + [self sendToEngine:[dictForEngine objectForKey:@"templateFilterCommand"]]; + [self sendToEngine:[dictForEngine objectForKey:@"mapGenCommand"]]; + [self sendToEngine:[dictForEngine objectForKey:@"mazeSizeCommand"]]; + [self sendToEngine:@"!"]; + + memset(map, 0, 128*32); + SDLNet_TCP_Recv(csd, map, 128*32); + SDLNet_TCP_Recv(csd, &maxHogs, sizeof(uint8_t)); + + SDLNet_TCP_Close(csd); + serverQuit = YES; + } + } + + SDLNet_TCP_Close(sd); + SDLNet_Quit(); + return map; +} + +-(void) drawingThread { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + const uint8_t *map = [self engineProtocol]; + uint8_t mapExp[128*32*8]; + + // draw the buffer (1 pixel per component, 0= transparent 1= color) + int k = 0; + for (int i = 0; i < 32*128; i++) { + unsigned char byte = map[i]; + for (int j = 0; j < 8; j++) { + // select the color based on the leftmost bit + if ((byte & 0x80) != 0) + mapExp[k] = 100; + else + mapExp[k] = 255; + // shift to next bit + byte <<= 1; + k++; + } + } + CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceGray(); + CGContextRef bitmapImage = CGBitmapContextCreate(mapExp, 256, 128, 8, 256, colorspace, kCGImageAlphaNone); + CGColorSpaceRelease(colorspace); + + CGImageRef previewCGImage = CGBitmapContextCreateImage(bitmapImage); + CGContextRelease(bitmapImage); + UIImage *previewImage = [[UIImage alloc] initWithCGImage:previewCGImage]; + CGImageRelease(previewCGImage); + previewCGImage = nil; + + // all these are performed on the main thread to prevent a leak + [self performSelectorOnMainThread:@selector(setImageRoundedForNormalState:) + withObject:previewImage + waitUntilDone:NO]; + [previewImage release]; + [self performSelectorOnMainThread:@selector(setLabelText:) + withObject:[NSString stringWithFormat:@"%d", maxHogs] + waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(turnOnWidgets) + withObject:nil + waitUntilDone:NO]; + [self performSelectorOnMainThread:@selector(removeIndicator) + withObject:nil + waitUntilDone:NO]; + + [pool release]; + + /* + // http://developer.apple.com/mac/library/qa/qa2001/qa1037.html + UIGraphicsBeginImageContext(CGSizeMake(256,128)); + CGContextRef context = UIGraphicsGetCurrentContext(); + UIGraphicsPushContext(context); + CGContextSetRGBFillColor(context, 0.5, 0.5, 0.7, 1.0); + CGContextFillRect(context,CGRectMake(xc,yc,1,1)); + UIGraphicsPopContext(); + UIImage *previewImage = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + */ +} + +-(void) updatePreviewWithSeed:(NSString *)seed { + // remove the current preview and title + [self setImage:nil forState:UIControlStateNormal]; + [self setTitle:nil forState:UIControlStateNormal]; + + // don't display preview on slower device, too slow and memory hog + NSString *modelId = modelType(); + if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"]) { + //self.delegate.busy = NO; + [self setTitle:NSLocalizedString(@"Preview not available",@"") forState:UIControlStateNormal]; + } else { + // add a very nice spinning wheel + UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] + initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; + indicator.center = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2); + indicator.tag = INDICATOR_TAG; + [indicator startAnimating]; + [self addSubview:indicator]; + [indicator release]; + + // let's draw in a separate thread so the gui can work; at the end it restore other widgets + [NSThread detachNewThreadSelector:@selector(drawingThread) toTarget:self withObject:nil]; + } +} + +-(void) updatePreviewWithFile:(NSString *)filePath { + UIImage *image = [[UIImage alloc] initWithContentsOfFile:filePath]; + [self setImageRounded:image forState:UIControlStateNormal]; + [image release]; +} + +-(void) removeIndicator { + UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)[self viewWithTag:INDICATOR_TAG]; + if (indicator) { + [indicator stopAnimating]; + [indicator removeFromSuperview]; + } +} + +#pragma mark - +#pragma mark delegate +-(void) turnOnWidgets { + [self.delegate turnOnWidgets]; +} + +-(void) setLabelText:(NSString *)string { + [self.delegate setLabelText:string]; +} + +-(NSDictionary *)getDataForEngine { + return [self.delegate getDataForEngine]; +} + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/MasterViewController.h --- a/project_files/HedgewarsMobile/Classes/MasterViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/MasterViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// MasterViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 27/03/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 27/03/2010. + */ + #import @@ -14,18 +27,20 @@ @class TeamSettingsViewController; @class WeaponSettingsViewController; @class SchemeSettingsViewController; +@class SupportViewController; @interface MasterViewController : UITableViewController { - DetailViewController *detailViewController; + MasterViewController *targetController; NSArray *controllerNames; NSIndexPath *lastIndexPath; GeneralSettingsViewController *generalSettingsViewController; TeamSettingsViewController *teamSettingsViewController; WeaponSettingsViewController *weaponSettingsViewController; SchemeSettingsViewController *schemeSettingsViewController; + SupportViewController *supportViewController; } -@property (nonatomic, retain) DetailViewController *detailViewController; +@property (nonatomic, retain) MasterViewController *targetController; @property (nonatomic, retain) NSArray *controllerNames; @property (nonatomic, retain) NSIndexPath *lastIndexPath; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/MasterViewController.m --- a/project_files/HedgewarsMobile/Classes/MasterViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/MasterViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,21 +1,34 @@ -// -// MasterViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 27/03/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 27/03/2010. + */ + #import "MasterViewController.h" -#import "DetailViewController.h" +#import "CommodityFunctions.h" #import "GeneralSettingsViewController.h" #import "TeamSettingsViewController.h" #import "WeaponSettingsViewController.h" #import "SchemeSettingsViewController.h" -#import "CommodityFunctions.h" +#import "SupportViewController.h" @implementation MasterViewController -@synthesize detailViewController, controllerNames, lastIndexPath; +@synthesize targetController, controllerNames, lastIndexPath; -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { @@ -27,22 +40,33 @@ #pragma mark View lifecycle -(void) viewDidLoad { [super viewDidLoad]; - + // the list of selectable controllers - controllerNames = [[NSArray alloc] initWithObjects:NSLocalizedString(@"General",@""), - NSLocalizedString(@"Teams",@""), - NSLocalizedString(@"Weapons",@""), - NSLocalizedString(@"Schemes",@""), - nil]; - // the "Done" button on top left - self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone - target:self - action:@selector(dismissSplitView)]; + NSArray *array = [[NSArray alloc] initWithObjects:NSLocalizedString(@"General",@""), + NSLocalizedString(@"Teams",@""), + NSLocalizedString(@"Weapons",@""), + NSLocalizedString(@"Schemes",@""), + NSLocalizedString(@"Support",@""), + nil]; + self.controllerNames = array; + [array release]; + + // targetControllers tells whether we're on the right or left side of the splitview -- on iphone we only use the right side + if (targetController == nil && IS_IPAD()) { + if (nil == generalSettingsViewController) + generalSettingsViewController = [[GeneralSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped]; + generalSettingsViewController.navigationItem.hidesBackButton = YES; + [generalSettingsViewController viewWillAppear:YES]; + [self.navigationController pushViewController:generalSettingsViewController animated:NO]; + } else { + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone + target:self + action:@selector(dismissSplitView)]; + } } #pragma mark - #pragma mark Table view data source - -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { return 1; } @@ -54,13 +78,44 @@ // Customize the appearance of table view cells. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; - + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { + if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; - cell.textLabel.text = [controllerNames objectAtIndex:[indexPath row]]; + + NSString *iconStr = nil; + switch ([indexPath row]) { + case 0: + iconStr = [NSString stringWithFormat:@"%@/TargetBee.png",GRAPHICS_DIRECTORY()]; + break; + case 1: + iconStr = [NSString stringWithFormat:@"%@/Egg.png",GRAPHICS_DIRECTORY()]; + break; + case 2: + iconStr = [NSString stringWithFormat:@"%@/Molotov.png",GRAPHICS_DIRECTORY()]; + break; + case 3: + iconStr = [NSString stringWithFormat:@"%@/Target.png",GRAPHICS_DIRECTORY()]; + break; + case 4: + iconStr = [NSString stringWithFormat:@"%@/Seduction.png",GRAPHICS_DIRECTORY()]; + break; + default: + //seduction.png for support page + DLog(@"Nope"); + break; } + if (nil == targetController) + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + else + cell.accessoryType = UITableViewCellAccessoryNone; + + cell.textLabel.text = [controllerNames objectAtIndex:[indexPath row]]; + UIImage *icon = [[UIImage alloc] initWithContentsOfFile:iconStr]; + cell.imageView.image = icon; + [icon release]; + return cell; } @@ -70,11 +125,11 @@ int newRow = [indexPath row]; int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; UIViewController *nextController = nil; - + if (newRow != oldRow) { [self.tableView deselectRowAtIndexPath:lastIndexPath animated:YES]; - [detailViewController.navigationController popToRootViewControllerAnimated:NO]; - + [targetController.navigationController popToRootViewControllerAnimated:NO]; + switch (newRow) { case 0: if (nil == generalSettingsViewController) @@ -96,13 +151,25 @@ schemeSettingsViewController = [[SchemeSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped]; nextController = schemeSettingsViewController; break; + case 4: + if (nil == supportViewController) + supportViewController = [[SupportViewController alloc] initWithNibName:@"SupportViewController" bundle:nil]; + nextController = supportViewController; + break; } - - nextController.navigationItem.hidesBackButton = YES; + nextController.title = [controllerNames objectAtIndex:newRow]; - [detailViewController.navigationController pushViewController:nextController animated:NO]; self.lastIndexPath = indexPath; [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; + + if (nil == targetController) { + nextController.navigationItem.hidesBackButton = NO; + [self.navigationController pushViewController:nextController animated:YES]; + } else { + playSound(@"clickSound"); + nextController.navigationItem.hidesBackButton = YES; + [targetController.navigationController pushViewController:nextController animated:NO]; + } } } @@ -110,9 +177,6 @@ #pragma mark - #pragma mark Memory management -(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - // Relinquish ownership any cached data, images, etc that aren't in use. if (generalSettingsViewController.view.superview == nil) generalSettingsViewController = nil; if (teamSettingsViewController.view.superview == nil) @@ -121,33 +185,39 @@ weaponSettingsViewController = nil; if (schemeSettingsViewController.view.superview == nil) schemeSettingsViewController = nil; + if (supportViewController.view.superview == nil) + supportViewController = nil; MSG_MEMCLEAN(); + [super didReceiveMemoryWarning]; } -(void) viewDidUnload { - self.detailViewController = nil; + self.targetController = nil; self.controllerNames = nil; self.lastIndexPath = nil; generalSettingsViewController = nil; teamSettingsViewController = nil; weaponSettingsViewController = nil; schemeSettingsViewController = nil; + supportViewController = nil; MSG_DIDUNLOAD(); [super viewDidUnload]; } -(void) dealloc { + targetController = nil; [controllerNames release]; - [detailViewController release]; [lastIndexPath release]; [generalSettingsViewController release]; [teamSettingsViewController release]; [weaponSettingsViewController release]; [schemeSettingsViewController release]; + [supportViewController release]; [super dealloc]; } -(IBAction) dismissSplitView { + playSound(@"backSound"); [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissModalView" object:nil]; } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/OverlayViewController.h --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,36 +1,68 @@ -// -// overlayViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 16/03/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 16/03/2010. + */ + #import #import "SDL_sysvideo.h" @class InGameMenuViewController; +@class HelpPageViewController; +@class AmmoMenuViewController; @interface OverlayViewController : UIViewController { // the timer that dims the overlay NSTimer *dimTimer; // the in-game menu - UIPopoverController *popoverController; // iPad only + UIPopoverController *popoverController; // iPad only, never set on iPhone InGameMenuViewController *popupMenu; BOOL isPopoverVisible; + + // the help menu + HelpPageViewController *helpPage; + + // the objc ammomenu + AmmoMenuViewController *amvc; + BOOL wasVisible; // ths touch section CGFloat initialDistanceForPinching; CGPoint startingPoint; BOOL isSegmentVisible; + BOOL isAttacking; - // the sdl window underneath - SDL_Window *sdlwindow; + // stuff initialized externally + BOOL isNetGame; + BOOL useClassicMenu; + + // dual head support + NSInteger initialScreenCount; + NSInteger a, b; } @property (nonatomic,retain) id popoverController; @property (nonatomic,retain) InGameMenuViewController *popupMenu; +@property (nonatomic,retain) HelpPageViewController *helpPage; +@property (nonatomic,retain) AmmoMenuViewController *amvc; +@property (assign) BOOL isNetGame; +@property (assign) BOOL useClassicMenu; -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; @@ -44,8 +76,14 @@ -(void) dismissPopover; -(void) dimOverlay; -(void) activateOverlay; +-(void) cleanup; @end +// actual game started (controls should be enabled) BOOL isGameRunning; - +void setGameRunning(BOOL value); +// black screen present +BOOL isReplay; +// cache the grenade time +NSInteger cachedGrenadeTime; \ No newline at end of file diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/OverlayViewController.m --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,161 +1,291 @@ -// -// overlayViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 16/03/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 16/03/2010. + */ + #import "OverlayViewController.h" #import "SDL_uikitappdelegate.h" +#import "InGameMenuViewController.h" +#import "HelpPageViewController.h" +#import "AmmoMenuViewController.h" #import "PascalImports.h" +#import "CommodityFunctions.h" #import "CGPointUtils.h" +#import "SDL_config_iphoneos.h" #import "SDL_mouse.h" -#import "InGameMenuViewController.h" -#import "CommodityFunctions.h" -#import "SDL_config_iphoneos.h" #define HIDING_TIME_DEFAULT [NSDate dateWithTimeIntervalSinceNow:2.7] #define HIDING_TIME_NEVER [NSDate dateWithTimeIntervalSinceNow:10000] -#define doDim() [dimTimer setFireDate:HIDING_TIME_DEFAULT] +#define doDim() [dimTimer setFireDate: (IS_DUALHEAD()) ? HIDING_TIME_NEVER : HIDING_TIME_DEFAULT] #define doNotDim() [dimTimer setFireDate:HIDING_TIME_NEVER] #define CONFIRMATION_TAG 5959 #define GRENADE_TAG 9595 +#define REPLAYBLACKVIEW_TAG 9955 +#define ACTIVITYINDICATOR_TAG 987654 #define ANIMATION_DURATION 0.25 -#define removeConfirmationInput() [[self.view viewWithTag:CONFIRMATION_TAG] removeFromSuperview]; +#define removeConfirmationInput() [[self.view viewWithTag:CONFIRMATION_TAG] removeFromSuperview]; @implementation OverlayViewController -@synthesize popoverController, popupMenu; +@synthesize popoverController, popupMenu, helpPage, amvc, isNetGame, useClassicMenu; +#pragma mark - +#pragma mark rotation -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { return rotationManager(interfaceOrientation); } --(void) didRotate:(NSNotification *)notification { +// pause the game and remove objc menus so that animation is smoother +-(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation) toInterfaceOrientation duration:(NSTimeInterval) duration{ + [self dismissPopover]; + if (HW_isPaused() == NO) + HW_pause(); + if (self.amvc.isVisible && IS_DUALHEAD() == NO) { + [self.amvc disappear]; + wasVisible = YES; + } else + wasVisible = NO; + + [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; +} + +// now restore previous state +-(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation) fromInterfaceOrientation { + if (wasVisible || IS_DUALHEAD()) + [self.amvc appearInView:self.view]; + if (HW_isPaused() == YES) + HW_pause(); + + [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; +} + +// rotate the sdl view according to the orientation -- the uiview is autorotated +-(void) didRotate:(NSNotification *)notification { UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; - CGRect rect = [[UIScreen mainScreen] bounds]; - CGRect usefulRect = CGRectMake(0, 0, rect.size.width, rect.size.height); UIView *sdlView = [[[UIApplication sharedApplication] keyWindow] viewWithTag:SDL_VIEW_TAG]; + CGRect screenRect = [[UIScreen mainScreen] bounds]; [UIView beginAnimations:@"rotation" context:NULL]; - [UIView setAnimationDuration:0.8f]; - [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; + [UIView setAnimationDuration:0.7]; switch (orientation) { case UIDeviceOrientationLandscapeLeft: - sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(0)); - self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90)); - HW_setLandscape(YES); + if (IS_DUALHEAD()) { + self.view.frame = CGRectMake(0, 0, screenRect.size.width, screenRect.size.height); + self.view.transform = CGAffineTransformMakeRotation(degreesToRadians(90)); + } else + sdlView.transform = CGAffineTransformMakeRotation(degreesToRadians(a)); break; case UIDeviceOrientationLandscapeRight: - sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(180)); - self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-90)); - HW_setLandscape(YES); + if (IS_DUALHEAD()) { + self.view.frame = CGRectMake(0, 0, screenRect.size.width, screenRect.size.height); + self.view.transform = CGAffineTransformMakeRotation(degreesToRadians(-90)); + } else + sdlView.transform = CGAffineTransformMakeRotation(degreesToRadians(b)); break; - /* - case UIDeviceOrientationPortrait: - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(270)); - self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(0)); - [self chatAppear]; - HW_setLandscape(NO); - } - break; - case UIDeviceOrientationPortraitUpsideDown: - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(90)); - self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(180)); - [self chatAppear]; - HW_setLandscape(NO); - } - break; - */ default: + // a debug log would spam too much break; } - self.view.frame = usefulRect; - //sdlView.frame = usefulRect; [UIView commitAnimations]; + + // for single screens only landscape mode is supported + // for dual screen mode the sdlview is not modified, but you can rotate the pad in any direction } #pragma mark - #pragma mark View Management +-(id) initWithCoder:(NSCoder *)aDecoder { + if ((self = [super initWithCoder:aDecoder])) { + isGameRunning = NO; + isReplay = NO; + cachedGrenadeTime = 2; + + isAttacking = NO; + wasVisible = NO; + isPopoverVisible = NO; // it is called "popover" even on the iphone + } + return self; +} + -(void) viewDidLoad { - isPopoverVisible = NO; + CGRect screenRect = [[UIScreen mainScreen] bounds]; + self.view.frame = CGRectMake(0, 0, screenRect.size.height, screenRect.size.width); + self.view.center = CGPointMake(self.view.frame.size.height/2, self.view.frame.size.width/2); self.view.alpha = 0; - self.view.center = CGPointMake(self.view.frame.size.height/2.0, self.view.frame.size.width/2.0); - - // set initial orientation - UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; - UIView *sdlView = [[[UIApplication sharedApplication] keyWindow] viewWithTag:SDL_VIEW_TAG]; - switch (orientation) { - case UIDeviceOrientationLandscapeLeft: - sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(0)); - self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90)); - break; - case UIDeviceOrientationLandscapeRight: - sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(180)); - self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-90)); - break; - default: - break; + + // detrmine the quanitiy and direction of the rotation + if (self.interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { + a = 180; + b = 0; + } else { + a = 0; + b = 180; } - CGRect rect = [[UIScreen mainScreen] bounds]; - self.view.frame = CGRectMake(0, 0, rect.size.width, rect.size.height); - - dimTimer = [[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:6] + + // get the number of screens to know the previous state whan a display is connected or detached + initialScreenCount = [[UIScreen screens] count]; + + // set initial orientation of the controller orientation + if (IS_DUALHEAD()) { + switch (self.interfaceOrientation) { + case UIDeviceOrientationLandscapeLeft: + self.view.transform = CGAffineTransformMakeRotation(degreesToRadians(90)); + break; + case UIDeviceOrientationLandscapeRight: + self.view.transform = CGAffineTransformMakeRotation(degreesToRadians(-90)); + break; + default: + DLog(@"Nope"); + break; + } + } + + // the timer used to dim the overlay + dimTimer = [[NSTimer alloc] initWithFireDate:(IS_DUALHEAD()) ? HIDING_TIME_NEVER : [NSDate dateWithTimeIntervalSinceNow:6] interval:1000 target:self selector:@selector(dimOverlay) userInfo:nil repeats:YES]; - - // add timer too runloop, otherwise it doesn't work + // add timer to runloop, otherwise it doesn't work [[NSRunLoop currentRunLoop] addTimer:dimTimer forMode:NSDefaultRunLoopMode]; - - [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; + + // become listener of some notifications + [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIDeviceOrientationDidChangeNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(showHelp:) + name:@"show help ingame" + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(cleanup) + name:@"remove overlay" + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(numberOfScreensIncreased) + name:UIScreenDidConnectNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(numberOfScreensDecreased) + name:UIScreenDidDisconnectNotification + object:nil]; + + // present the overlay [UIView beginAnimations:@"showing overlay" context:NULL]; [UIView setAnimationDuration:1]; self.view.alpha = 1; [UIView commitAnimations]; +} + +-(void) numberOfScreensIncreased { + if (initialScreenCount == 1) { + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"New display detected" + message:NSLocalizedString(@"Hedgewars supports multi-monitor configurations, but the screen has to be connected before launching the game.",@"") + delegate:nil + cancelButtonTitle:@"Ok" + otherButtonTitles:nil]; + [alert show]; + [alert release]; + if (HW_isPaused() == NO) + HW_pause(); + } +} + +-(void) numberOfScreensDecreased { + if (initialScreenCount == 2) { + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Oh noes! Display disconnected" + message:NSLocalizedString(@"A monitor has been disconnected while playing and this has ended the match! You need to restart the game if you wish to use the second display again.",@"") + delegate:nil + cancelButtonTitle:@"Ok" + otherButtonTitles:nil]; + [alert show]; + [alert release]; + [self cleanup]; + } +} + + +-(void) showHelp:(id) sender { + if (self.helpPage == nil) + self.helpPage = [[HelpPageViewController alloc] initWithNibName:@"HelpPageInGameViewController" bundle:nil]; + self.helpPage.view.alpha = 0; + [self.view addSubview:helpPage.view]; + [UIView beginAnimations:@"helpingame" context:NULL]; + self.helpPage.view.alpha = 1; + [UIView commitAnimations]; + doNotDim(); +} + +-(void) cleanup { + [self dismissPopover]; + HW_terminate(NO); + [self.view removeFromSuperview]; +} + +-(void) didReceiveMemoryWarning { + if (self.popupMenu.view.superview == nil) + self.popupMenu = nil; + if (self.helpPage.view.superview == nil) + self.helpPage = nil; + if (self.amvc.view.superview == nil) + self.amvc = nil; + if (IS_IPAD()) + if (((UIPopoverController *)self.popoverController).contentViewController.view.superview == nil) + self.popoverController = nil; - // find the sdl window we're on - SDL_VideoDevice *_this = SDL_GetVideoDevice(); - SDL_VideoDisplay *display = &_this->displays[0]; - sdlwindow = display->windows; + MSG_MEMCLEAN(); + [super didReceiveMemoryWarning]; } -(void) viewDidUnload { - // only object initialized in viewDidLoad should be here + // only objects initialized in viewDidLoad should be here + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [NSObject cancelPreviousPerformRequestsWithTarget:self + selector:@selector(unsetPreciseStatus) + object:nil]; dimTimer = nil; + self.helpPage = nil; + [self dismissPopover]; + self.popoverController = nil; + self.amvc = nil; MSG_DIDUNLOAD(); [super viewDidUnload]; } --(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - // Release any cached data, images, etc that aren't in use. - if (popupMenu.view.superview == nil) - popupMenu = nil; - MSG_MEMCLEAN(); -} - - -(void) dealloc { [popupMenu release]; + [helpPage release]; [popoverController release]; + [amvc release]; // dimTimer is autoreleased [super dealloc]; } #pragma mark - -#pragma mark Overlay actions and members +#pragma mark overlay user interaction // nice transition for dimming, should be called only by the timer himself -(void) dimOverlay { if (isGameRunning) { @@ -174,11 +304,11 @@ // dim the overlay when there's no more input for a certain amount of time -(IBAction) buttonReleased:(id) sender { - if (!isGameRunning) + if (isGameRunning == NO) return; - + UIButton *theButton = (UIButton *)sender; - + switch (theButton.tag) { case 0: case 1: @@ -199,40 +329,43 @@ break; } + isAttacking = NO; doDim(); } -// issue certain action based on the tag of the button +// issue certain action based on the tag of the button -(IBAction) buttonPressed:(id) sender { [self activateOverlay]; - if (isPopoverVisible) { + + if (isGameRunning == NO) + return; + + if (isPopoverVisible) [self dismissPopover]; - } - - if (!isGameRunning) - return; UIButton *theButton = (UIButton *)sender; - switch (theButton.tag) { case 0: - HW_walkLeft(); + if (isAttacking == NO) + HW_walkLeft(); break; case 1: - HW_walkRight(); + if (isAttacking == NO) + HW_walkRight(); break; case 2: [self performSelector:@selector(unsetPreciseStatus) withObject:nil afterDelay:0.8]; - HW_preciseSet(YES); + HW_preciseSet(!HW_isWeaponRope()); HW_aimUp(); break; case 3: [self performSelector:@selector(unsetPreciseStatus) withObject:nil afterDelay:0.8]; - HW_preciseSet(YES); + HW_preciseSet(!HW_isWeaponRope()); HW_aimDown(); break; case 4: HW_shoot(); + isAttacking = YES; break; case 5: HW_jump(); @@ -240,17 +373,36 @@ case 6: HW_backjump(); break; - case 7: - HW_tab(); - break; case 10: + playSound(@"clickSound"); HW_pause(); + if (self.amvc.isVisible && IS_DUALHEAD() == NO) { + doDim(); + [self.amvc disappear]; + } removeConfirmationInput(); [self showPopover]; break; case 11: + playSound(@"clickSound"); removeConfirmationInput(); - HW_ammoMenu(); + + if (IS_DUALHEAD() || self.useClassicMenu == NO) { + if (self.amvc == nil) + self.amvc = [[AmmoMenuViewController alloc] init]; + + if (self.amvc.isVisible) { + doDim(); + [self.amvc disappear]; + } else { + if (HW_isAmmoMenuNotAllowed() == NO) { + doNotDim(); + [self.amvc appearInView:self.view]; + } + } + } else { + HW_ammoMenu(); + } break; default: DLog(@"Nope"); @@ -262,12 +414,28 @@ HW_preciseSet(NO); } +-(void) sendHWClick { + HW_click(); + removeConfirmationInput(); + doDim(); +} + +-(void) setGrenadeTime:(id) sender { + UISegmentedControl *theSegment = (UISegmentedControl *)sender; + if (cachedGrenadeTime != theSegment.selectedSegmentIndex) { + HW_setGrenadeTime(theSegment.selectedSegmentIndex + 1); + cachedGrenadeTime = theSegment.selectedSegmentIndex; + } +} + +#pragma mark - +#pragma mark other menu // present a further check before closing game -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex { if ([actionSheet cancelButtonIndex] != buttonIndex) - HW_terminate(NO); + [self cleanup]; else - HW_pause(); + HW_pause(); } // show up a popover containing a popupMenuViewController; we hook it with setPopoverContentSize @@ -276,27 +444,27 @@ CGRect screen = [[UIScreen mainScreen] bounds]; isPopoverVisible = YES; - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - if (popupMenu == nil) - popupMenu = [[InGameMenuViewController alloc] initWithStyle:UITableViewStylePlain]; - if (popoverController == nil) { - popoverController = [[UIPopoverController alloc] initWithContentViewController:popupMenu]; - [popoverController setPopoverContentSize:CGSizeMake(220, 170) animated:YES]; - [popoverController setPassthroughViews:[NSArray arrayWithObject:self.view]]; + if (IS_IPAD()) { + if (self.popupMenu == nil) + self.popupMenu = [[InGameMenuViewController alloc] initWithStyle:UITableViewStylePlain]; + if (self.popoverController == nil) { + self.popoverController = [[UIPopoverController alloc] initWithContentViewController:self.popupMenu]; + [self.popoverController setPopoverContentSize:CGSizeMake(220, 170) animated:YES]; + [self.popoverController setPassthroughViews:[NSArray arrayWithObject:self.view]]; } - [popoverController presentPopoverFromRect:CGRectMake(screen.size.height / 2, screen.size.width / 2, 1, 1) + [self.popoverController presentPopoverFromRect:CGRectMake(screen.size.height / 2, screen.size.width / 2, 1, 1) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; } else { - if (popupMenu == nil) - popupMenu = [[InGameMenuViewController alloc] initWithStyle:UITableViewStyleGrouped]; - + if (self.popupMenu == nil) + self.popupMenu = [[InGameMenuViewController alloc] initWithStyle:UITableViewStyleGrouped]; + [self.view addSubview:popupMenu.view]; - [popupMenu present]; + [self.popupMenu present]; } - popupMenu.tableView.scrollEnabled = NO; + self.popupMenu.tableView.scrollEnabled = NO; } // on ipad just dismiss it, on iphone transtion to the right @@ -305,12 +473,12 @@ isPopoverVisible = NO; if (HW_isPaused()) HW_pause(); - - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - [(InGameMenuViewController *)popoverController.contentViewController removeChat]; - [popoverController dismissPopoverAnimated:YES]; + + if (IS_IPAD()) { + [(InGameMenuViewController *)[[self popoverController] contentViewController] removeChat]; + [self.popoverController dismissPopoverAnimated:YES]; } else { - [popupMenu dismiss]; + [self.popupMenu dismiss]; } [self buttonReleased:nil]; } @@ -321,24 +489,31 @@ -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSSet *allTouches = [event allTouches]; UITouch *first, *second; - + + if (isGameRunning == NO) + return; + // hide in-game menu if (isPopoverVisible) [self dismissPopover]; - + + if (self.amvc.isVisible && IS_DUALHEAD() == NO) { + doDim(); + [self.amvc disappear]; + } // reset default dimming doDim(); - + HW_setPianoSound([allTouches count]); - + switch ([allTouches count]) { - case 1: + case 1: removeConfirmationInput(); startingPoint = [[[allTouches allObjects] objectAtIndex:0] locationInView:self.view]; if (2 == [[[allTouches allObjects] objectAtIndex:0] tapCount]) HW_zoomReset(); break; - case 2: + case 2: // pinching first = [[allTouches allObjects] objectAtIndex:0]; second = [[allTouches allObjects] objectAtIndex:1]; @@ -349,26 +524,27 @@ } } - //if (currentPosition.y < screen.size.width - 130 || (currentPosition.x > 130 && currentPosition.x < screen.size.height - 130)) { - -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { CGRect screen = [[UIScreen mainScreen] bounds]; NSSet *allTouches = [event allTouches]; CGPoint currentPosition = [[[allTouches allObjects] objectAtIndex:0] locationInView:self.view]; + + if (isGameRunning == NO) + return; switch ([allTouches count]) { case 1: // if we're in the menu we just click in the point - if (HW_isAmmoOpen()) { - HW_setCursor(HWX(currentPosition.x), HWY(currentPosition.y)); + if (HW_isAmmoMenuOpen()) { + HW_setCursor(HWXZ(currentPosition.x), HWYZ(currentPosition.y)); // this click doesn't need any wrapping because the ammoMenu already limits the cursor HW_click(); - } else + } else // if weapon requires a further click, ask for tapping again if (HW_isWeaponRequiringClick()) { // here don't have to wrap thanks to isCursorVisible magic HW_setCursor(HWX(currentPosition.x), HWY(currentPosition.y)); - + // draw the button at the last touched point (which is the current position) UIButton *tapAgain = [UIButton buttonWithType:UIButtonTypeRoundedRect]; tapAgain.frame = CGRectMake(currentPosition.x - 75, currentPosition.y + 25, 150, 40); @@ -377,13 +553,13 @@ [tapAgain addTarget:self action:@selector(sendHWClick) forControlEvents:UIControlEventTouchUpInside]; [tapAgain setTitle:NSLocalizedString(@"Tap to set!",@"from the overlay") forState:UIControlStateNormal]; [self.view addSubview:tapAgain]; - + // animation ftw! - [UIView beginAnimations:@"inserting button" context:NULL]; + [UIView beginAnimations:@"inserting button" context:NULL]; [UIView setAnimationDuration:ANIMATION_DURATION]; [self.view viewWithTag:CONFIRMATION_TAG].alpha = 1; [UIView commitAnimations]; - + // keep the overlay active, or the button will fade [self activateOverlay]; doNotDim(); @@ -391,35 +567,35 @@ if (HW_isWeaponTimerable()) { if (isSegmentVisible) { UISegmentedControl *grenadeTime = (UISegmentedControl *)[self.view viewWithTag:GRENADE_TAG]; - + [UIView beginAnimations:@"removing segmented control" context:NULL]; [UIView setAnimationDuration:ANIMATION_DURATION]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; grenadeTime.frame = CGRectMake(screen.size.height / 2 - 125, screen.size.width, 250, 50); [UIView commitAnimations]; - + [grenadeTime performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:ANIMATION_DURATION]; } else { NSArray *items = [[NSArray alloc] initWithObjects:@"1",@"2",@"3",@"4",@"5",nil]; UISegmentedControl *grenadeTime = [[UISegmentedControl alloc] initWithItems:items]; [items release]; - + [grenadeTime addTarget:self action:@selector(setGrenadeTime:) forControlEvents:UIControlEventValueChanged]; grenadeTime.frame = CGRectMake(screen.size.height / 2 - 125, screen.size.width, 250, 50); - grenadeTime.selectedSegmentIndex = 2; + grenadeTime.selectedSegmentIndex = cachedGrenadeTime; grenadeTime.tag = GRENADE_TAG; [self.view addSubview:grenadeTime]; [grenadeTime release]; - + [UIView beginAnimations:@"inserting segmented control" context:NULL]; [UIView setAnimationDuration:ANIMATION_DURATION]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; grenadeTime.frame = CGRectMake(screen.size.height / 2 - 125, screen.size.width - 100, 250, 50); [UIView commitAnimations]; - + [self activateOverlay]; doNotDim(); - } + } isSegmentVisible = !isSegmentVisible; } else if (HW_isWeaponSwitch()) @@ -431,21 +607,10 @@ default: break; } - + initialDistanceForPinching = 0; } --(void) sendHWClick { - HW_click(); - removeConfirmationInput(); - doDim(); -} - --(void) setGrenadeTime:(id) sender { - UISegmentedControl *theSegment = (UISegmentedControl *)sender; - HW_setGrenadeTime(theSegment.selectedSegmentIndex + 1); -} - -(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { [self touchesEnded:touches withEvent:event]; } @@ -454,35 +619,43 @@ CGRect screen = [[UIScreen mainScreen] bounds]; NSSet *allTouches = [event allTouches]; int x, y, dx, dy; - UITouch *touch, *first, *second; + if (isGameRunning == NO) + return; + switch ([allTouches count]) { case 1: touch = [[allTouches allObjects] objectAtIndex:0]; CGPoint currentPosition = [touch locationInView:self.view]; - if (HW_isAmmoOpen() || HW_isWeaponRequiringClick()) { - // moves the cursor around - HW_setCursor(HWX(currentPosition.x), HWY(currentPosition.y)); - } else { - // panning \o/ - dx = startingPoint.x - currentPosition.x; - dy = currentPosition.y - startingPoint.y; - HW_getCursor(&x, &y); - // momentum (or something like that) - if (abs(dx) > 40) dx *= log(abs(dx)/4); - if (abs(dy) > 40) dy *= log(abs(dy)/4); - HW_setCursor(x + dx, y + dy); - startingPoint = currentPosition; - } + if (HW_isAmmoMenuOpen()) { + // no zoom consideration for this + HW_setCursor(HWXZ(currentPosition.x), HWYZ(currentPosition.y)); + } else + if (HW_isWeaponRequiringClick()) { + // moves the cursor around wrt zoom + HW_setCursor(HWX(currentPosition.x), HWY(currentPosition.y)); + } else { + // panning \o/ + dx = startingPoint.x - currentPosition.x; + dy = currentPosition.y - startingPoint.y; + HW_getCursor(&x, &y); + // momentum (or something like that) + /*if (abs(dx) > 40) + dx *= log(abs(dx)/4); + if (abs(dy) > 40) + dy *= log(abs(dy)/4);*/ + HW_setCursor(x + dx/HW_zoomFactor(), y + dy/HW_zoomFactor()); + startingPoint = currentPosition; + } break; case 2: first = [[allTouches allObjects] objectAtIndex:0]; second = [[allTouches allObjects] objectAtIndex:1]; CGFloat currentDistanceOfPinching = distanceBetweenPoints([first locationInView:self.view], [second locationInView:self.view]); const int pinchDelta = 40; - + if (0 != initialDistanceForPinching) { if (currentDistanceOfPinching - initialDistanceForPinching > pinchDelta) { HW_zoomIn(); @@ -492,49 +665,106 @@ HW_zoomOut(); initialDistanceForPinching = currentDistanceOfPinching; } - } else + } else initialDistanceForPinching = currentDistanceOfPinching; - break; default: + DLog(@"Nope"); break; } } #pragma mark - -#pragma mark Functions called by pascal -// called from AddProgress and FinishProgress (respectively) +#pragma mark Functions called by pascal code +void inline setGameRunning(BOOL value) { + isGameRunning = value; +} + +// called by uStore from AddProgress void startSpinning() { - isGameRunning = NO; - CGRect screen = [[UIScreen mainScreen] bounds]; + setGameRunning(NO); + UIWindow *theWindow = [[UIApplication sharedApplication] keyWindow]; UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; - indicator.tag = 987654; - indicator.center = CGPointMake(screen.size.width/2 - 118, screen.size.height/2); + indicator.tag = ACTIVITYINDICATOR_TAG; + int offset; + if ([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft) + offset = -120; + else + offset = 120; + if (IS_DUALHEAD()) + indicator.center = CGPointMake(theWindow.frame.size.width/2, theWindow.frame.size.height/2 + offset); + else + indicator.center = CGPointMake(theWindow.frame.size.width/2 + offset, theWindow.frame.size.height/2); indicator.hidesWhenStopped = YES; [indicator startAnimating]; - [[[[UIApplication sharedApplication] keyWindow] viewWithTag:SDL_VIEW_TAG] addSubview:indicator]; + [theWindow addSubview:indicator]; [indicator release]; } +// called by uStore from FinishProgress and by OverlayViewController by replayBegan void stopSpinning() { - UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)[[[[UIApplication sharedApplication] keyWindow] viewWithTag:SDL_VIEW_TAG] viewWithTag:987654]; + UIWindow *theWindow = [[UIApplication sharedApplication] keyWindow]; + UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)[theWindow viewWithTag:ACTIVITYINDICATOR_TAG]; [indicator stopAnimating]; - isGameRunning = YES; + HW_zoomSet(1.7); + if (isReplay == NO) + setGameRunning(YES); } +// called by CCHandlers from chNextTurn void clearView() { - UIWindow *theWindow = [[UIApplication sharedApplication] keyWindow]; + UIWindow *theWindow = (IS_DUALHEAD()) ? [SDLUIKitDelegate sharedAppDelegate].uiwindow : [[UIApplication sharedApplication] keyWindow]; UIButton *theButton = (UIButton *)[theWindow viewWithTag:CONFIRMATION_TAG]; UISegmentedControl *theSegment = (UISegmentedControl *)[theWindow viewWithTag:GRENADE_TAG]; - + [UIView beginAnimations:@"remove button" context:NULL]; [UIView setAnimationDuration:ANIMATION_DURATION]; theButton.alpha = 0; theSegment.alpha = 0; [UIView commitAnimations]; + + if (theButton) + [theWindow performSelector:@selector(removeFromSuperview) withObject:theButton afterDelay:ANIMATION_DURATION]; + if (theSegment) + [theWindow performSelector:@selector(removeFromSuperview) withObject:theSegment afterDelay:ANIMATION_DURATION]; + + cachedGrenadeTime = 2; +} + +// called by hwengine +void replayBegan() { + UIWindow *theWindow = [[UIApplication sharedApplication] keyWindow]; + UIView *blackView = [[UIView alloc] initWithFrame:theWindow.frame]; + blackView.backgroundColor = [UIColor blackColor]; + blackView.alpha = 0.6; + blackView.tag = REPLAYBLACKVIEW_TAG; + blackView.exclusiveTouch = NO; + blackView.multipleTouchEnabled = NO; + blackView.userInteractionEnabled = NO; + UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; + indicator.center = theWindow.center; + [indicator startAnimating]; + [blackView addSubview:indicator]; + [indicator release]; + [theWindow addSubview:blackView]; + [blackView release]; + isReplay = YES; + stopSpinning(); +} + +// called by uGame +void replayFinished() { + UIWindow *theWindow = [[UIApplication sharedApplication] keyWindow]; + UIView *blackView = (UIView *)[theWindow viewWithTag:REPLAYBLACKVIEW_TAG]; - [theWindow performSelector:@selector(removeFromSuperview) withObject:theButton afterDelay:0.3]; - [theWindow performSelector:@selector(removeFromSuperview) withObject:theSegment afterDelay:0.3]; + [UIView beginAnimations:@"removing black" context:NULL]; + [UIView setAnimationDuration:1]; + blackView.alpha = 0; + [UIView commitAnimations]; + [theWindow performSelector:@selector(removeFromSuperview) withObject:blackView afterDelay:1]; + + setGameRunning(YES); + isReplay = NO; } @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/PascalImports.h --- a/project_files/HedgewarsMobile/Classes/PascalImports.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/PascalImports.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,70 +1,99 @@ /* - * PascalImports.h -// fpciphonedel -// -// Created by Vittorio on 07/01/10. -// Copyright __MyCompanyName__ 2010. All rights reserved. + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 07/01/2010. */ + #ifndef PASCALIMPORTS #define PASCALIMPORTS #ifdef __cplusplus extern "C" { #endif - + /* add C declarations below for all exported Pascal functions/procedure * that you want to use */ void Game(const char *args[]); void GenLandPreview(void); - + void LoadLocaleWrapper(const char *filename); void HW_versionInfo(short int *netProto, char **versionStr); void HW_click(void); + void HW_ammoMenu(void); + void HW_zoomSet(float value); void HW_zoomIn(void); void HW_zoomOut(void); void HW_zoomReset(void); - void HW_ammoMenu(void); - + float HW_zoomFactor(void); + int HW_zoomLevel(void); + void HW_walkingKeysUp(void); void HW_otherKeysUp(void); void HW_allKeysUp(void); - + void HW_walkLeft(void); void HW_walkRight(void); void HW_aimUp(void); void HW_aimDown(void); void HW_preciseSet(BOOL status); - + void HW_shoot(void); void HW_jump(void); void HW_backjump(void); - + void HW_chat(void); void HW_chatEnd(void); void HW_tab(void); void HW_pause(void); - + void HW_terminate(BOOL andCloseFrontend); - - void HW_setLandscape(BOOL rotate); + void HW_setCursor(int x, int y); void HW_getCursor(int *x, int *y); - void HW_setPianoSound(int snd); - - BOOL HW_isAmmoOpen(void); + BOOL HW_isAmmoMenuOpen(void); + BOOL HW_isAmmoMenuNotAllowed(void); BOOL HW_isPaused(void); BOOL HW_isWeaponRequiringClick(void); BOOL HW_isWeaponTimerable(void); BOOL HW_isWeaponSwitch(void); + BOOL HW_isWeaponRope(void); + + void HW_setGrenadeTime(int time); + void HW_setPianoSound(int snd); - void HW_setGrenadeTime(int time); + void HW_setWeapon(int whichone); + BOOL HW_isWeaponAnEffect(int whichone); + char *HW_getWeaponNameByIndex(int whichone); + char *HW_getWeaponCaptionByIndex(int whichone); + char *HW_getWeaponDescriptionByIndex(int whichone); + + void HW_getAmmoDelays(unsigned char *pointer); + int HW_getAmmoCounts(int *pointer); + + int HW_getNumberOfWeapons(void); + int HW_getTurnsForCurrentTeam(void); + int HW_getMaxNumberOfHogs(void); + int HW_getMaxNumberOfTeams(void); #ifdef __cplusplus } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.h --- a/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.h Wed Oct 27 14:02:20 2010 +0200 @@ -21,21 +21,24 @@ */ #import -#import "SDL_uikitopenglview.h" @class MainMenuViewController; -@class OverlayViewController; @interface SDLUIKitDelegate:NSObject { MainMenuViewController *mainViewController; + UIWindow *uiwindow; + UIWindow *secondWindow; BOOL isInGame; } +@property (assign) BOOL isInGame; @property (nonatomic,retain) MainMenuViewController *mainViewController; +@property (nonatomic,retain) UIWindow *uiwindow; +@property (nonatomic,retain) UIWindow *secondWindow; +(SDLUIKitDelegate *)sharedAppDelegate; -(void) startSDLgame:(NSDictionary *)gameDictionary; --(void) displayOverlayLater; +-(void) displayOverlayLater:(id) object; @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m --- a/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,21 +1,21 @@ /* SDL - Simple DirectMedia Layer Copyright (C) 1997-2009 Sam Lantinga - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - + Sam Lantinga, mods for Hedgewars by Vittorio Giovara slouken@libsdl.org, vittorio.giovara@gmail.com */ @@ -39,6 +39,8 @@ #undef main #endif +#define BLACKVIEW_TAG 17935 +#define SECONDBLACKVIEW_TAG 48620 #define VALGRIND "/opt/valgrind/bin/valgrind" int main (int argc, char *argv[]) { @@ -56,7 +58,7 @@ } @implementation SDLUIKitDelegate -@synthesize mainViewController; +@synthesize mainViewController, uiwindow, secondWindow, isInGame; // convenience method +(SDLUIKitDelegate *)sharedAppDelegate { @@ -67,6 +69,8 @@ -(id) init { if (self = [super init]){ mainViewController = nil; + uiwindow = nil; + secondWindow = nil; isInGame = NO; } return self; @@ -74,69 +78,133 @@ -(void) dealloc { [mainViewController release]; + [uiwindow release]; + [secondWindow release]; [super dealloc]; } // main routine for calling the actual game engine --(IBAction) startSDLgame: (NSDictionary *)gameDictionary { +-(void) startSDLgame:(NSDictionary *)gameDictionary { + UIWindow *gameWindow; + if (IS_DUALHEAD()) + gameWindow = self.secondWindow; + else + gameWindow = self.uiwindow; + + UIView *blackView = [[UIView alloc] initWithFrame:gameWindow.frame]; + blackView.backgroundColor = [UIColor blackColor]; + blackView.opaque = YES; + blackView.tag = BLACKVIEW_TAG; + [gameWindow addSubview:blackView]; + if (IS_DUALHEAD()) { + blackView.alpha = 0; + [UIView beginAnimations:@"fading to game first" context:NULL]; + [UIView setAnimationDuration:1]; + blackView.alpha = 1; + [UIView commitAnimations]; + + UIView *secondBlackView = [[UIView alloc] initWithFrame:self.uiwindow.frame]; + secondBlackView.backgroundColor = [UIColor blackColor]; + secondBlackView.opaque = YES; + secondBlackView.tag = SECONDBLACKVIEW_TAG; + secondBlackView.alpha = 0; + [self.uiwindow addSubview:secondBlackView]; + [UIView beginAnimations:@"fading to game second" context:NULL]; + [UIView setAnimationDuration:1]; + secondBlackView.alpha = 1; + [UIView commitAnimations]; + [secondBlackView release]; + } + [blackView release]; + // pull out useful configuration info from various files GameSetup *setup = [[GameSetup alloc] initWithDictionary:gameDictionary]; + NSNumber *isNetGameNum = [gameDictionary objectForKey:@"netgame"]; - [setup startThread:@"engineProtocol"]; - const char **gameArgs = [setup getSettings]; + if ([isNetGameNum boolValue] == NO) + [setup startThread:@"engineProtocol"]; + const char **gameArgs = [setup getSettings:[gameDictionary objectForKey:@"savefile"]]; + NSNumber *menuStyle = [NSNumber numberWithBool:setup.menuStyle]; [setup release]; // since the sdlwindow is not yet created, we add the overlayController with a delay - [self performSelector:@selector(displayOverlayLater) withObject:nil afterDelay:0.1]; - + NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:isNetGameNum,@"net",menuStyle,@"menu",nil]; + [self performSelector:@selector(displayOverlayLater:) withObject:dict afterDelay:1]; + // this is the pascal fuction that starts the game (wrapped around isInGame) - isInGame = YES; + self.isInGame = YES; Game(gameArgs); - isInGame = NO; + self.isInGame = NO; free(gameArgs); + + [self.uiwindow makeKeyAndVisible]; + [self.uiwindow bringSubviewToFront:self.mainViewController.view]; - // bring the uiwindow below in front - UIWindow *aWin = [[[UIApplication sharedApplication] windows] objectAtIndex:0]; - [aWin makeKeyAndVisible]; - - // notice that in the simulator this reports 2 windows - DLog(@"%@",[[UIApplication sharedApplication] windows]); + UIView *refBlackView = [gameWindow viewWithTag:BLACKVIEW_TAG]; + UIView *refSecondBlackView = [self.uiwindow viewWithTag:SECONDBLACKVIEW_TAG]; + [UIView beginAnimations:@"fading in from ingame" context:NULL]; + [UIView setAnimationDuration:1]; + refBlackView.alpha = 0; + refSecondBlackView.alpha = 0; + [UIView commitAnimations]; + [refBlackView performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1]; + [refSecondBlackView performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1]; } --(void) displayOverlayLater { - // overlay with controls, become visible later, with a transparency effect +// overlay with controls, become visible later, with a transparency effect +-(void) displayOverlayLater:(id) object { + NSDictionary *dict = (NSDictionary *)object; OverlayViewController *overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil]; - - // keyWindow is the frontmost window - [[[UIApplication sharedApplication] keyWindow] addSubview:overlayController.view]; + overlayController.isNetGame = [[dict objectForKey:@"net"] boolValue]; + overlayController.useClassicMenu = [[dict objectForKey:@"menu"] boolValue]; + + UIWindow *gameWindow; + if (IS_DUALHEAD()) + gameWindow = self.uiwindow; + else + gameWindow = [[UIApplication sharedApplication] keyWindow]; + [gameWindow addSubview:overlayController.view]; [overlayController release]; } // override the direct execution of SDL_main to allow us to implement the frontend (or even using a nib) -(void) applicationDidFinishLaunching:(UIApplication *)application { - [application setStatusBarHidden:YES]; - - UIWindow *uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + [application setStatusBarHidden:YES]; + + self.uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + + if (IS_IPAD()) self.mainViewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPad" bundle:nil]; else self.mainViewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPhone" bundle:nil]; - [uiwindow addSubview:self.mainViewController.view]; + [self.uiwindow addSubview:self.mainViewController.view]; [self.mainViewController release]; - uiwindow.backgroundColor = [UIColor blackColor]; - [uiwindow makeKeyAndVisible]; + self.uiwindow.backgroundColor = [UIColor blackColor]; + [self.uiwindow makeKeyAndVisible]; // set working directory to resource path [[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] resourcePath]]; + + // check for dual monitor support + if (IS_DUALHEAD()) { + DLog(@"dual head mode ftw"); + self.secondWindow = [[UIWindow alloc] initWithFrame:[[[UIScreen screens] objectAtIndex:1] bounds]]; + self.secondWindow.backgroundColor = [UIColor blackColor]; + self.secondWindow.screen = [[UIScreen screens] objectAtIndex:1]; + UIImage *titleImage = [UIImage imageWithContentsOfFile:@"title.png"]; + UIImageView *titleView = [[UIImageView alloc] initWithImage:titleImage]; + titleView.center = self.secondWindow.center; + [self.secondWindow addSubview:titleView]; + [titleView release]; + [self.secondWindow makeKeyAndVisible]; + } } -(void) applicationWillTerminate:(UIApplication *)application { - Mix_CloseAudio(); SDL_SendQuit(); - - if (isInGame) { + + if (self.isInGame) { HW_terminate(YES); // hack to prevent automatic termination. See SDL_uikitevents.m for details longjmp(*(jump_env()), 1); @@ -150,9 +218,9 @@ } -(void) applicationWillResignActive:(UIApplication *)application { - if (isInGame) { + if (self.isInGame) { HW_pause(); - + // Send every window on every screen a MINIMIZED event. SDL_VideoDevice *_this = SDL_GetVideoDevice(); if (!_this) @@ -169,7 +237,7 @@ } -(void) applicationDidBecomeActive:(UIApplication *)application { - if (isInGame) { + if (self.isInGame) { HW_pause(); // Send every window on every screen a RESTORED event. diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SavedGamesViewController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,38 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 22/09/2010. + */ + + +#import +#import "EditableCellView.h" + +@interface SavedGamesViewController : UIViewController { + UITableView *tableView; + NSMutableArray *listOfSavegames; +} + +@property (nonatomic,retain) IBOutlet UITableView *tableView; +@property (nonatomic,retain) NSMutableArray *listOfSavegames; + +-(IBAction) buttonPressed:(id) sender; +-(IBAction) toggleEdit:(id) sender; +-(IBAction) clearAll:(id) sender; + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SavedGamesViewController.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,242 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 22/09/2010. + */ + + +#import "SavedGamesViewController.h" +#import "SDL_uikitappdelegate.h" +#import "CommodityFunctions.h" + +@implementation SavedGamesViewController +@synthesize tableView, listOfSavegames; + +-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { + return rotationManager(interfaceOrientation); +} + +-(void) updateTable { + NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:SAVES_DIRECTORY() error:NULL]; + NSMutableArray *array = [[NSMutableArray alloc] initWithArray:contentsOfDir copyItems:YES]; + self.listOfSavegames = array; + [array release]; + + [self.tableView reloadData]; +} + +-(void) viewDidLoad { + self.tableView.backgroundView = nil; + [super viewDidLoad]; +} + +-(void) viewWillAppear:(BOOL)animated { + [self updateTable]; + [super viewWillAppear:animated]; +} + +#pragma mark - +#pragma mark button functions +-(IBAction) buttonPressed:(id) sender { + playSound(@"backSound"); + [self.tableView setEditing:NO animated:YES]; + [[self parentViewController] dismissModalViewControllerAnimated:YES]; +} + +-(IBAction) toggleEdit:(id) sender { + BOOL isEditing = self.tableView.editing; + [self.tableView setEditing:!isEditing animated:YES]; +} + +-(void) duplicateEntry:(id) sender { + UIButton *button = (UIButton *)sender; + NSUInteger row = button.tag; + + if (self.listOfSavegames == nil) + [self updateTable]; + + [(EditableCellView *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:0]] save:nil]; + NSString *currentSaveName = [self.listOfSavegames objectAtIndex:row]; + NSString *newSaveName = [[currentSaveName stringByDeletingPathExtension] stringByAppendingFormat:@" %d.hws",[self.listOfSavegames count]]; + + NSString *currentFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),currentSaveName]; + NSString *newFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),newSaveName]; + [[NSFileManager defaultManager] copyItemAtPath:currentFilePath toPath:newFilePath error:nil]; + [self.listOfSavegames addObject:newSaveName]; + [self.listOfSavegames sortUsingSelector:@selector(compare:)]; + + //[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:[self.listOfSavegames indexOfObject:newSaveName] inSection:0]] withRowAnimation:UITableViewRowAnimationFade]; + [self.tableView reloadData]; +} + +-(IBAction) clearAll:(id) sender { + NSString *titleStr, *cancelStr, *confirmStr; + if (IS_IPAD()) { + titleStr = nil; + cancelStr = nil; + confirmStr = NSLocalizedString(@"Tap to confirm",@""); + } else { + titleStr = NSLocalizedString(@"Are you reeeeeally sure?", @""); + cancelStr = NSLocalizedString(@"Well, maybe not...", @""); + confirmStr = NSLocalizedString(@"Of course!", @""); + } + + UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:titleStr + delegate:self + cancelButtonTitle:cancelStr + destructiveButtonTitle:confirmStr + otherButtonTitles:nil]; + [actionSheet showInView:self.view]; + [actionSheet release]; +} + +-(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex { + if ([actionSheet cancelButtonIndex] != buttonIndex) { + [[NSFileManager defaultManager] removeItemAtPath:SAVES_DIRECTORY() error:NULL]; + [[NSFileManager defaultManager] createDirectoryAtPath:SAVES_DIRECTORY() withIntermediateDirectories:NO attributes:nil error:NULL]; + [self updateTable]; + } +} + +#pragma mark - +#pragma mark Table view data source +-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + if (self.listOfSavegames == nil) + [self updateTable]; + return [self.listOfSavegames count]; +} + +-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + static NSString *CellIdentifier = @"Cell"; + + if (self.listOfSavegames == nil) + [self updateTable]; + EditableCellView *editableCell = (EditableCellView *)[aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (editableCell == nil) { + editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; + editableCell.delegate = self; + } + editableCell.tag = [indexPath row]; + editableCell.respectEditing = YES; + editableCell.textField.text = [[self.listOfSavegames objectAtIndex:[indexPath row]] stringByDeletingPathExtension]; + editableCell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; + + UIImage *addImg = [UIImage imageWithContentsOfFile:@"plus.png"]; + UIButton *customButton = [UIButton buttonWithType:UIButtonTypeContactAdd]; + customButton.tag = [indexPath row]; + [customButton setImage:addImg forState:UIControlStateNormal]; + [customButton addTarget:self action:@selector(duplicateEntry:) forControlEvents:UIControlEventTouchUpInside]; + editableCell.editingAccessoryView = customButton; + + return (UITableViewCell *)editableCell; +} + +-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger) section { + UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 50)]; + footer.backgroundColor = [UIColor clearColor]; + + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width*80/100, 100)]; + label.center = CGPointMake(self.tableView.frame.size.width/2,70); + label.textAlignment = UITextAlignmentCenter; + label.font = [UIFont systemFontOfSize:16]; + label.textColor = [UIColor lightGrayColor]; + label.numberOfLines = 5; + label.text = NSLocalizedString(@"Games are automatically saved and can be resumed by selecting an entry above.\nYou can modify this list by pressing the 'Edit' button.\nNotice that completed games are deleted, so make backups.",@""); + + label.backgroundColor = [UIColor clearColor]; + [footer addSubview:label]; + [label release]; + return [footer autorelease]; +} + +-(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + NSUInteger row = [indexPath row]; + [(EditableCellView *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:0]] save:nil]; + + if (self.listOfSavegames == nil) + [self updateTable]; + + NSString *saveName = [self.listOfSavegames objectAtIndex:row]; + NSString *currentFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),saveName]; + [[NSFileManager defaultManager] removeItemAtPath:currentFilePath error:nil]; + [self.listOfSavegames removeObject:saveName]; + + [self.tableView reloadData]; +} + +#pragma mark - +#pragma mark Table view delegate +-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; + if (self.listOfSavegames == nil) + [self updateTable]; + + [(EditableCellView *)[self.tableView cellForRowAtIndexPath:indexPath] save:nil]; + + NSString *filePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),[self.listOfSavegames objectAtIndex:[indexPath row]]]; + + NSDictionary *allDataNecessary = [NSDictionary dictionaryWithObjectsAndKeys: + filePath,@"savefile", + [NSNumber numberWithBool:NO],@"netgame", + [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:self.interfaceOrientation] forKey:@"orientation"],@"game_dictionary", + nil]; + [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; + [self.parentViewController dismissModalViewControllerAnimated:NO]; +} + +#pragma mark - +#pragma mark editableCellView delegate +// rename old file if names differ +-(void) saveTextFieldValue:(NSString *)textString withTag:(NSInteger) tagValue { + if (self.listOfSavegames == nil) + [self updateTable]; + NSString *oldFilePath = [NSString stringWithFormat:@"%@/%@",SAVES_DIRECTORY(),[self.listOfSavegames objectAtIndex:tagValue]]; + NSString *newFilePath = [NSString stringWithFormat:@"%@/%@.hws",SAVES_DIRECTORY(),textString]; + + if ([oldFilePath isEqualToString:newFilePath] == NO) { + [[NSFileManager defaultManager] moveItemAtPath:oldFilePath toPath:newFilePath error:nil]; + [self.listOfSavegames replaceObjectAtIndex:tagValue withObject:[textString stringByAppendingString:@".hws"]]; + } + +} + +#pragma mark - +#pragma mark Memory Management +-(void) didReceiveMemoryWarning { + self.listOfSavegames = nil; + MSG_MEMCLEAN(); + [super didReceiveMemoryWarning]; +} + +-(void) viewDidUnload { + self.tableView = nil; + self.listOfSavegames = nil; + MSG_DIDUNLOAD(); + [super viewDidUnload]; +} + +-(void) dealloc { + [tableView release]; + [listOfSavegames release]; + [super dealloc]; +} + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SavedGamesViewController.xib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/SavedGamesViewController.xib Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,619 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 292 + + YES + + + 292 + {768, 768} + + NO + IBIPadFramework + + NSImage + background_med.png + + + + + 290 + {768, 44} + + NO + 458912 + IBIPadFramework + + YES + + IBIPadFramework + 1 + + 0 + + + IBIPadFramework + + 5 + + + Clear All + IBIPadFramework + 1 + + + + IBIPadFramework + + 2 + + + + + + 274 + {{0, 44}, {768, 724}} + + + 1 + MCAwIDAgMAA + + YES + IBIPadFramework + YES + 1 + 2 + 0 + YES + 44 + 10 + 10 + + + {768, 768} + + + 3 + MQA + + NO + + 3 + + IBIPadFramework + + + + + YES + + + view + + + + 3 + + + + buttonPressed: + + + + 6 + + + + dataSource + + + + 8 + + + + delegate + + + + 9 + + + + tableView + + + + 10 + + + + toggleEdit: + + + + 14 + + + + clearAll: + + + + 16 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + YES + + + + + + + + 4 + + + YES + + + + + + + + + 5 + + + + + 7 + + + + + 11 + + + + + 12 + + + + + 13 + + + + + 15 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 11.IBPluginDependency + 12.IBPluginDependency + 13.IBPluginDependency + 15.IBPluginDependency + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 4.IBPluginDependency + 5.IBPluginDependency + 7.IBPluginDependency + + + YES + SavedGamesViewController + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{467, 276}, {768, 768}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 16 + + + + YES + + SavedGamesViewController + UIViewController + + YES + + YES + buttonPressed: + clearAll: + toggleEdit: + + + YES + id + id + id + + + + YES + + YES + buttonPressed: + clearAll: + toggleEdit: + + + YES + + buttonPressed: + id + + + clearAll: + id + + + toggleEdit: + id + + + + + tableView + UITableView + + + tableView + + tableView + UITableView + + + + IBProjectSource + Classes/SavedGamesViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIBarButtonItem + UIBarItem + + IBFrameworkSource + UIKit.framework/Headers/UIBarButtonItem.h + + + + UIBarItem + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIBarItem.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UIResponder + NSObject + + + + UIScrollView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIScrollView.h + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UITableView + UIScrollView + + IBFrameworkSource + UIKit.framework/Headers/UITableView.h + + + + UIToolbar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIToolbar.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBIPadFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../Hedgewars.xcodeproj + 3 + + background_med.png + {768, 768} + + 117 + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.h --- a/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// SchemeSettingsViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 19/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 19/04/2010. + */ + #import diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m --- a/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// SchemeSettingsViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 19/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 19/04/2010. + */ + #import "SchemeSettingsViewController.h" #import "CommodityFunctions.h" @@ -21,24 +34,23 @@ #pragma mark View lifecycle -(void) viewDidLoad { [super viewDidLoad]; - - UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"from the scheme panel") + + UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"") style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEdit:)]; self.navigationItem.rightBarButtonItem = editButton; [editButton release]; - } -(void) viewWillAppear:(BOOL) animated { [super viewWillAppear:animated]; - + NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCHEMES_DIRECTORY() error:NULL]; NSMutableArray *array = [[NSMutableArray alloc] initWithArray:contentsOfDir copyItems:YES]; self.listOfSchemes = array; [array release]; - + [self.tableView reloadData]; } @@ -46,7 +58,7 @@ -(void) toggleEdit:(id) sender { BOOL isEditing = self.tableView.editing; [self.tableView setEditing:!isEditing animated:YES]; - + if (isEditing) { [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Edit",@"from the scheme panel")]; [self.navigationItem.rightBarButtonItem setStyle: UIBarButtonItemStyleBordered]; @@ -65,15 +77,15 @@ -(void) addScheme:(id) sender { NSString *fileName = [[NSString alloc] initWithFormat:@"Scheme %u.plist", [self.listOfSchemes count]]; - + createSchemeNamed([fileName stringByDeletingPathExtension]); - + [self.listOfSchemes addObject:fileName]; [fileName release]; - + // order the array alphabetically, so schemes will keep their position [self.listOfSchemes sortUsingSelector:@selector(compare:)]; - + [self.tableView reloadData]; } @@ -89,28 +101,28 @@ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; - + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } - - NSUInteger row = [indexPath row]; - NSString *rowString = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension]; - cell.textLabel.text = rowString; + + NSUInteger row = [indexPath row]; + NSString *rowString = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension]; + cell.textLabel.text = rowString; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - + return cell; } // delete the row and the file -(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; - + NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),[self.listOfSchemes objectAtIndex:row]]; [[NSFileManager defaultManager] removeItemAtPath:schemeFile error:NULL]; [schemeFile release]; - + [self.listOfSchemes removeObjectAtIndex:row]; [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; } @@ -121,10 +133,10 @@ if (childController == nil) { childController = [[SingleSchemeViewController alloc] initWithStyle:UITableViewStyleGrouped]; } - + NSInteger row = [indexPath row]; NSString *selectedSchemeFile = [self.listOfSchemes objectAtIndex:row]; - + // this must be set so childController can load the correct plist childController.schemeName = [selectedSchemeFile stringByDeletingPathExtension]; [childController.tableView setContentOffset:CGPointMake(0,0) animated:NO]; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.h --- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// SchemeWeaponConfigViewController.h -// Hedgewars -// -// Created by Vittorio on 13/06/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 13/06/2010. + */ + #import @@ -12,7 +25,7 @@ @interface SchemeWeaponConfigViewController : UITableViewController { NSArray *listOfSchemes; NSArray *listOfWeapons; - + NSIndexPath *lastIndexPath_sc; NSIndexPath *lastIndexPath_we; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,13 +1,27 @@ -// -// SchemeWeaponConfigViewController.m -// Hedgewars -// -// Created by Vittorio on 13/06/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 13/06/2010. + */ + #import "SchemeWeaponConfigViewController.h" #import "CommodityFunctions.h" +#import "SDL_uikitappdelegate.h" @implementation SchemeWeaponConfigViewController @synthesize listOfSchemes, listOfWeapons, lastIndexPath_sc, lastIndexPath_we, selectedScheme, selectedWeapon; @@ -23,15 +37,13 @@ CGSize screenSize = [[UIScreen mainScreen] bounds].size; self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44); - - self.selectedScheme = @""; - self.selectedWeapon = @""; - - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - [self.tableView setBackgroundView:nil]; - self.view.backgroundColor = [UIColor clearColor]; - self.tableView.separatorColor = [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xCB/255 blue:0 alpha:1]; - } + + self.selectedScheme = nil; + self.selectedWeapon = nil; + + [self.tableView setBackgroundView:nil]; + self.view.backgroundColor = [UIColor clearColor]; + self.tableView.separatorColor = UICOLOR_HW_YELLOW_BODER; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; } @@ -40,16 +52,16 @@ NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCHEMES_DIRECTORY() error:NULL]; self.listOfSchemes = contentsOfDir; - - if ([listOfSchemes containsObject:@"Default.plist"]) - self.selectedScheme = @"Default.plist"; + + if (self.selectedScheme == nil && [listOfSchemes containsObject:@"Default.plist"]) + self.selectedScheme = @"Default.plist"; contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:WEAPONS_DIRECTORY() error:NULL]; self.listOfWeapons = contentsOfDir; - - if ([listOfWeapons containsObject:@"Default.plist"]) - self.selectedWeapon = @"Default.plist"; - + + if (self.selectedWeapon == nil && [listOfWeapons containsObject:@"Default.plist"]) + self.selectedWeapon = @"Default.plist"; + [self.tableView reloadData]; } @@ -61,7 +73,7 @@ } -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - if (section == 0) + if (section == 0) return [self.listOfSchemes count]; else return [self.listOfWeapons count]; @@ -71,29 +83,63 @@ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; NSInteger row = [indexPath row]; - + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; - if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; - } - - cell.accessoryType = UITableViewCellAccessoryNone; + if (cell == nil) + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; + + cell.accessoryView = nil; if ([indexPath section] == 0) { cell.textLabel.text = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension]; + NSString *str = [NSString stringWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),[self.listOfSchemes objectAtIndex:row]]; + NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:str]; + cell.detailTextLabel.text = [dict objectForKey:@"description"]; + [dict release]; if ([[self.listOfSchemes objectAtIndex:row] isEqualToString:self.selectedScheme]) { - cell.accessoryType = UITableViewCellAccessoryCheckmark; + UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; + cell.accessoryView = checkbox; + [checkbox release]; self.lastIndexPath_sc = indexPath; } } else { cell.textLabel.text = [[self.listOfWeapons objectAtIndex:row] stringByDeletingPathExtension]; + NSString *str = [NSString stringWithFormat:@"%@/%@",WEAPONS_DIRECTORY(),[self.listOfWeapons objectAtIndex:row]]; + NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:str]; + cell.detailTextLabel.text = [dict objectForKey:@"description"]; + [dict release]; if ([[self.listOfWeapons objectAtIndex:row] isEqualToString:self.selectedWeapon]) { - cell.accessoryType = UITableViewCellAccessoryCheckmark; + UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; + cell.accessoryView = checkbox; + [checkbox release]; self.lastIndexPath_we = indexPath; } } + + cell.backgroundColor = [UIColor blackColor]; + cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT; + cell.detailTextLabel.textColor = [UIColor whiteColor]; return cell; } +-(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + return 40.0; +} + +-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + CGRect frame = CGRectMake(0, 0, self.view.frame.size.width * 80/100, 30); + NSString *text; + if (section == 0) + text = NSLocalizedString(@"Schemes",@""); + else + text = NSLocalizedString(@"Weapons",@""); + UILabel *theLabel = createBlueLabel(text, frame); + theLabel.center = CGPointMake(self.view.frame.size.width/2, 20); + + UIView *theView = [[[UIView alloc] init] autorelease]; + [theView addSubview:theLabel]; + [theLabel release]; + return theView; +} #pragma mark - #pragma mark Table view delegate @@ -103,44 +149,43 @@ lastIndexPath = self.lastIndexPath_sc; else lastIndexPath = self.lastIndexPath_we; - + int newRow = [indexPath row]; int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; - + if (newRow != oldRow) { //TODO: this code works only for a single section table UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath]; - newCell.accessoryType = UITableViewCellAccessoryCheckmark; + UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; + newCell.accessoryView = checkbox; + [checkbox release]; UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath]; - oldCell.accessoryType = UITableViewCellAccessoryNone; - + oldCell.accessoryView = nil; + if ([indexPath section] == 0) { self.lastIndexPath_sc = indexPath; self.selectedScheme = [self.listOfSchemes objectAtIndex:newRow]; } else { self.lastIndexPath_we = indexPath; self.selectedWeapon = [self.listOfWeapons objectAtIndex:newRow]; - } - + } + [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; } [aTableView deselectRowAtIndexPath:indexPath animated:YES]; } --(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger) section { - if (section == 0) { - return NSLocalizedString(@"Schemes",@""); - } else { - return NSLocalizedString(@"Weapons",@"");; - } -} - #pragma mark - #pragma mark Memory management -(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. + if ([[SDLUIKitDelegate sharedAppDelegate] isInGame]) { + self.lastIndexPath_sc = nil; + self.lastIndexPath_we = nil; + self.listOfSchemes = nil; + self.listOfWeapons = nil; + MSG_MEMCLEAN(); + } [super didReceiveMemoryWarning]; - // Relinquish ownership any cached data, images, etc that aren't in use. } -(void) viewDidUnload { diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SingleSchemeViewController.h --- a/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,23 +1,36 @@ -// -// SingleSchemeViewController.h -// Hedgewars -// -// Created by Vittorio on 23/05/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 23/05/2010. + */ + #import #import "EditableCellView.h" @interface SingleSchemeViewController : UITableViewController { NSString *schemeName; - NSMutableArray *schemeArray; + NSMutableDictionary *schemeDictionary; NSArray *basicSettingList; NSArray *gameModifierArray; } @property (nonatomic, retain) NSString *schemeName; -@property (nonatomic, retain) NSMutableArray *schemeArray; +@property (nonatomic, retain) NSMutableDictionary *schemeDictionary; @property (nonatomic, retain) NSArray *basicSettingList; @property (nonatomic, retain) NSArray *gameModifierArray; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// SingleSchemeViewController.m -// Hedgewars -// -// Created by Vittorio on 23/05/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 23/05/2010. + */ + #import "SingleSchemeViewController.h" #import @@ -13,9 +26,10 @@ #define LABEL_TAG 12345 #define SLIDER_TAG 54321 +#define SWITCH_TAG 67890 @implementation SingleSchemeViewController -@synthesize schemeName, schemeArray, basicSettingList, gameModifierArray; +@synthesize schemeName, schemeDictionary, basicSettingList, gameModifierArray; -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { return rotationManager(interfaceOrientation); @@ -25,121 +39,59 @@ #pragma mark View lifecycle -(void) viewDidLoad { [super viewDidLoad]; + NSString *path = nil; - NSArray *mods = [[NSArray alloc] initWithObjects: - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Fort Mode",@""),@"title", - NSLocalizedString(@"Defend your fort and destroy the opponents (two team colours max)",@""),@"description", - @"Forts",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Divide Team",@""),@"title", - NSLocalizedString(@"Teams will start on opposite sides of the terrain (two team colours max)",@""),@"description", - @"TeamsDivide",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Solid Land",@""),@"title", - NSLocalizedString(@"Land can not be destroyed",@""),@"description", - @"Solid",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Add Border",@""),@"title", - NSLocalizedString(@"Add an indestructable border around the terrain",@""),@"description", - @"Border",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Low Gravity",@""),@"title", - NSLocalizedString(@"Lower gravity",@""),@"description", - @"LowGravity",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Laser Sight",@""),@"title", - NSLocalizedString(@"Assisted aiming with laser sight",@""),@"description", - @"LaserSight",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Invulnerable",@""),@"title", - NSLocalizedString(@"All hogs have a personal forcefield",@""),@"description", - @"Invulnerable",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Add Mines",@""),@"title", - NSLocalizedString(@"Enable random mines",@""),@"description", - @"Mines",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Vampirism Mode",@""),@"title", - NSLocalizedString(@"Gain 80% of the damage you do back in health",@""),@"description", - @"Vampiric",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Karma Mode",@""),@"title", - NSLocalizedString(@"Share your opponents pain, share their damage",@""),@"description", - @"Karma",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Artillery Mode",@""),@"title", - NSLocalizedString(@"Your hogs are unable to move, test your aim",@""),@"description", - @"Artillery",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Random Order",@""),@"title", - NSLocalizedString(@"Order of play is random instead of in room order",@""),@"description", - @"RandomOrder",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"King Mode",@""),@"title", - NSLocalizedString(@"Play with a King. If he dies, your side loses",@""),@"description", - @"King",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys: NSLocalizedString(@"Place Hedgehogs",@""),@"title", - NSLocalizedString(@"Take turns placing your hedgehogs pre-game",@""),@"description", - @"PlaceHog",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Clan Shares Ammo",@""),@"title", - NSLocalizedString(@"Ammo is shared between all clan teams",@""),@"description", - @"SharedAmmo",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Disable Girders",@""),@"title", - NSLocalizedString(@"Disable girders when generating random maps",@""),@"description", - @"DisableGirders",@"image",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Disable Land Objects",@""),@"title", - NSLocalizedString(@"Disable land objects when generating maps",@""),@"description", - @"DisableLandObjects",@"image",nil], - nil]; + // title, description, image name (+btn) + path = [NSString stringWithFormat:@"%@/gameFlags_en.plist",IFRONTEND_DIRECTORY()]; + NSArray *mods = [[NSArray alloc] initWithContentsOfFile:path]; self.gameModifierArray = mods; [mods release]; - - NSArray *basicSettings = [[NSArray alloc] initWithObjects: - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Damage Modifier",@""),@"title",@"Damage",@"image", - [NSNumber numberWithInt:100],@"default",[NSNumber numberWithInt:10],@"min",[NSNumber numberWithInt:300],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Turn Time",@""),@"title",@"Time",@"image", - [NSNumber numberWithInt:45],@"default",[NSNumber numberWithInt:1],@"min",[NSNumber numberWithInt:99],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Initial Health",@""),@"title",@"Health",@"image", - [NSNumber numberWithInt:100],@"default",[NSNumber numberWithInt:50],@"min",[NSNumber numberWithInt:200],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Sudden Death Timeout",@""),@"title",@"SuddenDeath",@"image", - [NSNumber numberWithInt:15],@"default",[NSNumber numberWithInt:0],@"min",[NSNumber numberWithInt:50],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Crate Drops",@""),@"title",@"Box",@"image", - [NSNumber numberWithInt:5],@"default",[NSNumber numberWithInt:0],@"min",[NSNumber numberWithInt:9],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Mines Time",@""),@"title",@"Time",@"image", - [NSNumber numberWithInt:3],@"default",[NSNumber numberWithInt:0],@"min",[NSNumber numberWithInt:3],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Mines Number",@""),@"title",@"Mine",@"image", - [NSNumber numberWithInt:4],@"default",[NSNumber numberWithInt:1],@"min",[NSNumber numberWithInt:80],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Dud Mines Probability",@""),@"title",@"Dud",@"image", - [NSNumber numberWithInt:0],@"default",[NSNumber numberWithInt:0],@"min",[NSNumber numberWithInt:100],@"max",nil], - [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Explosives",@""),@"title",@"Damage",@"image", - [NSNumber numberWithInt:2],@"default",[NSNumber numberWithInt:0],@"min",[NSNumber numberWithInt:40],@"max",nil], - nil]; + + // title, image name (+icon), default value, max value, min value + path = [NSString stringWithFormat:@"%@/basicFlags_en.plist",IFRONTEND_DIRECTORY()]; + NSArray *basicSettings = [[NSArray alloc] initWithContentsOfFile:path]; self.basicSettingList = basicSettings; [basicSettings release]; - + self.title = NSLocalizedString(@"Edit scheme preferences",@""); } // load from file -(void) viewWillAppear:(BOOL) animated { [super viewWillAppear:animated]; - + NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.schemeName]; - NSMutableArray *scheme = [[NSMutableArray alloc] initWithContentsOfFile:schemeFile]; + NSMutableDictionary *scheme = [[NSMutableDictionary alloc] initWithContentsOfFile:schemeFile]; [schemeFile release]; - self.schemeArray = scheme; + self.schemeDictionary = scheme; [scheme release]; - + [self.tableView reloadData]; } // save to file -(void) viewWillDisappear:(BOOL) animated { [super viewWillDisappear:animated]; - + NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.schemeName]; - [self.schemeArray writeToFile:schemeFile atomically:YES]; + [self.schemeDictionary writeToFile:schemeFile atomically:YES]; [schemeFile release]; } #pragma mark - #pragma mark editableCellView delegate // set the new value --(void) saveTextFieldValue:(NSString *)textString withTag:(NSInteger) tagValue { - // delete old file - [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.schemeName] error:NULL]; - // update filename - self.schemeName = textString; - // save new file - [self.schemeArray writeToFile:[NSString stringWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.schemeName] atomically:YES]; +-(void) saveTextFieldValue:(NSString *)textString withTag:(NSInteger) tagValue { + if (tagValue == 0) { + // delete old file + [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.schemeName] error:NULL]; + // update filename + self.schemeName = textString; + // save new file + [self.schemeDictionary writeToFile:[NSString stringWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.schemeName] atomically:YES]; + } else { + [self.schemeDictionary setObject:textString forKey:@"description"]; + } } #pragma mark - @@ -151,13 +103,13 @@ -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { switch (section) { case 0: - return 1; + return 2; break; case 1: - return [self.basicSettingList count]; + return [[self.schemeDictionary objectForKey:@"basic"] count]; break; case 2: - return [self.gameModifierArray count]; + return [[self.schemeDictionary objectForKey:@"gamemod"] count]; default: break; } @@ -168,47 +120,53 @@ static NSString *CellIdentifier0 = @"Cell0"; static NSString *CellIdentifier1 = @"Cell1"; static NSString *CellIdentifier2 = @"Cell2"; - + UITableViewCell *cell = nil; EditableCellView *editableCell = nil; NSInteger row = [indexPath row]; - + switch ([indexPath section]) { case 0: editableCell = (EditableCellView *)[aTableView dequeueReusableCellWithIdentifier:CellIdentifier0]; if (editableCell == nil) { - editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault + editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier0] autorelease]; editableCell.delegate = self; } - - editableCell.textField.text = self.schemeName; + editableCell.tag = row; + editableCell.selectionStyle = UITableViewCellSelectionStyleNone; + editableCell.imageView.image = nil; editableCell.detailTextLabel.text = nil; - editableCell.imageView.image = nil; - editableCell.selectionStyle = UITableViewCellSelectionStyleNone; + + if (row == 0) { + editableCell.textField.text = self.schemeName; + } else { + editableCell.minimumCharacters = 0; + editableCell.textField.font = [UIFont systemFontOfSize:[UIFont labelFontSize]]; + editableCell.textField.text = [self.schemeDictionary objectForKey:@"description"]; + editableCell.textField.placeholder = NSLocalizedString(@"You can add a description if you wish",@""); + } cell = editableCell; break; case 1: cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier1]; NSDictionary *detail = [self.basicSettingList objectAtIndex:row]; // need to offset this section (see format in CommodityFunctions.m and above) - NSInteger gmSize = [self.gameModifierArray count]; if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier1] autorelease]; - + int offset = 0; - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) + if (IS_IPAD()) offset = 50; - + UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(offset+260, 12, offset+150, 23)]; slider.maximumValue = [[detail objectForKey:@"max"] floatValue]; slider.minimumValue = [[detail objectForKey:@"min"] floatValue]; - slider.tag = row+gmSize; [slider addTarget:self action:@selector(sliderChanged:) forControlEvents:UIControlEventValueChanged]; [cell.contentView addSubview:slider]; [slider release]; - + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(50, 7, 200, 30)]; label.tag = LABEL_TAG; label.backgroundColor = [UIColor clearColor]; @@ -216,23 +174,35 @@ [cell.contentView addSubview:label]; [label release]; } - + UIImage *img = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/icon%@.png",BTN_DIRECTORY(),[[self.basicSettingList objectAtIndex:row] objectForKey:@"image"]]]; cell.imageView.image = img; [img release]; - + UILabel *cellLabel = (UILabel *)[cell.contentView viewWithTag:LABEL_TAG]; cellLabel.text = [[self.basicSettingList objectAtIndex:row] objectForKey:@"title"]; + + // can't use the viewWithTag method because row is dynamic + UISlider *cellSlider = nil; + for (UIView *oneView in cell.contentView.subviews) { + if ([oneView isMemberOfClass:[UISlider class]]) { + cellSlider = (UISlider *)oneView; + break; + } + } + cellSlider.tag = SLIDER_TAG + row; + cellSlider.value = [[[self.schemeDictionary objectForKey:@"basic"] objectAtIndex:row] floatValue]; + + // forced to use this weird format otherwise the label disappears when size of the text is bigger than the original + NSString *prestring = [NSString stringWithFormat:@"%d",(NSInteger) cellSlider.value]; + // turntime 100 means unlimited time turns (set in GameSetup) + if (row == 1 && (NSInteger) cellSlider.value == 100) + prestring = @"∞"; - UISlider *cellSlider = (UISlider *)[cell.contentView viewWithTag:row+gmSize]; - cellSlider.value = [[self.schemeArray objectAtIndex:row+gmSize] floatValue]; - - // forced to use this weird format otherwise the label disappears when size of the text is bigger than the original - NSString *prestring = [NSString stringWithFormat:@"%d",[[self.schemeArray objectAtIndex:row+gmSize] intValue]]; while ([prestring length] <= 4) prestring = [NSString stringWithFormat:@" %@",prestring]; cell.detailTextLabel.text = prestring; - + cell.selectionStyle = UITableViewCellSelectionStyleBlue; break; case 2: @@ -241,48 +211,54 @@ cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier2] autorelease]; UISwitch *onOff = [[UISwitch alloc] init]; - onOff.tag = row; [onOff addTarget:self action:@selector(toggleSwitch:) forControlEvents:UIControlEventValueChanged]; cell.accessoryView = onOff; [onOff release]; } + + UISwitch *switcher = (UISwitch *)cell.accessoryView; + switcher.tag = SWITCH_TAG + row; + [switcher setOn:[[[self.schemeDictionary objectForKey:@"gamemod"] objectAtIndex:row] boolValue] animated:NO]; UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/btn%@.png",BTN_DIRECTORY(),[[self.gameModifierArray objectAtIndex:row] objectForKey:@"image"]]]; cell.imageView.image = image; [image release]; [cell.imageView.layer setCornerRadius:7.0f]; - [cell.imageView.layer setBorderWidth:1]; [cell.imageView.layer setMasksToBounds:YES]; cell.textLabel.text = [[self.gameModifierArray objectAtIndex:row] objectForKey:@"title"]; cell.detailTextLabel.text = [[self.gameModifierArray objectAtIndex:row] objectForKey:@"description"]; - [(UISwitch *)cell.accessoryView setOn:[[self.schemeArray objectAtIndex:row] boolValue] animated:NO]; - + cell.detailTextLabel.adjustsFontSizeToFitWidth = YES; + cell.detailTextLabel.minimumFontSize = 6; + cell.selectionStyle = UITableViewCellSelectionStyleNone; } - + return cell; } -(void) toggleSwitch:(id) sender { UISwitch *theSwitch = (UISwitch *)sender; - [self.schemeArray replaceObjectAtIndex:theSwitch.tag withObject:[NSNumber numberWithBool:theSwitch.on]]; + NSMutableArray *array = [self.schemeDictionary objectForKey:@"gamemod"]; + [array replaceObjectAtIndex:theSwitch.tag-SWITCH_TAG withObject:[NSNumber numberWithBool:theSwitch.on]]; } -(void) sliderChanged:(id) sender { - // need to offset this section (see format in CommodityFunctions.m and above) - NSInteger gmSize = [self.gameModifierArray count]; // the slider that changed is sent as object UISlider *theSlider = (UISlider *)sender; // create the indexPath of the row of the slider - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:theSlider.tag-gmSize inSection:1]; + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:theSlider.tag-SLIDER_TAG inSection:1]; // get its cell UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath]; // grab the associated label UILabel *label = (UILabel *)cell.detailTextLabel; // modify it - label.text = [NSString stringWithFormat:@"%d",(int)theSlider.value]; - // save changes in the main array (remember that you need to offset it) - [self.schemeArray replaceObjectAtIndex:theSlider.tag withObject:[NSNumber numberWithInt:(int)theSlider.value]]; + if ([indexPath row] == 1 && [indexPath section] == 1 && (NSInteger) theSlider.value == 100) + label.text = @"∞"; + else + label.text = [NSString stringWithFormat:@"%d",(NSInteger) theSlider.value]; + // save changes in the main array + NSMutableArray *array = [self.schemeDictionary objectForKey:@"basic"]; + [array replaceObjectAtIndex:theSlider.tag-SLIDER_TAG withObject:[NSNumber numberWithInt:(NSInteger) theSlider.value]]; } #pragma mark - @@ -291,14 +267,14 @@ UITableViewCell *cell = [aTableView cellForRowAtIndexPath:indexPath]; EditableCellView *editableCell = nil; UISlider *cellSlider = nil; - + switch ([indexPath section]) { case 0: editableCell = (EditableCellView *)cell; [editableCell replyKeyboard]; break; case 1: - cellSlider = (UISlider *)[cell.contentView viewWithTag:[indexPath row]+[self.gameModifierArray count]]; + cellSlider = (UISlider *)[cell.contentView viewWithTag:[indexPath row]+SLIDER_TAG]; [cellSlider setValue:[[[self.basicSettingList objectAtIndex:[indexPath row]] objectForKey:@"default"] floatValue] animated:YES]; [self sliderChanged:cellSlider]; //cell.detailTextLabel.text = [[[self.basicSettingList objectAtIndex:[indexPath row]] objectForKey:@"default"] stringValue]; @@ -311,7 +287,7 @@ default: break; } - + [aTableView deselectRowAtIndexPath:indexPath animated:YES]; } @@ -338,11 +314,13 @@ #pragma mark Memory management -(void) didReceiveMemoryWarning { [super didReceiveMemoryWarning]; + self.basicSettingList = nil; + self.gameModifierArray = nil; } -(void) viewDidUnload { self.schemeName = nil; - self.schemeArray = nil; + self.schemeDictionary = nil; self.basicSettingList = nil; self.gameModifierArray = nil; MSG_DIDUNLOAD(); @@ -351,7 +329,7 @@ -(void) dealloc { [schemeName release]; - [schemeArray release]; + [schemeDictionary release]; [basicSettingList release]; [gameModifierArray release]; [super dealloc]; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SingleTeamViewController.h --- a/project_files/HedgewarsMobile/Classes/SingleTeamViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SingleTeamViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// SingleTeamViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import #import "EditableCellView.h" @@ -18,13 +31,14 @@ @interface SingleTeamViewController : UITableViewController { NSMutableDictionary *teamDictionary; - + NSString *teamName; UIImage *normalHogSprite; - + NSArray *secondaryItems; + NSArray *moreSecondaryItems; BOOL isWriteNeeded; - + HogHatViewController *hogHatViewController; GravesViewController *gravesViewController; VoicesViewController *voicesViewController; @@ -37,6 +51,7 @@ @property (nonatomic,retain) NSString *teamName; @property (nonatomic,retain) UIImage *normalHogSprite; @property (nonatomic,retain) NSArray *secondaryItems; +@property (nonatomic,retain) NSArray *moreSecondaryItems; -(void) writeFile; -(void) setWriteNeeded; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SingleTeamViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// SingleTeamViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import "SingleTeamViewController.h" #import "HogHatViewController.h" @@ -15,11 +28,12 @@ #import "LevelViewController.h" #import "CommodityFunctions.h" #import "UIImageExtra.h" +#import "PascalImports.h" #define TEAMNAME_TAG 78789 @implementation SingleTeamViewController -@synthesize teamDictionary, normalHogSprite, secondaryItems, teamName; +@synthesize teamDictionary, normalHogSprite, secondaryItems, moreSecondaryItems, teamName; -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { return rotationManager(interfaceOrientation); @@ -48,7 +62,7 @@ #pragma mark View lifecycle -(void) viewDidLoad { [super viewDidLoad]; - + // labels for the entries NSArray *array = [[NSArray alloc] initWithObjects: NSLocalizedString(@"Grave",@""), @@ -58,6 +72,16 @@ NSLocalizedString(@"Level",@""),nil]; self.secondaryItems = array; [array release]; + + // labels for the subtitles + NSArray *moreArray = [[NSArray alloc] initWithObjects: + NSLocalizedString(@"Mark the death of your fallen warriors",@""), + NSLocalizedString(@"Pick a slang your hogs will speak",@""), + NSLocalizedString(@"Select the team invincible fortress (only valid for fort games)",@""), + NSLocalizedString(@"Choose a charismatic symbol for your team",@""), + NSLocalizedString(@"Opt for controlling the team or let the AI lead",@""),nil]; + self.moreSecondaryItems = moreArray; + [moreArray release]; // load the base hog image, drawing will occure in cellForRow... NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()]; @@ -65,27 +89,27 @@ [normalHogFile release]; self.normalHogSprite = hogSprite; [hogSprite release]; - + // listen if any childController modifies the plist and write it if needed [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setWriteNeeded) name:@"setWriteNeedTeams" object:nil]; isWriteNeeded = NO; - + self.title = NSLocalizedString(@"Edit team settings",@""); } -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - + // load data about the team and write if there has been a change from other childControllers - if (isWriteNeeded) + if (isWriteNeeded) [self writeFile]; - + NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),self.teamName]; NSMutableDictionary *teamDict = [[NSMutableDictionary alloc] initWithContentsOfFile:teamFile]; self.teamDictionary = teamDict; [teamDict release]; [teamFile release]; - + [self.tableView reloadData]; } @@ -93,7 +117,7 @@ -(void) viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; - if (isWriteNeeded) + if (isWriteNeeded) [self writeFile]; } @@ -108,7 +132,7 @@ [self.teamDictionary writeToFile:teamFile atomically:YES]; [teamFile release]; - DLog(@"%@",teamDictionary); + //DLog(@"%@",teamDictionary); isWriteNeeded = NO; } @@ -125,7 +149,7 @@ rows = 1; break; case 1: // team members - rows = MAX_HOGS; + rows = HW_getMaxNumberOfHogs(); break; case 2: // team details rows = [self.secondaryItems count]; @@ -159,23 +183,23 @@ static NSString *CellIdentifier0 = @"Cell0"; static NSString *CellIdentifier1 = @"Cell1"; static NSString *CellIdentifier2 = @"Cell2"; - + NSArray *hogArray; UITableViewCell *cell = nil; EditableCellView *editableCell = nil; NSInteger row = [indexPath row]; UIImage *accessoryImage; - + switch ([indexPath section]) { case 0: editableCell = (EditableCellView *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier0]; if (editableCell == nil) { - editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault + editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier0] autorelease]; editableCell.delegate = self; editableCell.tag = TEAMNAME_TAG; } - + editableCell.imageView.image = nil; editableCell.accessoryType = UITableViewCellAccessoryNone; editableCell.textField.text = self.teamName; @@ -185,34 +209,35 @@ case 1: editableCell = (EditableCellView *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier1]; if (editableCell == nil) { - editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault + editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease]; editableCell.delegate = self; editableCell.tag = [indexPath row]; } - + hogArray = [self.teamDictionary objectForKey:@"hedgehogs"]; - + // draw the hat on top of the hog NSString *hatFile = [[NSString alloc] initWithFormat:@"%@/%@.png", HATS_DIRECTORY(), [[hogArray objectAtIndex:row] objectForKey:@"hat"]]; UIImage *hatSprite = [[UIImage alloc] initWithContentsOfFile: hatFile andCutAt:CGRectMake(0, 0, 32, 32)]; [hatFile release]; - editableCell.imageView.image = [self.normalHogSprite mergeWith:hatSprite atPoint:CGPointMake(0, -5)]; + editableCell.imageView.image = [self.normalHogSprite mergeWith:hatSprite atPoint:CGPointMake(0, 5)]; [hatSprite release]; - + editableCell.textField.text = [[hogArray objectAtIndex:row] objectForKey:@"hogname"]; editableCell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; - + cell = editableCell; break; case 2: cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier2]; if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier2] autorelease]; } - + cell.textLabel.text = [self.secondaryItems objectAtIndex:row]; + cell.detailTextLabel.text = [self.moreSecondaryItems objectAtIndex:row]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; switch (row) { case 0: // grave @@ -222,17 +247,22 @@ cell.imageView.image = accessoryImage; [accessoryImage release]; break; - case 2: // fort - accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@L.png", - FORTS_DIRECTORY(),[teamDictionary objectForKey:@"fort"]]]; - cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(42, 42)]; + case 1: // voice + accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/HellishBomb.png", + GRAPHICS_DIRECTORY()]]; + cell.imageView.image = accessoryImage; [accessoryImage release]; break; - + case 2: // fort + accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@-preview.png", + FORTS_DIRECTORY(),[teamDictionary objectForKey:@"fort"]]]; + cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(32, 32)]; + [accessoryImage release]; + break; case 3: // flags accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.png", FLAGS_DIRECTORY(),[teamDictionary objectForKey:@"flag"]]]; - cell.imageView.image = accessoryImage; + cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(27, 19)]; [accessoryImage release]; break; case 4: // level @@ -240,7 +270,7 @@ BOTLEVELS_DIRECTORY(),[[[[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0] objectForKey:@"level"] intValue]]]; - cell.imageView.image = accessoryImage; + cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(32, 32)]; [accessoryImage release]; break; default: @@ -249,7 +279,7 @@ } break; } - + return cell; } @@ -259,45 +289,48 @@ -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row = [indexPath row]; NSInteger section = [indexPath section]; - UITableViewController *nextController = nil; - + if (2 == section) { switch (row) { case 0: // grave if (nil == gravesViewController) gravesViewController = [[GravesViewController alloc] initWithStyle:UITableViewStyleGrouped]; - nextController = gravesViewController; + [gravesViewController setTeamDictionary:teamDictionary]; + [self.navigationController pushViewController:gravesViewController animated:YES]; break; case 1: // voice if (nil == voicesViewController) voicesViewController = [[VoicesViewController alloc] initWithStyle:UITableViewStyleGrouped]; - nextController = voicesViewController; + [voicesViewController setTeamDictionary:teamDictionary]; + [self.navigationController pushViewController:voicesViewController animated:YES]; break; case 2: // fort if (nil == fortsViewController) fortsViewController = [[FortsViewController alloc] initWithStyle:UITableViewStyleGrouped]; - nextController = fortsViewController; + [fortsViewController setTeamDictionary:teamDictionary]; + [self.navigationController pushViewController:fortsViewController animated:YES]; break; case 3: // flag - if (nil == flagsViewController) + if (nil == flagsViewController) flagsViewController = [[FlagsViewController alloc] initWithStyle:UITableViewStyleGrouped]; - nextController = flagsViewController; + [flagsViewController setTeamDictionary:teamDictionary]; + [self.navigationController pushViewController:flagsViewController animated:YES]; break; case 4: // level if (nil == levelViewController) levelViewController = [[LevelViewController alloc] initWithStyle:UITableViewStyleGrouped]; - nextController = levelViewController; + [levelViewController setTeamDictionary:teamDictionary]; + [self.navigationController pushViewController:levelViewController animated:YES]; + break; + default: + DLog(@"Nope"); break; } - - if ([nextController respondsToSelector:@selector(setTeamDictionary:)]) - [nextController setTeamDictionary:teamDictionary]; - [self.navigationController pushViewController:nextController animated:YES]; } else { EditableCellView *cell = (EditableCellView *)[aTableView cellForRowAtIndexPath:indexPath]; [cell replyKeyboard]; @@ -310,15 +343,15 @@ -(void) tableView:(UITableView *)aTableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { if (nil == hogHatViewController) hogHatViewController = [[HogHatViewController alloc] initWithStyle:UITableViewStyleGrouped]; - + // cache the dictionary file of the team, so that other controllers can modify it hogHatViewController.teamDictionary = self.teamDictionary; hogHatViewController.selectedHog = [indexPath row]; - + // if we are editing the field undo any change before proceeding EditableCellView *cell = (EditableCellView *)[aTableView cellForRowAtIndexPath:indexPath]; [cell cancel:nil]; - + [self.navigationController pushViewController:hogHatViewController animated:YES]; } @@ -343,11 +376,12 @@ } -(void) viewDidUnload { - [super viewDidUnload]; + [[NSNotificationCenter defaultCenter] removeObserver:self]; self.teamDictionary = nil; self.teamName = nil; self.normalHogSprite = nil; self.secondaryItems = nil; + self.moreSecondaryItems = nil; hogHatViewController = nil; gravesViewController = nil; voicesViewController = nil; @@ -363,6 +397,7 @@ [teamName release]; [normalHogSprite release]; [secondaryItems release]; + [moreSecondaryItems release]; [hogHatViewController release]; [gravesViewController release]; [fortsViewController release]; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SingleWeaponViewController.h --- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// SingleWeaponViewController.h -// Hedgewars -// -// Created by Vittorio on 19/06/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 19/06/2010. + */ + #import #import "EditableCellView.h" @@ -12,10 +25,10 @@ @interface SingleWeaponViewController : UITableViewController { NSString *weaponName; - + NSString *description; + UIImage *ammoStoreImage; - NSArray *ammoNames; - + char *quantity; char *probability; char *delay; @@ -23,8 +36,8 @@ } @property (nonatomic,retain) NSString *weaponName; +@property (nonatomic,retain) NSString *description; @property (nonatomic,retain) UIImage *ammoStoreImage; -@property (nonatomic,retain) NSArray *ammoNames; -(void) saveAmmos; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m --- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,18 +1,31 @@ -// -// SingleWeaponViewController.m -// Hedgewars -// -// Created by Vittorio on 19/06/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 19/06/2010. + */ + #import "SingleWeaponViewController.h" -#import "WeaponCellView.h" #import "CommodityFunctions.h" #import "UIImageExtra.h" +#import "PascalImports.h" @implementation SingleWeaponViewController -@synthesize weaponName, ammoStoreImage, ammoNames; +@synthesize weaponName, description, ammoStoreImage; -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { return rotationManager(interfaceOrientation); @@ -23,61 +36,14 @@ -(void) viewDidLoad { [super viewDidLoad]; - NSArray *array = [[NSArray alloc] initWithObjects: - NSLocalizedString(@"Grenade",@""), - NSLocalizedString(@"Cluster Bomb",@""), - NSLocalizedString(@"Bazooka",@""), - NSLocalizedString(@"Homing Bee",@""), - NSLocalizedString(@"Shotgun",@""), - NSLocalizedString(@"Pick Hammer",@""), - NSLocalizedString(@"Skip",@""), - NSLocalizedString(@"Rope",@""), - NSLocalizedString(@"Mine",@""), - NSLocalizedString(@"Deagle",@""), - NSLocalizedString(@"Dynamite",@""), - NSLocalizedString(@"Fire Punch",@""), - NSLocalizedString(@"Slash",@""), - NSLocalizedString(@"Baseball bat",@""), - NSLocalizedString(@"Parachute",@""), - NSLocalizedString(@"Air Attack",@""), - NSLocalizedString(@"Mines Attack",@""), - NSLocalizedString(@"Blow Torch",@""), - NSLocalizedString(@"Construction",@""), - NSLocalizedString(@"Teleport",@""), - NSLocalizedString(@"Switch Hedgehog",@""), - NSLocalizedString(@"Mortar",@""), - NSLocalizedString(@"Kamikaze",@""), - NSLocalizedString(@"Cake",@""), - NSLocalizedString(@"Seduction",@""), - NSLocalizedString(@"Watermelon Bomb",@""), - NSLocalizedString(@"Hellish Hand Grenade",@""), - NSLocalizedString(@"Napalm Attack",@""), - NSLocalizedString(@"Drill Rocket",@""), - NSLocalizedString(@"Ballgun",@""), - NSLocalizedString(@"RC Plane",@""), - NSLocalizedString(@"Low Gravity",@""), - NSLocalizedString(@"Extra Damage",@""), - NSLocalizedString(@"Invulnerable",@""), - NSLocalizedString(@"Extra Time",@""), - NSLocalizedString(@"Laser Sight",@""), - NSLocalizedString(@"Vampirism",@""), - NSLocalizedString(@"Sniper Rifle",@""), - NSLocalizedString(@"Flying Saucer",@""), - NSLocalizedString(@"Molotov Cocktail",@""), - NSLocalizedString(@"Birdy",@""), - NSLocalizedString(@"Portable Portal Device",@""), - NSLocalizedString(@"Piano Attack",@""), - NSLocalizedString(@"Old Limburger",@""), - NSLocalizedString(@"Sine Gun",@""), - NSLocalizedString(@"Flamethrower",@""), - nil]; - self.ammoNames = array; - [array release]; - - quantity = (char *)malloc(sizeof(char)*(CURRENT_AMMOSIZE+1)); - probability = (char *)malloc(sizeof(char)*(CURRENT_AMMOSIZE+1)); - delay = (char *)malloc(sizeof(char)*(CURRENT_AMMOSIZE+1)); - crateness = (char *)malloc(sizeof(char)*(CURRENT_AMMOSIZE+1)); + NSString *trFilePath = [NSString stringWithFormat:@"%@/en.txt",LOCALE_DIRECTORY()]; + // fill the data structure that we are going to read + LoadLocaleWrapper([trFilePath UTF8String]); + + quantity = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); + probability = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); + delay = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); + crateness = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); NSString *str = [NSString stringWithFormat:@"%@/AmmoMenu/Ammos.png",GRAPHICS_DIRECTORY()]; UIImage *img = [[UIImage alloc] initWithContentsOfFile:str]; @@ -94,6 +60,7 @@ NSDictionary *weapon = [[NSDictionary alloc] initWithContentsOfFile:ammoFile]; [ammoFile release]; + self.description = [weapon objectForKey:@"description"]; const char *tmp1 = [[weapon objectForKey:@"ammostore_initialqt"] UTF8String]; const char *tmp2 = [[weapon objectForKey:@"ammostore_probability"] UTF8String]; const char *tmp3 = [[weapon objectForKey:@"ammostore_delay"] UTF8String]; @@ -109,7 +76,7 @@ delay[i] = tmp3[i]; crateness[i] = tmp4[i]; } - for (int i = oldlen; i < CURRENT_AMMOSIZE; i++) { + for (int i = oldlen; i < HW_getNumberOfWeapons(); i++) { quantity[i] = '0'; probability[i] = '0'; delay[i] = '0'; @@ -125,23 +92,24 @@ } -(void) saveAmmos { - quantity[CURRENT_AMMOSIZE] = '\0'; - probability[CURRENT_AMMOSIZE] = '\0'; - delay[CURRENT_AMMOSIZE] = '\0'; - crateness[CURRENT_AMMOSIZE] = '\0'; + quantity[HW_getNumberOfWeapons()] = '\0'; + probability[HW_getNumberOfWeapons()] = '\0'; + delay[HW_getNumberOfWeapons()] = '\0'; + crateness[HW_getNumberOfWeapons()] = '\0'; NSString *quantityStr = [NSString stringWithUTF8String:quantity]; NSString *probabilityStr = [NSString stringWithUTF8String:probability]; NSString *delayStr = [NSString stringWithUTF8String:delay]; NSString *cratenessStr = [NSString stringWithUTF8String:crateness]; - + NSDictionary *weapon = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSNumber numberWithInt:CURRENT_AMMOSIZE],@"version", quantityStr,@"ammostore_initialqt", probabilityStr,@"ammostore_probability", delayStr,@"ammostore_delay", - cratenessStr,@"ammostore_crate", nil]; - + cratenessStr,@"ammostore_crate", + self.description,@"description", + nil]; + NSString *ammoFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",WEAPONS_DIRECTORY(),self.weaponName]; [weapon writeToFile:ammoFile atomically:YES]; [ammoFile release]; @@ -156,9 +124,9 @@ -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if (section == 0) - return 1; + return 2; else - return CURRENT_AMMOSIZE; + return HW_getNumberOfWeapons(); } // Customize the appearance of table view cells. @@ -167,42 +135,50 @@ static NSString *CellIdentifier1 = @"Cell1"; NSInteger row = [indexPath row]; UITableViewCell *cell = nil; - + if (0 == [indexPath section]) { - EditableCellView *customCell = (EditableCellView *)[aTableView dequeueReusableCellWithIdentifier:CellIdentifier0]; - if (customCell == nil) { - customCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault - reuseIdentifier:CellIdentifier0] autorelease]; - customCell.delegate = self; + EditableCellView *editableCell = (EditableCellView *)[aTableView dequeueReusableCellWithIdentifier:CellIdentifier0]; + if (editableCell == nil) { + editableCell = [[[EditableCellView alloc] initWithStyle:UITableViewCellStyleDefault + reuseIdentifier:CellIdentifier0] autorelease]; + editableCell.delegate = self; } + editableCell.tag = row; + editableCell.selectionStyle = UITableViewCellSelectionStyleNone; + editableCell.imageView.image = nil; + editableCell.detailTextLabel.text = nil; - customCell.textField.text = self.weaponName; - customCell.detailTextLabel.text = nil; - customCell.imageView.image = nil; - customCell.selectionStyle = UITableViewCellSelectionStyleNone; - cell = customCell; + if (row == 0) { + editableCell.textField.text = self.weaponName; + } else { + editableCell.minimumCharacters = 0; + editableCell.textField.font = [UIFont systemFontOfSize:[UIFont labelFontSize]]; + editableCell.textField.text = self.description; + editableCell.textField.placeholder = NSLocalizedString(@"You can add a description if you wish",@""); + } + cell = editableCell; } else { - WeaponCellView *customCell = (WeaponCellView *)[aTableView dequeueReusableCellWithIdentifier:CellIdentifier1]; - if (customCell == nil) { - customCell = [[[WeaponCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease]; - customCell.delegate = self; + WeaponCellView *weaponCell = (WeaponCellView *)[aTableView dequeueReusableCellWithIdentifier:CellIdentifier1]; + if (weaponCell == nil) { + weaponCell = [[[WeaponCellView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease]; + weaponCell.delegate = self; } - - int x = ((row*32)/1024)*32; - int y = (row*32)%1024; - + + int x = ((row*32)/(int)self.ammoStoreImage.size.height)*32; + int y = (row*32)%(int)self.ammoStoreImage.size.height; + UIImage *img = [[self.ammoStoreImage cutAt:CGRectMake(x, y, 32, 32)] makeRoundCornersOfSize:CGSizeMake(7, 7)]; - customCell.weaponIcon.image = img; - customCell.weaponName.text = [ammoNames objectAtIndex:row]; - customCell.tag = row; - - [customCell.initialQt setValue:[[NSString stringWithFormat:@"%c",quantity[row]] intValue] animated:NO]; - [customCell.probabilityQt setValue:[[NSString stringWithFormat:@"%c", probability[row]] intValue] animated:NO]; - [customCell.delayQt setValue:[[NSString stringWithFormat:@"%c", delay[row]] intValue] animated:NO]; - [customCell.crateQt setValue:[[NSString stringWithFormat:@"%c", crateness[row]] intValue] animated:NO]; - cell = customCell; + weaponCell.weaponIcon.image = img; + weaponCell.weaponName.text = [NSString stringWithUTF8String:HW_getWeaponNameByIndex(row)]; + weaponCell.tag = row; + + [weaponCell.initialSli setValue:[[NSString stringWithFormat:@"%c",quantity[row]] intValue] animated:NO]; + [weaponCell.probabilitySli setValue:[[NSString stringWithFormat:@"%c", probability[row]] intValue] animated:NO]; + [weaponCell.delaySli setValue:[[NSString stringWithFormat:@"%c", delay[row]] intValue] animated:NO]; + [weaponCell.crateSli setValue:[[NSString stringWithFormat:@"%c", crateness[row]] intValue] animated:NO]; + cell = weaponCell; } - + cell.selectionStyle = UITableViewCellSelectionStyleNone; return cell; } @@ -214,6 +190,22 @@ return 120; } +-(NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section { + NSString *sectionTitle = nil; + switch (section) { + case 0: + sectionTitle = NSLocalizedString(@"Weaponset Name", @""); + break; + case 1: + sectionTitle = NSLocalizedString(@"Weapon Ammuntions", @""); + break; + default: + DLog(@"nope"); + break; + } + return sectionTitle; +} + #pragma mark - #pragma mark Table view delegate -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { @@ -226,13 +218,17 @@ #pragma mark - #pragma mark editableCellView delegate // set the new value --(void) saveTextFieldValue:(NSString *)textString withTag:(NSInteger) tagValue { - // delete old file - [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@.plist",WEAPONS_DIRECTORY(),self.weaponName] error:NULL]; - // update filename - self.weaponName = textString; - // save new file - [self saveAmmos]; +-(void) saveTextFieldValue:(NSString *)textString withTag:(NSInteger) tagValue { + if (tagValue == 0) { + // delete old file + [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@.plist",WEAPONS_DIRECTORY(),self.weaponName] error:NULL]; + // update filename + self.weaponName = textString; + // save new file + [self saveAmmos]; + } else { + self.description = textString; + } } #pragma mark - @@ -256,9 +252,9 @@ free(delay); delay = NULL; free(crateness); crateness = NULL; [super viewDidUnload]; + self.description = nil; self.weaponName = nil; self.ammoStoreImage = nil; - self.ammoNames = nil; MSG_DIDUNLOAD(); [super viewDidUnload]; } @@ -266,8 +262,8 @@ -(void) dealloc { [weaponName release]; + [description release]; [ammoStoreImage release]; - [ammoNames release]; [super dealloc]; } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SplitViewRootController.h --- a/project_files/HedgewarsMobile/Classes/SplitViewRootController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SplitViewRootController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,17 +1,32 @@ -// -// SplitViewRootController.h -// HedgewarsMobile -// -// Created by Vittorio on 27/03/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 27/03/2010. + */ + #import -@class DetailViewController; +@class MasterViewController; @interface SplitViewRootController: UIViewController { - DetailViewController *detailViewController; + MasterViewController *activeController; } +@property (nonatomic,retain) MasterViewController *activeController; + @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SplitViewRootController.m --- a/project_files/HedgewarsMobile/Classes/SplitViewRootController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SplitViewRootController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,73 +1,87 @@ - // -// SplitViewRootController.m -// HedgewarsMobile -// -// Created by Vittorio on 27/03/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 27/03/2010. + */ + #import "SplitViewRootController.h" #import "MasterViewController.h" -#import "DetailViewController.h" #import "CommodityFunctions.h" @implementation SplitViewRootController - +@synthesize activeController; -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return rotationManager(interfaceOrientation); } -(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - // Release any cached data, images, etc that aren't in use. - if (detailViewController.view.superview == nil) - detailViewController = nil; + if (self.activeController.view.superview == nil) + self.activeController = nil; MSG_MEMCLEAN(); + [super didReceiveMemoryWarning]; } -// load the view programmatically; we need a splitViewController that handles a MasterViewController +// load the view programmatically; we need a splitViewController that handles a MasterViewController // (which is just a UITableViewController) and a DetailViewController where we present options -(void) viewDidLoad { - detailViewController = [[DetailViewController alloc] initWithStyle:UITableViewStyleGrouped]; - UINavigationController *detailedNavController = [[UINavigationController alloc] initWithRootViewController:detailViewController]; - [detailViewController release]; + CGRect rect = [[UIScreen mainScreen] bounds]; + self.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width); - CGRect rect = [[UIScreen mainScreen] bounds]; - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - self.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width); - + if (self.activeController == nil) { + MasterViewController *rightController = [[MasterViewController alloc] initWithStyle:UITableViewStyleGrouped]; + rightController.targetController = nil; + self.activeController = rightController; + [rightController release]; + } + UINavigationController *rightNavController = [[UINavigationController alloc] initWithRootViewController:self.activeController]; + + if (IS_IPAD()) { + MasterViewController *leftController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain]; + leftController.targetController = self.activeController; + UINavigationController *leftNavController = [[UINavigationController alloc] initWithRootViewController:leftController]; + [leftController release]; + UISplitViewController *splitViewRootController = [[UISplitViewController alloc] init]; + splitViewRootController.delegate = nil; splitViewRootController.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width); - - MasterViewController *masterViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain]; - UINavigationController *mainNavController = [[UINavigationController alloc] initWithRootViewController:masterViewController]; - [masterViewController release]; + splitViewRootController.viewControllers = [NSArray arrayWithObjects: leftNavController, rightNavController, nil]; + [leftNavController release]; + [rightNavController release]; - splitViewRootController.delegate = detailViewController; - masterViewController.detailViewController = detailViewController; - splitViewRootController.viewControllers = [NSArray arrayWithObjects: mainNavController, detailedNavController, nil]; - [mainNavController release]; - [detailedNavController release]; - // add view to main controller [self.view addSubview:splitViewRootController.view]; } else { - [self.view addSubview:detailedNavController.view]; + rightNavController.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width); + [self.view addSubview:rightNavController.view]; } [super viewDidLoad]; } - + -(void) viewDidUnload { - detailViewController = nil; + self.activeController = nil; MSG_DIDUNLOAD(); [super viewDidUnload]; } -(void) dealloc { - [detailViewController release]; + [self.activeController release]; [super dealloc]; } @@ -76,22 +90,22 @@ // see http://davidebenini.it/2009/01/03/viewwillappear-not-being-called-inside-a-uinavigationcontroller/ -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - [detailViewController.navigationController viewWillAppear:animated]; + [self.activeController.navigationController viewWillAppear:animated]; } -(void) viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; - [detailViewController.navigationController viewWillDisappear:animated]; + [self.activeController.navigationController viewWillDisappear:animated]; } -(void) viewDidAppear:(BOOL)animated { [super viewDidLoad]; - [detailViewController.navigationController viewDidAppear:animated]; + [self.activeController.navigationController viewDidAppear:animated]; } -(void) viewDidDisappear:(BOOL)animated { [super viewDidUnload]; - [detailViewController.navigationController viewDidDisappear:animated]; + [self.activeController.navigationController viewDidDisappear:animated]; } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SquareButtonView.h --- a/project_files/HedgewarsMobile/Classes/SquareButtonView.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SquareButtonView.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// HogButtonView.h -// HedgewarsMobile -// -// Created by Vittorio on 20/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 20/04/2010. + */ + #import diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SquareButtonView.m --- a/project_files/HedgewarsMobile/Classes/SquareButtonView.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/SquareButtonView.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// HogButtonView.m -// HedgewarsMobile -// -// Created by Vittorio on 20/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 20/04/2010. + */ + #import "SquareButtonView.h" #import @@ -19,25 +32,17 @@ colorIndex = -1; selectedColor = 0; - // list of allowed colors - NSArray *colors = [[NSArray alloc] initWithObjects: [NSNumber numberWithUnsignedInt:4421353], // bluette - [NSNumber numberWithUnsignedInt:4100897], // greeeen - [NSNumber numberWithUnsignedInt:10632635], // violett - [NSNumber numberWithUnsignedInt:16749353], // oranngy - [NSNumber numberWithUnsignedInt:14483456], // reddish - [NSNumber numberWithUnsignedInt:7566195], // graaaay - nil]; - self.colorArray = colors; - [colors release]; + self.colorArray = getAvailableColors(); // set the color to the first available one [self nextColor]; - + // this makes the button round and nice with a border [self.layer setCornerRadius:7.0f]; - [self.layer setMasksToBounds:YES]; + [self.layer setMasksToBounds:YES]; [self.layer setBorderWidth:2]; - + [self.layer setBorderColor:[UICOLOR_HW_YELLOW_BODER CGColor]]; + // this changes the color at button press [self addTarget:self action:@selector(nextColor) forControlEvents:UIControlEventTouchUpInside]; } @@ -51,11 +56,11 @@ colorIndex = 0; NSUInteger color = [[self.colorArray objectAtIndex:colorIndex] unsignedIntValue]; - self.backgroundColor = [UIColor colorWithRed:((color & 0x00FF0000) >> 16)/255.0f - green:((color & 0x0000FF00) >> 8)/255.0f - blue: (color & 0x000000FF)/255.0f + self.backgroundColor = [UIColor colorWithRed:((color & 0x00FF0000) >> 16)/255.0f + green:((color & 0x0000FF00) >> 8)/255.0f + blue: (color & 0x000000FF)/255.0f alpha:1.0f]; - + [ownerDictionary setObject:[NSNumber numberWithInt:color] forKey:@"color"]; } @@ -63,10 +68,10 @@ if (color != selectedColor) { selectedColor = color; colorIndex = [colorArray indexOfObject:[NSNumber numberWithUnsignedInt:color]]; - - self.backgroundColor = [UIColor colorWithRed:((color & 0x00FF0000) >> 16)/255.0f - green:((color & 0x0000FF00) >> 8)/255.0f - blue: (color & 0x000000FF)/255.0f + + self.backgroundColor = [UIColor colorWithRed:((color & 0x00FF0000) >> 16)/255.0f + green:((color & 0x0000FF00) >> 8)/255.0f + blue: (color & 0x000000FF)/255.0f alpha:1.0f]; } } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SupportViewController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/SupportViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,30 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 19/09/2010. + */ + + +#import + +@interface SupportViewController : UIViewController { + +} + +-(IBAction) buttonPressed:(id) sender; + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SupportViewController.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/SupportViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,52 @@ +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 19/09/2010. + */ + + +#import "SupportViewController.h" +#import "CommodityFunctions.h" + +@implementation SupportViewController + +-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation { + return rotationManager(interfaceOrientation); +} + +-(void) didReceiveMemoryWarning { + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + // Release any cached data, images, etc that aren't in use. +} + +-(void) viewDidUnload { + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + +-(void) dealloc { + [super dealloc]; +} + +-(IBAction) buttonPressed:(id) sender { + NSString *reviewURL = @"http://itunes.apple.com/us/app/hedgewars/id391234866?affC=QQABAAAAHgAFasEiWjVwUGZOc3k1VGctQkRJazlacXhUclpBTVpiU2xteVdfUQ%3D%3D#&mt=8"; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:reviewURL]]; +} + +@end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/SupportViewController.xib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Classes/SupportViewController.xib Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,561 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBIPadFramework + + + IBFirstResponder + IBIPadFramework + + + + 292 + + YES + + + 292 + {{94, 214}, {514, 21}} + + NO + YES + 7 + NO + IBIPadFramework + If you like this app, please leave a positive review on the AppStore! + + 1 + MCAwIDAAA + + + 1 + 10 + 1 + + + + 292 + {{231, 20}, {240, 160}} + + NO + NO + IBIPadFramework + + NSImage + denied.png + + + + + 292 + {{191, 363}, {320, 240}} + + NO + NO + IBIPadFramework + + NSImage + surpise.png + + + + + 292 + {{293, 269}, {116, 37}} + + NO + IBIPadFramework + 0 + 0 + + Helvetica-Bold + 15 + 16 + + 1 + Open iTunes + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + + + + + 292 + {{274, 611}, {153, 37}} + + NO + YES + 7 + NO + IBIPadFramework + ♥ THANK YOU ♥ + + Helvetica-Bold + 17 + 16 + + + + 1 + 10 + 1 + + + {703, 724} + + + 3 + MQA + + 2 + + + NO + + NO + + + 3 + + + IBUISplitViewController + + IBUISplitViewControllerContentSizeLocation + IBUISplitViewControllerContentSizeLocationDetail + + IBIPadFramework + Detail + + IBIPadFramework + + + + + YES + + + view + + + + 3 + + + + buttonPressed: + + + 7 + + 11 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 2 + + + YES + + + + + + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 12 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 12.IBPluginDependency + 2.IBEditorWindowLastContentRect + 2.IBPluginDependency + 4.IBPluginDependency + 5.IBPluginDependency + 6.IBPluginDependency + 7.IBPluginDependency + + + YES + SupportViewController + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{562, 125}, {703, 768}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 12 + + + + YES + + SupportViewController + UIViewController + + buttonPressed: + id + + + buttonPressed: + + buttonPressed: + id + + + + IBProjectSource + Classes/SupportViewController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CAAnimation.h + + + + NSObject + + IBFrameworkSource + QuartzCore.framework/Headers/CALayer.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIImageView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIImageView.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UINavigationController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UITabBarController.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + + 0 + IBIPadFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../Hedgewars.xcodeproj + 3 + + YES + + YES + denied.png + surpise.png + + + YES + {240, 160} + {320, 240} + + + 117 + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/TeamConfigViewController.h --- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// TeamConfigViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 20/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 20/04/2010. + */ + #import @@ -12,10 +25,11 @@ @interface TeamConfigViewController : UITableViewController { NSMutableArray *listOfTeams; NSMutableArray *listOfSelectedTeams; - BOOL isFirstLoad; + NSArray *cachedContentsOfDir; } @property (nonatomic, retain) NSMutableArray *listOfTeams; @property (nonatomic, retain) NSMutableArray *listOfSelectedTeams; +@property (nonatomic, retain) NSArray *cachedContentsOfDir; @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/TeamConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// TeamConfigViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 20/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 20/04/2010. + */ + #import "TeamConfigViewController.h" #import "CommodityFunctions.h" @@ -12,7 +25,7 @@ #import "SquareButtonView.h" @implementation TeamConfigViewController -@synthesize listOfTeams, listOfSelectedTeams; +@synthesize listOfTeams, listOfSelectedTeams, cachedContentsOfDir; #define NUMBERBUTTON_TAG 123456 #define SQUAREBUTTON_TAG 654321 @@ -22,36 +35,40 @@ #pragma mark View lifecycle -(void) viewDidLoad { [super viewDidLoad]; - + CGSize screenSize = [[UIScreen mainScreen] bounds].size; self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44); - isFirstLoad = YES; + + [self.tableView setBackgroundView:nil]; + self.view.backgroundColor = [UIColor clearColor]; + self.tableView.separatorColor = UICOLOR_HW_YELLOW_BODER; + self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; } -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL]; // avoid overwriting selected teams when returning on this view - if (isFirstLoad) { - // integer representation of various color (defined in SquareButtonView) - NSUInteger colors[6] = { 4421353, 4100897, 10632635, 16749353, 14483456, 7566195 }; - NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL]; + if ([self.cachedContentsOfDir isEqualToArray:contentsOfDir] == NO) { + NSArray *colors = getAvailableColors(); NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:[contentsOfDir count]]; for (int i = 0; i < [contentsOfDir count]; i++) { NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithObjectsAndKeys: [contentsOfDir objectAtIndex:i],@"team", [NSNumber numberWithInt:4],@"number", - [NSNumber numberWithInt:colors[i%6]],@"color",nil]; + [colors objectAtIndex:i%[colors count]],@"color",nil]; [array addObject:dict]; [dict release]; } self.listOfTeams = array; [array release]; - + NSMutableArray *emptyArray = [[NSMutableArray alloc] initWithObjects:nil]; self.listOfSelectedTeams = emptyArray; [emptyArray release]; - isFirstLoad = NO; + + cachedContentsOfDir = [[NSArray alloc] initWithArray:contentsOfDir copyItems:YES]; } [self.tableView reloadData]; } @@ -74,20 +91,13 @@ return [listOfTeams count]; } --(NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section { - if (section == 0) - return NSLocalizedString(@"Playing Teams",@""); - else - return NSLocalizedString(@"Available Teams",@""); -} - // Customize the appearance of table view cells. -(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier0 = @"Cell0"; static NSString *CellIdentifier1 = @"Cell1"; NSInteger section = [indexPath section]; UITableViewCell *cell; - + if (section == 0) { cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier0]; if (cell == nil) { @@ -97,50 +107,84 @@ numberButton.tag = NUMBERBUTTON_TAG; [cell addSubview:numberButton]; [numberButton release]; - - SquareButtonView *squareButton = [[SquareButtonView alloc] initWithFrame:CGRectMake(12+88+7, 5, 36, 36)]; + + SquareButtonView *squareButton = [[SquareButtonView alloc] initWithFrame:CGRectMake(12+88+6, 5, 36, 36)]; squareButton.tag = SQUAREBUTTON_TAG; [cell addSubview:squareButton]; [squareButton release]; - - UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(12+88+7+36+7, 10, 250, 25)]; + + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(12+88+6+36, 10, 103, 25)]; label.textAlignment = UITextAlignmentLeft; + label.minimumFontSize = 11; + label.adjustsFontSizeToFitWidth = YES; + label.baselineAdjustment = UIBaselineAdjustmentAlignCenters; label.backgroundColor = [UIColor clearColor]; - label.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize] + 2]; + label.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]]; + label.textColor = UICOLOR_HW_YELLOW_TEXT; label.tag = LABEL_TAG; [cell.contentView addSubview:label]; [label release]; } - + NSMutableDictionary *selectedRow = [listOfSelectedTeams objectAtIndex:[indexPath row]]; - + UILabel *cellLabel = (UILabel *)[cell viewWithTag:LABEL_TAG]; cellLabel.text = [[selectedRow objectForKey:@"team"] stringByDeletingPathExtension]; - + HogButtonView *numberButton = (HogButtonView *)[cell viewWithTag:NUMBERBUTTON_TAG]; [numberButton drawManyHogs:[[selectedRow objectForKey:@"number"] intValue]]; numberButton.ownerDictionary = selectedRow; - + SquareButtonView *squareButton = (SquareButtonView *)[cell viewWithTag:SQUAREBUTTON_TAG]; [squareButton selectColor:[[selectedRow objectForKey:@"color"] intValue]]; squareButton.ownerDictionary = selectedRow; - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - cellLabel.textColor = [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xCB/255 blue:0 alpha:1]; - } + + NSString *teamPath = [NSString stringWithFormat:@"%@/%@",TEAMS_DIRECTORY(),[selectedRow objectForKey:@"team"]]; + NSDictionary *firstHog = [[[NSDictionary dictionaryWithContentsOfFile:teamPath] objectForKey:@"hedgehogs"] objectAtIndex:0]; + if ([[firstHog objectForKey:@"level"] intValue]> 0) { + NSString *filePath = [NSString stringWithFormat:@"%@/cyborg.png",HATS_DIRECTORY()]; + UIImage *sprite = [[UIImage alloc] initWithContentsOfFile:filePath andCutAt:CGRectMake(0, 2, 32, 32)]; + UIImageView *spriteView = [[UIImageView alloc] initWithImage:sprite]; + [sprite release]; + + cell.accessoryView = spriteView; + [spriteView release]; + } else + cell.accessoryView = nil; } else { cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier1]; - if (cell == nil) + if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease]; - + cell.textLabel.text = [[[listOfTeams objectAtIndex:[indexPath row]] objectForKey:@"team"] stringByDeletingPathExtension]; - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - cell.textLabel.textColor = [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xCB/255 blue:0 alpha:1 ]; - } + cell.accessoryView = nil; } + cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT; + cell.backgroundColor = [UIColor blackColor]; + return cell; } +-(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + return 40.0; +} + +-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + CGRect frame = CGRectMake(0, 0, self.view.frame.size.width * 80/100, 30); + NSString *text; + if (section == 0) + text = NSLocalizedString(@"Playing Teams",@""); + else + text = NSLocalizedString(@"Available Teams",@""); + UILabel *theLabel = createBlueLabel(text, frame); + theLabel.center = CGPointMake(self.view.frame.size.width/2, 20); + + UIView *theView = [[[UIView alloc] init] autorelease]; + [theView addSubview:theLabel]; + [theLabel release]; + return theView; +} #pragma mark - #pragma mark Table view delegate @@ -153,7 +197,7 @@ [self.listOfSelectedTeams removeObjectAtIndex:row]; } else { [self.listOfSelectedTeams addObject:[self.listOfTeams objectAtIndex:row]]; - [self.listOfTeams removeObjectAtIndex:row]; + [self.listOfTeams removeObjectAtIndex:row]; } [aTableView reloadData]; } @@ -162,20 +206,25 @@ #pragma mark - #pragma mark Memory management -(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. + // Relinquish ownership any cached data, images, etc that aren't in use. + self.cachedContentsOfDir = nil; + MSG_MEMCLEAN(); [super didReceiveMemoryWarning]; - // Relinquish ownership any cached data, images, etc that aren't in use. } -(void) viewDidUnload { self.listOfTeams = nil; + self.listOfSelectedTeams = nil; + self.cachedContentsOfDir = nil; MSG_DIDUNLOAD(); [super viewDidUnload]; } -(void) dealloc { - [self.listOfTeams release]; + [listOfTeams release]; + [listOfSelectedTeams release]; + [cachedContentsOfDir release]; [super dealloc]; } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/TeamSettingsViewController.h --- a/project_files/HedgewarsMobile/Classes/TeamSettingsViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/TeamSettingsViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// TeamSettingsViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/TeamSettingsViewController.m --- a/project_files/HedgewarsMobile/Classes/TeamSettingsViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/TeamSettingsViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// TeamSettingsViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import "TeamSettingsViewController.h" #import "SingleTeamViewController.h" @@ -24,7 +37,7 @@ -(void) viewDidLoad { [super viewDidLoad]; - UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"from the team panel") + UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"") style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEdit:)]; @@ -35,12 +48,12 @@ // load the list of teams in the teams directory -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - + NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL]; NSMutableArray *array = [[NSMutableArray alloc] initWithArray:contentsOfDir copyItems:YES]; self.listOfTeams = array; [array release]; - + [self.tableView reloadData]; } @@ -48,7 +61,7 @@ -(void) toggleEdit:(id) sender { BOOL isEditing = self.tableView.editing; [self.tableView setEditing:!isEditing animated:YES]; - + if (isEditing) { [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Edit",@"from the team panel")]; [self.navigationItem.rightBarButtonItem setStyle: UIBarButtonItemStyleBordered]; @@ -68,15 +81,15 @@ // add a team file with default values and updates the table -(void) addTeam:(id) sender { NSString *fileName = [[NSString alloc] initWithFormat:@"Default Team %u.plist", [self.listOfTeams count]]; - + createTeamNamed([fileName stringByDeletingPathExtension]); - + [self.listOfTeams addObject:fileName]; [fileName release]; - + // order the array alphabetically, so teams will keep their position [self.listOfTeams sortUsingSelector:@selector(compare:)]; - + [self.tableView reloadData]; } @@ -93,28 +106,28 @@ // Customize the appearance of table view cells. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; - + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } - - NSUInteger row = [indexPath row]; - NSString *rowString = [[self.listOfTeams objectAtIndex:row] stringByDeletingPathExtension]; - cell.textLabel.text = rowString; + + NSUInteger row = [indexPath row]; + NSString *rowString = [[self.listOfTeams objectAtIndex:row] stringByDeletingPathExtension]; + cell.textLabel.text = rowString; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - + return cell; } // delete the row and the file -(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; - + NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@",TEAMS_DIRECTORY(),[self.listOfTeams objectAtIndex:row]]; [[NSFileManager defaultManager] removeItemAtPath:teamFile error:NULL]; [teamFile release]; - + [self.listOfTeams removeObjectAtIndex:row]; [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; } @@ -126,10 +139,10 @@ if (childController == nil) { childController = [[SingleTeamViewController alloc] initWithStyle:UITableViewStyleGrouped]; } - + NSInteger row = [indexPath row]; NSString *selectedTeamFile = [listOfTeams objectAtIndex:row]; - + // this must be set so childController can load the correct plist childController.teamName = [selectedTeamFile stringByDeletingPathExtension]; [childController.tableView setContentOffset:CGPointMake(0,0) animated:NO]; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/UIImageExtra.h --- a/project_files/HedgewarsMobile/Classes/UIImageExtra.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// UIImageExtra.h -// HedgewarsMobile -// -// Created by Vittorio on 08/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/04/2010. + */ + #import @@ -13,11 +26,13 @@ -(UIImage *)scaleToSize:(CGSize) size; -(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint; --(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize; +-(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint ofSize:(CGSize) resultingSize; -(id) initWithContentsOfFile:(NSString *)path andCutAt:(CGRect) rect; -(UIImage *)cutAt:(CGRect) rect; -(UIImage *)convertToGrayScale; +-(UIImage *)convertToNegative; -(UIImage *)maskImageWith:(UIImage *)maskImage; -(UIImage *)makeRoundCornersOfSize:(CGSize) sizewh; ++(UIImage *)whiteImage:(CGSize) ofSize; @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/UIImageExtra.m --- a/project_files/HedgewarsMobile/Classes/UIImageExtra.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/UIImageExtra.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,74 +1,102 @@ -// -// UIImageExtra.m -// HedgewarsMobile -// -// Created by Vittorio on 08/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 08/04/2010. + */ + #import "UIImageExtra.h" @implementation UIImage (extra) - + -(UIImage *)scaleToSize:(CGSize) size { DLog(@"warning - this is a very expensive operation, you should avoid using it"); - + // Create a bitmap graphics context; this will also set it as the current context UIGraphicsBeginImageContext(size); - + // Draw the scaled image in the current context [self drawInRect:CGRectMake(0, 0, size.width, size.height)]; - + // Create a new image from current context UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext(); - + // Pop the current context from the stack UIGraphicsEndImageContext(); - + // Return our new scaled image (autoreleased) return scaledImage; } -(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint { // create a contex of size of the background image - return [self mergeWith:secondImage atPoint:secondImagePoint atSize:self.size]; + return [self mergeWith:secondImage atPoint:secondImagePoint ofSize:self.size]; } --(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize { - // Create a bitmap graphics context; this will also set it as the current context - UIGraphicsBeginImageContext(resultingSize); +-(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint ofSize:(CGSize) resultingSize { + if (secondImage == nil) { + DLog(@"Warning, secondImage == nil"); + return self; + } + int w = resultingSize.width; + int h = resultingSize.height; - // draw the background image in the current context - [self drawAtPoint:CGPointMake(0,0)]; + if (w == 0 || h == 0) { + DLog(@"Can have 0 dimesions"); + return self; + } - // draw the image on top of the first image (because the context is the same) - [secondImage drawAtPoint:secondImagePoint]; + // Create a bitmap graphics context; this will also set it as the current context + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst); + + // draw the two images in the current context + CGContextDrawImage(context, CGRectMake(0, 0, self.size.width, self.size.height), [self CGImage]); + CGContextDrawImage(context, CGRectMake(secondImagePoint.x, secondImagePoint.y, secondImage.size.width, secondImage.size.height), [secondImage CGImage]); - // create an image from the current contex (not thread safe) - UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext(); + // Create bitmap image info from pixel data in current context + CGImageRef imageRef = CGBitmapContextCreateImage(context); - // free drawing contex - UIGraphicsEndImageContext(); - - // return the resulting autoreleased image + // Create a new UIImage object + UIImage *resultImage = [UIImage imageWithCGImage:imageRef]; + + // Release colorspace, context and bitmap information + CGColorSpaceRelease(colorSpace); + CGContextRelease(context); + CFRelease(imageRef); + return resultImage; } -(id) initWithContentsOfFile:(NSString *)path andCutAt:(CGRect) rect { // load image from path UIImage *image = [[UIImage alloc] initWithContentsOfFile: path]; - + if (nil != image) { // get its CGImage representation with a give size CGImageRef cgImage = CGImageCreateWithImageInRect([image CGImage], rect); - + // clean memory [image release]; - + // create a UIImage from the CGImage (memory must be allocated already) UIImage *sprite = [self initWithCGImage:cgImage]; - + // clean memory CGImageRelease(cgImage); @@ -82,38 +110,38 @@ -(UIImage *)cutAt:(CGRect) rect { CGImageRef cgImage = CGImageCreateWithImageInRect([self CGImage], rect); - + UIImage *res = [UIImage imageWithCGImage:cgImage]; CGImageRelease(cgImage); - + return res; } -(UIImage *)convertToGrayScale { // Create image rectangle with current image width/height CGRect imageRect = CGRectMake(0, 0, self.size.width, self.size.height); - + // Grayscale color space CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray(); - + // Create bitmap content with current image size and grayscale colorspace CGContextRef context = CGBitmapContextCreate(nil, self.size.width, self.size.height, 8, 0, colorSpace, kCGImageAlphaNone); - + // Draw image into current context, with specified rectangle // using previously defined context (with grayscale colorspace) CGContextDrawImage(context, imageRect, [self CGImage]); - + // Create bitmap image info from pixel data in current context CGImageRef imageRef = CGBitmapContextCreateImage(context); - - // Create a new UIImage object + + // Create a new UIImage object UIImage *newImage = [UIImage imageWithCGImage:imageRef]; - + // Release colorspace, context and bitmap information - CGColorSpaceRelease(colorSpace); + CFRelease(imageRef); CGContextRelease(context); - CFRelease(imageRef); - + CGColorSpaceRelease(colorSpace); + // Return the new grayscale image return newImage; } @@ -122,7 +150,7 @@ -(UIImage*) maskImageWith:(UIImage *)maskImage { // prepare the reference image CGImageRef maskRef = [maskImage CGImage]; - + // create the mask using parameters of the mask reference CGImageRef mask = CGImageMaskCreate(CGImageGetWidth(maskRef), CGImageGetHeight(maskRef), @@ -130,14 +158,14 @@ CGImageGetBitsPerPixel(maskRef), CGImageGetBytesPerRow(maskRef), CGImageGetDataProvider(maskRef), NULL, false); - + // create an image in the current context CGImageRef masked = CGImageCreateWithMask([self CGImage], mask); CGImageRelease(mask); - + UIImage* retImage = [UIImage imageWithCGImage:masked]; CGImageRelease(masked); - + return retImage; } @@ -162,31 +190,59 @@ CGContextRestoreGState(context); } --(UIImage *)makeRoundCornersOfSize:(CGSize) sizewh { +-(UIImage *)makeRoundCornersOfSize:(CGSize) sizewh { CGFloat cornerWidth = sizewh.width; CGFloat cornerHeight = sizewh.height; CGFloat w = self.size.width; CGFloat h = self.size.height; - + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst); - + CGContextBeginPath(context); CGRect rect = CGRectMake(0, 0, w, h); addRoundedRectToPath(context, rect, cornerWidth, cornerHeight); CGContextClosePath(context); CGContextClip(context); - + CGContextDrawImage(context, CGRectMake(0, 0, w, h), [self CGImage]); - + CGImageRef imageMasked = CGBitmapContextCreateImage(context); CGContextRelease(context); CGColorSpaceRelease(colorSpace); - + UIImage *newImage = [UIImage imageWithCGImage:imageMasked]; CGImageRelease(imageMasked); - + return newImage; } +// by http://www.sixtemia.com/journal/2010/06/23/uiimage-negative-color-effect/ +-(UIImage *)convertToNegative { + UIGraphicsBeginImageContext(self.size); + CGContextSetBlendMode(UIGraphicsGetCurrentContext(), kCGBlendModeCopy); + [self drawInRect:CGRectMake(0, 0, self.size.width, self.size.height)]; + CGContextSetBlendMode(UIGraphicsGetCurrentContext(), kCGBlendModeDifference); + CGContextSetFillColorWithColor(UIGraphicsGetCurrentContext(),[UIColor whiteColor].CGColor); + CGContextFillRect(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, self.size.width, self.size.height)); + // create an image from the current contex (not thread safe) + UIImage *result = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return result; +} + ++(UIImage *)whiteImage:(CGSize) ofSize { + UIGraphicsBeginImageContext(ofSize); + CGContextRef context = UIGraphicsGetCurrentContext(); + UIGraphicsPushContext(context); + + CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0); + CGContextFillRect(context,CGRectMake(0,0,ofSize.width,ofSize.height)); + + UIGraphicsPopContext(); + UIImage *bkgImg = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return bkgImg; +} + @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/VoicesViewController.h --- a/project_files/HedgewarsMobile/Classes/VoicesViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/VoicesViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,17 +1,30 @@ -// -// VoicesViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import #import "SDL_mixer.h" @interface VoicesViewController : UITableViewController { NSMutableDictionary *teamDictionary; - + NSArray *voiceArray; NSIndexPath *lastIndexPath; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/VoicesViewController.m --- a/project_files/HedgewarsMobile/Classes/VoicesViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/VoicesViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,15 +1,27 @@ -// -// VoicesViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 02/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 02/04/2010. + */ + #import "VoicesViewController.h" #import "CommodityFunctions.h" - @implementation VoicesViewController @synthesize teamDictionary, voiceArray, lastIndexPath; @@ -18,7 +30,6 @@ return rotationManager(interfaceOrientation); } - #pragma mark - #pragma mark View lifecycle -(void) viewDidLoad { @@ -31,24 +42,30 @@ // it's here and not in viewWillAppear because user cannot add/remove them NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:VOICES_DIRECTORY() error:NULL]; self.voiceArray = array; - + self.title = NSLocalizedString(@"Set hedgehog voices",@""); } -(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - + // this moves the tableview to the top [self.tableView setContentOffset:CGPointMake(0,0) animated:NO]; } --(void) viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; +-(void) viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + Mix_OpenAudio(44100, 0x8010, 1, 1024); +} + +-(void) viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; if(voiceBeingPlayed != NULL) { Mix_HaltChannel(lastChannel); Mix_FreeChunk(voiceBeingPlayed); voiceBeingPlayed = NULL; } + Mix_CloseAudio(); } @@ -64,17 +81,17 @@ // Customize the appearance of table view cells. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - + static NSString *CellIdentifier = @"Cell"; - + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } - + NSString *voice = [[voiceArray objectAtIndex:[indexPath row]] stringByDeletingPathExtension]; cell.textLabel.text = voice; - + if ([voice isEqualToString:[teamDictionary objectForKey:@"voicepack"]]) { cell.accessoryType = UITableViewCellAccessoryCheckmark; self.lastIndexPath = indexPath; @@ -91,46 +108,56 @@ -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { int newRow = [indexPath row]; int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; - + if (newRow != oldRow) { [teamDictionary setObject:[voiceArray objectAtIndex:newRow] forKey:@"voicepack"]; - + // tell our boss to write this new stuff on disk [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil]; [self.tableView reloadData]; - + self.lastIndexPath = indexPath; [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; - } + } [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; - + + // stop any sound before playing another one if (voiceBeingPlayed != NULL) { Mix_HaltChannel(lastChannel); Mix_FreeChunk(voiceBeingPlayed); voiceBeingPlayed = NULL; } - + NSString *voiceDir = [[NSString alloc] initWithFormat:@"%@/%@/",VOICES_DIRECTORY(),[voiceArray objectAtIndex:newRow]]; NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:voiceDir error:NULL]; - + int index = random() % [array count]; - + voiceBeingPlayed = Mix_LoadWAV([[voiceDir stringByAppendingString:[array objectAtIndex:index]] UTF8String]); [voiceDir release]; - lastChannel = Mix_PlayChannel(-1, voiceBeingPlayed, 0); + lastChannel = Mix_PlayChannel(-1, voiceBeingPlayed, 0); } #pragma mark - #pragma mark Memory management -(void) didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. + if (voiceBeingPlayed != NULL) { + Mix_HaltChannel(lastChannel); + Mix_FreeChunk(voiceBeingPlayed); + voiceBeingPlayed = NULL; + } + self.lastIndexPath = nil; + MSG_MEMCLEAN(); [super didReceiveMemoryWarning]; - // Relinquish ownership any cached data, images, etc that aren't in use. } -(void) viewDidUnload { - voiceBeingPlayed = NULL; + if (voiceBeingPlayed != NULL) { + Mix_HaltChannel(lastChannel); + Mix_FreeChunk(voiceBeingPlayed); + voiceBeingPlayed = NULL; + } self.lastIndexPath = nil; self.teamDictionary = nil; self.voiceArray = nil; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/WeaponCellView.h --- a/project_files/HedgewarsMobile/Classes/WeaponCellView.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/WeaponCellView.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// WeaponCellView.h -// Hedgewars -// -// Created by Vittorio on 03/07/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 03/07/2010. + */ + #import @@ -18,42 +31,46 @@ id delegate; UILabel *weaponName; UIImageView *weaponIcon; - - UISlider *initialQt; - UISlider *probabilityQt; - UISlider *delayQt; - UISlider *crateQt; - + + UISlider *initialSli; + UISlider *probabilitySli; + UISlider *delaySli; + UISlider *crateSli; + @private UIImageView *initialImg; - UIImageView *probabImg; + UIImageView *probabilityImg; UIImageView *delayImg; UIImageView *crateImg; - + UILabel *initialLab; - UILabel *probLab; - UILabel *delLab; - UILabel *craLab; + UILabel *probabilityLab; + UILabel *delayLab; + UILabel *crateLab; + + UILabel *helpLabel; } @property (nonatomic,assign) id delegate; @property (nonatomic,retain) UILabel *weaponName; @property (nonatomic,retain) UIImageView *weaponIcon; - -@property (nonatomic,retain) UISlider *initialQt; -@property (nonatomic,retain) UISlider *probabilityQt; -@property (nonatomic,retain) UISlider *delayQt; -@property (nonatomic,retain) UISlider *crateQt; + +@property (nonatomic,retain) UISlider *initialSli; +@property (nonatomic,retain) UISlider *probabilitySli; +@property (nonatomic,retain) UISlider *delaySli; +@property (nonatomic,retain) UISlider *crateSli; @property (nonatomic,retain) UIImageView *initialImg; -@property (nonatomic,retain) UIImageView *probabImg; +@property (nonatomic,retain) UIImageView *probabilityImg; @property (nonatomic,retain) UIImageView *delayImg; @property (nonatomic,retain) UIImageView *crateImg; @property (nonatomic,retain) UILabel *initialLab; -@property (nonatomic,retain) UILabel *probLab; -@property (nonatomic,retain) UILabel *delLab; -@property (nonatomic,retain) UILabel *craLab; +@property (nonatomic,retain) UILabel *probabilityLab; +@property (nonatomic,retain) UILabel *delayLab; +@property (nonatomic,retain) UILabel *crateLab; + +@property (nonatomic,retain) UILabel *helpLabel; @end diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/WeaponCellView.m --- a/project_files/HedgewarsMobile/Classes/WeaponCellView.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/WeaponCellView.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,94 +1,127 @@ -// -// WeaponCellView.m -// Hedgewars -// -// Created by Vittorio on 03/07/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 07/03/2010. + */ + #import "WeaponCellView.h" #import "CommodityFunctions.h" @implementation WeaponCellView -@synthesize delegate, weaponName, weaponIcon, initialQt, probabilityQt, delayQt, crateQt, - initialImg, probabImg, delayImg, crateImg, initialLab, probLab, delLab, craLab; +@synthesize delegate, weaponName, weaponIcon, initialSli, probabilitySli, delaySli, crateSli, helpLabel, + initialImg, probabilityImg, delayImg, crateImg, initialLab, probabilityLab, delayLab, crateLab; -(id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) { delegate = nil; - + weaponName = [[UILabel alloc] init]; weaponName.backgroundColor = [UIColor clearColor]; weaponName.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]]; weaponIcon = [[UIImageView alloc] init]; - - initialQt = [[UISlider alloc] init]; - [initialQt addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; - initialQt.maximumValue = 9; - initialQt.minimumValue = 0; - - probabilityQt = [[UISlider alloc] init]; - [probabilityQt addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; - probabilityQt.maximumValue = 9; - probabilityQt.minimumValue = 0; - - delayQt = [[UISlider alloc] init]; - [delayQt addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; - delayQt.maximumValue = 9; - delayQt.minimumValue = 0; - - crateQt = [[UISlider alloc] init]; - [crateQt addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; - crateQt.maximumValue = 9; - crateQt.minimumValue = 0; - + + initialSli = [[UISlider alloc] init]; + [initialSli addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; + [initialSli addTarget:self action:@selector(startDragging:) forControlEvents:UIControlEventTouchDown]; + [initialSli addTarget:self action:@selector(stopDragging:) forControlEvents:UIControlEventTouchUpInside | UIControlEventTouchUpOutside]; + initialSli.maximumValue = 9; + initialSli.minimumValue = 0; + initialSli.tag = 100; + + probabilitySli = [[UISlider alloc] init]; + [probabilitySli addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; + [probabilitySli addTarget:self action:@selector(startDragging:) forControlEvents:UIControlEventTouchDown]; + [probabilitySli addTarget:self action:@selector(stopDragging:) forControlEvents:UIControlEventTouchUpInside | UIControlEventTouchUpOutside]; + probabilitySli.maximumValue = 9; + probabilitySli.minimumValue = 0; + probabilitySli.tag = 200; + + delaySli = [[UISlider alloc] init]; + [delaySli addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; + [delaySli addTarget:self action:@selector(startDragging:) forControlEvents:UIControlEventTouchDown]; + [delaySli addTarget:self action:@selector(stopDragging:) forControlEvents:UIControlEventTouchUpInside | UIControlEventTouchUpOutside]; + delaySli.maximumValue = 9; + delaySli.minimumValue = 0; + delaySli.tag = 300; + + crateSli = [[UISlider alloc] init]; + [crateSli addTarget:self action:@selector(valueChanged:) forControlEvents:UIControlEventValueChanged]; + [crateSli addTarget:self action:@selector(startDragging:) forControlEvents:UIControlEventTouchDown]; + [crateSli addTarget:self action:@selector(stopDragging:) forControlEvents:UIControlEventTouchUpInside | UIControlEventTouchUpOutside]; + crateSli.maximumValue = 9; + crateSli.minimumValue = 0; + crateSli.tag = 400; + NSString *imgAmmoStr = [NSString stringWithFormat:@"%@/iconAmmo.png",BTN_DIRECTORY()]; NSString *imgDamageStr = [NSString stringWithFormat:@"%@/iconDamage.png",BTN_DIRECTORY()]; NSString *imgTimeStr = [NSString stringWithFormat:@"%@/iconTime.png",BTN_DIRECTORY()]; NSString *imgBoxStr = [NSString stringWithFormat:@"%@/iconBox.png",BTN_DIRECTORY()]; initialImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgAmmoStr]]; - probabImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgDamageStr]]; + probabilityImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgDamageStr]]; delayImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgTimeStr]]; crateImg = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:imgBoxStr]]; - + initialLab = [[UILabel alloc] init]; initialLab.backgroundColor = [UIColor clearColor]; initialLab.textColor = [UIColor grayColor]; initialLab.textAlignment = UITextAlignmentCenter; - - probLab = [[UILabel alloc] init]; - probLab.backgroundColor = [UIColor clearColor]; - probLab.textColor = [UIColor grayColor]; - probLab.textAlignment = UITextAlignmentCenter; - - delLab = [[UILabel alloc] init]; - delLab.backgroundColor = [UIColor clearColor]; - delLab.textColor = [UIColor grayColor]; - delLab.textAlignment = UITextAlignmentCenter; - - craLab = [[UILabel alloc] init]; - craLab.backgroundColor = [UIColor clearColor]; - craLab.textColor = [UIColor grayColor]; - craLab.textAlignment = UITextAlignmentCenter; - - [self.contentView addSubview:weaponName]; // [weaponName release]; - [self.contentView addSubview:weaponIcon]; // [weaponIcon release]; - - [self.contentView addSubview:initialQt]; // [initialQt release]; - [self.contentView addSubview:probabilityQt]; // [probabilityQt release]; - [self.contentView addSubview:delayQt]; // [delayQt release]; - [self.contentView addSubview:crateQt]; // [crateQt release]; - - [self.contentView addSubview:initialImg]; // [initialImg release]; - [self.contentView addSubview:probabImg]; // [probabImg release]; - [self.contentView addSubview:delayImg]; // [delayImg release]; - [self.contentView addSubview:crateImg]; // [crateImg release]; + + probabilityLab = [[UILabel alloc] init]; + probabilityLab.backgroundColor = [UIColor clearColor]; + probabilityLab.textColor = [UIColor grayColor]; + probabilityLab.textAlignment = UITextAlignmentCenter; + + delayLab = [[UILabel alloc] init]; + delayLab.backgroundColor = [UIColor clearColor]; + delayLab.textColor = [UIColor grayColor]; + delayLab.textAlignment = UITextAlignmentCenter; + + crateLab = [[UILabel alloc] init]; + crateLab.backgroundColor = [UIColor clearColor]; + crateLab.textColor = [UIColor grayColor]; + crateLab.textAlignment = UITextAlignmentCenter; - [self.contentView addSubview:initialLab]; // [initialLab release]; - [self.contentView addSubview:probLab]; // [probLab release]; - [self.contentView addSubview:delLab]; // [delLab release]; - [self.contentView addSubview:craLab]; // [craLab release]; + helpLabel = [[UILabel alloc] init]; + helpLabel.backgroundColor = [UIColor clearColor]; + helpLabel.textColor = [UIColor grayColor]; + helpLabel.textAlignment = UITextAlignmentRight; + helpLabel.font = [UIFont italicSystemFontOfSize:[UIFont smallSystemFontSize]]; + + [self.contentView addSubview:weaponName]; + [self.contentView addSubview:weaponIcon]; + + [self.contentView addSubview:initialSli]; + [self.contentView addSubview:probabilitySli]; + [self.contentView addSubview:delaySli]; + [self.contentView addSubview:crateSli]; + + [self.contentView addSubview:initialImg]; + [self.contentView addSubview:probabilityImg]; + [self.contentView addSubview:delayImg]; + [self.contentView addSubview:crateImg]; + + [self.contentView addSubview:initialLab]; + [self.contentView addSubview:probabilityLab]; + [self.contentView addSubview:delayLab]; + [self.contentView addSubview:crateLab]; + + [self.contentView addSubview:helpLabel]; } return self; } @@ -97,37 +130,41 @@ [super layoutSubviews]; CGRect contentRect = self.contentView.bounds; - CGFloat boundsX = contentRect.origin.x; - - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) - boundsX += 65; - else - boundsX -= 9; + CGFloat shiftSliders = contentRect.origin.x; + CGFloat shiftLabel = 0; + + if (IS_IPAD()) { + shiftSliders += 65; + shiftLabel += 165; + } else + shiftSliders -= 13; weaponIcon.frame = CGRectMake(5, 5, 32, 32); weaponName.frame = CGRectMake(45, 8, 200, 25); + helpLabel.frame = CGRectMake(shiftLabel + 200, 8, 250, 15); + // second line - initialImg.frame = CGRectMake(boundsX+20, 40, 32, 32); - initialLab.frame = CGRectMake(boundsX+56, 40, 20, 32); - initialLab.text = ((int)initialQt.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)initialQt.value]; - initialQt.frame = CGRectMake(boundsX+80, 40, 150, 32); - - probabImg.frame = CGRectMake(boundsX+255, 40, 32, 32); - probLab.frame = CGRectMake(boundsX+291, 40, 20, 32); - probLab.text = ((int)probabilityQt.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)probabilityQt.value]; - probabilityQt.frame = CGRectMake(boundsX+314, 40, 150, 32); - + initialImg.frame = CGRectMake(shiftSliders + 20, 40, 32, 32); + initialLab.frame = CGRectMake(shiftSliders + 56, 40, 20, 32); + initialLab.text = ((int)initialSli.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)initialSli.value]; + initialSli.frame = CGRectMake(shiftSliders + 80, 40, 150, 32); + + probabilityImg.frame = CGRectMake(shiftSliders + 255, 40, 32, 32); + probabilityLab.frame = CGRectMake(shiftSliders + 291, 40, 20, 32); + probabilityLab.text = ((int)probabilitySli.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)probabilitySli.value]; + probabilitySli.frame = CGRectMake(shiftSliders + 314, 40, 150, 32); + // third line - delayImg.frame = CGRectMake(boundsX+20, 80, 32, 32); - delLab.frame = CGRectMake(boundsX+56, 80, 20, 32); - delLab.text = ((int)delayQt.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)delayQt.value]; - delayQt.frame = CGRectMake(boundsX+80, 80, 150, 32); - - crateImg.frame = CGRectMake(boundsX+255, 80, 32, 32); - craLab.frame = CGRectMake(boundsX+291, 80, 20, 32); - craLab.text = ((int)crateQt.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)crateQt.value]; - crateQt.frame = CGRectMake(boundsX+314, 80, 150, 32); + delayImg.frame = CGRectMake(shiftSliders + 20, 80, 32, 32); + delayLab.frame = CGRectMake(shiftSliders + 56, 80, 20, 32); + delayLab.text = ((int)delaySli.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)delaySli.value]; + delaySli.frame = CGRectMake(shiftSliders + 80, 80, 150, 32); + + crateImg.frame = CGRectMake(shiftSliders + 255, 80, 32, 32); + crateLab.frame = CGRectMake(shiftSliders + 291, 80, 20, 32); + crateLab.text = ((int)crateSli.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)crateSli.value]; + crateSli.frame = CGRectMake(shiftSliders + 314, 80, 150, 32); } /* @@ -139,37 +176,66 @@ -(void) valueChanged:(id) sender { if (self.delegate != nil) { - initialLab.text = ((int)initialQt.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)initialQt.value]; - probLab.text = ((int)probabilityQt.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)probabilityQt.value]; - delLab.text = ((int)delayQt.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)delayQt.value]; - craLab.text = ((int)crateQt.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)crateQt.value]; - + initialLab.text = ((int)initialSli.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)initialSli.value]; + probabilityLab.text = ((int)probabilitySli.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)probabilitySli.value]; + delayLab.text = ((int)delaySli.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)delaySli.value]; + crateLab.text = ((int)crateSli.value == 9) ? @"∞" : [NSString stringWithFormat:@"%d",(int)crateSli.value]; + [delegate updateValues:[NSArray arrayWithObjects: - [NSNumber numberWithInt:(int)initialQt.value], - [NSNumber numberWithInt:(int)probabilityQt.value], - [NSNumber numberWithInt:(int)delayQt.value], - [NSNumber numberWithInt:(int)crateQt.value], nil] + [NSNumber numberWithInt:(int)initialSli.value], + [NSNumber numberWithInt:(int)probabilitySli.value], + [NSNumber numberWithInt:(int)delaySli.value], + [NSNumber numberWithInt:(int)crateSli.value], nil] atIndex:self.tag]; } else DLog(@"error - delegate = nil!"); } +-(void) startDragging:(id) sender { + UISlider *slider = (UISlider *)sender; + NSString *str = nil; + + switch (slider.tag) { + case 100: + str = NSLocalizedString(@"Initial quantity ",@"ammo selection"); + break; + case 200: + str = NSLocalizedString(@"Presence probability in crates ",@"ammo selection"); + break; + case 300: + str = NSLocalizedString(@"Number of turns before you can use this weapon ",@"ammo selection"); + break; + case 400: + str = NSLocalizedString(@"Quantity that you will find in a crate ",@"ammo selection"); + break; + default: + DLog(@"Nope"); + break; + } + self.helpLabel.text = str; +} + +-(void) stopDragging:(id) sender { + self.helpLabel.text = @""; +} + -(void) dealloc { self.delegate = nil; releaseAndNil(weaponName); releaseAndNil(weaponIcon); - releaseAndNil(initialQt); - releaseAndNil(probabilityQt); - releaseAndNil(delayQt); - releaseAndNil(crateQt); + releaseAndNil(initialSli); + releaseAndNil(probabilitySli); + releaseAndNil(delaySli); + releaseAndNil(crateSli); releaseAndNil(initialImg); - releaseAndNil(probabImg); + releaseAndNil(probabilityImg); releaseAndNil(delayImg); releaseAndNil(crateImg); releaseAndNil(initialLab); - releaseAndNil(probLab); - releaseAndNil(delLab); - releaseAndNil(craLab); + releaseAndNil(probabilityLab); + releaseAndNil(delayLab); + releaseAndNil(crateLab); + releaseAndNil(helpLabel); [super dealloc]; } diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.h --- a/project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.h Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.h Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// WeaponSettingsViewController.h -// HedgewarsMobile -// -// Created by Vittorio on 19/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 19/04/2010. + */ + #import @class SingleWeaponViewController; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m --- a/project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m Wed Oct 27 14:02:20 2010 +0200 @@ -1,10 +1,23 @@ -// -// WeaponSettingsViewController.m -// HedgewarsMobile -// -// Created by Vittorio on 19/04/10. -// Copyright 2010 __MyCompanyName__. All rights reserved. -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * File created on 19/04/2010. + */ + #import "WeaponSettingsViewController.h" #import "CommodityFunctions.h" @@ -21,24 +34,24 @@ #pragma mark View lifecycle -(void) viewDidLoad { [super viewDidLoad]; - - UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"from the weapon panel") + + UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"") style:UIBarButtonItemStyleBordered target:self action:@selector(toggleEdit:)]; self.navigationItem.rightBarButtonItem = editButton; [editButton release]; - + } -(void) viewWillAppear:(BOOL) animated { [super viewWillAppear:animated]; - + NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:WEAPONS_DIRECTORY() error:NULL]; NSMutableArray *array = [[NSMutableArray alloc] initWithArray:contentsOfDir copyItems:YES]; self.listOfWeapons = array; [array release]; - + [self.tableView reloadData]; } @@ -46,7 +59,7 @@ -(void) toggleEdit:(id) sender { BOOL isEditing = self.tableView.editing; [self.tableView setEditing:!isEditing animated:YES]; - + if (isEditing) { [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Edit",@"from the scheme panel")]; [self.navigationItem.rightBarButtonItem setStyle: UIBarButtonItemStyleBordered]; @@ -65,15 +78,15 @@ -(void) addWeapon:(id) sender { NSString *fileName = [[NSString alloc] initWithFormat:@"Weapon %u.plist", [self.listOfWeapons count]]; - - createWeaponNamed([fileName stringByDeletingPathExtension]); - + + createWeaponNamed([fileName stringByDeletingPathExtension], 0); + [self.listOfWeapons addObject:fileName]; [fileName release]; - + // order the array alphabetically, so schemes will keep their position [self.listOfWeapons sortUsingSelector:@selector(compare:)]; - + [self.tableView reloadData]; } @@ -89,28 +102,28 @@ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; - + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } - - NSUInteger row = [indexPath row]; - NSString *rowString = [[self.listOfWeapons objectAtIndex:row] stringByDeletingPathExtension]; - cell.textLabel.text = rowString; + + NSUInteger row = [indexPath row]; + NSString *rowString = [[self.listOfWeapons objectAtIndex:row] stringByDeletingPathExtension]; + cell.textLabel.text = rowString; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - + return cell; } // delete the row and the file -(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; - + NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@",WEAPONS_DIRECTORY(),[self.listOfWeapons objectAtIndex:row]]; [[NSFileManager defaultManager] removeItemAtPath:schemeFile error:NULL]; [schemeFile release]; - + [self.listOfWeapons removeObjectAtIndex:row]; [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; } @@ -121,10 +134,10 @@ if (childController == nil) { childController = [[SingleWeaponViewController alloc] initWithStyle:UITableViewStyleGrouped]; } - + NSInteger row = [indexPath row]; NSString *selectedWeaponFile = [self.listOfWeapons objectAtIndex:row]; - + // this must be set so childController can load the correct plist childController.weaponName = [selectedWeaponFile stringByDeletingPathExtension]; [childController.tableView setContentOffset:CGPointMake(0,0) animated:NO]; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj --- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Wed Oct 27 14:02:20 2010 +0200 @@ -25,19 +25,39 @@ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; }; 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + 610D5FB21270E2660033333A /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43411E290650040BA66 /* Icon-Small@2x.png */; }; + 610D5FB31270E26C0033333A /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43611E290650040BA66 /* Icon@2x.png */; }; + 611D9BFB12497E9800008271 /* SavedGamesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611D9BF912497E9800008271 /* SavedGamesViewController.m */; }; + 611D9BFC12497E9800008271 /* SavedGamesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 611D9BFA12497E9800008271 /* SavedGamesViewController.xib */; }; + 611DA031124E2BC500008271 /* background_med.png in Resources */ = {isa = PBXBuildFile; fileRef = 611DA030124E2BC500008271 /* background_med.png */; }; + 611DA1D0124E5C6300008271 /* plus.png in Resources */ = {isa = PBXBuildFile; fileRef = 611DA1CF124E5C6300008271 /* plus.png */; }; 611E03E711FA747C0077A41E /* libvorbis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 611E037C11FA74590077A41E /* libvorbis.a */; }; 611E0E5111FA92170077A41E /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 611E0E5011FA92130077A41E /* libfreetype.a */; }; 611E0EE711FB20610077A41E /* ammoButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 611E0EE511FB20610077A41E /* ammoButton.png */; }; 611E0EE811FB20610077A41E /* cornerButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 611E0EE611FB20610077A41E /* cornerButton.png */; }; 611E12FF117BBBDA0044B62F /* Entitlements-Development.plist in Resources */ = {isa = PBXBuildFile; fileRef = 611E12FE117BBBDA0044B62F /* Entitlements-Development.plist */; }; + 611EE974122A9C4100DF6938 /* clickSound.wav in Resources */ = {isa = PBXBuildFile; fileRef = 611EE973122A9C4100DF6938 /* clickSound.wav */; }; + 611EE9D9122AA10A00DF6938 /* backSound.wav in Resources */ = {isa = PBXBuildFile; fileRef = 611EE9D7122AA10A00DF6938 /* backSound.wav */; }; + 611EE9DA122AA10A00DF6938 /* selSound.wav in Resources */ = {isa = PBXBuildFile; fileRef = 611EE9D8122AA10A00DF6938 /* selSound.wav */; }; + 611EEA7E122B09C200DF6938 /* background_small.png in Resources */ = {isa = PBXBuildFile; fileRef = 611EEA7D122B09C200DF6938 /* background_small.png */; }; + 611EEAEE122B2A4D00DF6938 /* HelpPageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611EEAEC122B2A4D00DF6938 /* HelpPageViewController.m */; }; + 611EEAEF122B2A4D00DF6938 /* HelpPageLobbyViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 611EEAED122B2A4D00DF6938 /* HelpPageLobbyViewController.xib */; }; + 611EEBC1122B34A800DF6938 /* helpingame.png in Resources */ = {isa = PBXBuildFile; fileRef = 611EEBC0122B34A800DF6938 /* helpingame.png */; }; + 611EEBC4122B355700DF6938 /* helpbottom.png in Resources */ = {isa = PBXBuildFile; fileRef = 611EEBC2122B355700DF6938 /* helpbottom.png */; }; + 611EEBC5122B355700DF6938 /* helpright.png in Resources */ = {isa = PBXBuildFile; fileRef = 611EEBC3122B355700DF6938 /* helpright.png */; }; + 611EEC31122B54D700DF6938 /* helpplain.png in Resources */ = {isa = PBXBuildFile; fileRef = 611EEC30122B54D700DF6938 /* helpplain.png */; }; 611F4D4B11B27A9900F9759A /* uScript.pas in Sources */ = {isa = PBXBuildFile; fileRef = 611F4D4A11B27A9900F9759A /* uScript.pas */; }; 61272334117DF764005B90CF /* libSDL_image.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61272333117DF752005B90CF /* libSDL_image.a */; }; 61272339117DF778005B90CF /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61272338117DF778005B90CF /* MobileCoreServices.framework */; }; 6129B9F711EFB04D0017E305 /* denied.png in Resources */ = {isa = PBXBuildFile; fileRef = 6129B9F611EFB04D0017E305 /* denied.png */; }; 61370653117B1D50004EE44A /* Entitlements-Distribution.plist in Resources */ = {isa = PBXBuildFile; fileRef = 61370652117B1D50004EE44A /* Entitlements-Distribution.plist */; }; + 61399013125D19C0003C2DC0 /* uMobile.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61399012125D19C0003C2DC0 /* uMobile.pas */; }; + 6147DAD31253DCDE0010357E /* savesButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 6147DAD21253DCDE0010357E /* savesButton.png */; }; 61536DF411CEAE7100D87A7E /* GameConfigViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924A11CA9CB400D6E256 /* GameConfigViewController.xib */; }; + 615AD96212073B4D00F2FF04 /* startGameButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 615AD96112073B4D00F2FF04 /* startGameButton.png */; }; + 615AD9E9120764CA00F2FF04 /* backButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 615AD9E8120764CA00F2FF04 /* backButton.png */; }; + 615AD9EB1207654E00F2FF04 /* helpButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 615AD9EA1207654E00F2FF04 /* helpButton.png */; }; 6163EE7E11CC2600001C0453 /* SingleWeaponViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6163EE7D11CC2600001C0453 /* SingleWeaponViewController.m */; }; - 6165920C11CA9BA200D6E256 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591DF11CA9BA200D6E256 /* DetailViewController.m */; }; 6165920D11CA9BA200D6E256 /* FlagsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E111CA9BA200D6E256 /* FlagsViewController.m */; }; 6165920E11CA9BA200D6E256 /* FortsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E311CA9BA200D6E256 /* FortsViewController.m */; }; 6165920F11CA9BA200D6E256 /* GameConfigViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E511CA9BA200D6E256 /* GameConfigViewController.m */; }; @@ -66,9 +86,7 @@ 6165923111CA9BD500D6E256 /* SquareButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165922B11CA9BD500D6E256 /* SquareButtonView.m */; }; 6165923211CA9BD500D6E256 /* UIImageExtra.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165922D11CA9BD500D6E256 /* UIImageExtra.m */; }; 6165925311CA9CB400D6E256 /* MainMenuViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924B11CA9CB400D6E256 /* MainMenuViewController-iPad.xib */; }; - 6165925411CA9CB400D6E256 /* MainMenuViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924C11CA9CB400D6E256 /* MainMenuViewController-iPhone.xib */; }; 6165925511CA9CB400D6E256 /* MapConfigViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924D11CA9CB400D6E256 /* MapConfigViewController-iPad.xib */; }; - 6165925611CA9CB400D6E256 /* MapConfigViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924E11CA9CB400D6E256 /* MapConfigViewController-iPhone.xib */; }; 6165925811CA9CB400D6E256 /* OverlayViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165925011CA9CB400D6E256 /* OverlayViewController.xib */; }; 6165929E11CA9E2F00D6E256 /* SDL_uikitappdelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */; }; 61798816114AA34C00BA94A9 /* hwengine.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987E7114AA34C00BA94A9 /* hwengine.pas */; }; @@ -109,15 +127,32 @@ 61798A14114AB65C00BA94A9 /* libSDL_ttf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798A13114AB65600BA94A9 /* libSDL_ttf.a */; }; 61799289114AE08700BA94A9 /* Data in Resources */ = {isa = PBXBuildFile; fileRef = 61798A5E114AE08600BA94A9 /* Data */; }; 6183D83E11E2BCE200A88903 /* LI-ipad-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 6183D83C11E2BCE200A88903 /* LI-ipad-Landscape.png */; }; - 6183D83F11E2BCE200A88903 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6183D83D11E2BCE200A88903 /* Default.png */; }; - 619C09EA11E8B8D600F1DF16 /* title_small.png in Resources */ = {isa = PBXBuildFile; fileRef = 619C09E911E8B8D600F1DF16 /* title_small.png */; }; + 61842B24122B619D0096E335 /* HelpPageInGameViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61842B23122B619D0096E335 /* HelpPageInGameViewController.xib */; }; + 61842B3E122B65BD0096E335 /* helpabove.png in Resources */ = {isa = PBXBuildFile; fileRef = 61842B3D122B65BD0096E335 /* helpabove.png */; }; + 61842B40122B66280096E335 /* helpleft.png in Resources */ = {isa = PBXBuildFile; fileRef = 61842B3F122B66280096E335 /* helpleft.png */; }; + 6187AEBD120781B900B31A27 /* Settings in Resources */ = {isa = PBXBuildFile; fileRef = 6187AEA5120781B900B31A27 /* Settings */; }; + 6199E81612463EA800DADF8C /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6199E81512463EA800DADF8C /* CFNetwork.framework */; }; + 6199E81A12463EC400DADF8C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6199E81912463EC400DADF8C /* SystemConfiguration.framework */; }; + 6199E839124647DE00DADF8C /* SupportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6199E837124647DE00DADF8C /* SupportViewController.m */; }; + 6199E83A124647DE00DADF8C /* SupportViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6199E838124647DE00DADF8C /* SupportViewController.xib */; }; + 6199E86D12464A8E00DADF8C /* surpise.png in Resources */ = {isa = PBXBuildFile; fileRef = 6199E86C12464A8E00DADF8C /* surpise.png */; }; + 619C5ACF124F7DE200D041AE /* libLua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 619C5ACE124F7DDF00D041AE /* libLua.a */; }; + 619C5AF4124F7E3100D041AE /* LuaPas.pas in Sources */ = {isa = PBXBuildFile; fileRef = 619C5AF3124F7E3100D041AE /* LuaPas.pas */; }; + 619C5BA2124FA59000D041AE /* MapPreviewButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 619C5BA1124FA59000D041AE /* MapPreviewButtonView.m */; }; 61A1188511683A8C00359010 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A117FE1168322700359010 /* CoreGraphics.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 61A118D311683CD100359010 /* HedgewarsTitle.png in Resources */ = {isa = PBXBuildFile; fileRef = 611FD9CB1155A28C00C2203D /* HedgewarsTitle.png */; }; + 61A670BE12747D8900B06CE7 /* borderBottom.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903E911DF58550068B24D /* borderBottom.png */; }; + 61A670BF12747D9100B06CE7 /* borderTop.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903EA11DF58550068B24D /* borderTop.png */; }; + 61A670C012747D9B00B06CE7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6183D83D11E2BCE200A88903 /* Default.png */; }; + 61A670C112747DB900B06CE7 /* MainMenuViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924C11CA9CB400D6E256 /* MainMenuViewController-iPhone.xib */; }; + 61A670C212747DBD00B06CE7 /* MapConfigViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924E11CA9CB400D6E256 /* MapConfigViewController-iPhone.xib */; }; + 61A670FA12747E0000B06CE7 /* playButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903EC11DF58550068B24D /* playButton.png */; }; + 61A670FB12747E0D00B06CE7 /* title_small.png in Resources */ = {isa = PBXBuildFile; fileRef = 619C09E911E8B8D600F1DF16 /* title_small.png */; }; + 61A6710612747E4000B06CE7 /* backgroundCenter.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903E511DF58550068B24D /* backgroundCenter.png */; }; 61B3D71C11EA6F2700EC7420 /* uKeys.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987FE114AA34C00BA94A9 /* uKeys.pas */; }; 61C079E411F35A300072BF46 /* EditableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61C079E311F35A300072BF46 /* EditableCellView.m */; }; - 61C3255B1179A384001E70B1 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61C3255A1179A384001E70B1 /* OpenAL.framework */; }; + 61DE8F221257EB1100B80214 /* AmmoMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61DE8F211257EB1100B80214 /* AmmoMenuViewController.m */; }; 61E1F4F811D004240016A5AA /* adler32.pas in Sources */ = {isa = PBXBuildFile; fileRef = 61E1F4F711D004240016A5AA /* adler32.pas */; }; - 61EBA62911DFF2BC0048B68A /* bricks.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EBA62711DFF2BC0048B68A /* bricks.png */; }; 61EBA62A11DFF2BC0048B68A /* title.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EBA62811DFF2BC0048B68A /* title.png */; }; 61EBA62D11DFF3310048B68A /* backgroundAndTitle.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EBA62C11DFF3310048B68A /* backgroundAndTitle.png */; }; 61EF920E11DF57AC003441C4 /* arrowDown.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920511DF57AC003441C4 /* arrowDown.png */; }; @@ -127,30 +162,17 @@ 61EF921211DF57AC003441C4 /* joyButton_attack.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920911DF57AC003441C4 /* joyButton_attack.png */; }; 61EF921311DF57AC003441C4 /* joyButton_backjump.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920A11DF57AC003441C4 /* joyButton_backjump.png */; }; 61EF921411DF57AC003441C4 /* joyButton_forwardjump.png in Resources */ = {isa = PBXBuildFile; fileRef = 61EF920B11DF57AC003441C4 /* joyButton_forwardjump.png */; }; - 61F7A35511E27D3C0040BA66 /* background-lobby.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A35411E27D3C0040BA66 /* background-lobby.png */; }; + 61F2E7CE1205EDE0005734F7 /* AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F2E7CC1205EDE0005734F7 /* AboutViewController.m */; }; + 61F2E7CF1205EDE0005734F7 /* AboutViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61F2E7CD1205EDE0005734F7 /* AboutViewController.xib */; }; + 61F2E7EC12060E31005734F7 /* checkbox.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F2E7EB12060E31005734F7 /* checkbox.png */; }; 61F7A43811E290650040BA66 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43111E290650040BA66 /* Icon-72.png */; }; 61F7A43911E290650040BA66 /* Icon-Small-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43211E290650040BA66 /* Icon-Small-50.png */; }; 61F7A43A11E290650040BA66 /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43311E290650040BA66 /* Icon-Small.png */; }; - 61F7A43B11E290650040BA66 /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43411E290650040BA66 /* Icon-Small@2x.png */; }; 61F7A43C11E290650040BA66 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43511E290650040BA66 /* Icon.png */; }; - 61F7A43D11E290650040BA66 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43611E290650040BA66 /* Icon@2x.png */; }; 61F7A43E11E290650040BA66 /* iTunesArtwork.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F7A43711E290650040BA66 /* iTunesArtwork.png */; }; - 61F903EF11DF58550068B24D /* backgroundBottom.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903E411DF58550068B24D /* backgroundBottom.png */; }; - 61F903F011DF58550068B24D /* backgroundCenter.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903E511DF58550068B24D /* backgroundCenter.png */; }; - 61F903F111DF58550068B24D /* backgroundLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903E611DF58550068B24D /* backgroundLeft.png */; }; - 61F903F211DF58550068B24D /* backgroundRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903E711DF58550068B24D /* backgroundRight.png */; }; - 61F903F311DF58550068B24D /* backgroundTop.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903E811DF58550068B24D /* backgroundTop.png */; }; - 61F903F411DF58550068B24D /* borderBottom.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903E911DF58550068B24D /* borderBottom.png */; }; - 61F903F511DF58550068B24D /* borderTop.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903EA11DF58550068B24D /* borderTop.png */; }; - 61F903F611DF58550068B24D /* networkButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903EB11DF58550068B24D /* networkButton.png */; }; - 61F903F711DF58550068B24D /* playButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903EC11DF58550068B24D /* playButton.png */; }; - 61F903F811DF58550068B24D /* storeButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F903ED11DF58550068B24D /* storeButton.png */; }; 61F9040911DF58B00068B24D /* settingsButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040811DF58B00068B24D /* settingsButton.png */; }; 61F9040B11DF59370068B24D /* background.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040A11DF59370068B24D /* background.png */; }; 61F9040E11DF59D10068B24D /* localplayButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040C11DF59D10068B24D /* localplayButton.png */; }; - 61F9040F11DF59D10068B24D /* netplayButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9040D11DF59D10068B24D /* netplayButton.png */; }; - 61F9041411DF5E9B0068B24D /* toolbarBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9041311DF5E9B0068B24D /* toolbarBackground.png */; }; - 61F9043A11DF64E20068B24D /* bluebox.png in Resources */ = {isa = PBXBuildFile; fileRef = 61F9043911DF64E20068B24D /* bluebox.png */; }; 61F904D711DF7DA30068B24D /* WeaponCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61F904D611DF7DA30068B24D /* WeaponCellView.m */; }; 922F64900F10F53100DC6EC0 /* libfpc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 928301170F10CAFC00CC5A3C /* libfpc.a */; }; /* End PBXBuildFile section */ @@ -666,6 +688,27 @@ remoteGlobalIDString = 006E982211955059001DE610; remoteInfo = testsdl; }; + 619C5AC9124F7DDF00D041AE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1D6058910D05DD3D006BFB54; + remoteInfo = "Test Lua"; + }; + 619C5ACB124F7DDF00D041AE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 506EE05E10304ED200A389B3; + remoteInfo = "cocos2d libraries"; + }; + 619C5ACD124F7DDF00D041AE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = E14CF7C110ABC177005470B6; + remoteInfo = Lua; + }; 928301590F10E41300CC5A3C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; @@ -682,22 +725,41 @@ 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 32CA4F630368D1EE00C91783 /* Hedgewars_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Hedgewars_Prefix.pch; sourceTree = ""; }; + 611D9BF812497E9800008271 /* SavedGamesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SavedGamesViewController.h; sourceTree = ""; }; + 611D9BF912497E9800008271 /* SavedGamesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SavedGamesViewController.m; sourceTree = ""; }; + 611D9BFA12497E9800008271 /* SavedGamesViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SavedGamesViewController.xib; sourceTree = ""; }; + 611DA030124E2BC500008271 /* background_med.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = background_med.png; path = Resources/Overlay/background_med.png; sourceTree = ""; }; + 611DA1CF124E5C6300008271 /* plus.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = plus.png; path = Resources/Overlay/plus.png; sourceTree = ""; }; 611E02EC11FA74580077A41E /* cocos2d-iphone.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "cocos2d-iphone.xcodeproj"; path = "../../../Library/cocos2d/cocos2d-iphone.xcodeproj"; sourceTree = SOURCE_ROOT; }; 611E0E4B11FA92130077A41E /* freetype.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = freetype.xcodeproj; path = "../../../Library/freetype/Xcode-iPhoneOS/freetype.xcodeproj"; sourceTree = SOURCE_ROOT; }; 611E0EE511FB20610077A41E /* ammoButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ammoButton.png; path = Resources/Overlay/ammoButton.png; sourceTree = ""; }; 611E0EE611FB20610077A41E /* cornerButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = cornerButton.png; path = Resources/Overlay/cornerButton.png; sourceTree = ""; }; 611E12FE117BBBDA0044B62F /* Entitlements-Development.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Entitlements-Development.plist"; sourceTree = ""; }; + 611EE973122A9C4100DF6938 /* clickSound.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = clickSound.wav; path = Resources/clickSound.wav; sourceTree = ""; }; + 611EE9D7122AA10A00DF6938 /* backSound.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = backSound.wav; path = Resources/backSound.wav; sourceTree = ""; }; + 611EE9D8122AA10A00DF6938 /* selSound.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = selSound.wav; path = Resources/selSound.wav; sourceTree = ""; }; + 611EEA7D122B09C200DF6938 /* background_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = background_small.png; path = Resources/Overlay/background_small.png; sourceTree = ""; }; + 611EEAEB122B2A4D00DF6938 /* HelpPageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelpPageViewController.h; sourceTree = ""; }; + 611EEAEC122B2A4D00DF6938 /* HelpPageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HelpPageViewController.m; sourceTree = ""; }; + 611EEAED122B2A4D00DF6938 /* HelpPageLobbyViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HelpPageLobbyViewController.xib; sourceTree = ""; }; + 611EEBC0122B34A800DF6938 /* helpingame.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpingame.png; path = Resources/Overlay/helpingame.png; sourceTree = ""; }; + 611EEBC2122B355700DF6938 /* helpbottom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpbottom.png; path = Resources/Overlay/helpbottom.png; sourceTree = ""; }; + 611EEBC3122B355700DF6938 /* helpright.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpright.png; path = Resources/Overlay/helpright.png; sourceTree = ""; }; + 611EEC30122B54D700DF6938 /* helpplain.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpplain.png; path = Resources/Overlay/helpplain.png; sourceTree = ""; }; 611F4D4A11B27A9900F9759A /* uScript.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uScript.pas; path = ../../hedgewars/uScript.pas; sourceTree = SOURCE_ROOT; }; 611FD9CB1155A28C00C2203D /* HedgewarsTitle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = HedgewarsTitle.png; path = ../../QTfrontend/res/HedgewarsTitle.png; sourceTree = SOURCE_ROOT; }; 6127232E117DF752005B90CF /* SDL_image.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_image.xcodeproj; path = "../../../Library/SDL-1.3/SDL_image/Xcode_iPhone/SDL_image.xcodeproj"; sourceTree = SOURCE_ROOT; }; 61272338117DF778005B90CF /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 6129B9F611EFB04D0017E305 /* denied.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = denied.png; path = Resources/denied.png; sourceTree = ""; }; 61370652117B1D50004EE44A /* Entitlements-Distribution.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Entitlements-Distribution.plist"; sourceTree = ""; }; + 61399012125D19C0003C2DC0 /* uMobile.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uMobile.pas; path = ../../hedgewars/uMobile.pas; sourceTree = SOURCE_ROOT; }; + 6147DAD21253DCDE0010357E /* savesButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = savesButton.png; path = Resources/savesButton.png; sourceTree = ""; }; 614E333D11DE9A93009DBA4E /* VGSHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = VGSHandlers.inc; path = ../../hedgewars/VGSHandlers.inc; sourceTree = SOURCE_ROOT; }; + 615AD96112073B4D00F2FF04 /* startGameButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = startGameButton.png; path = "Resources/Frontend-iPad/startGameButton.png"; sourceTree = ""; }; + 615AD9E8120764CA00F2FF04 /* backButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backButton.png; path = "Resources/Frontend-iPad/backButton.png"; sourceTree = ""; }; + 615AD9EA1207654E00F2FF04 /* helpButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpButton.png; path = "Resources/Frontend-iPad/helpButton.png"; sourceTree = ""; }; 6163EE7C11CC2600001C0453 /* SingleWeaponViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleWeaponViewController.h; sourceTree = ""; }; 6163EE7D11CC2600001C0453 /* SingleWeaponViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SingleWeaponViewController.m; sourceTree = ""; }; - 616591DE11CA9BA200D6E256 /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = ""; }; - 616591DF11CA9BA200D6E256 /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = ""; }; 616591E011CA9BA200D6E256 /* FlagsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlagsViewController.h; sourceTree = ""; }; 616591E111CA9BA200D6E256 /* FlagsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlagsViewController.m; sourceTree = ""; }; 616591E211CA9BA200D6E256 /* FortsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FortsViewController.h; sourceTree = ""; }; @@ -807,15 +869,28 @@ 61798A5E114AE08600BA94A9 /* Data */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Data; sourceTree = ""; }; 6183D83C11E2BCE200A88903 /* LI-ipad-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "LI-ipad-Landscape.png"; path = "Resources/Icons/LI-ipad-Landscape.png"; sourceTree = ""; }; 6183D83D11E2BCE200A88903 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/Icons/Default.png; sourceTree = ""; }; + 61842B23122B619D0096E335 /* HelpPageInGameViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HelpPageInGameViewController.xib; sourceTree = ""; }; + 61842B3D122B65BD0096E335 /* helpabove.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpabove.png; path = Resources/Overlay/helpabove.png; sourceTree = ""; }; + 61842B3F122B66280096E335 /* helpleft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = helpleft.png; path = Resources/Overlay/helpleft.png; sourceTree = ""; }; 618736B8118CA28600123B23 /* GearDrawing.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = GearDrawing.inc; path = ../../hedgewars/GearDrawing.inc; sourceTree = SOURCE_ROOT; }; + 6187AEA5120781B900B31A27 /* Settings */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Settings; path = Resources/Settings; sourceTree = ""; }; + 6199E81512463EA800DADF8C /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; + 6199E81912463EC400DADF8C /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 6199E836124647DE00DADF8C /* SupportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SupportViewController.h; sourceTree = ""; }; + 6199E837124647DE00DADF8C /* SupportViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SupportViewController.m; sourceTree = ""; }; + 6199E838124647DE00DADF8C /* SupportViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SupportViewController.xib; sourceTree = ""; }; + 6199E86C12464A8E00DADF8C /* surpise.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = surpise.png; path = Resources/surpise.png; sourceTree = ""; }; 619C09E911E8B8D600F1DF16 /* title_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title_small.png; path = "Resources/Frontend-iPhone/title_small.png"; sourceTree = ""; }; + 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Lua.xcodeproj; path = ../../../Library/Lua/Lua.xcodeproj; sourceTree = SOURCE_ROOT; }; + 619C5AF3124F7E3100D041AE /* LuaPas.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = LuaPas.pas; path = ../../hedgewars/LuaPas.pas; sourceTree = SOURCE_ROOT; }; + 619C5BA0124FA59000D041AE /* MapPreviewButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MapPreviewButtonView.h; path = Classes/MapPreviewButtonView.h; sourceTree = ""; }; + 619C5BA1124FA59000D041AE /* MapPreviewButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MapPreviewButtonView.m; path = Classes/MapPreviewButtonView.m; sourceTree = ""; }; 61A117FE1168322700359010 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 61C079E211F35A300072BF46 /* EditableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditableCellView.h; sourceTree = ""; }; 61C079E311F35A300072BF46 /* EditableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditableCellView.m; sourceTree = ""; }; - 61C3251D1179A300001E70B1 /* libopenalbridge.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libopenalbridge.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 61C3255A1179A384001E70B1 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + 61DE8F201257EB1100B80214 /* AmmoMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AmmoMenuViewController.h; sourceTree = ""; }; + 61DE8F211257EB1100B80214 /* AmmoMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AmmoMenuViewController.m; sourceTree = ""; }; 61E1F4F711D004240016A5AA /* adler32.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = adler32.pas; path = ../../hedgewars/adler32.pas; sourceTree = SOURCE_ROOT; }; - 61EBA62711DFF2BC0048B68A /* bricks.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bricks.png; path = "Resources/Frontend-iPad/bricks.png"; sourceTree = ""; }; 61EBA62811DFF2BC0048B68A /* title.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title.png; path = "Resources/Frontend-iPad/title.png"; sourceTree = ""; }; 61EBA62C11DFF3310048B68A /* backgroundAndTitle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundAndTitle.png; path = "Resources/Frontend-iPad/backgroundAndTitle.png"; sourceTree = ""; }; 61EF920511DF57AC003441C4 /* arrowDown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowDown.png; path = Resources/Overlay/arrowDown.png; sourceTree = ""; }; @@ -825,7 +900,10 @@ 61EF920911DF57AC003441C4 /* joyButton_attack.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButton_attack.png; path = Resources/Overlay/joyButton_attack.png; sourceTree = ""; }; 61EF920A11DF57AC003441C4 /* joyButton_backjump.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButton_backjump.png; path = Resources/Overlay/joyButton_backjump.png; sourceTree = ""; }; 61EF920B11DF57AC003441C4 /* joyButton_forwardjump.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButton_forwardjump.png; path = Resources/Overlay/joyButton_forwardjump.png; sourceTree = ""; }; - 61F7A35411E27D3C0040BA66 /* background-lobby.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "background-lobby.png"; path = "Resources/Frontend-iPad/background-lobby.png"; sourceTree = ""; }; + 61F2E7CB1205EDE0005734F7 /* AboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutViewController.h; sourceTree = ""; }; + 61F2E7CC1205EDE0005734F7 /* AboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutViewController.m; sourceTree = ""; }; + 61F2E7CD1205EDE0005734F7 /* AboutViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AboutViewController.xib; sourceTree = ""; }; + 61F2E7EB12060E31005734F7 /* checkbox.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = checkbox.png; path = Resources/checkbox.png; sourceTree = ""; }; 61F7A43111E290650040BA66 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-72.png"; path = "Resources/Icons/Icon-72.png"; sourceTree = ""; }; 61F7A43211E290650040BA66 /* Icon-Small-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small-50.png"; path = "Resources/Icons/Icon-Small-50.png"; sourceTree = ""; }; 61F7A43311E290650040BA66 /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small.png"; path = "Resources/Icons/Icon-Small.png"; sourceTree = ""; }; @@ -845,10 +923,8 @@ 61F903ED11DF58550068B24D /* storeButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = storeButton.png; path = "Resources/Frontend-iPhone/storeButton.png"; sourceTree = ""; }; 61F9040811DF58B00068B24D /* settingsButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = settingsButton.png; path = Resources/settingsButton.png; sourceTree = ""; }; 61F9040A11DF59370068B24D /* background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = background.png; path = "Resources/Frontend-iPad/background.png"; sourceTree = ""; }; - 61F9040C11DF59D10068B24D /* localplayButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = localplayButton.png; path = "../../../../Desktop/ForKoda/Main Menu/localplayButton.png"; sourceTree = SOURCE_ROOT; }; - 61F9040D11DF59D10068B24D /* netplayButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = netplayButton.png; path = "../../../../Desktop/ForKoda/Main Menu/netplayButton.png"; sourceTree = SOURCE_ROOT; }; - 61F9041311DF5E9B0068B24D /* toolbarBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = toolbarBackground.png; path = "Resources/Frontend-iPad/toolbarBackground.png"; sourceTree = ""; }; - 61F9043911DF64E20068B24D /* bluebox.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bluebox.png; path = "Resources/Frontend-iPad/bluebox.png"; sourceTree = ""; }; + 61F9040C11DF59D10068B24D /* localplayButton.png */ = {isa = PBXFileReference; explicitFileType = image.png; name = localplayButton.png; path = "Resources/Frontend-iPad/localplayButton.png"; sourceTree = ""; }; + 61F9040D11DF59D10068B24D /* netplayButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = netplayButton.png; path = "Resources/Frontend-iPad/netplayButton.png"; sourceTree = ""; }; 61F904D511DF7DA30068B24D /* WeaponCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeaponCellView.h; sourceTree = ""; }; 61F904D611DF7DA30068B24D /* WeaponCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WeaponCellView.m; sourceTree = ""; }; 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -868,6 +944,7 @@ 922F64900F10F53100DC6EC0 /* libfpc.a in Frameworks */, 611E03E711FA747C0077A41E /* libvorbis.a in Frameworks */, 611E0E5111FA92170077A41E /* libfreetype.a in Frameworks */, + 619C5ACF124F7DE200D041AE /* libLua.a in Frameworks */, 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 61A1188511683A8C00359010 /* CoreGraphics.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, @@ -875,14 +952,8 @@ 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */, 61798935114AB25F00BA94A9 /* AudioToolbox.framework in Frameworks */, 61272339117DF778005B90CF /* MobileCoreServices.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 61C3251B1179A300001E70B1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 61C3255B1179A384001E70B1 /* OpenAL.framework in Frameworks */, + 6199E81612463EA800DADF8C /* CFNetwork.framework in Frameworks */, + 6199E81A12463EC400DADF8C /* SystemConfiguration.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -894,6 +965,7 @@ children = ( 6163EE4D11CC247D001C0453 /* Game Config */, 6163EE4C11CC2478001C0453 /* Settings Pages */, + 611D9BF312497B7700008271 /* Other Controllers */, 6163EE6C11CC253F001C0453 /* Overlay */, 616591F011CA9BA200D6E256 /* MainMenuViewController.h */, 616591F111CA9BA200D6E256 /* MainMenuViewController.m */, @@ -910,7 +982,6 @@ children = ( 1D6058910D05DD3D006BFB54 /* Hedgewars.app */, 928301170F10CAFC00CC5A3C /* libfpc.a */, - 61C3251D1179A300001E70B1 /* libopenalbridge.a */, ); name = Products; sourceTree = ""; @@ -933,18 +1004,15 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( + 61DE91561258B76800B80214 /* Custom Buttons */, 32CA4F630368D1EE00C91783 /* Hedgewars_Prefix.pch */, 6165922911CA9BD500D6E256 /* PascalImports.h */, - 6165929C11CA9E2F00D6E256 /* SDL_uikitappdelegate.h */, - 6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */, 6165922411CA9BD500D6E256 /* CGPointUtils.h */, 6165922311CA9BD500D6E256 /* CGPointUtils.c */, + 6165929C11CA9E2F00D6E256 /* SDL_uikitappdelegate.h */, + 6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */, 6165922511CA9BD500D6E256 /* CommodityFunctions.h */, 6165922611CA9BD500D6E256 /* CommodityFunctions.m */, - 6165922711CA9BD500D6E256 /* HogButtonView.h */, - 6165922811CA9BD500D6E256 /* HogButtonView.m */, - 6165922A11CA9BD500D6E256 /* SquareButtonView.h */, - 6165922B11CA9BD500D6E256 /* SquareButtonView.m */, 6165922C11CA9BD500D6E256 /* UIImageExtra.h */, 6165922D11CA9BD500D6E256 /* UIImageExtra.m */, ); @@ -954,12 +1022,25 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + 6147DAD21253DCDE0010357E /* savesButton.png */, + 6199E86C12464A8E00DADF8C /* surpise.png */, + 611EEBC0122B34A800DF6938 /* helpingame.png */, + 611EEC30122B54D700DF6938 /* helpplain.png */, + 611EEBC2122B355700DF6938 /* helpbottom.png */, + 61842B3D122B65BD0096E335 /* helpabove.png */, + 611EEBC3122B355700DF6938 /* helpright.png */, + 61842B3F122B66280096E335 /* helpleft.png */, 6129B9F611EFB04D0017E305 /* denied.png */, + 61F2E7EB12060E31005734F7 /* checkbox.png */, + 611EE973122A9C4100DF6938 /* clickSound.wav */, + 611EE9D7122AA10A00DF6938 /* backSound.wav */, + 611EE9D8122AA10A00DF6938 /* selSound.wav */, 61F7A42811E2905C0040BA66 /* Icons */, 61F903FA11DF58680068B24D /* Frontend-iPad */, 61F903E311DF584D0068B24D /* Frontend-iPhone */, 6179936611501D1E00BA94A9 /* Overlay */, 61798A5E114AE08600BA94A9 /* Data */, + 6187AEA5120781B900B31A27 /* Settings */, 611FD9CB1155A28C00C2203D /* HedgewarsTitle.png */, 8D1107310486CEB800E47090 /* Info.plist */, 61F9040811DF58B00068B24D /* settingsButton.png */, @@ -970,6 +1051,7 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( + 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */, 611E02EC11FA74580077A41E /* cocos2d-iphone.xcodeproj */, 611E0E4B11FA92130077A41E /* freetype.xcodeproj */, 617988D3114AAA3900BA94A9 /* SDLiPhoneOS.xcodeproj */, @@ -983,12 +1065,26 @@ 28FD14FF0DC6FC520079059D /* OpenGLES.framework */, 28FD15070DC6FC5B0079059D /* QuartzCore.framework */, 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 61C3255A1179A384001E70B1 /* OpenAL.framework */, 61272338117DF778005B90CF /* MobileCoreServices.framework */, + 6199E81512463EA800DADF8C /* CFNetwork.framework */, + 6199E81912463EC400DADF8C /* SystemConfiguration.framework */, ); name = Frameworks; sourceTree = ""; }; + 611D9BF312497B7700008271 /* Other Controllers */ = { + isa = PBXGroup; + children = ( + 61F2E7CB1205EDE0005734F7 /* AboutViewController.h */, + 61F2E7CC1205EDE0005734F7 /* AboutViewController.m */, + 61F2E7CD1205EDE0005734F7 /* AboutViewController.xib */, + 611D9BF812497E9800008271 /* SavedGamesViewController.h */, + 611D9BF912497E9800008271 /* SavedGamesViewController.m */, + 611D9BFA12497E9800008271 /* SavedGamesViewController.xib */, + ); + name = "Other Controllers"; + sourceTree = ""; + }; 611E02ED11FA74580077A41E /* Products */ = { isa = PBXGroup; children = ( @@ -1083,8 +1179,6 @@ 6165920311CA9BA200D6E256 /* SplitViewRootController.m */, 616591F411CA9BA200D6E256 /* MasterViewController.h */, 616591F511CA9BA200D6E256 /* MasterViewController.m */, - 616591DE11CA9BA200D6E256 /* DetailViewController.h */, - 616591DF11CA9BA200D6E256 /* DetailViewController.m */, 6163EE4E11CC248D001C0453 /* First Level */, 6163EE4F11CC2497001C0453 /* Second Level */, 6163EE5011CC24A1001C0453 /* Third Level */, @@ -1121,6 +1215,9 @@ 6165920B11CA9BA200D6E256 /* WeaponSettingsViewController.m */, 616591FA11CA9BA200D6E256 /* SchemeSettingsViewController.h */, 616591FB11CA9BA200D6E256 /* SchemeSettingsViewController.m */, + 6199E836124647DE00DADF8C /* SupportViewController.h */, + 6199E837124647DE00DADF8C /* SupportViewController.m */, + 6199E838124647DE00DADF8C /* SupportViewController.xib */, ); name = "First Level"; sourceTree = ""; @@ -1169,6 +1266,12 @@ 616591F611CA9BA200D6E256 /* OverlayViewController.h */, 616591F711CA9BA200D6E256 /* OverlayViewController.m */, 6165925011CA9CB400D6E256 /* OverlayViewController.xib */, + 611EEAEB122B2A4D00DF6938 /* HelpPageViewController.h */, + 611EEAEC122B2A4D00DF6938 /* HelpPageViewController.m */, + 611EEAED122B2A4D00DF6938 /* HelpPageLobbyViewController.xib */, + 61842B23122B619D0096E335 /* HelpPageInGameViewController.xib */, + 61DE8F201257EB1100B80214 /* AmmoMenuViewController.h */, + 61DE8F211257EB1100B80214 /* AmmoMenuViewController.m */, ); name = Overlay; sourceTree = ""; @@ -1224,12 +1327,15 @@ 6179936611501D1E00BA94A9 /* Overlay */ = { isa = PBXGroup; children = ( + 611DA1CF124E5C6300008271 /* plus.png */, + 611DA030124E2BC500008271 /* background_med.png */, 611E0EE511FB20610077A41E /* ammoButton.png */, 611E0EE611FB20610077A41E /* cornerButton.png */, 61EF920511DF57AC003441C4 /* arrowDown.png */, 61EF920611DF57AC003441C4 /* arrowLeft.png */, 61EF920711DF57AC003441C4 /* arrowRight.png */, 61EF920811DF57AC003441C4 /* arrowUp.png */, + 611EEA7D122B09C200DF6938 /* background_small.png */, 61EF920911DF57AC003441C4 /* joyButton_attack.png */, 61EF920A11DF57AC003441C4 /* joyButton_backjump.png */, 61EF920B11DF57AC003441C4 /* joyButton_forwardjump.png */, @@ -1237,6 +1343,29 @@ name = Overlay; sourceTree = ""; }; + 619C5AC1124F7DDF00D041AE /* Products */ = { + isa = PBXGroup; + children = ( + 619C5ACA124F7DDF00D041AE /* Lua.app */, + 619C5ACC124F7DDF00D041AE /* libcocos2d libraries.a */, + 619C5ACE124F7DDF00D041AE /* libLua.a */, + ); + name = Products; + sourceTree = ""; + }; + 61DE91561258B76800B80214 /* Custom Buttons */ = { + isa = PBXGroup; + children = ( + 6165922711CA9BD500D6E256 /* HogButtonView.h */, + 6165922811CA9BD500D6E256 /* HogButtonView.m */, + 6165922A11CA9BD500D6E256 /* SquareButtonView.h */, + 6165922B11CA9BD500D6E256 /* SquareButtonView.m */, + 619C5BA0124FA59000D041AE /* MapPreviewButtonView.h */, + 619C5BA1124FA59000D041AE /* MapPreviewButtonView.m */, + ); + name = "Custom Buttons"; + sourceTree = ""; + }; 61F7A42811E2905C0040BA66 /* Icons */ = { isa = PBXGroup; children = ( @@ -1274,14 +1403,13 @@ 61F903FA11DF58680068B24D /* Frontend-iPad */ = { isa = PBXGroup; children = ( - 61F9043911DF64E20068B24D /* bluebox.png */, - 61EBA62711DFF2BC0048B68A /* bricks.png */, + 615AD96112073B4D00F2FF04 /* startGameButton.png */, + 615AD9EA1207654E00F2FF04 /* helpButton.png */, + 615AD9E8120764CA00F2FF04 /* backButton.png */, 61EBA62811DFF2BC0048B68A /* title.png */, - 61F9041311DF5E9B0068B24D /* toolbarBackground.png */, 61F9040C11DF59D10068B24D /* localplayButton.png */, 61F9040D11DF59D10068B24D /* netplayButton.png */, 61F9040A11DF59370068B24D /* background.png */, - 61F7A35411E27D3C0040BA66 /* background-lobby.png */, 61EBA62C11DFF3310048B68A /* backgroundAndTitle.png */, ); name = "Frontend-iPad"; @@ -1290,6 +1418,8 @@ 9283015C0F10E48900CC5A3C /* Pascal Sources */ = { isa = PBXGroup; children = ( + 61399012125D19C0003C2DC0 /* uMobile.pas */, + 619C5AF3124F7E3100D041AE /* LuaPas.pas */, 61798892114AA56300BA94A9 /* inc */, 61E1F4F711D004240016A5AA /* adler32.pas */, 617987E7114AA34C00BA94A9 /* hwengine.pas */, @@ -1331,16 +1461,6 @@ }; /* End PBXGroup section */ -/* Begin PBXHeadersBuildPhase section */ - 61C325191179A300001E70B1 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - /* Begin PBXNativeTarget section */ 1D6058900D05DD3D006BFB54 /* Hedgewars */ = { isa = PBXNativeTarget; @@ -1361,23 +1481,6 @@ productReference = 1D6058910D05DD3D006BFB54 /* Hedgewars.app */; productType = "com.apple.product-type.application"; }; - 61C3251C1179A300001E70B1 /* openalbridge */ = { - isa = PBXNativeTarget; - buildConfigurationList = 61C325351179A314001E70B1 /* Build configuration list for PBXNativeTarget "openalbridge" */; - buildPhases = ( - 61C325191179A300001E70B1 /* Headers */, - 61C3251A1179A300001E70B1 /* Sources */, - 61C3251B1179A300001E70B1 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = openalbridge; - productName = openalbridge; - productReference = 61C3251D1179A300001E70B1 /* libopenalbridge.a */; - productType = "com.apple.product-type.library.static"; - }; 928301160F10CAFC00CC5A3C /* fpc */ = { isa = PBXNativeTarget; buildConfigurationList = 9283011C0F10CB4B00CC5A3C /* Build configuration list for PBXNativeTarget "fpc" */; @@ -1404,7 +1507,14 @@ }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Hedgewars" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; projectReferences = ( @@ -1417,6 +1527,10 @@ ProjectRef = 611E0E4B11FA92130077A41E /* freetype.xcodeproj */; }, { + ProductGroup = 619C5AC1124F7DDF00D041AE /* Products */; + ProjectRef = 619C5AC0124F7DDF00D041AE /* Lua.xcodeproj */; + }, + { ProductGroup = 6127232F117DF752005B90CF /* Products */; ProjectRef = 6127232E117DF752005B90CF /* SDL_image.xcodeproj */; }, @@ -1441,7 +1555,6 @@ targets = ( 1D6058900D05DD3D006BFB54 /* Hedgewars */, 928301160F10CAFC00CC5A3C /* fpc */, - 61C3251C1179A300001E70B1 /* openalbridge */, 6179928B114AE0C800BA94A9 /* UpdateDataFolder */, ); }; @@ -1945,6 +2058,27 @@ remoteRef = 6184608B11DA8BF3000E1314 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 619C5ACA124F7DDF00D041AE /* Lua.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = Lua.app; + remoteRef = 619C5AC9124F7DDF00D041AE /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 619C5ACC124F7DDF00D041AE /* libcocos2d libraries.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libcocos2d libraries.a"; + remoteRef = 619C5ACB124F7DDF00D041AE /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 619C5ACE124F7DDF00D041AE /* libLua.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libLua.a; + remoteRef = 619C5ACD124F7DDF00D041AE /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -1958,9 +2092,7 @@ 61370653117B1D50004EE44A /* Entitlements-Distribution.plist in Resources */, 611E12FF117BBBDA0044B62F /* Entitlements-Development.plist in Resources */, 6165925311CA9CB400D6E256 /* MainMenuViewController-iPad.xib in Resources */, - 6165925411CA9CB400D6E256 /* MainMenuViewController-iPhone.xib in Resources */, 6165925511CA9CB400D6E256 /* MapConfigViewController-iPad.xib in Resources */, - 6165925611CA9CB400D6E256 /* MapConfigViewController-iPhone.xib in Resources */, 6165925811CA9CB400D6E256 /* OverlayViewController.xib in Resources */, 61EF920E11DF57AC003441C4 /* arrowDown.png in Resources */, 61EF920F11DF57AC003441C4 /* arrowLeft.png in Resources */, @@ -1969,39 +2101,54 @@ 61EF921211DF57AC003441C4 /* joyButton_attack.png in Resources */, 61EF921311DF57AC003441C4 /* joyButton_backjump.png in Resources */, 61EF921411DF57AC003441C4 /* joyButton_forwardjump.png in Resources */, - 61F903EF11DF58550068B24D /* backgroundBottom.png in Resources */, - 61F903F011DF58550068B24D /* backgroundCenter.png in Resources */, - 61F903F111DF58550068B24D /* backgroundLeft.png in Resources */, - 61F903F211DF58550068B24D /* backgroundRight.png in Resources */, - 61F903F311DF58550068B24D /* backgroundTop.png in Resources */, - 61F903F411DF58550068B24D /* borderBottom.png in Resources */, - 61F903F511DF58550068B24D /* borderTop.png in Resources */, - 61F903F611DF58550068B24D /* networkButton.png in Resources */, - 61F903F711DF58550068B24D /* playButton.png in Resources */, - 61F903F811DF58550068B24D /* storeButton.png in Resources */, 61F9040911DF58B00068B24D /* settingsButton.png in Resources */, 61F9040B11DF59370068B24D /* background.png in Resources */, 61F9040E11DF59D10068B24D /* localplayButton.png in Resources */, - 61F9040F11DF59D10068B24D /* netplayButton.png in Resources */, - 61F9041411DF5E9B0068B24D /* toolbarBackground.png in Resources */, - 61F9043A11DF64E20068B24D /* bluebox.png in Resources */, - 61EBA62911DFF2BC0048B68A /* bricks.png in Resources */, 61EBA62A11DFF2BC0048B68A /* title.png in Resources */, 61EBA62D11DFF3310048B68A /* backgroundAndTitle.png in Resources */, - 61F7A35511E27D3C0040BA66 /* background-lobby.png in Resources */, 61F7A43811E290650040BA66 /* Icon-72.png in Resources */, 61F7A43911E290650040BA66 /* Icon-Small-50.png in Resources */, 61F7A43A11E290650040BA66 /* Icon-Small.png in Resources */, - 61F7A43B11E290650040BA66 /* Icon-Small@2x.png in Resources */, 61F7A43C11E290650040BA66 /* Icon.png in Resources */, - 61F7A43D11E290650040BA66 /* Icon@2x.png in Resources */, 61F7A43E11E290650040BA66 /* iTunesArtwork.png in Resources */, 6183D83E11E2BCE200A88903 /* LI-ipad-Landscape.png in Resources */, - 6183D83F11E2BCE200A88903 /* Default.png in Resources */, - 619C09EA11E8B8D600F1DF16 /* title_small.png in Resources */, 6129B9F711EFB04D0017E305 /* denied.png in Resources */, 611E0EE711FB20610077A41E /* ammoButton.png in Resources */, 611E0EE811FB20610077A41E /* cornerButton.png in Resources */, + 61F2E7CF1205EDE0005734F7 /* AboutViewController.xib in Resources */, + 61F2E7EC12060E31005734F7 /* checkbox.png in Resources */, + 615AD96212073B4D00F2FF04 /* startGameButton.png in Resources */, + 615AD9E9120764CA00F2FF04 /* backButton.png in Resources */, + 615AD9EB1207654E00F2FF04 /* helpButton.png in Resources */, + 6187AEBD120781B900B31A27 /* Settings in Resources */, + 611EE974122A9C4100DF6938 /* clickSound.wav in Resources */, + 611EE9D9122AA10A00DF6938 /* backSound.wav in Resources */, + 611EE9DA122AA10A00DF6938 /* selSound.wav in Resources */, + 611EEA7E122B09C200DF6938 /* background_small.png in Resources */, + 611EEAEF122B2A4D00DF6938 /* HelpPageLobbyViewController.xib in Resources */, + 611EEBC1122B34A800DF6938 /* helpingame.png in Resources */, + 611EEBC4122B355700DF6938 /* helpbottom.png in Resources */, + 611EEBC5122B355700DF6938 /* helpright.png in Resources */, + 611EEC31122B54D700DF6938 /* helpplain.png in Resources */, + 61842B24122B619D0096E335 /* HelpPageInGameViewController.xib in Resources */, + 61842B3E122B65BD0096E335 /* helpabove.png in Resources */, + 61842B40122B66280096E335 /* helpleft.png in Resources */, + 6199E83A124647DE00DADF8C /* SupportViewController.xib in Resources */, + 6199E86D12464A8E00DADF8C /* surpise.png in Resources */, + 611D9BFC12497E9800008271 /* SavedGamesViewController.xib in Resources */, + 611DA031124E2BC500008271 /* background_med.png in Resources */, + 611DA1D0124E5C6300008271 /* plus.png in Resources */, + 6147DAD31253DCDE0010357E /* savesButton.png in Resources */, + 610D5FB21270E2660033333A /* Icon-Small@2x.png in Resources */, + 610D5FB31270E26C0033333A /* Icon@2x.png in Resources */, + 61A670BE12747D8900B06CE7 /* borderBottom.png in Resources */, + 61A670BF12747D9100B06CE7 /* borderTop.png in Resources */, + 61A670C012747D9B00B06CE7 /* Default.png in Resources */, + 61A670C112747DB900B06CE7 /* MainMenuViewController-iPhone.xib in Resources */, + 61A670C212747DBD00B06CE7 /* MapConfigViewController-iPhone.xib in Resources */, + 61A670FA12747E0000B06CE7 /* playButton.png in Resources */, + 61A670FB12747E0D00B06CE7 /* title_small.png in Resources */, + 61A6710612747E4000B06CE7 /* backgroundCenter.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2019,7 +2166,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\nmkdir ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/btn*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/ammopic.png ${PROJECT_DIR}/Data/Graphics/Btn/iconAmmo.png\ncp ${PROJECT_DIR}/../../QTfrontend/res/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels\n\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\n\n#delete desktop frontend translation\nrm -rf ${PROJECT_DIR}/Data/Locale/hedgewars_*\n\n#delete dummy maps\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,KnockBall,Ruler,BasketBall}\n\n#the following ones must be removed when their support is implemented\n\n#delete some voices\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/{Classic,British,Mobster,Pirate,Robot,Russian,Singer,Surfer}\n\n#delete all names\nrm -rf ${PROJECT_DIR}/Data/Names/\n\n#delete all missions\nrm -rf ${PROJECT_DIR}/Data/Missions/\n\n#delete all reserved hats\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/"; + shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\nmkdir ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/btn*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/ammopic.png ${PROJECT_DIR}/Data/Graphics/Btn/iconAmmo.png\ncp ${PROJECT_DIR}/../../QTfrontend/res/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels\n\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg -delete\nfind ${PROJECT_DIR}/Data -name *.svgz -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\nfind ${PROJECT_DIR}/Data -name *.orig -delete\n\n#delete desktop frontend translation\nrm -rf ${PROJECT_DIR}/Data/Locale/hedgewars_*\n\n#delete dummy maps and hats\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,Ruler}\nrm -rf ${PROJECT_DIR}/Data/Hats/{TeamCap,TeamHeadband,TeamHair}\n\n#copy mono audio\ncp -R ${PROJECT_DIR}/audio/* ${PROJECT_DIR}/Data/\n\n#the following ones must be removed when their support is implemented\nrm -rf ${PROJECT_DIR}/Data/Maps/{Cheese,FlightJoust}\n\n#move Lua maps in Missions\nmkdir ${PROJECT_DIR}/Data/Missions/Maps/\nmv ${PROJECT_DIR}/Data/Maps/{Basketball,Knockball} ${PROJECT_DIR}/Data/Missions/Maps/\n\n#reduce the number of flakes for City\nawk '{if ($1 == 1500) $1=40; print $0}' < ${PROJECT_DIR}/Data/Themes/City/theme.cfg > /tmp/tempfile\nmv /tmp/tempfile ${PROJECT_DIR}/Data/Themes/City/theme.cfg\n\n#remove Isalnd from the list of Themes\nawk '{if ($1 != \"Island\") print $0}' < ${PROJECT_DIR}/Data/Themes/themes.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Themes/themes.cfg\n\n#remove Isalnd from the Maps and themes\nrm -rf ${PROJECT_DIR}/Data/Themes/Island\nawk '{if ($1 == \"Island\") print \"Nature\"}' < ${PROJECT_DIR}/Data/Maps/Cave/map.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Maps/Cave/map.cfg\nawk '{if ($1 == \"Island\") print \"Nature\"}' < ${PROJECT_DIR}/Data/Maps/Lonely_Island/map.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Maps/Lonely_Island/map.cfg\nawk '{if ($1 == \"Island\") print \"Nature\"}' < ${PROJECT_DIR}/Data/Maps/PirateFlag/map.cfg > /tmp/tempfile && mv /tmp/tempfile ${PROJECT_DIR}/Data/Maps/PirateFlag/map.cfg\n\n#delete the Classic voice\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/Classic\n\n#delete useless fonts\nrm -rf ${PROJECT_DIR}/Data/Fonts/{wqy-zenhei.ttc,DroidSansFallback.ttf}\n\n#delete all names, reserved hats\nrm -rf ${PROJECT_DIR}/Data/Names/\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/\n"; showEnvVarsInLog = 0; }; 9283011B0F10CB2D00CC5A3C /* Build libfpc.a */ = { @@ -2092,7 +2239,6 @@ 6179883C114AA34C00BA94A9 /* uVisualGears.pas in Sources */, 6179883D114AA34C00BA94A9 /* uWorld.pas in Sources */, 611F4D4B11B27A9900F9759A /* uScript.pas in Sources */, - 6165920C11CA9BA200D6E256 /* DetailViewController.m in Sources */, 6165920D11CA9BA200D6E256 /* FlagsViewController.m in Sources */, 6165920E11CA9BA200D6E256 /* FortsViewController.m in Sources */, 6165920F11CA9BA200D6E256 /* GameConfigViewController.m in Sources */, @@ -2126,13 +2272,14 @@ 61F904D711DF7DA30068B24D /* WeaponCellView.m in Sources */, 61B3D71C11EA6F2700EC7420 /* uKeys.pas in Sources */, 61C079E411F35A300072BF46 /* EditableCellView.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 61C3251A1179A300001E70B1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( + 61F2E7CE1205EDE0005734F7 /* AboutViewController.m in Sources */, + 611EEAEE122B2A4D00DF6938 /* HelpPageViewController.m in Sources */, + 6199E839124647DE00DADF8C /* SupportViewController.m in Sources */, + 611D9BFB12497E9800008271 /* SavedGamesViewController.m in Sources */, + 619C5AF4124F7E3100D041AE /* LuaPas.pas in Sources */, + 619C5BA2124FA59000D041AE /* MapPreviewButtonView.m in Sources */, + 61DE8F221257EB1100B80214 /* AmmoMenuViewController.m in Sources */, + 61399013125D19C0003C2DC0 /* uMobile.pas in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2154,6 +2301,8 @@ ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_TEST_COVERAGE_FILES = YES; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Hedgewars_Prefix.pch; @@ -2162,8 +2311,12 @@ "$(inherited)", "\"$(SRCROOT)\"", ); + OTHER_LDFLAGS = ( + "$(inherited)", + "-lgcov", + ); PRODUCT_NAME = Hedgewars; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "$(inherited)"; }; name = Debug; }; @@ -2186,13 +2339,107 @@ PRODUCT_NAME = Hedgewars; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "$(inherited)"; }; name = Release; }; - 6137064B117B1CB3004EE44A /* Distribution */ = { + 61022D7C12305A2800B08935 /* DistributionAppStore */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLY_RULES_IN_COPY_FILES = YES; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CODE_SIGN_IDENTITY = "iPhone Distribution: Vittorio Giovara"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Vittorio Giovara"; + FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B -Sgix -Sc"; + FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.5.1; + FPC_MAIN_FILE = "$(PROJECT_DIR)/../../hedgewars/hwLibrary.pas"; + FPC_RTL_UNITS_BASE = /usr/local/lib/fpc; + FPC_SPECIFIC_OPTIONS = "-Ci- -Cr- -Co- -O-2 -Xs -Cfvfpv2 -dNOCONSOLE"; + FPC_UNITS_PATH = "-Fu\"$(PROJECT_DIR)\""; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_DEBUGGING_SYMBOLS = default; + GCC_FAST_MATH = YES; + GCC_OPTIMIZATION_LEVEL = 2; + GCC_PREPROCESSOR_DEFINITIONS = ""; + GCC_STRICT_ALIASING = YES; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/events\"", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/video\"/**", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/include/\"", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_net/\"", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_mixer/\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 3.2; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = ( + "-lz", + "-Wl,-no_order_inits", + ); + PREBINDING = NO; + PROVISIONING_PROFILE = "450C4020-346A-4F44-8DDE-E71300796C94"; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = "450C4020-346A-4F44-8DDE-E71300796C94"; + SDKROOT = iphoneos4.1; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VALID_ARCHS = "armv6 armv7"; + }; + name = DistributionAppStore; + }; + 61022D7D12305A2800B08935 /* DistributionAppStore */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CODE_SIGN_ENTITLEMENTS = "Entitlements-Development.plist"; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Hedgewars_Prefix.pch; + INFOPLIST_FILE = Info.plist; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + ); + PRODUCT_NAME = Hedgewars; + PROVISIONING_PROFILE = ""; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + TARGETED_DEVICE_FAMILY = "$(inherited)"; + }; + name = DistributionAppStore; + }; + 61022D7E12305A2800B08935 /* DistributionAppStore */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PREBINDING = NO; + PRODUCT_NAME = fpc; + ZERO_LINK = NO; + }; + name = DistributionAppStore; + }; + 61022D7F12305A2800B08935 /* DistributionAppStore */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = UpdateDataFolder; + ZERO_LINK = NO; + }; + name = DistributionAppStore; + }; + 6137064B117B1CB3004EE44A /* DistributionAdHoc */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLY_RULES_IN_COPY_FILES = YES; ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CODE_SIGN_ENTITLEMENTS = "Entitlements-Distribution.plist"; CODE_SIGN_IDENTITY = "iPhone Distribution"; @@ -2207,19 +2454,20 @@ GCC_DEBUGGING_SYMBOLS = default; GCC_FAST_MATH = YES; GCC_OPTIMIZATION_LEVEL = 2; + GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_STRICT_ALIASING = YES; GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/OpenAL.framework/Headers, - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/\"/**", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/events\"", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/video\"/**", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/include/\"", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_net/\"", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_mixer/\"", ); - IPHONEOS_DEPLOYMENT_TARGET = 3.1; + IPHONEOS_DEPLOYMENT_TARGET = 3.2; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "-lz", @@ -2228,14 +2476,14 @@ PREBINDING = NO; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos4.0; + SDKROOT = iphoneos4.1; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = NO; - VALID_ARCHS = "armv7 armv6"; + VALIDATE_PRODUCT = YES; + VALID_ARCHS = "armv6 armv7"; }; - name = Distribution; + name = DistributionAdHoc; }; - 6137064C117B1CB3004EE44A /* Distribution */ = { + 6137064C117B1CB3004EE44A /* DistributionAdHoc */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -2252,11 +2500,11 @@ ); PRODUCT_NAME = Hedgewars; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "$(inherited)"; }; - name = Distribution; + name = DistributionAdHoc; }; - 6137064D117B1CB3004EE44A /* Distribution */ = { + 6137064D117B1CB3004EE44A /* DistributionAdHoc */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -2267,33 +2515,9 @@ PRODUCT_NAME = fpc; ZERO_LINK = NO; }; - name = Distribution; + name = DistributionAdHoc; }; - 6137064E117B1CB3004EE44A /* Distribution */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - HEADER_SEARCH_PATHS = ( - /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/OpenAL.framework/Headers, - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/include\"/**", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src\"/**", - "\"$(SRCROOT)/../../../Library/lpng141\"", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_net\"", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_mixer\"", - "\"$(SRCROOT)/../../../Library/libvorbis-1.3.1/include\"", - "\"$(SRCROOT)/../../../Library/libogg-1.2.0/include\"", - ); - OTHER_LDFLAGS = ""; - PREBINDING = NO; - PRODUCT_NAME = openalbridge; - ZERO_LINK = NO; - }; - name = Distribution; - }; - 6137064F117B1CB3004EE44A /* Distribution */ = { + 6137064F117B1CB3004EE44A /* DistributionAdHoc */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = YES; @@ -2302,11 +2526,12 @@ PRODUCT_NAME = UpdateDataFolder; ZERO_LINK = NO; }; - name = Distribution; + name = DistributionAdHoc; }; 6164429D11B5CDE500B9A6F3 /* Valgrind */ = { isa = XCBuildConfiguration; buildSettings = { + APPLY_RULES_IN_COPY_FILES = YES; ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CODE_SIGN_IDENTITY = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)"; @@ -2331,23 +2556,23 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/OpenAL.framework/Headers, - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/\"/**", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/events\"", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/video\"/**", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/include/\"", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_net/\"", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_mixer/\"", ); - IPHONEOS_DEPLOYMENT_TARGET = 3.1; + IPHONEOS_DEPLOYMENT_TARGET = 3.2; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "-lz", "-Wl,-no_order_inits", ); PREBINDING = NO; - SDKROOT = iphoneos4.0; + SDKROOT = iphoneos4.1; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = NO; - VALID_ARCHS = "armv7 armv6"; + VALID_ARCHS = "armv6 armv7"; }; name = Valgrind; }; @@ -2367,7 +2592,7 @@ "\"$(SRCROOT)\"", ); PRODUCT_NAME = Hedgewars; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "$(inherited)"; }; name = Valgrind; }; @@ -2383,29 +2608,6 @@ }; name = Valgrind; }; - 616442A011B5CDE500B9A6F3 /* Valgrind */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - HEADER_SEARCH_PATHS = ( - /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/OpenAL.framework/Headers, - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/include\"/**", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src\"/**", - "\"$(SRCROOT)/../../../Library/lpng141\"", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_net\"", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_mixer\"", - "\"$(SRCROOT)/../../../Library/libvorbis-1.3.1/include\"", - "\"$(SRCROOT)/../../../Library/libogg-1.2.0/include\"", - ); - OTHER_LDFLAGS = ""; - PREBINDING = NO; - PRODUCT_NAME = openalbridge; - }; - name = Valgrind; - }; 616442A111B5CDE500B9A6F3 /* Valgrind */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2437,53 +2639,6 @@ }; name = Release; }; - 61C3251E1179A300001E70B1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - HEADER_SEARCH_PATHS = ( - /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/OpenAL.framework/Headers, - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/include\"/**", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src\"/**", - "\"$(SRCROOT)/../../../Library/lpng141\"", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_net\"", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_mixer\"", - "\"$(SRCROOT)/../../../Library/libvorbis-1.3.1/include\"", - "\"$(SRCROOT)/../../../Library/libogg-1.2.0/include\"", - ); - OTHER_LDFLAGS = ""; - PREBINDING = NO; - PRODUCT_NAME = openalbridge; - }; - name = Debug; - }; - 61C3251F1179A300001E70B1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - HEADER_SEARCH_PATHS = ( - /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/OpenAL.framework/Headers, - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/include\"/**", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src\"/**", - "\"$(SRCROOT)/../../../Library/lpng141\"", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_net\"", - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_mixer\"", - "\"$(SRCROOT)/../../../Library/libvorbis-1.3.1/include\"", - "\"$(SRCROOT)/../../../Library/libogg-1.2.0/include\"", - ); - OTHER_LDFLAGS = ""; - PREBINDING = NO; - PRODUCT_NAME = openalbridge; - ZERO_LINK = NO; - }; - name = Release; - }; 928301180F10CAFD00CC5A3C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2512,6 +2667,7 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + APPLY_RULES_IN_COPY_FILES = YES; ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CODE_SIGN_IDENTITY = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)"; @@ -2529,33 +2685,34 @@ GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_STRICT_ALIASING = YES; GCC_THUMB_SUPPORT = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/OpenAL.framework/Headers, - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/\"/**", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/events\"", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/video\"/**", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/include/\"", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_net/\"", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_mixer/\"", ); - IPHONEOS_DEPLOYMENT_TARGET = 3.1; + IPHONEOS_DEPLOYMENT_TARGET = 3.2; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "-lz", "-Wl,-no_order_inits", ); PREBINDING = NO; - SDKROOT = iphoneos4.0; + SDKROOT = iphoneos4.1; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = NO; - VALID_ARCHS = "armv7 armv6"; + VALID_ARCHS = "armv6 armv7"; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + APPLY_RULES_IN_COPY_FILES = YES; ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -2563,7 +2720,7 @@ FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.5.1; FPC_MAIN_FILE = "$(PROJECT_DIR)/../../hedgewars/hwLibrary.pas"; FPC_RTL_UNITS_BASE = /usr/local/lib/fpc; - FPC_SPECIFIC_OPTIONS = "-Ci- -Cr- -Co- -O-2 -Xs -Cfvfpv2"; + FPC_SPECIFIC_OPTIONS = "-Ci- -Cr- -Co- -O-2 -Xs -Cfvfpv2 -dDEBUGFILE"; FPC_UNITS_PATH = "-Fu\"$(PROJECT_DIR)\""; GCC_C_LANGUAGE_STANDARD = c99; GCC_DEBUGGING_SYMBOLS = default; @@ -2576,13 +2733,13 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/OpenAL.framework/Headers, - "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/\"/**", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/events\"", + "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/src/video\"/**", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL/include/\"", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_net/\"", "\"$(SRCROOT)/../../../Library/SDL-1.3/SDL_mixer/\"", ); - IPHONEOS_DEPLOYMENT_TARGET = 3.1; + IPHONEOS_DEPLOYMENT_TARGET = 3.2; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "-lz", @@ -2591,10 +2748,10 @@ PREBINDING = NO; PROVISIONING_PROFILE = ""; "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos4.0; + SDKROOT = iphoneos4.1; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = NO; - VALID_ARCHS = "armv7 armv6"; + VALID_ARCHS = "armv6 armv7"; }; name = Release; }; @@ -2606,7 +2763,8 @@ buildConfigurations = ( 1D6058940D05DD3E006BFB54 /* Debug */, 1D6058950D05DD3E006BFB54 /* Release */, - 6137064C117B1CB3004EE44A /* Distribution */, + 6137064C117B1CB3004EE44A /* DistributionAdHoc */, + 61022D7D12305A2800B08935 /* DistributionAppStore */, 6164429E11B5CDE500B9A6F3 /* Valgrind */, ); defaultConfigurationIsVisible = 0; @@ -2617,29 +2775,20 @@ buildConfigurations = ( 6179928C114AE0C800BA94A9 /* Debug */, 6179928D114AE0C800BA94A9 /* Release */, - 6137064F117B1CB3004EE44A /* Distribution */, + 6137064F117B1CB3004EE44A /* DistributionAdHoc */, + 61022D7F12305A2800B08935 /* DistributionAppStore */, 616442A111B5CDE500B9A6F3 /* Valgrind */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 61C325351179A314001E70B1 /* Build configuration list for PBXNativeTarget "openalbridge" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 61C3251E1179A300001E70B1 /* Debug */, - 61C3251F1179A300001E70B1 /* Release */, - 6137064E117B1CB3004EE44A /* Distribution */, - 616442A011B5CDE500B9A6F3 /* Valgrind */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 9283011C0F10CB4B00CC5A3C /* Build configuration list for PBXNativeTarget "fpc" */ = { isa = XCConfigurationList; buildConfigurations = ( 928301180F10CAFD00CC5A3C /* Debug */, 928301190F10CAFD00CC5A3C /* Release */, - 6137064D117B1CB3004EE44A /* Distribution */, + 6137064D117B1CB3004EE44A /* DistributionAdHoc */, + 61022D7E12305A2800B08935 /* DistributionAppStore */, 6164429F11B5CDE500B9A6F3 /* Valgrind */, ); defaultConfigurationIsVisible = 0; @@ -2650,7 +2799,8 @@ buildConfigurations = ( C01FCF4F08A954540054247B /* Debug */, C01FCF5008A954540054247B /* Release */, - 6137064B117B1CB3004EE44A /* Distribution */, + 6137064B117B1CB3004EE44A /* DistributionAdHoc */, + 61022D7C12305A2800B08935 /* DistributionAppStore */, 6164429D11B5CDE500B9A6F3 /* Valgrind */, ); defaultConfigurationIsVisible = 0; diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Hedgewars_Prefix.pch --- a/project_files/HedgewarsMobile/Hedgewars_Prefix.pch Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Hedgewars_Prefix.pch Wed Oct 27 14:02:20 2010 +0200 @@ -1,11 +1,32 @@ -// -// Prefix header for all source files of the 'OpenGL ES app' target in the 'OpenGL ES app' project -// +/* + * Hedgewars-iOS, a Hedgewars port for iOS devices + * Copyright (c) 2009-2010 Vittorio Giovara + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ #ifdef __OBJC__ #import #import #import +#import "PascalImports.h" +#import "UIImageExtra.h" +#import "CommodityFunctions.h" +#import "SDL.h" +#import "SDL_video.h" +#import "SDL_net.h" +#import "SDL_mixer.h" #endif // by http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/ @@ -19,7 +40,7 @@ #endif #define ALog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) #endif - + #define ZAssert(condition, ...) do { if (!(condition)) { ALog(__VA_ARGS__); }} while(0) // by http://blog.coriolis.ch/2009/01/05/macros-for-xcode/ diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Info.plist --- a/project_files/HedgewarsMobile/Info.plist Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Info.plist Wed Oct 27 14:02:20 2010 +0200 @@ -28,9 +28,13 @@ CFBundleSignature ???? CFBundleVersion - 1.0 + 1.2 LSRequiresIPhoneOS + UIApplicationExitsOnSuspend + + UILaunchImageFile~ipad + LI-ipad UIStatusBarHidden UISupportedInterfaceOrientations @@ -38,11 +42,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UILaunchImageFile~ipad - LI-ipad - UILaunchImageFile~iphone - LI-iphone - UIApplicationExitsOnSuspend - diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Frontend-iPad/backButton.png Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/backButton.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Frontend-iPad/background-lobby.png Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/background-lobby.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Frontend-iPad/bluebox.png Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/bluebox.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Frontend-iPad/helpButton.png Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/helpButton.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Frontend-iPad/localplayButton.png Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/localplayButton.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Frontend-iPad/netplayButton.png Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/netplayButton.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Frontend-iPad/startGameButton.png Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/startGameButton.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Frontend-iPad/toolbarBackground.png Binary file project_files/HedgewarsMobile/Resources/Frontend-iPad/toolbarBackground.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib --- a/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib Wed Oct 27 14:02:20 2010 +0200 @@ -1,7 +1,7 @@ - 800 + 1024 10F569 788 1038.29 @@ -57,7 +57,7 @@ 292 - {{154, 417}, {258, 215}} + {{383, 427}, {263, 244}} NO IBIPadFramework @@ -68,7 +68,7 @@ 15 16 - 188 + 215 0.0 0.0 0.0 @@ -90,39 +90,13 @@ localplayButton.png - - - 292 - {{611, 417}, {258, 215}} - - NO - 1 - IBIPadFramework - 0 - 0 - - 188 - 0.0 - 0.0 - 0.0 - Multiplayer - - - 2 - MC45OTYwNzg0OTEyIDAuODAwMDAwMDcxNSAwLjAzOTIxNTY4NzY2AA - - - - NSImage - netplayButton.png - - 292 - {{20, 729}, {18, 19}} + {{788, 300}, {18, 19}} NO + 0.31690141558647156 3 IBIPadFramework 0 @@ -137,37 +111,10 @@ - - - 292 - {{390, 345}, {243, 21}} - - NO - YES - 7 - NO - IBIPadFramework - - - Helvetica-Oblique - 17 - 16 - - - 1 - MSAxIDEAA - - 1 - - - - 1 - 10 - 292 - {{476, 686}, {72, 62}} + {{932, 686}, {72, 62}} NO 2 @@ -186,6 +133,28 @@ settingsButton.png + + + 292 + {{20, 686}, {72, 62}} + + NO + 4 + IBIPadFramework + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + savesButton.png + + {1024, 768} @@ -231,29 +200,21 @@ switchViews: - - - 7 - - 49 - - - - versionLabel - - - - 51 - - - - switchViews: 7 54 + + + switchViews: + + + 7 + + 89 + @@ -270,10 +231,9 @@ YES - + - - + @@ -296,22 +256,11 @@ local - 40 - - - multi - - 45 - 50 - - - - 52 @@ -321,6 +270,11 @@ + + 88 + + + @@ -333,10 +287,9 @@ 1.IBPluginDependency 37.IBPluginDependency 39.IBPluginDependency - 40.IBPluginDependency 45.IBPluginDependency - 50.IBPluginDependency 52.IBPluginDependency + 88.IBPluginDependency YES @@ -349,7 +302,6 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -368,7 +320,7 @@ - 87 + 89 @@ -387,17 +339,6 @@ id - - versionLabel - UILabel - - - versionLabel - - versionLabel - UILabel - - IBProjectSource Classes/MainMenuViewController.h @@ -445,13 +386,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSObject.h @@ -459,13 +393,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSRunLoop.h @@ -473,13 +400,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSThread.h @@ -501,13 +421,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource QuartzCore.framework/Headers/CAAnimation.h @@ -564,14 +477,6 @@ - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - UIResponder NSObject @@ -649,7 +554,7 @@ IBIPadFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 @@ -664,14 +569,14 @@ YES backgroundAndTitle.png localplayButton.png - netplayButton.png + savesButton.png settingsButton.png YES {1024, 768} {263, 244} - {263, 244} + {61, 59} {61, 59} diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib --- a/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib Wed Oct 27 14:02:20 2010 +0200 @@ -1,18 +1,18 @@ - 800 + 1024 10F569 - 788 + 804 1038.29 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 117 + 123 YES - + YES @@ -62,7 +62,7 @@ 293 - {{118, 25}, {240, 52}} + {{120, 44}, {240, 52}} NO NO @@ -77,7 +77,7 @@ 289 - {{240, 102}, {220, 52}} + {{130, 166}, {220, 52}} 1 @@ -110,88 +110,10 @@ playButton.png - - - 265 - {{240, 177}, {220, 52}} - - - 1 - MCAwIDAgMAA - - NO - NO - 3 - IBCocoaTouchFramework - 0 - 0 - - - - 1 - MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA - - - - NSImage - networkButton.png - - - - - 260 - {{12, 144}, {220, 52}} - - - 1 - MCAwIDAgMAA - - NO - NO - 3 - IBCocoaTouchFramework - 0 - 0 - - - - 3 - MAA - - - - NSImage - storeButton.png - - - - - 292 - {{37, 102}, {168, 21}} - - NO - YES - NO - IBCocoaTouchFramework - - - Helvetica-Oblique - 17 - 16 - - - 1 - MSAxIDEAA - - - 1 - 10 - 1 - 269 - {{209, 237}, {59, 52}} + {{401, 247}, {59, 52}} NO NO @@ -211,6 +133,29 @@ settingsButton.png + + + 269 + {{20, 247}, {59, 52}} + + NO + NO + 4 + IBCocoaTouchFramework + 0 + 0 + + + + 1 + MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA + + + + NSImage + savesButton.png + + 290 @@ -244,9 +189,10 @@ 292 - {{20, 270}, {18, 19}} + {{0, 20}, {18, 19}} NO + 0.5 3 IBCocoaTouchFramework 0 @@ -295,32 +241,6 @@ 30 - - versionLabel - - - - 37 - - - - switchViews: - - - 7 - - 38 - - - - switchViews: - - - 7 - - 39 - - switchViews: @@ -338,6 +258,15 @@ 42 + + + switchViews: + + + 7 + + 44 + @@ -354,15 +283,13 @@ YES - - + - - + - + @@ -398,21 +325,6 @@ - 25 - - - - - 26 - - - - - 27 - - - - 28 @@ -427,6 +339,11 @@ + + 43 + + + @@ -439,14 +356,17 @@ 1.IBPluginDependency 22.IBPluginDependency 23.IBPluginDependency + 23.IBViewBoundsToFrameTransform 24.IBPluginDependency - 25.IBPluginDependency - 26.IBPluginDependency - 27.IBPluginDependency + 24.IBViewBoundsToFrameTransform 28.IBPluginDependency + 28.IBViewBoundsToFrameTransform 35.IBPluginDependency 36.IBPluginDependency 41.IBPluginDependency + 41.IBViewBoundsToFrameTransform + 43.IBPluginDependency + 43.IBViewBoundsToFrameTransform YES @@ -456,14 +376,27 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABC7AAAwpYAAA + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABC7AAAw0gAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + AUPIgABDdwAAA + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABBoAAAw4+AAA + com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAABDywAAw5cAAA + @@ -482,7 +415,7 @@ - 42 + 44 @@ -501,17 +434,6 @@ id - - versionLabel - UILabel - - - versionLabel - - versionLabel - UILabel - - IBProjectSource Classes/MainMenuViewController.h @@ -559,13 +481,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSObject.h @@ -573,13 +488,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSRunLoop.h @@ -587,13 +495,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSThread.h @@ -615,13 +516,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource QuartzCore.framework/Headers/CAAnimation.h @@ -678,14 +572,6 @@ - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - UIResponder NSObject @@ -763,7 +649,7 @@ IBCocoaTouchFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 @@ -779,10 +665,9 @@ backgroundCenter.png borderBottom.png borderTop.png - networkButton.png playButton.png + savesButton.png settingsButton.png - storeButton.png title_small.png @@ -790,13 +675,12 @@ {480, 278} {480, 21} {480, 21} - {217, 51} {216, 51} {61, 59} - {216, 51} + {61, 59} {262, 84} - 117 + 123 diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib --- a/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib Wed Oct 27 14:02:20 2010 +0200 @@ -1,7 +1,7 @@ - 800 + 1024 10F569 788 1038.29 @@ -12,7 +12,7 @@ YES - + YES @@ -45,107 +45,70 @@ 292 - {1024, 704} + {1024, 768} + NO NO IBIPadFramework NSImage - background-lobby.png - - - - - 292 - {{1, 214}, {304, 490}} - - NO - NO - IBIPadFramework - - NSImage - bluebox.png + background.png - - - 292 - {{715, 214}, {309, 490}} - - NO - NO - IBIPadFramework - - - - - 292 - {{357, 214}, {309, 490}} - - NO - NO - IBIPadFramework - - - - - 292 - {{17, 20}, {272, 162}} - - NO - NO - IBIPadFramework - - 289 - {{754, 169}, {240, 30}} + {{725, 166}, {277, 30}} NO IBIPadFramework 2 - 3 - 0 + 4 + 1 YES Random Map Maze + Mission YES + YES + YES {0, 0} {0, 0} {0, 0} + {0, 0} YES + 1 - MCAwLjUwMTk2MDgxNCAwAA + MCAwIDAAA 292 - {{75, 138}, {149, 23}} + {{263, 723}, {149, 23}} NO IBIPadFramework @@ -157,7 +120,7 @@ 289 - {{746, 20}, {256, 128}} + {{736, 26}, {256, 128}} NO IBIPadFramework @@ -188,7 +151,7 @@ 292 - {{129, 41}, {42, 21}} + {{778, 724}, {42, 21}} NO YES @@ -196,6 +159,11 @@ NO IBIPadFramework ... + + Helvetica-Bold + 17 + 16 + 2 MC45MTc2NDcxMjMzIDAuNjc0NTA5ODIzMyAwAA @@ -208,7 +176,7 @@ 292 - {{77, 87}, {145, 29}} + {{112, 720}, {145, 29}} NO YES @@ -217,8 +185,8 @@ IBIPadFramework Label - Helvetica - 24 + Helvetica-Oblique + 18 16 @@ -230,68 +198,10 @@ 10 1 - - - 265 - {{719, 222}, {300, 474}} - - - 3 - MSAwAA - - YES - IBIPadFramework - 2 - NO - 2 - 0 - YES - 44 - 22 - 22 - - - - -2147483356 - {{0, 219}, {300, 477}} - - NO - IBIPadFramework - 0 - 0 - - 1 - teams section - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - - - - -2147483356 - {{362, 218}, {300, 478}} - - NO - IBIPadFramework - 0 - 0 - - 1 - details section - - - 1 - MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA - - - 292 - {{357, 57}, {309, 165}} + {{357, 28}, {309, 165}} NO NO @@ -301,26 +211,97 @@ title.png - + + + 274 + {{714, 225}, {300, 445}} + + + 3 + MCAwAA + + YES + YES + IBIPadFramework + YES + 1 + 2 + 0 + YES + 45 + + 292 - {{0, 704}, {1024, 20}} + {{441, 702}, {142, 64}} - NO + NO + 1 + IBIPadFramework + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + startGameButton.png + + + + + 292 + {{10, 693}, {64, 64}} + + NO IBIPadFramework - + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + NSImage - bricks.png + backButton.png + + + + + 292 + {{950, 693}, {64, 64}} + + NO + 2 + IBIPadFramework + 0 + 0 + + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + + NSImage + helpButton.png - {1024, 724} + {1024, 768} 2 MC44MzkyMTU3NTU1IDAuODQ3MDU4ODkyMyAwLjg3MDU4ODMwMjYAA - 3 @@ -339,15 +320,6 @@ 3 - - updatePreview - - - 7 - - 12 - - previewButton @@ -417,26 +389,70 @@ dataSource - + - 26 + 67 delegate - + - 27 + 68 tableView - + + + 69 + + + + buttonPressed: + + + 7 + + 73 + + + + buttonPressed: + + + 7 - 32 + 74 + + + + buttonPressed: + + + 7 + + 77 + + + + mapButtonPressed + + + 7 + + 113 + + + + delegate + + + + 114 @@ -449,29 +465,6 @@ - 1 - - - YES - - - - - - - - - - - - - - - - - - - -1 @@ -483,18 +476,47 @@ - 7 - + 1 + + + YES + + + + + + + + + + + + + + + + 75 + - 8 - + 72 + - 11 - + 70 + + + + + 66 + + + + + 57 + @@ -503,8 +525,8 @@ - 39 - + 11 + @@ -513,28 +535,13 @@ - 51 - - - - - 53 - + 8 + - 54 - - - - - 55 - - - - - 57 - + 7 + @@ -542,22 +549,6 @@ - - 58 - - - - - 25 - - - Table View (Themes) - - - 59 - - - @@ -570,25 +561,22 @@ 1.IBPluginDependency 11.IBPluginDependency 17.IBPluginDependency - 25.IBPluginDependency - 39.IBPluginDependency 50.IBPluginDependency - 51.IBPluginDependency - 53.IBPluginDependency - 54.IBPluginDependency - 55.IBPluginDependency 57.IBPluginDependency - 58.IBPluginDependency - 59.IBPluginDependency + 66.IBPluginDependency 7.IBPluginDependency + 70.IBPluginDependency + 72.IBPluginDependency + 75.IBPluginDependency 8.IBPluginDependency + 9.CustomClassName 9.IBPluginDependency YES MapConfigViewController UIResponder - {{72, 265}, {1024, 768}} + {{288, 236}, {1024, 768}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -600,10 +588,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MapPreviewButtonView com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -623,7 +608,7 @@ - 60 + 119 @@ -635,10 +620,11 @@ YES YES + buttonPressed: + mapButtonPressed segmentedControlChanged: sliderChanged: sliderEndedChanging: - updatePreview YES @@ -646,20 +632,30 @@ id id id + id YES YES + buttonPressed: + mapButtonPressed segmentedControlChanged: sliderChanged: sliderEndedChanging: - updatePreview YES + buttonPressed: + id + + + mapButtonPressed + id + + segmentedControlChanged: id @@ -671,10 +667,6 @@ sliderEndedChanging: id - - updatePreview - id - @@ -691,7 +683,7 @@ YES UILabel - UIButton + MapPreviewButtonView UISegmentedControl UILabel UISlider @@ -717,7 +709,7 @@ previewButton - UIButton + MapPreviewButtonView segmentedControl @@ -742,6 +734,25 @@ Classes/MapConfigViewController.h + + MapPreviewButtonView + UIButton + + delegate + id + + + delegate + + delegate + id + + + + IBProjectSource + Classes/MapPreviewButtonView.h + + YES @@ -784,13 +795,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSObject.h @@ -798,13 +802,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSRunLoop.h @@ -812,13 +809,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSThread.h @@ -840,13 +830,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource QuartzCore.framework/Headers/CAAnimation.h @@ -1020,7 +1003,7 @@ IBIPadFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 @@ -1033,16 +1016,18 @@ YES YES - background-lobby.png - bluebox.png - bricks.png + backButton.png + background.png + helpButton.png + startGameButton.png title.png YES - {1024, 704} - {512, 512} - {1024, 20} + {64, 64} + {1024, 768} + {64, 64} + {142, 64} {273, 151} diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/MapConfigViewController-iPhone.xib --- a/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPhone.xib Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPhone.xib Wed Oct 27 14:02:20 2010 +0200 @@ -1,14 +1,14 @@ - 800 + 1024 10F569 - 762 + 804 1038.29 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 87 + 123 YES @@ -45,48 +45,53 @@ 292 - {{28, 166}, {240, 30}} + {{13, 166}, {256, 30}} NO IBCocoaTouchFramework 2 - 3 - 0 + 4 + 1 YES Random Map Maze + Mission YES + YES + YES {0, 0} {0, 0} {0, 0} + {0, 0} YES + 292 - {{121, 240}, {149, 23}} + {{98, 240}, {149, 23}} NO IBCocoaTouchFramework @@ -98,7 +103,7 @@ 292 - {{20, 20}, {256, 128}} + {{13, 20}, {256, 128}} NO IBCocoaTouchFramework @@ -125,7 +130,7 @@ 292 - {{54, 234}, {42, 21}} + {{28, 234}, {42, 21}} NO YES @@ -145,7 +150,7 @@ 292 - {{123, 203}, {145, 29}} + {{100, 203}, {145, 29}} NO YES @@ -167,7 +172,7 @@ 274 - {{295, 0}, {185, 276}} + {{284, 0}, {196, 276}} YES @@ -203,15 +208,6 @@ 3 - - updatePreview - - - 7 - - 12 - - previewButton @@ -302,6 +298,23 @@ 32 + + + mapButtonPressed + + + 7 + + 33 + + + + delegate + + + + 34 + @@ -319,10 +332,10 @@ YES - + @@ -383,6 +396,7 @@ 25.IBPluginDependency 7.IBPluginDependency 8.IBPluginDependency + 9.CustomClassName 9.IBPluginDependency @@ -396,6 +410,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MapPreviewButtonView com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -415,7 +430,7 @@ - 32 + 34 @@ -427,10 +442,11 @@ YES YES + buttonPressed: + mapButtonPressed segmentedControlChanged: sliderChanged: sliderEndedChanging: - updatePreview YES @@ -438,6 +454,41 @@ id id id + id + + + + YES + + YES + buttonPressed: + mapButtonPressed + segmentedControlChanged: + sliderChanged: + sliderEndedChanging: + + + YES + + buttonPressed: + id + + + mapButtonPressed + id + + + segmentedControlChanged: + id + + + sliderChanged: + id + + + sliderEndedChanging: + id + @@ -454,18 +505,76 @@ YES UILabel - UIButton + MapPreviewButtonView UISegmentedControl UILabel UISlider UITableView + + YES + + YES + maxLabel + previewButton + segmentedControl + sizeLabel + slider + tableView + + + YES + + maxLabel + UILabel + + + previewButton + MapPreviewButtonView + + + segmentedControl + UISegmentedControl + + + sizeLabel + UILabel + + + slider + UISlider + + + tableView + UITableView + + + IBProjectSource Classes/MapConfigViewController.h + + MapPreviewButtonView + UIButton + + delegate + id + + + delegate + + delegate + id + + + + IBProjectSource + Classes/MapPreviewButtonView.h + + YES @@ -508,13 +617,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSObject.h @@ -522,13 +624,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSRunLoop.h @@ -536,13 +631,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSThread.h @@ -564,13 +652,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource QuartzCore.framework/Headers/CAAnimation.h @@ -736,15 +817,15 @@ IBCocoaTouchFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 YES - ../../project_files/HedgewarsMobile/Hedgewars.xcodeproj + ../Hedgewars.xcodeproj 3 - 87 + 123 diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/background_med.png Binary file project_files/HedgewarsMobile/Resources/Overlay/background_med.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/background_small.png Binary file project_files/HedgewarsMobile/Resources/Overlay/background_small.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/helpabove.png Binary file project_files/HedgewarsMobile/Resources/Overlay/helpabove.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/helpbottom.png Binary file project_files/HedgewarsMobile/Resources/Overlay/helpbottom.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/helpingame.png Binary file project_files/HedgewarsMobile/Resources/Overlay/helpingame.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/helpleft.png Binary file project_files/HedgewarsMobile/Resources/Overlay/helpleft.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/helpplain.png Binary file project_files/HedgewarsMobile/Resources/Overlay/helpplain.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/helpright.png Binary file project_files/HedgewarsMobile/Resources/Overlay/helpright.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/joyButton_backjump.png Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButton_backjump.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/joyButton_forwardjump.png Binary file project_files/HedgewarsMobile/Resources/Overlay/joyButton_forwardjump.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/joyPush.png Binary file project_files/HedgewarsMobile/Resources/Overlay/joyPush.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Overlay/plus.png Binary file project_files/HedgewarsMobile/Resources/Overlay/plus.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/OverlayViewController.xib --- a/project_files/HedgewarsMobile/Resources/OverlayViewController.xib Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/OverlayViewController.xib Wed Oct 27 14:02:20 2010 +0200 @@ -1,7 +1,7 @@ - 800 + 1024 10F569 788 1038.29 @@ -63,7 +63,7 @@ 265 - {{337, 193}, {143, 127}} + {{337, 187}, {143, 133}} 3 @@ -154,7 +154,7 @@ NSImage - joyButton_forwardjump.png + joyButton_backjump.png @@ -178,7 +178,7 @@ NSImage - joyButton_backjump.png + joyButton_forwardjump.png @@ -854,13 +854,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSObject.h @@ -868,13 +861,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSRunLoop.h @@ -882,13 +868,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource Foundation.framework/Headers/NSThread.h @@ -910,13 +889,6 @@ NSObject IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource QuartzCore.framework/Headers/CAAnimation.h @@ -1042,7 +1014,7 @@ IBCocoaTouchFramework com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Barrel Mayhem.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,42 @@ + + + + + basic + + 100 + 30 + 100 + 15 + 0 + 0 + 1 + 0 + 40 + + gamemod + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Default.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,42 @@ + + + + + basic + + 100 + 45 + 100 + 15 + 5 + 3 + 4 + 0 + 2 + + gamemod + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Minefield.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,42 @@ + + + + + basic + + 150 + 30 + 50 + 15 + 0 + 0 + 80 + 0 + 0 + + gamemod + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Pro Mode.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,42 @@ + + + + + basic + + 100 + 15 + 100 + 15 + 0 + 3 + 4 + 0 + 2 + + gamemod + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Shoppa.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,42 @@ + + + + + basic + + 100 + 300 + 100 + 50 + 1 + 3 + 4 + 0 + 0 + + gamemod + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/Schemes/Timeless.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Timeless.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,42 @@ + + + + + basic + + 100 + 100 + 100 + 15 + 5 + 3 + 4 + 0 + 2 + + gamemod + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Schemes/Tunnel Hogs.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,42 @@ + + + + + basic + + 100 + 30 + 100 + 15 + 5 + 3 + 10 + 10 + 10 + + gamemod + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/Teams/Ninjas.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Teams/Ninjas.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,83 @@ + + + + + flag + japan + fort + Plane + grave + bp2 + hash + 0 + hedgehogs + + + hat + NinjaFull + hogname + Ukemi + level + 0 + + + hat + NinjaStraight + hogname + Godai + level + 0 + + + hat + NinjaTriangle + hogname + Ninpo + level + 0 + + + hat + NinjaStraight + hogname + Shinobi + level + 0 + + + hat + NinjaFull + hogname + Tatsujin + level + 0 + + + hat + NinjaTriangle + hogname + Arashi + level + 0 + + + hat + NinjaStraight + hogname + Bushi + level + 0 + + + hat + NinjaFull + hogname + Itami + level + 0 + + + voicepack + Default + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/Teams/Pirates.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Teams/Pirates.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,83 @@ + + + + + flag + cm_pirate + fort + Plane + grave + chest + hash + 0 + hedgehogs + + + hat + pirate_jack_bandana + hogname + Toothless Wayne + level + 0 + + + hat + pirate_jack + hogname + Long-nose Kidd + level + 0 + + + hat + dwarf + hogname + Eye-patch Jim + level + 0 + + + hat + pirate_jack + hogname + Rackham Blood + level + 0 + + + hat + dwarf + hogname + One-eyed Ayee + level + 0 + + + hat + pirate_jack_bandana + hogname + Dirty Ben + level + 0 + + + hat + pirate_jack + hogname + Morris + level + 0 + + + hat + dwarf + hogname + Cruise Seymour + level + 0 + + + voicepack + Pirate + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/Teams/Robots.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/Teams/Robots.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,83 @@ + + + + + flag + cm_binary + fort + UFO + grave + Rip + hash + 0 + hedgehogs + + + hat + cyborg + hogname + HAL + level + 4 + + + hat + cyborg + hogname + R2-D2 + level + 4 + + + hat + cyborg + hogname + Wall-E + level + 4 + + + hat + cyborg + hogname + Robocob + level + 4 + + + hat + cyborg + hogname + Optimus Prime + level + 4 + + + hat + cyborg + hogname + C-3PO + level + 4 + + + hat + cyborg + hogname + Terminator + level + 4 + + + hat + cyborg + hogname + KITT + level + 4 + + + voicepack + Robot + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/iFrontend/basicFlags_en.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/iFrontend/basicFlags_en.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,114 @@ + + + + + + default + 100 + image + Damage + max + 300 + min + 10 + title + Damage Modifier + + + default + 45 + image + Time + max + 100 + min + 1 + title + Turn Time + + + default + 100 + image + Health + max + 200 + min + 50 + title + Initial Health + + + default + 15 + image + SuddenDeath + max + 50 + min + 0 + title + Sudden Death Timeout + + + default + 5 + image + Box + max + 9 + min + 0 + title + Crate Drops + + + default + 3 + image + Time + max + 3 + min + 0 + title + Mines Time + + + default + 4 + image + Mine + max + 80 + min + 1 + title + Mines Number + + + default + 0 + image + Dud + max + 100 + min + 0 + title + Dud Mines Probability + + + default + 2 + image + Damage + max + 40 + min + 0 + title + Explosives + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/iFrontend/credits.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/iFrontend/credits.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,114 @@ + + + + + + Andrey "UnC0Rr" Korotaev + Igor "Displacer" Ulyanov + Derek "Nemo" Pomery + Martin "Affect" Boze + David "Krawek" Cuadrado + Martin "Ttsmj" Minarik + Kristian "TheXception" Lehmann + Vittorio "Koda" Giovara + Mario "Smaxx" Liebisch + Carlos "Palewolf" Vives + Richard "Sheepluva" Korlyi + Henning "Prg" Kühn + + + Tiyuri + Joshua Frese + Stanko Tadić + Julien Koesten + Joshua O'Sullivan + Nils Luck + Trey Perry + + + Stephen "Armagon" Alexander + Finn "Tiyuri" Brice + Jonatan Nilsson + Daniel Martin + + + Romulo Fernandes Machado + Svetoslav Stefanov + Petr Řezáček + Jie Luo + Andrey Korotaev + Nina Kuisma + Antoine Turmel + Peter Hüwe, Mario Liebisch + Luca Bonora + Adam Etienne + Maciej Mroziński, Wojciech Latkowski, Maciej Górny + Fábio Canário + Andrey Korotaev + Jose Riha + Carlos Vives + Niklas Grahn + Eugene V. Lyubimkin + + + Aleksey Andreev + Aleksander Rudalev + Natasha Stafeeva + Adam Higerd + + + Engine, frontend, net server author + Desktop frontend improvements + Many engine and frontend improvements + Drillrocket, Ballgun, RC Plane weapons + Mine number and time game settings + Desktop frontend improvements + Desktop frontend improvements + Mac OS X and iPhone version + Gamepad support, OpenGL wizard + Many engine improvements and graphics + Many engine and server improvements + Maze maps + + + + + + + + + Some hats + + + Hedgehogs voice + + + + + + Brazilian Portuguese + Bulgarian + Czech + Chinese + English + Finnish + French + German + Italian + Japanese + Polish + Portuguese + Russian + Slovak + Spanish + Swedish + Ukrainian + + + + + + + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/iFrontend/gameFlags_en.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/iFrontend/gameFlags_en.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,174 @@ + + + + + + description + Land can not be destroyed + image + Solid + title + Solid Land + + + description + Add an indestructable border around the terrain + image + Border + title + Add Border + + + description + Teams will start on opposite sides of the terrain (two teams only) + image + TeamsDivide + title + Divide Team + + + description + Lower gravity + image + LowGravity + title + Low Gravity + + + description + Assisted aiming with laser sight + image + LaserSight + title + Laser Sight + + + description + All hogs have a personal forcefield + image + Invulnerable + title + Invulnerable + + + description + Enable random mines + image + Mines + title + Add Mines + + + description + Gain 80% of the damage you do back in health + image + Vampiric + title + Vampirism Mode + + + description + Share your opponents pain, share their damage + image + Karma + title + Karma Mode + + + description + Your hogs are unable to move, test your aim + image + Artillery + title + Artillery Mode + + + description + Defend your fort and destroy the opponents (two teams only) + image + Forts + title + Fort Mode + + + description + Order of play is random instead of in room order + image + RandomOrder + title + Random Order + + + description + Play with a King. If he dies, your side loses + image + King + title + King Mode + + + description + Take turns placing your hedgehogs pre-game + image + PlaceHog + title + Place Hedgehogs + + + description + Ammo is shared between all clan teams + image + SharedAmmo + title + Clan Shares Ammo + + + description + Disable girders when generating random maps + image + DisableGirders + title + Disable Girders + + + description + Disable land objects when generating maps + image + DisableLandObjects + title + Disable Land Objects + + + description + AI-controlled hogs respawn on death + image + AISurvival + title + AI Survival Mode + + + description + Attacking does not end your turn + image + InfAttack + title + Unlimited Attacks + + + description + Weapons are reset to starting values each turn + image + ResetWeps + title + Reset Weapons + + + description + Each hedgehog has its own ammo. + image + PerHogAmmo + title + Per Hedgehog Ammo + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/Settings/settings.plist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/Resources/Settings/settings.plist Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,18 @@ + + + + + alternate + + music + + password + + sound + + username + + menu + + + diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/backSound.wav Binary file project_files/HedgewarsMobile/Resources/backSound.wav has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/checkbox.png Binary file project_files/HedgewarsMobile/Resources/checkbox.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/clickSound.wav Binary file project_files/HedgewarsMobile/Resources/clickSound.wav has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/savesButton.png Binary file project_files/HedgewarsMobile/Resources/savesButton.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/selSound.wav Binary file project_files/HedgewarsMobile/Resources/selSound.wav has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/Resources/surpise.png Binary file project_files/HedgewarsMobile/Resources/surpise.png has changed diff -r 793386610068 -r b1c2c2f6fc5e project_files/HedgewarsMobile/SDL.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/project_files/HedgewarsMobile/SDL.patch Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,373 @@ +diff -r c0021a587dc7 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj +--- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Sun Oct 10 15:45:58 2010 -0700 ++++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Sat Oct 16 18:35:03 2010 +0200 +@@ -1549,15 +1549,19 @@ + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; ++ ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_DEBUGGING_SYMBOLS = full; ++ GCC_THUMB_SUPPORT = 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; + ONLY_ACTIVE_ARCH = NO; + PREBINDING = NO; +- SDKROOT = iphoneos3.2; ++ SDKROOT = iphoneos4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; +@@ -1566,14 +1570,19 @@ + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; +- ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)"; ++ ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; ++ GCC_OPTIMIZATION_LEVEL = 2; ++ GCC_THUMB_SUPPORT = NO; ++ GCC_UNROLL_LOOPS = YES; ++ 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; + PREBINDING = NO; +- SDKROOT = iphoneos3.2; ++ SDKROOT = iphoneos4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; +diff -r c0021a587dc7 Xcode-iPhoneOS/SDL/testsdl-Info.plist +--- a/Xcode-iPhoneOS/SDL/testsdl-Info.plist Sun Oct 10 15:45:58 2010 -0700 ++++ b/Xcode-iPhoneOS/SDL/testsdl-Info.plist Sat Oct 16 18:35:03 2010 +0200 +@@ -16,7 +16,5 @@ + ???? + CFBundleVersion + 1.0 +- NSMainNibFile +- MainWindow + + +diff -r c0021a587dc7 include/SDL_config_iphoneos.h +--- a/include/SDL_config_iphoneos.h Sun Oct 10 15:45:58 2010 -0700 ++++ b/include/SDL_config_iphoneos.h Sat Oct 16 18:35:03 2010 +0200 +@@ -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 @@ + /* enable iPhone version of Core Audio driver */ + #define SDL_AUDIO_DRIVER_COREAUDIOIPHONE 1 + /* Enable the dummy audio driver (src/audio/dummy/\*.c) */ +-#define SDL_AUDIO_DRIVER_DUMMY 1 ++#define SDL_AUDIO_DRIVER_DUMMY 0 + + /* Enable the stub haptic driver (src/haptic/dummy/\*.c) */ + #define SDL_HAPTIC_DISABLED 1 +@@ -135,7 +137,7 @@ + + /* Supported video drivers */ + #define SDL_VIDEO_DRIVER_UIKIT 1 +-#define SDL_VIDEO_DRIVER_DUMMY 1 ++#define SDL_VIDEO_DRIVER_DUMMY 0 + + /* enable OpenGL ES */ + #define SDL_VIDEO_OPENGL_ES 1 +@@ -152,4 +154,7 @@ + */ + #define SDL_IPHONE_MAX_GFORCE 5.0 + ++/* Tag to grab the uikit view from external code for further modification */ ++#define SDL_VIEW_TAG 456987 ++ + #endif /* _SDL_config_iphoneos_h */ +diff -r c0021a587dc7 src/SDL_fatal.c +--- a/src/SDL_fatal.c Sun Oct 10 15:45:58 2010 -0700 ++++ b/src/SDL_fatal.c Sat Oct 16 18:35:03 2010 +0200 +@@ -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 c0021a587dc7 src/video/SDL_renderer_gles.c +--- a/src/video/SDL_renderer_gles.c Sun Oct 10 15:45:58 2010 -0700 ++++ b/src/video/SDL_renderer_gles.c Sat Oct 16 18:35:03 2010 +0200 +@@ -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 c0021a587dc7 src/video/SDL_video.c +--- a/src/video/SDL_video.c Sun Oct 10 15:45:58 2010 -0700 ++++ b/src/video/SDL_video.c Sat Oct 16 18:35:03 2010 +0200 +@@ -1416,9 +1416,9 @@ + SDL_MinimizeWindow(window); + } + +- if (display->gamma && _this->SetDisplayGammaRamp) { ++ /*if (display->gamma && _this->SetDisplayGammaRamp) { + _this->SetDisplayGammaRamp(_this, display, display->saved_gamma); +- } ++ }*/ + if ((window->flags & (SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FULLSCREEN)) + && _this->SetWindowGrab) { + _this->SetWindowGrab(_this, window); +diff -r c0021a587dc7 src/video/uikit/SDL_uikitopengles.m +--- a/src/video/uikit/SDL_uikitopengles.m Sun Oct 10 15:45:58 2010 -0700 ++++ b/src/video/uikit/SDL_uikitopengles.m Sat Oct 16 18:35:03 2010 +0200 +@@ -114,8 +114,8 @@ + bBits: _this->gl_config.blue_size \ + aBits: _this->gl_config.alpha_size \ + depthBits: _this->gl_config.depth_size]; +- +- data->view = view; ++ view.tag = SDL_VIEW_TAG; ++ data->view = view; + + /* add the view to our window */ + [uiwindow addSubview: view ]; +diff -r c0021a587dc7 src/video/uikit/SDL_uikitview.m +--- a/src/video/uikit/SDL_uikitview.m Sun Oct 10 15:45:58 2010 -0700 ++++ b/src/video/uikit/SDL_uikitview.m Sat Oct 16 18:35:03 2010 +0200 +@@ -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 @@ + + /* Terminates the editing session */ + - (BOOL)textFieldShouldReturn:(UITextField*)_textField { ++ SDL_SendKeyboardKey(SDL_PRESSED, SDL_SCANCODE_RETURN); + [self hideKeyboard]; + return YES; + } +@@ -314,7 +313,7 @@ + int SDL_iPhoneKeyboardShow(SDL_Window * window) { + + SDL_WindowData *data; +- SDL_uikitview *view; ++ SDL_uikitview *view = NULL; + + if (NULL == window) { + SDL_SetError("Window does not exist"); +@@ -322,7 +321,8 @@ + } + + data = (SDL_WindowData *)window->driverdata; +- view = data->view; ++ if (data != NULL) ++ view = data->view; + + if (nil == view) { + SDL_SetError("Window has no view"); +@@ -337,7 +337,7 @@ + int SDL_iPhoneKeyboardHide(SDL_Window * window) { + + SDL_WindowData *data; +- SDL_uikitview *view; ++ SDL_uikitview *view = NULL; + + if (NULL == window) { + SDL_SetError("Window does not exist"); +@@ -345,7 +345,8 @@ + } + + data = (SDL_WindowData *)window->driverdata; +- view = data->view; ++ if (data != NULL) ++ view = data->view; + + if (NULL == view) { + SDL_SetError("Window has no view"); +@@ -360,7 +361,7 @@ + SDL_bool SDL_iPhoneKeyboardIsShown(SDL_Window * window) { + + SDL_WindowData *data; +- SDL_uikitview *view; ++ SDL_uikitview *view = NULL; + + if (NULL == window) { + SDL_SetError("Window does not exist"); +@@ -368,7 +369,8 @@ + } + + data = (SDL_WindowData *)window->driverdata; +- view = data->view; ++ if (data != NULL) ++ view = data->view; + + if (NULL == view) { + SDL_SetError("Window has no view"); +@@ -382,7 +384,7 @@ + int SDL_iPhoneKeyboardToggle(SDL_Window * window) { + + SDL_WindowData *data; +- SDL_uikitview *view; ++ SDL_uikitview *view = NULL; + + if (NULL == window) { + SDL_SetError("Window does not exist"); +@@ -390,7 +392,8 @@ + } + + data = (SDL_WindowData *)window->driverdata; +- view = data->view; ++ if (data != NULL) ++ view = data->view; + + if (NULL == view) { + SDL_SetError("Window has no view"); +diff -r c0021a587dc7 src/video/uikit/SDL_uikitwindow.m +--- a/src/video/uikit/SDL_uikitwindow.m Sun Oct 10 15:45:58 2010 -0700 ++++ b/src/video/uikit/SDL_uikitwindow.m Sat Oct 16 18:35:03 2010 +0200 +@@ -144,7 +144,10 @@ + if (SDL_UIKit_supports_multiple_displays) { + [uiwindow setScreen:uiscreen]; + } +- ++ ++ if ([[UIScreen screens] count] > 1) ++ uiwindow.screen = [[UIScreen screens] objectAtIndex:1]; ++ + if (SetupWindowData(_this, window, uiwindow, SDL_TRUE) < 0) { + [uiwindow release]; + return -1; +diff -r c0021a587dc7 src/video/uikit/keyinfotable.h +--- a/src/video/uikit/keyinfotable.h Sun Oct 10 15:45:58 2010 -0700 ++++ b/src/video/uikit/keyinfotable.h Sat Oct 16 18:35:03 2010 +0200 +@@ -54,7 +54,7 @@ + /* 10 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 11 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 12 */ { SDL_SCANCODE_UNKNOWN, 0 }, +-/* 13 */ { SDL_SCANCODE_UNKNOWN, 0 }, ++/* 13 */ { SDL_SCANCODE_RETURN, 0 }, + /* 14 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 15 */ { SDL_SCANCODE_UNKNOWN, 0 }, + /* 16 */ { SDL_SCANCODE_UNKNOWN, 0 }, +@@ -137,7 +137,7 @@ + /* 93 */ { SDL_SCANCODE_RIGHTBRACKET, 0 }, + /* 94 */ { SDL_SCANCODE_6, KMOD_SHIFT }, /* plus shift modifier '^' */ + /* 95 */ { SDL_SCANCODE_MINUS, KMOD_SHIFT }, /* plus shift modifier '_' */ +-/* 96 */ { SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* '`' ++/* 96 */ { SDL_SCANCODE_GRAVE, KMOD_SHIFT }, /* '`' */ + /* 97 */ { SDL_SCANCODE_A, 0 }, + /* 98 */ { SDL_SCANCODE_B, 0 }, + /* 99 */ { SDL_SCANCODE_C, 0 }, diff -r 793386610068 -r b1c2c2f6fc5e project_files/hedgewars.pro --- a/project_files/hedgewars.pro Thu Aug 26 23:59:18 2010 +0200 +++ b/project_files/hedgewars.pro Wed Oct 27 14:02:20 2010 +0200 @@ -69,6 +69,7 @@ TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_es.ts TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_fi.ts TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_fr.ts +TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_hu.ts TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_it.ts TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_ja.ts TRANSLATIONS += ../share/hedgewars/Data/Locale/hedgewars_pl.ts diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Fonts/wqy-zenhei.ttc Binary file share/hedgewars/Data/Fonts/wqy-zenhei.ttc has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/BarrelhouseL.png Binary file share/hedgewars/Data/Forts/BarrelhouseL.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/BarrelhouseR.png Binary file share/hedgewars/Data/Forts/BarrelhouseR.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/CMakeLists.txt --- a/share/hedgewars/Data/Forts/CMakeLists.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Forts/CMakeLists.txt Wed Oct 27 14:02:20 2010 +0200 @@ -1,4 +1,4 @@ -file(GLOB FortSprites *.png) +file(GLOB FortSprites *L.png *R.png) install(FILES ${FortSprites} diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/Cake-preview.png Binary file share/hedgewars/Data/Forts/Cake-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/Castle-preview.png Binary file share/hedgewars/Data/Forts/Castle-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/Earth-preview.png Binary file share/hedgewars/Data/Forts/Earth-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/EarthR.png Binary file share/hedgewars/Data/Forts/EarthR.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/Flowerhog-preview.png Binary file share/hedgewars/Data/Forts/Flowerhog-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/Hydrant-preview.png Binary file share/hedgewars/Data/Forts/Hydrant-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/IslandL.png Binary file share/hedgewars/Data/Forts/IslandL.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/IslandR.png Binary file share/hedgewars/Data/Forts/IslandR.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/Lego-preview.png Binary file share/hedgewars/Data/Forts/Lego-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/Plane-preview.png Binary file share/hedgewars/Data/Forts/Plane-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/Statue-preview.png Binary file share/hedgewars/Data/Forts/Statue-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/Tank-preview.png Binary file share/hedgewars/Data/Forts/Tank-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/TankL.png Binary file share/hedgewars/Data/Forts/TankL.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/TankL.svgz Binary file share/hedgewars/Data/Forts/TankL.svgz has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/TankR.png Binary file share/hedgewars/Data/Forts/TankR.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/UFO-preview.png Binary file share/hedgewars/Data/Forts/UFO-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Forts/Wood-preview.png Binary file share/hedgewars/Data/Forts/Wood-preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/AmmoMenu/Slot.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/Slot.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/AmmoMenu/SlotKeys.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/SlotKeys.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Case.png Binary file share/hedgewars/Data/Graphics/Case.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Chunk.png Binary file share/hedgewars/Data/Graphics/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Crosshair.png Binary file share/hedgewars/Data/Graphics/Crosshair.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Explosives.png Binary file share/hedgewars/Data/Graphics/Explosives.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Finger.png Binary file share/hedgewars/Data/Graphics/Finger.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/FirstAid.png Binary file share/hedgewars/Data/Graphics/FirstAid.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Flags/cm_pacman2.png Binary file share/hedgewars/Data/Graphics/Flags/cm_pacman2.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Flags/pirate.png Binary file share/hedgewars/Data/Graphics/Flags/pirate.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Flame.png Binary file share/hedgewars/Data/Graphics/Flame.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/HHDeath.png Binary file share/hedgewars/Data/Graphics/HHDeath.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/4gsuif.png Binary file share/hedgewars/Data/Graphics/Hats/4gsuif.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Balrog.png Binary file share/hedgewars/Data/Graphics/Hats/Balrog.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Bandit.png Binary file share/hedgewars/Data/Graphics/Hats/Bandit.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Blanka.png Binary file share/hedgewars/Data/Graphics/Hats/Blanka.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/BlankaToothless.png Binary file share/hedgewars/Data/Graphics/Hats/BlankaToothless.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/BlueCap.png Binary file share/hedgewars/Data/Graphics/Hats/BlueCap.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/BlueHair.png Binary file share/hedgewars/Data/Graphics/Hats/BlueHair.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/BrainSlug.png Binary file share/hedgewars/Data/Graphics/Hats/BrainSlug.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/BrainSlugMouth.png Binary file share/hedgewars/Data/Graphics/Hats/BrainSlugMouth.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Bunny.png Binary file share/hedgewars/Data/Graphics/Hats/Bunny.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Chunli.png Binary file share/hedgewars/Data/Graphics/Hats/Chunli.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Coonskin3.png Binary file share/hedgewars/Data/Graphics/Hats/Coonskin3.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Cowboy.png Binary file share/hedgewars/Data/Graphics/Hats/Cowboy.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Eva_00b.png Binary file share/hedgewars/Data/Graphics/Hats/Eva_00b.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Eva_00y.png Binary file share/hedgewars/Data/Graphics/Hats/Eva_00y.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Falcon.png Binary file share/hedgewars/Data/Graphics/Hats/Falcon.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Gasmask.png Binary file share/hedgewars/Data/Graphics/Hats/Gasmask.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Geordi.png Binary file share/hedgewars/Data/Graphics/Hats/Geordi.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Glasses.png Binary file share/hedgewars/Data/Graphics/Hats/Glasses.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/GreenCap.png Binary file share/hedgewars/Data/Graphics/Hats/GreenCap.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/GreenHair.png Binary file share/hedgewars/Data/Graphics/Hats/GreenHair.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/GreyHair.png Binary file share/hedgewars/Data/Graphics/Hats/GreyHair.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Guile.png Binary file share/hedgewars/Data/Graphics/Hats/Guile.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/HogInTheHat.png Binary file share/hedgewars/Data/Graphics/Hats/HogInTheHat.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Honda.png Binary file share/hedgewars/Data/Graphics/Hats/Honda.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/IndianChief.png Binary file share/hedgewars/Data/Graphics/Hats/IndianChief.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Jason.png Binary file share/hedgewars/Data/Graphics/Hats/Jason.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Ken.png Binary file share/hedgewars/Data/Graphics/Hats/Ken.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/KirbyMask.png Binary file share/hedgewars/Data/Graphics/Hats/KirbyMask.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Luigi.png Binary file share/hedgewars/Data/Graphics/Hats/Luigi.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Mario.png Binary file share/hedgewars/Data/Graphics/Hats/Mario.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/MegaHogX.png Binary file share/hedgewars/Data/Graphics/Hats/MegaHogX.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/NinjaFull.png Binary file share/hedgewars/Data/Graphics/Hats/NinjaFull.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/NinjaStraight.png Binary file share/hedgewars/Data/Graphics/Hats/NinjaStraight.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/NinjaTriangle.png Binary file share/hedgewars/Data/Graphics/Hats/NinjaTriangle.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/NoHat.png Binary file share/hedgewars/Data/Graphics/Hats/NoHat.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/OrangeHair.png Binary file share/hedgewars/Data/Graphics/Hats/OrangeHair.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/PinkHair.png Binary file share/hedgewars/Data/Graphics/Hats/PinkHair.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/PrincessDaisy.png Binary file share/hedgewars/Data/Graphics/Hats/PrincessDaisy.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/PrincessPeach.png Binary file share/hedgewars/Data/Graphics/Hats/PrincessPeach.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Pumpkin Hat.png Binary file share/hedgewars/Data/Graphics/Hats/Pumpkin Hat.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Pumpkin_Hat.png Binary file share/hedgewars/Data/Graphics/Hats/Pumpkin_Hat.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/PurpleHair.png Binary file share/hedgewars/Data/Graphics/Hats/PurpleHair.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Rain.png Binary file share/hedgewars/Data/Graphics/Hats/Rain.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Rambo.png Binary file share/hedgewars/Data/Graphics/Hats/Rambo.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/RedCap.png Binary file share/hedgewars/Data/Graphics/Hats/RedCap.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/RedHair.png Binary file share/hedgewars/Data/Graphics/Hats/RedHair.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Reserved/51e46e89a4f7ee3ea760bb587063b202judo.png Binary file share/hedgewars/Data/Graphics/Hats/Reserved/51e46e89a4f7ee3ea760bb587063b202judo.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Reserved/941fc72a68a50cebf562059816e8cb26RSR.png Binary file share/hedgewars/Data/Graphics/Hats/Reserved/941fc72a68a50cebf562059816e8cb26RSR.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Reserved/afaff8193505e29230b76f8c8dd78170lambda.png Binary file share/hedgewars/Data/Graphics/Hats/Reserved/afaff8193505e29230b76f8c8dd78170lambda.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Bob.png Binary file share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Bob.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Bub.png Binary file share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Bub.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Cororon.png Binary file share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Cororon.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Kululun.png Binary file share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Kululun.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/RobinHood.png Binary file share/hedgewars/Data/Graphics/Hats/RobinHood.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Ryu.png Binary file share/hedgewars/Data/Graphics/Hats/Ryu.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Samurai.png Binary file share/hedgewars/Data/Graphics/Hats/Samurai.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Santa.png Binary file share/hedgewars/Data/Graphics/Hats/Santa.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Skull.png Binary file share/hedgewars/Data/Graphics/Hats/Skull.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Sniper.png Binary file share/hedgewars/Data/Graphics/Hats/Sniper.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Sonic.png Binary file share/hedgewars/Data/Graphics/Hats/Sonic.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/SparkleSuperFun.png Binary file share/hedgewars/Data/Graphics/Hats/SparkleSuperFun.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/StrawHat.png Binary file share/hedgewars/Data/Graphics/Hats/StrawHat.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/StrawHatEyes.png Binary file share/hedgewars/Data/Graphics/Hats/StrawHatEyes.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/StrawHatFacial.png Binary file share/hedgewars/Data/Graphics/Hats/StrawHatFacial.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Sunglasses.png Binary file share/hedgewars/Data/Graphics/Hats/Sunglasses.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/TeamCap.png Binary file share/hedgewars/Data/Graphics/Hats/TeamCap.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/TeamHair.png Binary file share/hedgewars/Data/Graphics/Hats/TeamHair.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/TeamHeadband.png Binary file share/hedgewars/Data/Graphics/Hats/TeamHeadband.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/TeamTophat.png Binary file share/hedgewars/Data/Graphics/Hats/TeamTophat.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Toad.png Binary file share/hedgewars/Data/Graphics/Hats/Toad.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Vega.png Binary file share/hedgewars/Data/Graphics/Hats/Vega.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Viking.png Binary file share/hedgewars/Data/Graphics/Hats/Viking.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/Wario.png Binary file share/hedgewars/Data/Graphics/Hats/Wario.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/WhySoSerious.png Binary file share/hedgewars/Data/Graphics/Hats/WhySoSerious.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/WizardHat.png Binary file share/hedgewars/Data/Graphics/Hats/WizardHat.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/YellowCap.png Binary file share/hedgewars/Data/Graphics/Hats/YellowCap.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/YellowHair.png Binary file share/hedgewars/Data/Graphics/Hats/YellowHair.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/android.png Binary file share/hedgewars/Data/Graphics/Hats/android.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/angel.png Binary file share/hedgewars/Data/Graphics/Hats/angel.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/anzac.png Binary file share/hedgewars/Data/Graphics/Hats/anzac.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/apple.png Binary file share/hedgewars/Data/Graphics/Hats/apple.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/ash.png Binary file share/hedgewars/Data/Graphics/Hats/ash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/banana.png Binary file share/hedgewars/Data/Graphics/Hats/banana.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/beefeater.png Binary file share/hedgewars/Data/Graphics/Hats/beefeater.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/charmander.png Binary file share/hedgewars/Data/Graphics/Hats/charmander.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/chef.png Binary file share/hedgewars/Data/Graphics/Hats/chef.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/chikorita.png Binary file share/hedgewars/Data/Graphics/Hats/chikorita.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/clown-copper.png Binary file share/hedgewars/Data/Graphics/Hats/clown-copper.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/clown-crossed.png Binary file share/hedgewars/Data/Graphics/Hats/clown-crossed.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/clown.png Binary file share/hedgewars/Data/Graphics/Hats/clown.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/crown.png Binary file share/hedgewars/Data/Graphics/Hats/crown.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/cyborg.png Binary file share/hedgewars/Data/Graphics/Hats/cyborg.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/darthvader.png Binary file share/hedgewars/Data/Graphics/Hats/darthvader.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/diglett.png Binary file share/hedgewars/Data/Graphics/Hats/diglett.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/dwarf.png Binary file share/hedgewars/Data/Graphics/Hats/dwarf.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/eastertop.png Binary file share/hedgewars/Data/Graphics/Hats/eastertop.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/jigglypuff.png Binary file share/hedgewars/Data/Graphics/Hats/jigglypuff.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/junior.png Binary file share/hedgewars/Data/Graphics/Hats/junior.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/kiss_criss.png Binary file share/hedgewars/Data/Graphics/Hats/kiss_criss.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/kiss_frehley.png Binary file share/hedgewars/Data/Graphics/Hats/kiss_frehley.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/kiss_simmons.png Binary file share/hedgewars/Data/Graphics/Hats/kiss_simmons.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/kiss_stanley.png Binary file share/hedgewars/Data/Graphics/Hats/kiss_stanley.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/knight.png Binary file share/hedgewars/Data/Graphics/Hats/knight.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/laurel.png Binary file share/hedgewars/Data/Graphics/Hats/laurel.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/lemon.png Binary file share/hedgewars/Data/Graphics/Hats/lemon.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/link.png Binary file share/hedgewars/Data/Graphics/Hats/link.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/lugia.png Binary file share/hedgewars/Data/Graphics/Hats/lugia.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/mickey_ears.png Binary file share/hedgewars/Data/Graphics/Hats/mickey_ears.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/mp3.png Binary file share/hedgewars/Data/Graphics/Hats/mp3.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/mudkip.png Binary file share/hedgewars/Data/Graphics/Hats/mudkip.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/naruto.png Binary file share/hedgewars/Data/Graphics/Hats/naruto.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/orange.png Binary file share/hedgewars/Data/Graphics/Hats/orange.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/pikachu.png Binary file share/hedgewars/Data/Graphics/Hats/pikachu.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/pinksunhat.png Binary file share/hedgewars/Data/Graphics/Hats/pinksunhat.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/pirate_jack.png Binary file share/hedgewars/Data/Graphics/Hats/pirate_jack.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/pirate_jack_bandana.png Binary file share/hedgewars/Data/Graphics/Hats/pirate_jack_bandana.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/policecap.png Binary file share/hedgewars/Data/Graphics/Hats/policecap.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/quotecap.png Binary file share/hedgewars/Data/Graphics/Hats/quotecap.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/rasta.png Binary file share/hedgewars/Data/Graphics/Hats/rasta.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/royalguard.png Binary file share/hedgewars/Data/Graphics/Hats/royalguard.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/slowpoke.png Binary file share/hedgewars/Data/Graphics/Hats/slowpoke.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/spartan.png Binary file share/hedgewars/Data/Graphics/Hats/spartan.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/spidey.png Binary file share/hedgewars/Data/Graphics/Hats/spidey.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/squirtle.png Binary file share/hedgewars/Data/Graphics/Hats/squirtle.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/sth_Amy.png Binary file share/hedgewars/Data/Graphics/Hats/sth_Amy.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/sth_AmyClassic.png Binary file share/hedgewars/Data/Graphics/Hats/sth_AmyClassic.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/sth_Eggman.png Binary file share/hedgewars/Data/Graphics/Hats/sth_Eggman.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/sth_Knux.png Binary file share/hedgewars/Data/Graphics/Hats/sth_Knux.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/sth_Metal.png Binary file share/hedgewars/Data/Graphics/Hats/sth_Metal.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/sth_Shadow.png Binary file share/hedgewars/Data/Graphics/Hats/sth_Shadow.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/sth_Sonic.png Binary file share/hedgewars/Data/Graphics/Hats/sth_Sonic.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/sth_Super.png Binary file share/hedgewars/Data/Graphics/Hats/sth_Super.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/sth_Tails.png Binary file share/hedgewars/Data/Graphics/Hats/sth_Tails.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/stormcloud.png Binary file share/hedgewars/Data/Graphics/Hats/stormcloud.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/stormtrooper.png Binary file share/hedgewars/Data/Graphics/Hats/stormtrooper.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/thug.png Binary file share/hedgewars/Data/Graphics/Hats/thug.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/tophats.png Binary file share/hedgewars/Data/Graphics/Hats/tophats.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/ushanka.png Binary file share/hedgewars/Data/Graphics/Hats/ushanka.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/venom.png Binary file share/hedgewars/Data/Graphics/Hats/venom.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hats/voltorb.png Binary file share/hedgewars/Data/Graphics/Hats/voltorb.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hedgehog/ILoveLemonade.png Binary file share/hedgewars/Data/Graphics/Hedgehog/ILoveLemonade.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hedgehog/Idle.png Binary file share/hedgewars/Data/Graphics/Hedgehog/Idle.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hedgehog/Juggle.png Binary file share/hedgewars/Data/Graphics/Hedgehog/Juggle.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hedgehog/Shrug.png Binary file share/hedgewars/Data/Graphics/Hedgehog/Shrug.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hedgehog/amHammer.png Binary file share/hedgewars/Data/Graphics/Hedgehog/amHammer.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hedgehog/amMine.png Binary file share/hedgewars/Data/Graphics/Hedgehog/amMine.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hedgehog/amResurrector.png Binary file share/hedgewars/Data/Graphics/Hedgehog/amResurrector.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Hedgehog/amSMine.png Binary file share/hedgewars/Data/Graphics/Hedgehog/amSMine.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Lag.png Binary file share/hedgewars/Data/Graphics/Lag.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/MineDead.png Binary file share/hedgewars/Data/Graphics/MineDead.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/MineOff.png Binary file share/hedgewars/Data/Graphics/MineOff.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/MineOn.png Binary file share/hedgewars/Data/Graphics/MineOn.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Note.png Binary file share/hedgewars/Data/Graphics/Note.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Power.png Binary file share/hedgewars/Data/Graphics/Power.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/SMineOff.png Binary file share/hedgewars/Data/Graphics/SMineOff.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/SMineOn.png Binary file share/hedgewars/Data/Graphics/SMineOn.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Splash.png Binary file share/hedgewars/Data/Graphics/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/Utility.png Binary file share/hedgewars/Data/Graphics/Utility.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Graphics/amGirder.png Binary file share/hedgewars/Data/Graphics/amGirder.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/CMakeLists.txt --- a/share/hedgewars/Data/Locale/CMakeLists.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/CMakeLists.txt Wed Oct 27 14:02:20 2010 +0200 @@ -1,9 +1,18 @@ file(GLOB txttrans2 ??.txt) file(GLOB txttrans5 ?????.txt) -file(GLOB qmtrans hedgewars_*.qm) +file(GLOB tsfiles *.ts) + +QT4_ADD_TRANSLATION(QM ${tsfiles}) + +add_custom_target (release-translation ALL + DEPENDS ${QM} + COMMENT "Compiling ts files" +) install(FILES ${txttrans2} ${txttrans5} - ${qmtrans} - DESTINATION ${SHAREPATH}Data/Locale) + ${QM} + DESTINATION ${SHAREPATH}Data/Locale +) + diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/en.txt --- a/share/hedgewars/Data/Locale/en.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/en.txt Wed Oct 27 14:02:20 2010 +0200 @@ -45,8 +45,11 @@ 00:42=Portable Portal Device 00:43=Piano Strike 00:44=Old Limburger -00:45=Sine Gun +00:45=Sine Gun (beta) 00:46=Flamethrower +00:47=Sticky Mine +00:48=Hammer +00:49=Resurrector (beta) 01:00=Let's fight! 01:01=Round draw @@ -62,6 +65,7 @@ 01:11=This weapon or utility is not yet available! 01:12=Last round till Sudden Death! 01:13=%1 rounds till Sudden Death! +01:14=Get ready, %1! ; Event messages ; Hog (%1) died @@ -97,7 +101,7 @@ 02:00=Poor poor %1... 02:00=%1 prefers wormux 02:00=%1 has been blocking shots with his face -02:00=%1 is a hero amongst me...err..hogs +02:00=%1 is a hero amongst me...err...hogs 02:00=%1 finds his place in Valhalla 02:00=%1 has left the building 02:00=%1 goes the way of the dinosaurs @@ -140,7 +144,7 @@ 02:01=%1 is sleeping with the fishes 02:01=%1 thinks the water physics suck in this game 02:01=%1 looks thirsty -02:01=the sea claims %1 +02:01=The sea claims %1 02:01=%1 is lost at sea 02:01=%1 should have brought his scuba gear 02:01=%1 gets a burial at sea @@ -239,7 +243,7 @@ 02:05=Medic! 02:05=First aid from the skies! 02:05=A health pack for you -02:05=Good health.. in box form! +02:05=Good health... in box form! 02:05=The doctor calls 02:05=Fresh band-aids! 02:05=This will make you feel better @@ -421,7 +425,12 @@ 03:42=I'm making a note here... ; the misspelled "Beethoven" is intentional (-> to beat) 03:43=Performing Beathoven's deadly sonata -03:44=Quite old and very smelly +03:44=Best before: 1923 +03:45=The power of science +03:46=Hot Hot Hot! +03:47=Stick these somewhere useful! +03:48=It's Hammer time! +03:49=Does what you guess ; Weapon Descriptions (use | as line breaks) 04:00=Attack your enemies using a simple grenade.|It will explode once its timer reaches zero.|1-5: Set grenade's timer|Attack: Hold to throw with more power @@ -466,9 +475,14 @@ 04:39=Fly to other parts of the map using the flying|saucer. This hard to master utility is able to|take you to almost any position on the battlefield.|Attack: Activate|Up/Left/Right: Apply force in one direction|Long Jump: Drop grenades or similar weapons 04:40=Set some ground on fire using this bottle filled|with (soon to be) burning liquid.|Attack: Hold to shoot with more power 04:41=The evidence nature might even top the flying|saucer. Birdy can carry your hog around and|drop eggs on your enemies!|Attack: Activate and drop eggs|Up/Left/Right: Flap in one direction -04:42=HUGE SUCCESS| | |(but missing texts!) -04:43=(missing text) -04:44=This isn't just cheese, it's biological warfare!|It won't cause an huge amount of damage once|the timer reaches zero but it will definitely|poison anyone unlucky to be nearby!|1-5: Set grenade's timer|Attack: Hold to throw with more power +04:42=This portable portal device is capable|of instantly transporting you, your enemies,|or your weaponry between two points on the|terrain.|Use it wisely and your campaign will be a...|HUGE SUCCESS!|Attack: Shoot a portal|Switch: Cycle portal colours +04:43=Make your musical debut an explosive success!|Drop a piano from the heavens, but beware...|someone needs to play it, and that may cost you|your life!|Cursor: Select target region|F1-F9: Play the piano +04:44=This isn't just cheese, it's biological warfare!|It won't cause an huge amount of damage once|the timer reaches zero but it will definitely|poison anyone unlucky to touch the smell!|1-5: Set grenade's timer|Attack: Hold to throw with more power +04:45=All those physics classes have finally|paid off, launch a devastating Sine|wave at your foes.|Watch out, this weapon packs quite a kick. (This weapon is incomplete)|Attack: Shoot +04:46=Cover your foes with sizzling liquid flame.|Heartwarming!|Attack: Activate|Up/Down: Continue aiming|Left/Right: Modify spitting power +04:47=Double the fun with two spiky, sneaky, sticky mines.|Set up a chain reaction or defend yourself (or both!)|Attack: Hold to shoot with more power (twice) +04:48=Why should the moles get all the abuse?|Wacking a hog can be just as fun! A good|blow from this hammer will shave off one|third of a hog's health and plunge them|underground.|Attack: Activate +04:49=Resurrect your friends!|But beware that this also resurrects your foes.|Attack: Keep attack pressed to resurrect slowly|Up: Accelerate resurrection ; Game goal strings 05:00=Game Modes diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/es.txt --- a/share/hedgewars/Data/Locale/es.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/es.txt Wed Oct 27 14:02:20 2010 +0200 @@ -1,5 +1,5 @@ ; Spanish locale -; Revision 3205 +; Revision 3987 00:00=Granada 00:01=Granada de frag. @@ -43,6 +43,14 @@ 00:39=Platillo volante 00:40=Cóctel molotov 00:41=Birdy +00:42=Dispositivo portátil de portales +00:43=Piano +00:44=Limbuger añejo +00:45=Rifle sinusoidal (beta) +00:46=Lanzallamas +00:47=Bomba lapa +00:48=Mazo +00:49=Resurrección (beta) 01:00=¡Luchad! 01:01=Empate @@ -56,6 +64,9 @@ 01:09=Sincronizando... 01:10=Activar esta herramienta no hará que tu turno acabe. 01:11=Esta herramienta o arma todavía no está disponible. +01:12=¡Última ronda antes de la muerte súbita! +01:13=¡%1 rondas hasta la muerte súbita! +01:14=¡Prepárate, %1! ; Eventos ; El erizo (%1) ha muerto @@ -361,6 +372,13 @@ 02:10=Es un pájaro, es un avión... 02:10=¡Eliminado! +; El erizo (%1) abandona (el equipo ha salido de la partida) +02:11=¡%1 tiene que irse a mimir! +02:11=¡%1 tiene que irse a la cama! +02:11=Parece que %1 está demasiado ocupado para seguir jugando +02:11=¡Teletranspórtame, Scotty! +02:11=%1 tiene que irse + ; Categorías de armamento 03:00=Arma arrojadiza 03:01=Arma arrojadiza @@ -404,6 +422,14 @@ 03:39=Herramienta de transporte 03:40=Bomba incendiaria 03:41=Amigo chillón +03:42=I'm making a note here... +03:43=Performing Beathoven's deadly sonata +03:44=Consumir preferentemente antes de 1923 +03:45=¡El poder de la ciencia! +03:46=¡Caliente caliente caliente! +03:47=Stick these somewhere useful! +03:48=Pablo clavó un clavito +03:49=Hace exactamente lo que dice ; Descripciones de armamento ( líneas delimitadas con | ) 04:00=Ataca a tus enemigos usando una sencilla granada.|Explotará una vez el temporizador llegue a cero.|1-5: ajustar temporizador.|Atacar: mantener presionado para lanzar más lejos. @@ -411,12 +437,12 @@ 04:02=Ataca a tus enemigos usando un proyectil balístico.|¡Atención al viento, modificará su trayectoria!|Atacar: mantener presionado para lanzar más lejos. 04:03=Lanza un abejorro explosivo que buscará el objetivo marcado.|No dispares a máxima potencia para mejorar su precisión.|Ratón: seleccionar objetivo.|Atacar: mantener presionado para lanzar más lejos. 04:04=Ataca a tus enemigos usando una escopeta de dos cañones.|Las balas se dispersan, así que no necesitarás|un tiro directo para herir a tus oponentes.|Atacar: abrir fuego (dos tiros). -04:05=¡Ve bajo tierra! Usa el martillo neumático para excavar|un pozo en el suelo y alcanzar otras áreas.|Atacar: empezar o terminar de cavar. +04:05=¡Entiérrate! Usa el martillo neumático para excavar|un pozo en el suelo y alcanzar otras áreas.|Atacar: empezar o terminar de cavar. 04:06=¿Aburrido? ¿Sin posibilidad de atacar? ¿Racionas tu munición?|¡No hay problema! ¡Adelante, pasa esta turno, gallina!|Atacar: pasa este turno sin hacer nada. 04:07=Cubre grandes distancias usando hábilmente la cuerda.|Gana inercia para empujar a otros erizos|o deja caer granadas u otras armas sobre ellos.|Atacar: lanza o suelta la cuerda.|Salto: deja caer el arma seleccionada. 04:08=Mantén alejados a tus enemigos desplegando minas|en pasadizos estrechos o justo bajo sus pies.|¡Asegúrate de alejarte rápidamente para no activarla tú mismo!|Atacar: deposita una mina ante ti. 04:09=¿No confías en tu puntería? Con la desert eagle|tienes 4 disparos para conseguir alcanzar a tu enemigo.|Atacar: abrir fuego (hasta 4 veces). -04:10=La fuerza bruta siempre es una opción. Lanza este clásico|explosivo cerca de tus enemigos y huye.|Atacar: deposita la dinamita ante ti. +04:10=La fuerza bruta siempre es una opción. Coloca este clásico|explosivo cerca de tus enemigos y huye.|Atacar: deposita la dinamita ante ti. 04:11=¡Manda a tus enemigos lejos de ti de un buen batazo!|Acaba con ellos lanzándolos fuera del mapa o al agua.|¿O qué tal lanzarles algunas minas?|Atacar: batear cualquier cosa delante de ti. 04:12=Enfréntate cara a cara con tus enemigos|y libera el poder de tus puños sobre ellos.|Útil para lanzarlos fuera del mapa o al agua.|Atacar: ejecutar el puño de fuego. 04:13=SIN USAR @@ -429,7 +455,7 @@ 04:20=Te permite jugar este turno con otro de tus erizos.|Atacar: activar.|Tabulador: cambiar entre erizos una vez activada. 04:21=Lanza un proyectil que se fragmentará al impactar, enviando|una lluvia explosiva sobre tus enemigos.|Atacar: lanzar a máxima potencia. 04:22=¡Siéntete como Indiana Jones! El látigo es un arma muy útil|en ciertas situaciones, especialmente para deshacerte de|erizos enemigos enviándolos fuera del mapa o al agua.|Atacar: golpear cualquier cosa delante de ti. -04:23=Si no tienes nada que perder, esto puede serte útil.|Sacrifica a tu erizo lanzándolo como un cohete que despejará|cualquier cosa que encuentre en su camino, explotando al final.|Atacar: manda a tu erizo a la perdición. +04:23=Si no tienes nada que perder, esto puede serte útil.|Sacrifica a tu erizo lanzándolo como un cohete que despejará|cualquier cosa que encuentre en su camino, detonando al final.|Atacar: manda a tu erizo a la perdición. 04:24=¡Feliz cumpleaños! Esta tarta bípeda caminará|hasta tus enemigos para darles una fiesta sorpresa explosiva.|La tarta es capaz de atravesar casi cualquier tipo de terreno,|pero evita que se quede atascada.|Atacar: enviar la tarta de camino o hacerla detonar. 04:25=Utiliza este disfraz para seducir a tus enemigos,|haciéndoles perder la cabeza y saltar como locos hacia ti|(y de paso hacia el agua o una mina).|Atacar: disfrazarte y lanzar un beso a tus enemigos. 04:26=Lanza esta jugosa sandía a tus enemigos.|Una vez el temporizador llegue a cero se fragmentará|en rodajas deliciosamente explosivas sobre tus enemigos.|Atacar: mantener presionado para lanzar más lejos. @@ -440,14 +466,22 @@ 04:31=El avión teledirigido es el arma ideal para recoger cajas|o atacar enemigos lejanos.|Cargado con 3 bombas, el avión explotará|si choca contra algo.|Atacar: lanzar el avión o dejar caer las bombas.|Cursores: controlar el avión. 04:32=¡Mucho mejor que cualquier dieta! Salta más alto y más lejos|o haz que tus enemigos vuelen incluso más lejos.|Atacar: activar. 04:33=A veces uno necesita una pequeña ayuda para acabar con sus enemigos.|Atacar: activar. -04:34=¡Na, na, no me tocas!|Atacar: activar. +04:34=¡Na, na, na, no me tocas!|Atacar: activar. 04:35=A veces el reloj corre demasiado deprisa. Consigue un poco|de tiempo extra para finalizar tu ataque.|Atacar: activar. 04:36=Vaya, parece que tu puntería apesta. Por suerte para ti|la tecnología moderna está de tu lado.|Atacar: activar. 04:37=No le temas a la luz del día. Sólo durará un turno, pero|te permitirá absorber la fuerza vital de tus enemigos|cuando les ataques.|Atacar: activar. 04:38=El rifle de francotirador puede ser el arma más destructiva|de todo tu arsenal, pero es muy inefectiva en distancias cortas.|El daño infligido es proporcional a la distancia respecto del objetivo.|Atacar: abrir fuego (un disparo). 04:39=Vuela hasta otras partes del mapa usando un platillo volante.|Puede ser complicado de controlar, pero conseguirás llegar|a sitios que nunca hubieras imaginado accesibles.|Atacar: activar.|Cursores: acelerar en esa dirección (un golpe cada vez). 04:40=Alza un muro de fuego usando esta botella|llena de (en breve, ardiendo) líquido inflamable.|Atacar: mantener presionado para lanzar más lejos. -04:41=¡Demostrando que lo natural puede ser mejor|que lo artificial, Birdy puede no sólo|transportar tu erizo como el platillo volante,|sino también lanzar huevos envenenados a tus enemigos!|Atacar: activar y lanzar huevos.|Cursores: aletear en esa dirección. +04:41=¡Demostrando que lo natural puede ser mejor|que lo artificial, Birdy puede no sólo|transportar tu erizo como el platillo volante,|sino también lanzar huevos envenenados a tus enemigos!|Atacar: activar/lanzar huevos.|Cursores: aletear en esa dirección. +04:42=El dispositivo portátil de portales es capaz de|transportar instantáneamente minas, armas o ¡incluso erizos!|Úsalo adecuadamente y tu campaña será un... |¡ÉXITO ALUCINANTE!|Atacar: disparar un portal.|Cambiar: alternar el color a disparar. +04:43=¡Haz un debut explosivo en el mundo del espectáculo!|Lanza un piano desde lo más alto del firmamento, pero ten cuidado...|¡alguien debe tocarlo, y eso puede costarte la vida!|Ratón: seleccionar objetivo.|F1-F9: tocar el piano. +04:44=¡No es simplemente queso, es un arma biológica!|No causará mucho daño al detonar, pero ten por seguro|que cualquiera que se acerque demasiado|a su oloroso rastro quedará gravemente intoxicado.|1-5: ajustar temporizador.|Atacar: mantener presionado para lanzar más lejos. +04:45=Al fin una utilidad para todas esas clases de física.|Dispara una devastadora onda sinusoidal que mandará|a tus enemigos al infierno matemático.|Ten cuidado, el retroceso de este arma es considerable.|Atacar: disparar. +04:46=Envuelve a tus enemigos en siseante fuego líquido.|¡Se derretirán de placer!|Atacar: activar.|Arriba/abajo: modificar trayectoria.|Izquierda/derecha: modificar potencia de fuego. +04:47=¡Dos bombas lapa, doble diversión!|Útiles para planear reacciones en cadena, atrincherarte...|¡o las dos cosas!.|Atacar: mantener presionado para lanzar más lejos (dos disparos). +04:48=¿Por qué la gente siempre la toma con los topos?|¡Golpear erizos es aún más divertido!|Un buen mazazo puede reducir en un tercio la|vida de cualquier erizo y enterrarlo completamente.|Atacar: activar. +04:49=¡Resucita a tus aliados!|Pero ten cuidado, también resucitarás a tus enemigos.|Atacar: mantener presionado para resucitar lentamente.|Arriba: acelerar resurrección. ; Game goal strings 05:00=Modos de juego diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_bg.qm Binary file share/hedgewars/Data/Locale/hedgewars_bg.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_bg.ts --- a/share/hedgewars/Data/Locale/hedgewars_bg.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_bg.ts Wed Oct 27 14:02:20 2010 +0200 @@ -86,6 +86,10 @@ Please select record from the list above Изберете запис от списъка + + DefaultTeam + + HWGame @@ -290,22 +294,58 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Награда за най-добър изстрел е спечелена от <b>%1</b> с <b>%2</b> точки.</p> + <p>Награда за най-добър изстрел е спечелена от <b>%1</b> с <b>%2</b> точки.</p> + + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> + A total of <b>%1</b> hedgehog(s) were killed during this round. + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -388,11 +428,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -438,7 +473,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -627,6 +777,35 @@ Random Maze + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -714,6 +893,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -748,6 +931,10 @@ Load (Load a previously saved game) Зареди (заредете предишно запаметена игра) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -831,10 +1018,6 @@ Добави дата и час към името на записаното демо - Reduced quality - - - Show ammo menu tooltips @@ -877,6 +1060,54 @@ Mission + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + По подразбиране + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1075,6 +1306,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1358,6 +1593,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_cs.qm Binary file share/hedgewars/Data/Locale/hedgewars_cs.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_cs.ts --- a/share/hedgewars/Data/Locale/hedgewars_cs.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_cs.ts Wed Oct 27 14:02:20 2010 +0200 @@ -87,6 +87,10 @@ Please select record from the list above Prosím vyberte záznam ze seznamu výše + + DefaultTeam + + HWGame @@ -291,10 +295,26 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Cenu za nejlepší zásah vyhrál <b>%1</b> s <b>%2</b> body.</p> + <p>Cenu za nejlepší zásah vyhrál <b>%1</b> s <b>%2</b> body.</p> + + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. @@ -302,13 +322,33 @@ - <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> + A total of <b>%1</b> hedgehog(s) were killed during this round. + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -391,11 +431,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -441,7 +476,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -632,6 +782,35 @@ Random Maze + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -719,6 +898,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -753,6 +936,10 @@ Load (Load a previously saved game) Nahrát (Nahrát uloženou hru) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -836,10 +1023,6 @@ Připojit datim a čas k jménu záznamu - Reduced quality - - - Show ammo menu tooltips @@ -882,6 +1065,54 @@ Mission + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Základní + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1080,6 +1311,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1363,6 +1598,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_de.qm Binary file share/hedgewars/Data/Locale/hedgewars_de.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_de.ts --- a/share/hedgewars/Data/Locale/hedgewars_de.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Wed Oct 27 14:02:20 2010 +0200 @@ -86,6 +86,10 @@ Please select record from the list above Bitte wähle einen Eintrag aus der obigen Liste + + DefaultTeam + + HWGame @@ -313,22 +317,72 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Der Preis für den besten Schuss geht an <b>%1</b> mit <b>%2</b> Punkten.</p> + <p>Der Preis für den besten Schuss geht an <b>%1</b> mit <b>%2</b> Punkten.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>Der blutigste Kämpfer ist <b>%1</b> mit <b>%2</b> Opfer in einer Runde.</p> <p>Der blutigste Kämpfer ist <b>%1</b> mit <b>%2</b> Opfern in einer Runde.</p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>Insgesamt fand <b>%1</b> Igel ein trauriges Ende in dieser Runde.</p> <p>Insgesamt fanden <b>%1</b> Igel ein trauriges Ende in dieser Runde.</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -411,11 +465,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -461,7 +510,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -652,6 +816,35 @@ Random Maze Zufallslabyrinth + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + Clear + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -739,6 +932,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -773,6 +970,10 @@ Load (Load a previously saved game) Laden (eines vorher gespeicherten Spiels) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -857,7 +1058,7 @@ Reduced quality - Niedrige Qualität + Niedrige Qualität Show ammo menu tooltips @@ -902,6 +1103,54 @@ generated maze... Zufallslabyrinth... + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Standard + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1106,6 +1355,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1389,6 +1642,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_en.qm Binary file share/hedgewars/Data/Locale/hedgewars_en.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_en.ts --- a/share/hedgewars/Data/Locale/hedgewars_en.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Wed Oct 27 14:02:20 2010 +0200 @@ -86,6 +86,10 @@ Please select record from the list above Please select record from the list above + + DefaultTeam + + HWGame @@ -237,7 +241,10 @@ registered on Hedgewars.org Please provide your password below or pick another nickname in game config: - + Your nickname %1 is +registered on Hedgewars.org +Please provide your password below +or pick another nickname in game config: @@ -308,22 +315,72 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> + <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>The best killer is <b>%1</b> with <b>%2</b> kill in a turn.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>A total of <b>%1</b> hedgehog was killed during this round.</p> <p>A total of <b>%1</b> hedgehogs were killed during this round.</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + The best killer is <b>%1</b> with <b>%2</b> kill in a turn. + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + <b>%1</b> hedgehog was killed during this round. + A total of <b>%1</b> hedgehogs were killed during this round. + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -351,11 +408,6 @@ - Want to save ropse? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! - Tips - - - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. Tips @@ -406,11 +458,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -456,7 +503,127 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Want to save ropse? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! + Tips + + + + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -647,6 +814,35 @@ Random Maze + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -734,6 +930,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -768,6 +968,10 @@ Load (Load a previously saved game) Load (Load a previously saved game) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -852,7 +1056,7 @@ Reduced quality - Reduced quality + Reduced quality Show ammo menu tooltips @@ -897,6 +1101,54 @@ generated maze... + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Default + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1095,6 +1347,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1378,6 +1634,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_es.qm Binary file share/hedgewars/Data/Locale/hedgewars_es.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_es.ts --- a/share/hedgewars/Data/Locale/hedgewars_es.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_es.ts Wed Oct 27 14:02:20 2010 +0200 @@ -76,7 +76,7 @@ Cannot save record to file %1 - No se pudo guardar entrada en el fichero %1 + No se pudo almacenar una entrada en el fichero %1 new @@ -86,6 +86,20 @@ Please select record from the list above Por favor, selecciona una entrada de la lista + + DefaultTeam + Equipo predeterminado + + + Hedgewars Demo File + File Types + Fichero de demo de Hedgewars + + + Hedgewars Save File + File Types + Partida guardada de Hedgewars + HWGame @@ -134,7 +148,7 @@ Wacky - Loco + Lunático Tunnel size @@ -241,7 +255,10 @@ registered on Hedgewars.org Please provide your password below or pick another nickname in game config: - + El nick %1 ya está registrado +en Hedgewars.org. Por favor, +introduce ahora tu clave de acceso +o elige otro nick en las preferencias del juego: @@ -312,22 +329,72 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>El premio al mejor disparo es para <b>%1</b>, con <b>%2</b> puntos.</p> + <p>El premio al mejor disparo es para <b>%1</b>, con <b>%2</b> puntos.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>El asesino más eficiente es <b>%1</b>, con <b>%2</b> muerte en un solo turno.</p> <p>El asesino más eficiente es <b>%1</b>, con <b>%2</b> muertes en un solo turno.</p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> + + <p>Un total de <b>%1</b> erizo murió esta ronda.</p> + <p>Un total de <b>%1</b> erizos murieron esta ronda.</p> + + + + Details + Detalles + + + Health graph + Gráfica de puntos de vida + + + Ranking + Clasificación + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + <p>El premio al mejor disparo es para <b>%1</b>, con <b>%2</b> pts.</p> + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + <p>El mejor guerrero es <b>%1</b>, con <b>%2</b> muerte en un solo turno.</p> + <p>El mejor guerrero es <b>%1</b>, con <b>%2</b> muertes en un solo turno.</p> + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. <p>Un total de <b>%1</b> erizo murió esta ronda.</p> <p>Un total de <b>%1</b> erizos murieron esta ronda.</p> + + (%1 kill) + (%1 baja) + + + (%1 kills) + (%1 bajas) + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + <b>%1</b> prefiere disparar a sus miembros, con un total de <b>%2</b> pts. + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + <b>%1</b> acabó con <b>%2</b> de sus propios miembros. + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + <b>%1</b> tenía demasiado miedo y pasó <b>%2</b> turnos. + PageMain @@ -342,127 +409,242 @@ Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. Tips - + Elige el mismo color que tus amigos para hacer una alianza con ellos. Cada uno de vosotros controlará sus propios erizos, pero la victoria o derrota será compartida por vuestra facción. Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. Tips - + Puede que algunas armas hagan poco daño, pero pueden ser realmente devastadoras si son usadas en el momento correcto. Prueba a usar la Desert eagle para empujar erizos enemigos al agua, por ejemplo. If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! Tips - + Si no tienes claro qué vas a hacer y prefieres no desperdiciar munición puedes pasar un turno. ¡Pero ten cuidado, si dejas pasar muchos turnos puede que empiece la muerte súbita! Want to save ropse? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! Tips - + ¿Andas escaso de cuerdas? Suelta la cuerda mientras estés en el aire y vuelve a dispararla de nuevo. ¡Mientras no toques el suelo seguirás usando la misma cuerda sin desperdiciar munición adicional! If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. Tips - + Si prefieres que nadie más use tu nick en el servidor oficial puedes registrarlo en http://www.hedgewars.org You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. Tips - + ¿Estás cansado del modo de juego de siempre? Prueba alguna de las misiones, encontrarás en ellas nuevos tipos de juego dependiendo de la que elijas. By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. Tips - + El juego intentará guardar la última partida como una demo de forma predeterminada. Más tarde puedes ir a "Juego local" y visitar la sección de "Demos" en la esquina inferior derecha para reproducirlas o gestionarlas. Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! Tips - + Hedgewars es un juego gratuito de código abierto que hemos creado en nuestro tiempo libre. Si tienes algún problema estaremos encantados de ayudarte en nuestros foros o canal de IRC, pero no esperes que estemos allí las 24 horas del día. Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! Tips - + Hedgewars es un juego gratuito de código abierto que hemos creado en nuestro tiempo libre. Si te gusta podrías considerar el ayudarnos con una pequeña donación o contribuyendo tu propio código, gráficos o audios. Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! Tips - + Hedgewars es un juego gratuito de código abierto que hemos creado en nuestro tiempo libre. ¡Compártelo con tu família y amigos tanto como quieras! From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. Tips - + De cuando en cuando celebramos torneos oficiales. Puedes mantenerte al día sobre los próximos eventos en http://www.hedgewars.org Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! Tips - + Hedgewars está disponible en varios idiomas. Si no encuentras traducción a tu idioma o piensas que la actual es de baja calidad o está desactualizada estaremos encantados de aceptar tu colaboración para mejorarla. Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. Tips - + Hedgewars es un juego multiplataforma que puede ser ejecutado en diversos sistemas operativos, incluyendo Windows, Mac OS X y Linux. Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. Tips - - - - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - + Recuerda: puedes crear tus propias partidas multijugador tanto en local como por red, no estás limitado a jugar contra la máquina. While playing you should give yourself a short break at least once an hour. Tips - + Tu salud es lo primero. Recuerda descansar unos minutos al menos una vez por cada hora de juego. If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. Tips - + Si tu tarjeta gráfica no soporta aceleración gráfica mediante OpenGL prueba a habilitar el modo de baja calidad gráfica en la pantalla de opciones, puede que mejore el rendimiento del juego. We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! Tips - + Siempre estamos abiertos a sugerencias y opiniones constructivas. Si hay algo que no te guste o tienes grandes ideas que te gustaría ver en el juego, háznoslo saber. Especially while playing online be polite and always remember there might be some minors playing with or against you as well! Tips - + Si juegas a través de internet recuerda mantener tus buenos modales y siempre ten en cuenta que puede que estés jugando con o contra menores de edad. Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! Tips - + Los modos de juego especiales como "vampirismo" o "karma" te permiten desarrollar tácticas de juego completamente nuevas. ¡Pruébalos en tu próxima partida! The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing. Tips - + La versión para Windows de Hedgewars soporta Xfire. Recuerda añadie Hedgewars a tu lista de juegos favoritos para que tus amigos sepan cuándo estás jugando. You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! Tips - + Nunca instales Hedgewars en ordenadores que no te pertenezcan tales como los de tu escuela, universidad o trabajo sin perdir permiso primero a las personas responsables de los mismos. Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. Tips - + Hedgewars es realmente genial para jugar partidas rápidas durante pausas o descansos; sólo recuerda no añadir muchos erizos y no usar mapas excesivamente grandes para que la partida no se alargue demasiado. Reducir la duración de los turnos o la vida inicial también puede ayudar. No hedgehogs were harmed in making this game. Tips - - - - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Ningún erizo fue lastimado durante la creación de este juego. + + + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + Hedgewars es un juego gratuito de código abierto que hemos creado en nuestro tiempo libre. Si alguien te vendió el juego deberías pedirle que te devuelva tu dinero. + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + Conecta tus mandos al ordenador antes de iniciar el juego para poder asignar correctamente los controles de a equipo. + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + Crea una cuenta con tu nick en %1 para evitar que otras personas puedan usarlo en el servidor oficial. + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + Si tu tarjeta gráfica no es capaz de usar aceleración gráfica mediante OpenGL prueba a instalar drivers más actualizados. + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + Hay tres tipos de salto en el juego. Presiona [salto alto] dos veces para realizar un salto muy alto, vertical y ligeramente hacia atrás. + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + ¿Te da miedo caerte por una cornisa? Mantén presionado [aumentar precisión] para voltearte a [izquierda] o [derecha] sin moverte del sitio. + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + Algunas armas pueden requerir estrategias especiales o mucho entrenamiento antes de ser usadas correctamente. No tires la a toalla con alguna de ellas sólo porque has fallado el tiro la primera vez. + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + La mayoría de armas se desactivarán al tocar el agua. El abejorro y la tarta son algunas de las excepciones a la regla. + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + La explosión del limbuger añejo es relativamente pequeña, pero produce una nube de gas venenoso que será arrastrada por el viento, siendo capaz de intoxicar a varios erizos a la vez. + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + El piano es el ataque aéreo más destructivo del juego, aunque perderás el erizo que lo lance, así que úsalo con cuidado. + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + El abejorro puede ser complicado de usar. Su maniobrabilidad depende de su velocidad, así que intenta no lanzarlo a máxima potencia. + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. Tips - + Las bombas lapa son perfectas para crear reacciones en cadena y mandar a tus enemigos al agua... o la Luna. + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + El mazo es mucho más efectivo si lo usas sobre vigas o puentes. Los erizos golpeados simplemente caerán por el agujero como Alicia por la madriguera. + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + Si estás atrapado tras un erizo enemigo puedes usar el mazo para abrirte paso sin resultar dañado por una explosión. + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + El alcance de la tarta depende de lo escarpado del terreno que tenga que atravesar, aunque puedes pulsar [atacar] para detonarla antes de que el contador llegue a cero. + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + El lanzallamas es un arma, pero puede usarse para excavar túneles en caso de necesidad. + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + Puedes usar el cóctel molotov para evitar que erizos enemigos crucen túneles angostos o puentes. + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + ¿Quieres saber quiénes son los desarrolladores del juego? Pulsa el logo del juego en la pantalla principal para ver los créditos. + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + ¿Te gusta Hedgewars? Puedes hacerte fan en %1 o unirte a nuestro grupo en %2. ¡Y también puedes seguirnos en %3! + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + ¡Puedes dibujar tus propias tumbas, sombreros, banderas o incluso mapas y temas! Sólo ten en cuenta que el juego no es capaz de enviar archivos todavía, así que tendrás que enviar tú mismo los archivos a tus amigos para poder jugar en red con ellos. + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + ¿Te gustaría poder usar un sombrero especial, sólo para ti? Haz una donación y dinos qué sombrero quieres, lo dibujaremos para ti. + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + Mantén los drivers de tu tarjeta gráfica actualizados para evitar posibles problemas con este y otros juegos. + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + Puedes encontrar los archivos de configuración del juego en la carpeta "Mis Documentos\Hedgewars". Haz copias de seguridad de los mismos o cópialos a otro ordenador si lo deseas, pero no intentes editarlos a mano para evitar posibles pérdidas de datos. + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. + Tips + Puedes encontrar los archivos de configuración del juego en la carpeta ~/.hedgewars. Haz copias de seguridad de los mismos o cópialos a otro ordenador si lo deseas, pero no intentes editarlos a mano para evitar posibles pérdidas de datos. + + + You're able to associate Hedgewars related files (savegames and demo recordings) with the game to launch them right from your favorite file or internet browser. + Tips + Puedes asociar los tipos de archivo relacionados, partidas guardadas y demos, con Hedgewars para lanzarlos directamente desde tu gestor de archivos o navegador favoritos. @@ -529,7 +711,7 @@ You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - + No es posible editar equipos desde la pantalla de elección de equipo. Vuelve al menú principal para añadir, editar o borrar equipos. @@ -651,6 +833,36 @@ Random Maze Laberinto aleatorio + + State: + Estado: + + + Rules: + Reglas: + + + Weapons: + Armas: + + + Search: + Búsqueda: + + + Clear + Limpiar + + + Warning + Aviso + + + The game you are trying to join has started. +Do you still want to join the room? + La partida a la que intentas unirte ya ha empezado. +¿Realmente deseas entrar en la sala? + PageScheme @@ -736,7 +948,23 @@ Disable land objects when generating random maps. - Deshabilita los objetos en el terreno en los mapas generados aleatoriamente. + Deshabilita los objetos en los mapas generados aleatoriamente. + + + AI respawns on death. + La computadora resucita al morir. + + + Attacking does not end your turn. + Atacar no terminará tu turno. + + + Weapons are reset to starting values each turn. + La munición será reiniciada al comienzo de cada turno. + + + Each hedgehog has its own ammo. It does not share with the team. + Cada erizo tiene su propia munición y no la comparte con el resto del equipo. @@ -772,6 +1000,10 @@ Load (Load a previously saved game) Cargar (Cargar un juego previamente guardado) + + Campaign Mode (...). IN DEVELOPMENT + Campaña (...) EN DESARROLLO + QAction @@ -856,7 +1088,7 @@ Reduced quality - Reducir efectos gráficos (para ordenadores lentos) + Reducir efectos gráficos (para ordenadores lentos) Show ammo menu tooltips @@ -901,6 +1133,54 @@ Mission Misión + + Community + Comunidad + + + Any + Cualquiera + + + In lobby + En espera + + + In progress + En progreso + + + Default + Predeterminado + + + Pro mode + Modo pro + + + Shoppa + Shoppa + + + Basketball + Baloncesto + + + Minefield + Campo de minas + + + Barrel mayhem + Bodega infernal + + + Tunnel hogs + Erizos subterráneos + + + Crazy + Lunático + QGroupBox @@ -1100,11 +1380,17 @@ Tip: - + Consejo: This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - + Esta es una versión experimental del juego y puede no ser compatible con otras versiones del mismo, +así como carecer de algunas funcionalidades o simplemente funcionar mal. +¡Úsalo bajo tu propia responsabilidad! + + + Quality + Calidad @@ -1157,11 +1443,15 @@ Really delete this weapon set? - ¿Realmente desea borrar este set de armas? + ¿Realmente quieres borrar este set de armas? Can not overwrite default weapon set '%1'! - + ¡No se puede sobreescribir el set de armas por defecto '%1'! + + + All file associations have been set. + Se reestablecieron todas las asociaciones de tipo de archivo. @@ -1253,6 +1543,10 @@ Random Team Equipo aleatorio + + Associate file extensions + Asociar tipos de archivo. + QTableWidget @@ -1389,6 +1683,22 @@ Disable Land Objects Deshabilitar decoraciones + + AI Survival Mode + Supervivencia contra la computadora + + + Unlimited Attacks + Ataques ilimitados + + + Reset Weapons + Reiniciar munición + + + Per Hedgehog Ammo + Munición individualizada + binds @@ -1552,7 +1862,7 @@ slot 10 - posición 10 + posición 10 diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_fi.qm Binary file share/hedgewars/Data/Locale/hedgewars_fi.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_fi.ts --- a/share/hedgewars/Data/Locale/hedgewars_fi.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_fi.ts Wed Oct 27 14:02:20 2010 +0200 @@ -86,6 +86,10 @@ Please select record from the list above Ole hyvä ja valitse nauhoite ylläolevasta listasta + + DefaultTeam + + HWGame @@ -308,22 +312,72 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Paras laukaus -mitalin voitti <b>%1</b> <b>%2</b> pisteellä</p> + <p>Paras laukaus -mitalin voitti <b>%1</b> <b>%2</b> pisteellä</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>Paras tappaja oli <b>%1</b> <b>yhdellä</b> tapolla vuoron aikana</p> <p>Paras tappaja oli <b>%1</b> <b>%2</b>:llä tapolla </p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>Yhteensä <b>yksi</b> siili tapettiin tällä kierroksella.</p> <p>Yhteensä <b>%1</b> siiltä tapettiin tällä kierroksella.</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -406,11 +460,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -456,7 +505,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -647,6 +811,35 @@ Random Maze + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + Tyhjennä + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -734,6 +927,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -768,6 +965,10 @@ Load (Load a previously saved game) Lataa (Lataa aikaisemmin tallennettu peli) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -852,7 +1053,7 @@ Reduced quality - Huononnettu laatu + Huononnettu laatu Show ammo menu tooltips @@ -897,6 +1098,54 @@ Mission + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Oletus + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1095,6 +1344,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1378,6 +1631,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_fr.qm Binary file share/hedgewars/Data/Locale/hedgewars_fr.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_fr.ts --- a/share/hedgewars/Data/Locale/hedgewars_fr.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_fr.ts Wed Oct 27 14:02:20 2010 +0200 @@ -86,6 +86,10 @@ Please select record from the list above Veuillez sélectionner une partie dans la liste ci-dessus + + DefaultTeam + + HWGame @@ -308,22 +312,72 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Le prix du meilleur tir revient à <b>%1</b> avec <b>%2</b> points.</p> + <p>Le prix du meilleur tir revient à <b>%1</b> avec <b>%2</b> points.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>Le meilleur tueur est <b>%1</b> avec <b>%2</b> mort en un tour.</p> <p>Le meilleur tueur est <b>%1</b> avec <b>%2</b> morts en un tour.</p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>Un total de <b>%1</b> hérisson a été tué pendant cette partie.</p> <p>Un total de <b>%1</b> hérissons ont été tués pendant cette partie.</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -406,11 +460,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -456,7 +505,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -647,6 +811,35 @@ Random Maze + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -734,6 +927,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -768,6 +965,10 @@ Load (Load a previously saved game) Charger (Charger une partie préalablement sauvegardée) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -852,7 +1053,7 @@ Reduced quality - Qualité réduite + Qualité réduite Show ammo menu tooltips @@ -897,6 +1098,54 @@ Mission + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Défaut + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1095,6 +1344,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1378,6 +1631,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_hu.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Locale/hedgewars_hu.ts Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,1801 @@ + + + + + AmmoSchemeModel + + new + új + + + + FreqSpinBox + + Never + Soha + + + Every %1 turn + + Minden %1 körben + + + + + GameCFGWidget + + Edit weapons + Fegyverek beállítása + + + Error + Hiba + + + Illegal ammo scheme + Szabálytalan lőszerséma + + + Edit schemes + Sémák szerkesztése + + + + HWChatWidget + + %1 *** %2 has been removed from your ignore list + %1 *** %2 eltávolítva a figyelmen kívül hagyottak listájáról + + + %1 *** %2 has been added to your ignore list + %1 *** %2 hozzáadva a figyelmen kívül hagyottak listájához + + + %1 *** %2 has been removed from your friends list + %1 *** %2 eltávolítva a barátlistáról + + + %1 *** %2 has been added to your friends list + %1 *** %2 hozzáadva a barátlistádhoz + + + + HWForm + + new + új + + + Error + Hiba + + + OK + OK + + + Unable to start the server + A szervert nem sikerült elindítani + + + Cannot save record to file %1 + Nem sikerült menteni a %1 fájlba + + + Please select record from the list above + Kérlek válassz a fentebbi listából + + + + HWGame + + en.txt + hu.txt + + + Cannot open demofile %1 + Nem sikerült megnyitni a %1 demót + + + + HWMapContainer + + Map + Pálya + + + Themes + Témák + + + Filter + Szűrő + + + All + Minden + + + Small + Kicsi + + + Medium + Közepes + + + Large + Nagy + + + Cavern + Barlang + + + Wacky + Őrült + + + Type + Típus + + + Small tunnels + Szűk alagutak + + + Medium tunnels + Átlagos alagutak + + + Large tunnels + Tágas alagutak + + + Small floating islands + Apró lebegő szigetek + + + Medium floating islands + Közepes lebegő szigetek + + + Large floating islands + Nagy lebegő szigetek + + + + HWNetServersModel + + Title + Név + + + IP + IP + + + Port + Port + + + + HWNewNet + + The host was not found. Please check the host name and port settings. + Host nem található. Kérlek, ellenőrizd a host név és port beállításokat. + + + Connection refused + Kapcsolat visszautasítva + + + Room destroyed + Szoba megszűnt + + + Quit reason: + Kilépés oka: + + + You got kicked + Kirúgtak + + + Password + JElszó + + + Your nickname %1 is +registered on Hedgewars.org +Please provide your password +or pick another nickname: + A %1 név már +regisztrálva van a Hedgewars.org-on +Írd be a jelszavad +vagy válassz másik nevet: + + + %1 *** %2 has joined the room + %1 *** %2 belépett a szobába + + + %1 *** %2 has joined + %1 *** %2 csatlakozott + + + %1 *** %2 has left (%3) + %1 *** %2 távozott (%3) + + + %1 *** %2 has left + %1 *** %2 távozott + + + + KB + + SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. + SDL_ttf hibát dobott a szöveg kiírásakor, ezt valószínűleg a freetype2 egy hibája okozza. Ajánlott a freetype lib frissítése. + + + + PageAdmin + + Server message: + Server message: + + + Set message + Set message + + + Clear Accounts Cache + Accounts Cache kiürítése + + + Fetch data + Adatszerzés + + + Server message for latest version: + Szerverüzenet a legújabb verzióhoz: + + + Server message for previous versions: + Szerver üzenete az előző verzióknak: + + + Latest version protocol number: + Legújabb verzió protokollszáma: + + + MOTD preview: + MOTD előnézet: + + + Set data + Adat beállítása + + + + PageConnecting + + Connecting... + Csatlakozás... + + + + PageEditTeam + + General + Általános + + + Advanced + Haladó + + + + PageGameStats + + <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> + <p>A legjobb lövés díját <b>%1</b> nyerte <b>%2</b> ponttal.</p> + + + <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> + + <p>A legjobb gyilkos <b>%1</b> volt, <b>%2</b> áldozattal egy körben.</p> + + + + <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> + + <p>Összesen <b>%1</b> süni pusztult el ebben a játékban.</p> + + + + + PageMain + + Local Game (Play a game on a single computer) + Helyi játék (Játssz egyetlen számítógépen) + + + Network Game (Play a game across a network) + Hálózati játék (Játék hálózaton keresztül) + + + + PageMultiplayer + + Start + Start + + + + PageNet + + Error + Hiba + + + Please select server from the list above + Kérlek, válassz szervert a fenti listából + + + + PageNetGame + + Control + Irányítás + + + + PageNetType + + LAN game + LAN játék + + + Official server + Hivatalos szerver + + + + PageOptions + + New team + Új csapat + + + Edit team + Csapat szerkesztése + + + Delete team + Csapat törlése + + + New weapon scheme + Új fegyverséma + + + Edit weapon scheme + Fegyverséma szerkesztése + + + Delete weapon scheme + Fegyverséma törlése + + + + PagePlayDemo + + Error + Hiba + + + OK + OK + + + Rename dialog + Párbeszéd átnevezése + + + Enter new file name: + Add meg az új fájl nevét: + + + Cannot rename to + Nem nevezhető át erre - + + + Cannot delete file + Fájl nem törölhető + + + Please select record from the list + Kérlek, válassz a listából + + + + PageRoomsList + + Create + Létrehozás + + + Join + Csatlakozás + + + Refresh + Frissítés + + + Error + Hiba + + + OK + OK + + + Admin features + Adminisztráció + + + Room Name: + Szoba neve: + + + This game is in lobby. +You may join and start playing once the game starts. + Ez a játék elérhető. +Csatlakozz és játssz, amikor a játék elkezdődik. + + + This game is in progress. +You may join and spectate now but you'll have to wait for the game to end to start playing. + Ez a játék folyamatban van. +Csatlakozhatsz mint megfigyelő, de a játszáshoz meg kell várnod a jelenlegi meccs befejeződését. + + + %1 is the host. He may adjust settings and start the game. + %1 a host. Ő kezeli a beállításokat és a játék indítását. + + + Random Map + Véletlen pálya + + + Games may be played on precreated or randomized maps. + A játékok előkészített vagy véletlen pályákon játszódnak. + + + The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism. + A játék sémája az általános beállításokat határozza meg. illetve egyéb dolgokat, mint egy kör ideje, Hirtelen halál vagy Vámpírizmus. + + + The Weapon Scheme defines available weapons and their ammunition count. + A fegyverséma az elérhető fegyverek és a lőszer mennyiségét határozza meg. + + + There are %1 clients connected to this room. + + Összesen %1 kliens csatlakozott a szobához. + + + + There are %1 teams participating in this room. + + Összesen %1 csapat van a szobában. + + + + Please enter room name + Add meg a szoba nevét + + + Please select room from the list + Válassz egy szobát a listából + + + Random Maze + Véletlen labirintus + + + + PageScheme + + Defend your fort and destroy the opponents, two team colours max! + Védd meg az erődöd, és pusztítsd el az ellenfelekét! Legfeljebb két csapatszín! + + + Teams will start on opposite sides of the terrain, two team colours max! + A csapatok a pálya két végén kezdenek. Legfeljebb két csapatszín! + + + Land can not be destroyed! + A talajt nem lehet elpusztítani! + + + Add an indestructable border around the terrain + A pálya köré egy elpusztíthatatlan keret felhúzása + + + Lower gravity + Gyengébb gravitáció + + + Assisted aiming with laser sight + A célzás segítése egy lézerkövetővel + + + All hogs have a personal forcefield + Minden süninek saját erőtere van + + + Enable random mines + Véletlen aknaidőzítés engedélyezése + + + Gain 80% of the damage you do back in health + Az általad okozott sebzés 80% -át visszagyógyulod + + + Share your opponents pain, share their damage + Megosztod ellenfeled fájdalmát, ahogy a sérülésüket is + + + Your hogs are unable to move, put your artillery skills to the test + A sünik nem tudnak mozogni, próbára téve a célzóképességed + + + Random + Véletlen + + + Seconds + másodperc + + + New + Új + + + Delete + Törlés + + + Order of play is random instead of in room order. + A lépéssorrend véletlen a következőségi sorrend helyett. + + + Play with a King. If he dies, your side dies. + Kapsz egy királyt. Ha meghal, a te oldalad veszít. + + + Take turns placing your hedgehogs before the start of play. + Felváltva helyezitek el a sünöket a játék kezdete előtt. + + + Ammo is shared between all teams that share a colour. + A lőszerek közösek az azonos színű csapatok között. + + + Disable girders when generating random maps. + Hidak letiltása véletlen pályák létrehozásakor. + + + Disable land objects when generating random maps. + Tereptárgyak letiltása véletlen pálya létrehozásakor. + + + + PageSelectWeapon + + Default + Default + + + Delete + Törlés + + + + PageSinglePlayer + + Simple Game (a quick game against the computer, settings are chosen for you) + Egyszerű játék (gyors játék a gép ellen, a beállításokat már kiválasztottuk neked) + + + Multiplayer (play a hotseat game against your friends, or AI teams) + Többjátékos (hotseat játék a barátaid vagy a gép csapatai ellen) + + + Training Mode (Practice your skills in a range of training missions). IN DEVELOPMENT + Gyakorlás (fejleszd magad a gyakorlóküldetéseken keresztül). FEJLESZTÉS ALATT + + + Demos (Watch recorded demos) + Demók (felvett demók megtekintése) + + + Load (Load a previously saved game) + Betöltés (korábbi mentett állás visszatöltése) + + + + QAction + + Kick + Kirúgás + + + Info + Info + + + Start + Start + + + Restrict Joins + Csatlakozások korlátozása + + + Restrict Team Additions + Csapatok hozzáadásának korlátozása + + + Ban + Bannolás + + + Follow + Követés + + + Ignore + Ignorálás + + + Add friend + Barát felvétele + + + Unignore + Ignorálás feloldása + + + Remove friend + Barát eltávolítása + + + + QCheckBox + + Check for updates at startup + Frissítések keresése induláskor + + + Fullscreen + Teljes képernyő + + + Frontend fullscreen + Frontend teljesképernyő + + + Enable sound + Hangok engedélyezése + + + Enable music + Zene engedélyezése + + + Show FPS + FPS megjelenítése + + + Alternative damage show + Alternatív sebzés mutatása + + + Append date and time to record file name + Dátum és idő hozzáadása a tároló fájl nevéhez + + + Reduced quality + Csökkentett minőség + + + Show ammo menu tooltips + Lőszer menü tippjeinek mutatása + + + Enable frontend sounds + Frontend hangok engedélyezése + + + Enable frontend music + Frontend zenéjének engedélyezése + + + Frontend effects + Frontend effektusok + + + + QComboBox + + generated map... + a létrehozott pálya... + + + Human + Ember + + + Level + Szint + + + (System default) + (rendszer default) + + + Mission + Küldetés + + + generated maze... + a létrehozott labirintus... + + + + QGroupBox + + Team Members + Csapattagok + + + Fort + Erőd + + + Key binds + Billentyűzet testreszabása + + + Teams + Csapatok + + + Weapons + Fegyverek + + + Audio/Graphic options + Hang- és képi beállítások + + + Net game + Netes játék + + + Playing teams + Résztvevő csapatok + + + Game Modifiers + Játék módosítók + + + Basic Settings + Alap beállítások + + + Team Settings + Csapat beállítások + + + Misc + Egyéb + + + + QLabel + + Mines Time + Aknák ideje + + + Mines + Aknák + + + Version + Verzió + + + This program is distributed under the GNU General Public License + Ez a program a GNU General Public License alatt terjesztett + + + Developers: + Fejlesztők: + + + Art: + Grafika: + + + Sounds: + Hangok: + + + Translations: + Fordítások: + + + Special thanks: + Külön köszönet: + + + Weapons + Fegyverek + + + Host: + Host: + + + Port: + Port: + + + Net nick + Becenév a neten + + + Resolution + Felbontás + + + FPS limit + FPS határ + + + Server name: + Szerver név: + + + Server port: + Szerver port: + + + Initial sound volume + Kezdeti hangerő + + + Damage Modifier + Sebzés módosító + + + Turn Time + Köridő + + + Initial Health + Kezdeti életerő + + + Sudden Death Timeout + Hirtelen halál kezdete + + + Scheme Name: + Séma neve: + + + Crate Drops + Csomagok érkezése + + + Game scheme + Játék sémája + + + % Dud Mines + % hamis aknák + + + Name + Név + + + Type + Típus + + + Grave + Sírkő + + + Flag + Zászló + + + Voice + Hang + + + Locale + Nyelv + + + Restart game to apply + Újraindításkor lép érvénybe + + + Explosives + Robbanótöltetek + + + This SVN build is 'work in progress' and may not be compatible with other versions of the game. +Some features might be broken or incomplete. Use at your own risk! + Ez az SVN build még fejlesztés alatt áll és esetlegesen nem kompatibilis a játék más verzióival. +Néhány részlet esetleg nem működik vagy nincs készen. Csak saját felelősségre használd! + + + + QLineEdit + + unnamed + névtelen + + + + QMainWindow + + Hedgewars %1 + Hedgewars %1 + + + + QMessageBox + + Network + Hálózat + + + Connection to server is lost + A kapcsolat a szerverrel megszakadt + + + Error + Hiba + + + Failed to open data directory: +%1 +Please check your installation + Nem sikerült megnyitni az alábbi könyvtárat: + %1 +Kérlek, ellenőrizd a telepítésed + + + Weapons + Fegyverek + + + Can not edit default weapon set + Az alap fegverkészlet nem szerkeszthető + + + Can not delete default weapon set + Az alap fegyverkeszléet nem törölhető + + + Really delete this weapon set? + Valóban törlöd ezt a fegyverkészletet? + + + + QObject + + Error + Hiba + + + Cannot create directory %1 + Nem sikerült létrehozni %1 + + + OK + OK + + + Nickname + Becenév + + + Please enter your nickname + Add meg a beceneved + + + + QPushButton + + default + default + + + OK + OK + + + Cancel + Mégse + + + Start server + Szerver indítása + + + Connect + Kapcsolódás + + + Update + Frissítés + + + Specify + Specifikálás + + + Start + Start + + + Go! + Mehet! + + + Play demo + Demo lejátszása + + + Rename + Átnevezés + + + Delete + Törlés + + + Load + Betöltés + + + Setup + Beállítás + + + Ready + Kész + + + Random Team + Véletlen csapat + + + + QTableWidget + + Room Name + Szoba neve + + + C + C + + + T + T + + + Owner + Tulajdonos + + + Map + Pálya + + + Rules + Szabályok + + + Weapons + Fegyverek + + + + SelWeaponWidget + + Weapon set + Fegyverkészlet + + + Probabilities + Valószínűségek + + + Ammo in boxes + Lőszer a dobozokban + + + Delays + Késleltetések + + + + TCPBase + + Error + Hiba + + + Unable to start the server: %1. + Nem sikerült a szerverhez csatlakozni: %1. + + + Unable to run engine: %1 ( + Nem sikerült a játékot futtatni: %1 ( + + + + ToggleButtonWidget + + Vampirism + Vámpírizmus + + + Karma + Karma + + + Artillery + Tüzérség + + + Fort Mode + Erődítmény + + + Divide Teams + Csapatok felosztása + + + Solid Land + Szilárd talaj + + + Add Border + Határok felállítása + + + Low Gravity + Alacsony gravitáció + + + Laser Sight + Lézeres mutató + + + Invulnerable + Sérthetetlenség + + + Add Mines + Aknák hozzáadása + + + Random Order + Véletlen sorrend + + + King + Király + + + Place Hedgehogs + Sünik elhelyezése + + + Clan Shares Ammo + Közös lőszerek + + + Disable Girders + Hidak tiltása + + + Disable Land Objects + Tereptárgyak tiltása + + + + binds + + up + fel + + + left + balra + + + right + jobbra + + + down + le + + + attack + támadás + + + precise aim + pontos célzás + + + put + elhelyezés + + + switch + váltás + + + find hedgehog + süni megtalálása + + + ammo menu + lőszer menü + + + slot 1 + slot 1 + + + slot 2 + slot 2 + + + slot 3 + slot 3 + + + slot 4 + slot 4 + + + slot 5 + slot 5 + + + slot 6 + slot 6 + + + slot 7 + slot 7 + + + slot 8 + slot 8 + + + slot 9 + slot 9 + + + timer 1 sec + 1 mp időzítés + + + timer 2 sec + 2 mp időzítés + + + timer 3 sec + 3 mp időzítés + + + timer 4 sec + 4 mp időzítés + + + timer 5 sec + 5 mp időzítés + + + chat + chat + + + chat history + chat history + + + pause + szünet + + + confirmation + megerősítés + + + volume down + hangerő csökkentése + + + volume up + hangerő növelése + + + change mode + mód váltása + + + capture + elfogás + + + hedgehogs +info + süni +info + + + quit + kilépés + + + zoom in + ráközelítés + + + zoom out + távolodás + + + reset zoom + zoom visszaállítása + + + long jump + hosszú ugrás + + + high jump + magasugrás + + + + binds (categories) + + Basic controls + Alap irányítás + + + Weapon controls + Fegyverek kezelése + + + Camera and cursor controls + Kamera és kurzor irányítása + + + Other + Egyéb + + + + binds (descriptions) + + Move your hogs and aim: + Süni mozgatása és célzás: + + + Traverse gaps and obstacles by jumping: + Gödrök és akadályok leküzdése ugrással: + + + Fire your selected weapon or trigger an utility item: + Kijelölt fegyver vagy eszköz aktiválása: + + + Pick a weapon or a target location under the cursor: + A kurzor alatti fegyver vagy célterület kiválasztása: + + + Switch your currently active hog (if possible): + Aktív sün kiválasztása (amennyiben lehetséges): + + + Pick a weapon or utility item: + Fegyver vagy eszköz kijelölése: + + + Set the timer on bombs and timed weapons: + Időzítő beállítása bombákon és időzíthető fegyvereken: + + + Move the camera to the active hog: + Kamera mozgatása az aktív sünire: + + + Move the cursor or camera without using the mouse: + Kurzor vagy kamera mozgatása egér nélkül: + + + Modify the camera's zoom level: + Kamera ráközelítsének módosítása: + + + Talk to your team or all participants: + Beszélgetés a csapattal vagy minden résztvevővel: + + + Pause, continue or leave your game: + Szünet, folytatás vagy játék elhagyása: + + + Modify the game's volume while playing: + Játék hangerejének módosítása játék közben: + + + Toggle fullscreen mode: + Teljes képernyős mód: + + + Take a screenshot: + Képlopás: + + + Toggle labels above hedgehogs: + Sünik feletti címkék beállítása: + + + + binds (keys) + + Axis + Tengely + + + (Up) + (Fel) + + + (Down) + (Le) + + + Hat + Kalap + + + (Left) + (Balra) + + + (Right) + (Jobbra) + + + Button + Gomb + + + Keyboard + Billentyűzet + + + Delete + Delete + + + Mouse: Left button + Egér: Bal gomb + + + Mouse: Middle button + Egér: Középső gomb + + + Mouse: Right button + Egér: Jobb gomb + + + Mouse: Wheel up + Egér: Görgetés felfelé + + + Mouse: Wheel down + Egér: Görgetés lefelé + + + Backspace + Backspace + + + Tab + Tab + + + Clear + Törlés + + + Return + Enter + + + Pause + Szünet + + + Escape + Escape + + + Space + Szóköz + + + Numpad 0 + Numpad 0 + + + Numpad 1 + Numpad 1 + + + Numpad 2 + Numpad 2 + + + Numpad 3 + Numpad 3 + + + Numpad 4 + Numpad 4 + + + Numpad 5 + Numpad 5 + + + Numpad 6 + Numpad 6 + + + Numpad 7 + Numpad 7 + + + Numpad 8 + Numpad 8 + + + Numpad 9 + Numpad 9 + + + Numpad . + Numpad . + + + Numpad / + Numpad / + + + Numpad * + Numpad * + + + Numpad - + Numpad - + + + Numpad + + Numpad + + + + Enter + Enter + + + Equals + Egyenlő + + + Up + Fel + + + Down + Le + + + Right + Jobbra + + + Left + Balra + + + Insert + Insert + + + Home + Home + + + End + End + + + Page up + Page up + + + Page down + Page Down + + + Num lock + Num lock + + + Caps lock + Caps lock + + + Scroll lock + Scroll lock + + + Right shift + Jobb oldali Shift + + + Left shift + Bal oldali Shift + + + Right ctrl + Jobb oldali Ctrl + + + Left ctrl + Bal oldali Ctrl + + + Right alt + Jobb oldali Alt + + + Left alt + Bal oldali Alt + + + Right meta + Jobb oldali Meta + + + Left meta + Bal oldali Meta + + + A button + A gomb + + + B button + B gomb + + + X button + X gomb + + + Y button + Y gomb + + + LB button + LB gomb + + + RB button + RB gomb + + + Back button + Vissza gomb + + + Start button + Start gomb + + + Left stick + Bal rúd + + + Right stick + Jobb rúd + + + Left stick (Right) + Bal rúd (Jobbra) + + + Left stick (Left) + Bal rúd (Balra) + + + Left stick (Down) + Bal rúd (Le) + + + Left stick (Up) + Bal rúd (Fel) + + + Left trigger + Bal trigger + + + Right trigger + Jobb trigger + + + Right stick (Down) + Job rúd (Le) + + + Right stick (Up) + Jobb rúd (Fel) + + + Right stick (Right) + Jobb rúd (Jobbra) + + + Right stick (Left) + Jobb rúd (Balra) + + + DPad + DPad + + + diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_it.qm Binary file share/hedgewars/Data/Locale/hedgewars_it.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_it.ts --- a/share/hedgewars/Data/Locale/hedgewars_it.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_it.ts Wed Oct 27 14:02:20 2010 +0200 @@ -86,6 +86,10 @@ Please select record from the list above Inserisci il record dalla lista sottostante + + DefaultTeam + + HWGame @@ -312,22 +316,72 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Il premio per il miglior colpo è stato vinto da <b>%1</b> , con <b>%2</b> punti.</p> + <p>Il premio per il miglior colpo è stato vinto da <b>%1</b> , con <b>%2</b> punti.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>Il miglior killer è <b>%1</b> con <b>%2</b> uccisione in un turno.</p> <p>Il miglior killer è <b>%1</b> con <b>%2</b> uccisioni in un turno.</p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>Durante questo round è stato ucciso <b>%1</b> hedgehog in totale.</p> <p>Un totale di <b>%1</b> hedgehogs sono stati uccisi durante questo round.</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -410,11 +464,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -460,7 +509,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -651,6 +815,35 @@ Random Maze Labirinto Casuale + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + Cancella + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -738,6 +931,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -772,6 +969,10 @@ Load (Load a previously saved game) Carica (Carica una partita precedentemente salvata) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -856,7 +1057,7 @@ Reduced quality - Qualità ridotta + Qualità ridotta Show ammo menu tooltips @@ -901,6 +1102,54 @@ Mission Missione + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Default + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1105,6 +1354,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1388,6 +1641,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_ja.qm Binary file share/hedgewars/Data/Locale/hedgewars_ja.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_ja.ts --- a/share/hedgewars/Data/Locale/hedgewars_ja.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_ja.ts Wed Oct 27 14:02:20 2010 +0200 @@ -85,6 +85,10 @@ Please select record from the list above + + DefaultTeam + + HWGame @@ -289,20 +293,56 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p> <b>%2</b> で <b>%1</b> が一番良いショットの賞をもらった </p> + <p> <b>%2</b> で <b>%1</b> が一番良いショットの賞をもらった </p> + + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> + A total of <b>%1</b> hedgehog(s) were killed during this round. + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -385,11 +425,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -435,7 +470,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -622,6 +772,35 @@ Random Maze + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -709,6 +888,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -743,6 +926,10 @@ Load (Load a previously saved game) ロード (その前保存したゲームをやる) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -826,10 +1013,6 @@ ファイル名に年月日を追加する - Reduced quality - - - Show ammo menu tooltips @@ -872,6 +1055,54 @@ Mission + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + デフォールト + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1070,6 +1301,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1353,6 +1588,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_pl.qm Binary file share/hedgewars/Data/Locale/hedgewars_pl.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_pl.ts --- a/share/hedgewars/Data/Locale/hedgewars_pl.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_pl.ts Wed Oct 27 14:02:20 2010 +0200 @@ -87,6 +87,10 @@ Please select record from the list above Wybierz nagranie z listy + + DefaultTeam + + HWGame @@ -242,8 +246,8 @@ registered on Hedgewars.org Please provide your password below or pick another nickname in game config: - Twój nick %1 jest zarejestrowany -na www.hedgewars.org + Twój nick %1 jest zarejestrowany +na Hedgewars.org Proszę podać hasło bądź zmienić nick w ustawieniach gry: @@ -283,11 +287,11 @@ Latest version protocol number: - Ostatni nr. wersji protokołu: + Najnowszy nr. wersji protokołu: MOTD preview: - Podgląd wiadomości: + Podgląd wiadomości dnia: Set data @@ -316,24 +320,76 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Odznaczenie za najlepszy strzał przyznano <b>%1</b>, zadał(a) on(a) <b>%2</b> punktów obrażeń.</p> + <p>Odznaczenie za najlepszy strzał przyznano <b>%1</b>, zadał(a) on(a) <b>%2</b> punktów obrażeń.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> + + <p>Najlepszym zabójcą jest <b>%1</b> z <b>%2</b> zabiciami w przeciągu tury.</p> + <p>Najlepszym zabójcą jest <b>%1</b> z <b>%2</b> zabiciami w przeciągu tury.</p> + <p>Najlepszym zabójcą jest <b>%1</b> z <b>%2</b> zabiciami w przeciągu tury.</p> + + + + <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> + + <p>W sumie <b>%1</b> jeży zostało zabitych w tej walce.</p> + <p>W sumie <b>%1</b> jeży zostało zabitych w tej walce.</p> + <p>W sumie <b>%1</b> jeży zostało zabitych w tej walce.</p> + + + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - <p>Najlepszym zabójcą jest <b>%1</b> z <b>%2</b> zabiciami w przeciągu tury.</p> + - <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> + A total of <b>%1</b> hedgehog(s) were killed during this round. - <p>W sumie <b>%1</b> jeży zostało zabitych w tej walce.</p> - <p>W sumie <b>%1</b> jeży zostało zabitych w tej walce.</p> - <p>W sumie <b>%1</b> jeży zostało zabitych w tej walce.</p> + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -348,72 +404,72 @@ Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. Tips - By grać ze swoim przyjacielem w tej samej drużynie po prostu wybierzcie taki sam kolor obydwu zespołów. Każdy z was będzie sterować swoimi własnymi jeżami ale wygracie bądź przegracie jako jedna drużyna. + By grać ze swoim przyjacielem w tej samej drużynie po prostu wybierzcie taki sam kolor obydwu zespołów. Każdy z was będzie sterować swoimi własnymi jeżami ale wygracie bądź przegracie jako jedna drużyna. Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. Tips - Niektóre z broni zadają mało punktów obrażeń jednak użyte w odpowiednim momencie mogą pokazać swój pazur. Spróbuj użyć pistoletu do strącania swoich przeciwników do wody. + Niektóre z broni zadają mało punktów obrażeń jednak użyte w odpowiednim momencie mogą pokazać swój pazur. Spróbuj użyć pistoletu do strącania swoich przeciwników do wody. If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! Tips - Jeśli nie jesteś pewien co zrobić w danej turze i nie chcesz tracić amunicji możesz pominąć turę. Nie rób tak jdnak zbyt często gdyż nagła śmierć jest nieuchronna! + Jeśli nie jesteś pewien co zrobić w danej turze i nie chcesz tracić amunicji możesz pominąć turę. Nie rób tak jdnak zbyt często gdyż nagła śmierć jest nieuchronna! Want to save ropse? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! Tips - Chcesz zaoszczędzić liny? Odłącz ją będąc w powietrzu, a potem wypuść ją ponownie. Tak długo jak nie dotkniesz ziemi, będziesz używał pojedynczego naboju! + Chcesz zaoszczędzić liny? Odłącz ją będąc w powietrzu, a potem wypuść ją ponownie. Tak długo jak nie dotkniesz ziemi, będziesz używał pojedynczego naboju! If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. Tips - Jeśli chciałbyś zapobiec uzywania własnego nicka przez kogoś innego, zarejestruj go na http://www.hedgewars.org . + Jeśli chciałbyś zapobiec uzywania własnego nicka przez kogoś innego, zarejestruj go na http://www.hedgewars.org . You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. Tips - Znudzony domyślnymi ustawieniami gry? Spróbuj zagrać w którąś z misji. - oferulą one zmienione zasady gry w zależności od tej którą wybrałeś. + Znudzony domyślnymi ustawieniami gry? Spróbuj zagrać w którąś z misji. - oferulą one zmienione zasady gry w zależności od tej którą wybrałeś. By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. Tips - Gra zawsze będzie zapisywała ostatnią rozgrywkę jako Demo. Wybierz "Grę Lokalną" i kliknij w przycisk "Dema" który znajduje się w prawym dolnym rogu ekranu by je odtworzyć i zarządzać nimi. + Gra zawsze będzie zapisywała ostatnią rozgrywkę jako Demo. Wybierz "Grę Lokalną" i kliknij w przycisk "Dema" który znajduje się w prawym dolnym rogu ekranu by je odtworzyć i zarządzać nimi. Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! Tips - Hedgewars jest darmową grą o otwartym kodzie, którą tworzymy w naszym wolnym czasie. Jeśli masz jakiś problem, zapytaj na forum ale nie spodziewaj się wsparcia 24 godziny na dobę! + Hedgewars jest darmową grą o otwartym kodzie, którą tworzymy w naszym wolnym czasie. Jeśli masz jakiś problem, zapytaj na forum ale nie spodziewaj się wsparcia 24 godziny na dobę! Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! Tips - Hedgewars jest darmową grą o otwartym kodzie, którą tworzymy w naszym wolnym czasie. Jeśli ją lubisz, wspomóż nas małą wpłatą lub stwórz własną czapka bądź mapę! + Hedgewars jest darmową grą o otwartym kodzie, którą tworzymy w naszym wolnym czasie. Jeśli ją lubisz, wspomóż nas małą wpłatą lub stwórz własną czapka bądź mapę! Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! Tips - Hedgewars jest darmową grą o otwartym kodzie, którą tworzymy w naszym wolnym czasie. Jeśli tylko chcesz, rozdaj ją swojej rodzinie i kolegom! + Hedgewars jest darmową grą o otwartym kodzie, którą tworzymy w naszym wolnym czasie. Jeśli tylko chcesz, rozdaj ją swojej rodzinie i kolegom! From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. Tips - Od czasu do czasu będą organizowane mistrzostwa. Będą one ogłaszane na parę dni z wyprzedzeniem na http://www.hedgewars.org/ . + Od czasu do czasu będą organizowane mistrzostwa. Będą one ogłaszane na parę dni z wyprzedzeniem na http://www.hedgewars.org/ . Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! Tips - Hedgewars jest dostępne w wielu językach. Jeśli brakuje tłumaczenia w twoim języku bądź jest ono wybrakowane, nie krępuj się z nami skontaktować! + Hedgewars jest dostępne w wielu językach. Jeśli brakuje tłumaczenia w twoim języku bądź jest ono wybrakowane, nie krępuj się z nami skontaktować! Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. Tips - Hedgewars może być uruchomione na różnych systemach operacyjnych takich jak Microsoft Wondows, MacOS X oraz Linux. + Hedgewars może być uruchomione na różnych systemach operacyjnych takich jak Microsoft Wondows, MacOS X oraz Linux. Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. Tips - Zawsze możesz zmieniać ustawienia gry w opcjach gry lokalnej lub sieciowej. Nie musisz ciągle używać tzw. "Szybkiej gry". + Zawsze możesz zmieniać ustawienia gry w opcjach gry lokalnej lub sieciowej. Nie musisz ciągle używać tzw. "Szybkiej gry". Connect a gamepad before launching the game to be able to assign its controls to your team. @@ -423,56 +479,176 @@ Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. Tips - Stwórz konto na http://www.hedgewars.org/ by zapobiec używania twojego ulubionego nicku przez innych. + Stwórz konto na http://www.hedgewars.org/ by zapobiec używania twojego ulubionego nicku przez innych. While playing you should give yourself a short break at least once an hour. Tips - Zawsze pamiętaj o robieniu krótkich przerw co godzinę kiedy grasz na komputerze. + Zawsze pamiętaj o robieniu krótkich przerw co godzinę kiedy grasz na komputerze. If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. Tips - Jeśli twoja karta graficzna nie ma sprzętowego przyspieszania OpenGL, spróbuj włączyć tryb obniżonej jakości by zwiększyć płynność gry. + Jeśli twoja karta graficzna nie ma sprzętowego przyspieszania OpenGL, spróbuj włączyć tryb obniżonej jakości by zwiększyć płynność gry. We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! Tips - Jesteśmy otwarci na sugestie oraz konstruktywną krytykę. Jeśli coś Ci się nie podoba bądź masz jakiś pomysł, daj nam znać! + Jesteśmy otwarci na sugestie oraz konstruktywną krytykę. Jeśli coś Ci się nie podoba bądź masz jakiś pomysł, daj nam znać! Especially while playing online be polite and always remember there might be some minors playing with or against you as well! Tips - Bądź kulturalny grając w internecie oraz pamiętaj o tym, że w hedgewars mogą grać także młodsze osoby! + Bądź kulturalny grając w internecie oraz pamiętaj o tym, że w hedgewars mogą grać także młodsze osoby! Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! Tips - Specjalne tryby gry takie jak "Karma" bądź "Wampiryzm" pozwalają na stworzenie nowej taktyki! + Specjalne tryby gry takie jak "Karma" bądź "Wampiryzm" pozwalają na stworzenie nowej taktyki! The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing. Tips - Wersja Hedgewars dla systemu Windows wspiera XFire. Upewnij się, że dodałeś Hedgewars do listy gier by twoi znajomi mogli zobaczyć Ciebie w czasie gry. + Wersja Hedgewars dla systemu Windows wspiera XFire. Upewnij się, że dodałeś Hedgewars do listy gier by twoi znajomi mogli zobaczyć Ciebie w czasie gry. You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! Tips - Nie powinieneś instalowaś Hedgewars na komputerach których nie posiadasz (w szkole, na studiach, w pracy itp.).Zapytaj osoby odpowiedzialnej za te komputery! + Nie powinieneś instalowaś Hedgewars na komputerach których nie posiadasz (w szkole, na studiach, w pracy itp.).Zapytaj osoby odpowiedzialnej za te komputery! Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. Tips - Hedgewars jest idealny go gry w czasie przerw.Upewnij się, że nei dodałeś zbyt dużej ilości jeży, bądź zbyt dużej mapy. Pomóc może także zmniejszenie długości tury lub obniżenie ilości życia. + Hedgewars jest idealny go gry w czasie przerw.Upewnij się, że nei dodałeś zbyt dużej ilości jeży, bądź zbyt dużej mapy. Pomóc może także zmniejszenie długości tury lub obniżenie ilości życia. No hedgehogs were harmed in making this game. Tips - Żadny jeż nie został ranny w czasie tworzenia tej gry. + Żadny jeż nie został ranny w czasie tworzenia tej gry. Connect one or more gamepads before launching the game to be able to assign their controls to your teams. Tips + Jeśli podłączysz jeden lub więcej gamepadów przed włączeniem gry, będziesz miał możliwość przypisania klawiszy by sterować nimi własne jeże. + + + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. + Tips @@ -480,7 +656,7 @@ PageMultiplayer Start - Start + Start @@ -498,7 +674,7 @@ PageNetGame Control - Kontrola + Kontrola @@ -540,7 +716,7 @@ You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - Nie możesz edytować drużyn z menu wyboru drużyn. Wróć do głównego menu by dodawać, edytować i usuwać drużyny. + Nie możesz edytować drużyn z menu wyboru drużyn. Wróć do głównego menu by dodawać, edytować i usuwać drużyny. @@ -647,9 +823,9 @@ There are %1 teams participating in this room. - W tym pokoju uczestniczy %1 drużyna. - W tym pokoju uczestniczą %1 drużyny. - W tym pokoju uczestniczą %1 drużyny. + W tym pokoju gra %1 drużyna. + W tym pokoju grają %1 drużyny. + W tym pokoju grają %1 drużyny. @@ -664,6 +840,35 @@ Random Maze Losowy labirynt + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + Clear + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -749,7 +954,11 @@ Disable land objects when generating random maps. - Wyłącz dodatki w czasie tworzenia losowych map. + Wyłącz dodatki w czasie tworzenia losowych map. + + + AI respawns on death. + @@ -785,6 +994,10 @@ Load (Load a previously saved game) Wczytaj grę (wczytaj poprzednio zapisaną grę) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -869,7 +1082,7 @@ Reduced quality - Obniż jakość + Obniż jakość Show ammo menu tooltips @@ -914,6 +1127,54 @@ Mission Misja + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Domyślne + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1121,7 +1382,12 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - + Ta wersja testowa jest w fazie produkcji i może nie być kompatybilna z innymi wersjami gry. +Niektóre funkcje mogą nie działać lub być niekompletne. Używaj na własne ryzyko! + + + Quality + Jakość @@ -1178,7 +1444,7 @@ Can not overwrite default weapon set '%1'! - N ie można nadpisać zestawu uzbrojenia '%1'! + Nie można nadpisać zestawu uzbrojenia '%1'! @@ -1333,7 +1599,7 @@ Unable to run engine: %1 ( - Nie można uruchomić silnika: %1 ( + Nie można uruchomić silnika gry: %1 ( @@ -1404,7 +1670,11 @@ Disable Land Objects - Wyłącz dodatki terenu + Wyłącz dodatki terenu + + + AI Survival Mode + @@ -1673,7 +1943,7 @@ Hat - Czapka + Grzybek (Left) @@ -1925,27 +2195,27 @@ Left stick - Lewy grzybek + Lewy analog Right stick - Prawy grzybek + Prawy analog Left stick (Right) - Lewy grzybek (Prawo) + Lewy analog (Prawo) Left stick (Left) - Lewy grzybek (Lewo) + Lewy analog (Lewo) Left stick (Down) - Lewy grzybek (Dół) + Lewy analog (Dół) Left stick (Up) - Lewy grzybek (Góra) + Lewy analog (Góra) Left trigger @@ -1957,23 +2227,23 @@ Right stick (Down) - Prawy grzybek (Dół) + Prawy analog (Dół) Right stick (Up) - Prawy grzybek (Góra) + Prawy analog (Góra) Right stick (Right) - Prawy grzybek (Prawo) + Prawy analog (Prawo) Right stick (Left) - Prawy grzybek (Lewo) + Prawy analog (Lewo) DPad - Krzyżak + DPad diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_pt_BR.qm Binary file share/hedgewars/Data/Locale/hedgewars_pt_BR.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_pt_BR.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts Wed Oct 27 14:02:20 2010 +0200 @@ -86,6 +86,10 @@ Please select record from the list above Selecione um registro na lista acima + + DefaultTeam + EquipePadrão + HWGame @@ -237,7 +241,7 @@ registered on Hedgewars.org Please provide your password below or pick another nickname in game config: - O apelido %1 é + Seu apelido %1 é registrado no Hedgewars.org Por favor, forneça sua senha ou escolha outro apelido: @@ -258,7 +262,7 @@ Fetch data - Buscar dados + Trazer dados Server message for latest version: @@ -303,22 +307,72 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>O prêmio de melhor disparo foi ganho por <b>%1</b> , com <b>%2</b> pontos.</p> + <p>O prêmio de melhor disparo foi ganho por <b>%1</b> , com <b>%2</b> pontos.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>O prêmio de melhor matador é de <b>%1</b>, com <b>%2</b> morto em um turno.</p> - <p>O prêmio de melhor matador é de <b>%1</b>, com <b>%2</b> mortos em um turno.</p> + <p>Os prêmios de melhor matador vão para <b>%1</b>, com <b>%2</b> mortos em um turno.</p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - - <p>Um total de <b>%1</b> ouriço foi morto nesta rodada.</p> - <p>Um total de <b>%1</b> ouriços foram mortos nesta rodada.</p> + + <p>Um total de <b>%1</b> ouriço foi morto nesta batalha.</p> + <p>Um total de <b>%1</b> ouriços foram mortos nesta batalha.</p> + + + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -333,126 +387,251 @@ Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. Tips - + Use a mesma cor que um amigo para jogar como uma equipe única. Cada um controlará seus próprios ouriços, mas vencerão em equipe (ou perderão). Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. Tips - + Algumas armas que fazem pouco dano podem ser mais que devastadoras na situação certa. Tente usar a Desert Eagle para derrubar vários ouriços na água. If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! Tips - + Se você não tem certeza se quer desperdiçar munição ou ítens, passe a vez. Mas não deixe muitos turnos passarem ou chegará a Morte Súbita! Want to save ropse? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! Tips - + Quer economizar corda? Dispare-a enquanto estiver no meio do ar. Se você não tocar o solo, você não estará usando as cordas do seu arsenal! If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. Tips - + Se você quiser evitar que outros usem seu apelido no servidor oficial, registre-o em http://www.hedgewars.org/. You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. Tips - + Cansado do jogo padrão? Tente uma das missões - elas oferecem diferentes modos de jogo dependendo da sua escolha. By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. Tips - + O jogo irá, por padrão, sempre gravar o último jogo como demo. Selecione "Jogo Local" e use o botão "Demos" no canto inferior direito para assitir ou gerenciá-los. Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! Tips - + Hedgewars possui código aberto e é grátis, nós o desenvolvemos em nosso tempo livre. Se você encontrou problemas peça ajuda em nossos fóruns, mas não espere ser atendido 24 horas por dia! Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! Tips - + Hedgewars possui código aberto e é grátis, nós o desenvolvemos em nosso tempo livre. Se você deseja ajudar, pode doar ou contribuir com seu trabalho! Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! Tips - + Hedgewars possui código aberto e é grátis, nós o desenvolvemos em nosso tempo livre. Compartilhe com sua família e amigos! From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. Tips - + De tempos em tempos ocorrem torneios. Esses eventos podem ser acompanhados através do site http://www.hedgewars.org/ . Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! Tips - + Hedgewars está disponível em diversas linguages! Se você acha que a tradução não te satisfaz ou não é compatível, contacte-nos! Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. Tips - + Hedgewars pode ser jogado em muitos sistemas operacionais, incluindo Windows, Mas OS X e Linux. Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. Tips - + Lembre-se que você pode selecionar suas próprias regras em jogos locais ou em rede. Você não está limitado ao "Jogo Simples". + + + Connect a gamepad before launching the game to be able to assign its controls to your team. + Tips + Conecte um joystick ou controle antes de iniciar o jogo para poder atribuir os controles ao seu time. Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. Tips - + Crie um conta em http://www.hedgewars.org/ para evitar que outros use o seu apelido favorito no servidoroficial. While playing you should give yourself a short break at least once an hour. Tips - + Não jogue por diversas horas sem descansar! De uma pausa a cada hora. If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. Tips - + Se sua placa de vídeo não é capaz de suportar aceleração OpenGL, tente ativar a opção de "Qualidade Reduzida" para melhorar a performance. We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! Tips - + Somos abertos para sugestões e críticas construtivas. Se você não gosta de alguma coisa ou teve uma grande idéia, nos avise! Especially while playing online be polite and always remember there might be some minors playing with or against you as well! Tips - + Seja sempre educado, especialmente quando jogar on line, pois pode haver menores jogando com ou contra você! Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! Tips - + Modos especiais de jogo, como Vampirismo ou Karma permitem desenvolver novas táticas. Tente-os em um jogo personalisado! The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing. Tips - + A versão Windows deste jogo permite o uso do Xfire. Certifique-se de adicionar Hedgewars para sua lista de jogospara ver quem está jogando. You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! Tips - + Não instale este jogo em computadores que não seja permitido (escola, trabalho, universidade). Solicite isso ao responsável! Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. Tips - + Hedgewars pode ser um jogo perfeito nos intervalos! Apenas certifique-se de não adicionar muitos ouriços ou usar um mapa muito grande! Reduzir o tempo de turno e a vida também pode ajudar. No hedgehogs were harmed in making this game. Tips - + Nenhum ouriço foi ferido para fazer este jogo. Connect one or more gamepads before launching the game to be able to assign their controls to your teams. Tips + Conecte um ou mais controles antes de iniciar o jogo para que você possa atribuí-los para sua equipe + + + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. + Tips @@ -620,7 +799,7 @@ There are %1 clients connected to this room. Existe %1 cliente conectado a esta sala. - Existe %1 clientes conectados a esta sala. + Existem %1 clientes conectados a esta sala. @@ -642,6 +821,35 @@ Random Maze Labirinto Aleatório + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + Limpar + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -729,6 +937,10 @@ Disable land objects when generating random maps. Desabilite objetos do terreno quando gerar mapas aleatórios. + + AI respawns on death. + AI Renasce ao morrer. + PageSelectWeapon @@ -763,6 +975,10 @@ Load (Load a previously saved game) Carregar (Carregue um jogo salvo) + + Campaign Mode (...). IN DEVELOPMENT + Modo Campanha (...) EM DESENVOLVIMENTO + QAction @@ -847,7 +1063,7 @@ Reduced quality - Qualidade reduzida + Qualidade reduzida Show ammo menu tooltips @@ -892,6 +1108,54 @@ Mission Missão + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Padrão + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -937,7 +1201,7 @@ Team Settings - Opções da Equipe + Opções de Equipe Misc @@ -1089,12 +1353,20 @@ Explosivos + This SVN build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + Esta construção a partir do SVN é "trabalho em progresso" e pode não ser compatível com outras versões do jogo. Algumas funcionalidades podem estar quebradas ou incompletas. Use por sua conta e risco! + + Tip: - + Dica: This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! - + Esta versão do Hedgewars é um trabalho em progresso e pode não ser compatível com outras versões do jogo. Algumas coisas podem não funcionar ou podem estar incompletas. Use a sua conta e risco! + + + Quality + Qualidade @@ -1153,7 +1425,7 @@ Can not overwrite default weapon set '%1'! - + Não pode sobre-escrever o esquema %1! @@ -1381,9 +1653,12 @@ Disable Land Objects - Duvida: o que sao objetos do terreno? Desabilitar objetos do terreno + + AI Survival Mode + AI Modo de Sobrevivência + binds @@ -1409,8 +1684,7 @@ put - Duvida: verificar no jogo - usar + ativar switch @@ -1548,7 +1822,7 @@ slot 10 - posição 10 + posição 10 diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_pt_PT.qm Binary file share/hedgewars/Data/Locale/hedgewars_pt_PT.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_pt_PT.ts --- a/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_pt_PT.ts Wed Oct 27 14:02:20 2010 +0200 @@ -86,6 +86,10 @@ Please select record from the list above Seleccione uma gravação da lista acima + + DefaultTeam + + HWGame @@ -237,14 +241,17 @@ registered on Hedgewars.org Please provide your password below or pick another nickname in game config: - + O nome de utilizador %1 está +registado em Hedgewars.org +Por favor digite a sua palavra passe ou escolha +outro nome de utilizador no menu de configuração: KB SDL_ttf returned error while rendering text, most propably it is related to the bug in freetype2. It's recommended to update your freetype lib. - SDL_ttf retornou um erro ao renderizar o texto, provavelmente está relacionado com o bug no freetype2. É recomendado actualizar a sua livraria freetype. + SDL_ttf retornou um erro ao renderizar o texto, muito provavelmente está relacionado com o bug no freetype2. É recomendado actualizar a sua lib freetype. @@ -308,22 +315,72 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>O título de melhor tiro foi para <b>%1</b> com <b>%2</b> pontos de dano.</p> + <p>O título de melhor tiro foi para <b>%1</b> com <b>%2</b> pontos de dano.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>O extreminador da ronda foi <b>%1</b> com <b>%2</b> morto num unico turno.</p> <p>O extreminador da ronda foi <b>%1</b> com <b>%2</b> mortes num unico turno.</p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>Apenas <b>%1</b> ouriço perdeu a vida durante esta ronda.</p> <p>Um total de <b>%1</b> ouriços perderam a vida durante esta ronda.</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -338,17 +395,127 @@ Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. Tips - + Simplesmente selecciona a mesma cor de outro jogador para jogarem em equipa. Continuas a ter total controlo dos teus ouriços, mas ganham ou perdem juntos. Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. Tips - + Algumas armas podem não fazer muito dano, mas em ocasiões especificas podem-se demonstrar bastante mais letais. Experimenta usar a Desert Eagle para empurrar varios ouriços para a água. If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! Tips - + Se não tens a certeza do que fazer a seguir não desperdiçes munições, passa o turno. Mas não desperdices muito tempo, a Morte Súbita aproxima-se. + + + Want to save ropes? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! + Tips + Precisas de poupar as cordas? Solta a corda enquanto no ar e dispara-a novamente. Enquanto não tocares no solo podes usar a mesma corda novamente sem desperdiar outras! + + + If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. + Tips + Se não queres que outros usem o teu nome de utilizador preferido no servidor oficial, regista-o em http://www.hedgewars.org/. + + + You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. + Tips + Estás cansado do modo de jogo habitual? Experimenta uma das missões - existem várias por onde escolher, e todas com objectivos um pouco diferentes. + + + By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. + Tips + Por defeito, o ultimo jogo em que participaste é sempre gravado como 'demo'. Selecciona 'Jogo Local' e aí a opção 'Demos' no canto inferior direito para os gerir ou reproduzir. + + + Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! + Tips + O Hedgewars é Open Source e Freeware, desenvolvido nos tempos livres. Se tiveres algum problema pergunta nos fóruns, mas por favor não esperes suporte 24/7! + + + Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! + Tips + O Hedgewars é Open Source e Freeware, desenvolvido nos tempos livres. Se gostares do jogo podes contribuir com uma pequena doação ou o teu próprio trabalho! + + + Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! + Tips + O Hedgewars é Open Source e Freeware, desenvolvido nos tempos livres. Partilha-o com a família e amigos como quiseres! + + + From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. + Tips + De tempos a tempos realizam-se torneios oficiais. Todos estes eventos são anunciados em http://www.hedgewars.org/ com alguns dias de antecedência. + + + Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! + Tips + O Hedgewars está disponível em vários idiomas. Se a tradução do teu idioma está desactualizada ou em falta, não hesites em contactar-nos! + + + Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. + Tips + O Hedgewars está disponível para vários sistemas operativos incluindo Microsoft Windows, Mac OS X e Linux. + + + Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. + Tips + Lembra-te que tens sempre a opção de poder jogar na tua rede local ou online. Não estás restrito ao modo de Jogo Local. + + + Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. + Tips + Cria uma conta em http://www.hedgewars.org/ para prevenir que outros usem o teu nome de utilizador favorito no servidor oficial. + + + While playing you should give yourself a short break at least once an hour. + Tips + Lembra-te de fazer pequenos intervalos durante sessões de jogo prolongadas. + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. + Tips + Se a tua placa gráfica não é capaz de fornecer aceleração por hardware para OpenGL experimenta activar o modo de baixa qualidade para melhorar a performance. + + + We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! + Tips + Estamos abertos a sugestões e críticas construtivas. Se há algo que não gostas em particular ou tiveste uma boa ideia, deixa-nos saber! + + + Especially while playing online be polite and always remember there might be some minors playing with or against you as well! + Tips + Especialmente durante partidas online é importante ser educado. Lembra-te que podem haver menores a jogar com ou contra ti! + + + Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! + Tips + Modos de jogo especiais como 'Vampirismo' ou 'Karma' permitem-te desenvolver tácticas completamente novas! Experimenta-os num jogo personalizado! + + + The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing. + Tips + A versão do Hedgewars para Windows suporta Xfire. Não te esqueças de adicionar o Hedgewars à tua lista de jogos para que os teus amigos te possam ver a jogar. + + + You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! + Tips + Não deves instalar o Hedgewars em computadores que não te pertençam (escola, universidade, trabalho, etc.). Por favor contacta o responsável caso o pretendas fazer. + + + Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. + Tips + O Hedgewars é perfeito para pequenos jogos durante intervalos. Tem apenas a certeza que não adicionas muitos ouriços ou usas um mapa muito grande. Reduzir o tempo e pontos de vida pode ajudar também. + + + No hedgehogs were harmed in making this game. + Tips + Nenhum ouriço foi mal tratado durante a produção deste jogo. + + + Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Tips + Conecta um ou mais comandos antes de lançar o jogo para que seja possível configura-los nas opções das tuas equipas. Want to save ropse? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! @@ -356,107 +523,122 @@ - If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! Tips - You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. Tips - By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. Tips - Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. Tips - Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. Tips - Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. Tips - From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. Tips - Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. Tips - Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. Tips - Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. Tips - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. Tips - While playing you should give yourself a short break at least once an hour. + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. Tips - If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. + The Flame Thrower is a weapon but it can be used for tunnel digging as well. Tips - We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. Tips - Especially while playing online be polite and always remember there might be some minors playing with or against you as well! + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. Tips - Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! Tips - The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing. + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. Tips - You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! Tips - Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. + Keep your video card drivers up to date to avoid issues playing the game. Tips - No hedgehogs were harmed in making this game. + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. Tips - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -525,7 +707,7 @@ You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - + Não é possível editar equipas do menu de selecção de equipa. Volte ao menu principal se pretender adicionar, editar ou apagar equipas. @@ -647,6 +829,35 @@ Random Maze Labirinto Aleatório + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + Clear + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -732,6 +943,10 @@ Disable land objects when generating random maps. + Não adicionar objectos de terreno ao gerar mapas aleatórios. + + + AI respawns on death. @@ -768,6 +983,10 @@ Load (Load a previously saved game) Carregar (carregar um jogo salvo previamente) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -852,7 +1071,7 @@ Reduced quality - Qualidade reduzida + Qualidade reduzida Show ammo menu tooltips @@ -897,6 +1116,54 @@ generated maze... labirinto gerado... + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Predefinido + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1089,10 +1356,14 @@ Tip: - + Dica: This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + + Quality @@ -1150,7 +1421,7 @@ Can not overwrite default weapon set '%1'! - + Não é possivel sobrescrever o esquema de armas por omissão '%1'! @@ -1378,6 +1649,10 @@ Disable Land Objects Desactivar Objectos no Terreno + + AI Survival Mode + + binds @@ -1541,7 +1816,7 @@ slot 10 - slot 10 + slot 10 diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_ru.qm Binary file share/hedgewars/Data/Locale/hedgewars_ru.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_ru.ts --- a/share/hedgewars/Data/Locale/hedgewars_ru.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_ru.ts Wed Oct 27 14:02:20 2010 +0200 @@ -87,6 +87,10 @@ Please select record from the list above Выберите запись из списка + + DefaultTeam + + HWGame @@ -309,11 +313,11 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Приз за лучший выстрел получает <b>%1</b> с <b>%2</b> пунктами урона.</p> + <p>Приз за лучший выстрел получает <b>%1</b> с <b>%2</b> пунктами урона.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>Лучший киллер ‒ это <b>%1</b> с <b>%2</b> убитым за ход.</p> <p>Лучший киллер ‒ это <b>%1</b> с <b>%2</b> убитыми за ход.</p> <p>Лучший киллер ‒ это <b>%1</b> с <b>%2</b> убитыми за ход.</p> @@ -321,12 +325,64 @@ <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>Всего <b>%1</b> ёж был убит за этот поединок.</p> <p>Всего <b>%1</b> ежа были убиты за этот поединок.</p> <p>Всего <b>%1</b> ежей были убиты за этот поединок.</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -409,11 +465,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -459,7 +510,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -652,6 +818,35 @@ Random Maze Случайный лабиринт + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + Очистить + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -739,6 +934,10 @@ Disable land objects when generating random maps. Отключить добавляемые объекты на генерируемых картах. + + AI respawns on death. + + PageSelectWeapon @@ -773,6 +972,10 @@ Load (Load a previously saved game) Загрузить (загрузить сохранённую игру) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -857,7 +1060,7 @@ Reduced quality - Пониженное качество + Пониженное качество Show ammo menu tooltips @@ -902,6 +1105,54 @@ Mission Миссия + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + По умолчанию + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1106,6 +1357,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1389,6 +1644,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_sk.qm Binary file share/hedgewars/Data/Locale/hedgewars_sk.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_sk.ts --- a/share/hedgewars/Data/Locale/hedgewars_sk.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_sk.ts Wed Oct 27 14:02:20 2010 +0200 @@ -87,6 +87,10 @@ Please select record from the list above Prosím vyberte záznam zo zoznamu vyššie + + DefaultTeam + + HWGame @@ -309,11 +313,11 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Ocenenie za najlepší zásah vyhral(a) <b>%1</b> so ziskom <b>%2</b> bodov.</p> + <p>Ocenenie za najlepší zásah vyhral(a) <b>%1</b> so ziskom <b>%2</b> bodov.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>Najlepším zabijákom je <b>%1</b> s <b>jedným</b> zabitím počas ťahu.</p> <p>Najlepším zabijákom je <b>%1</b> s <b>%2</b> zabitiami počas ťahu.</p> <p>Najlepším zabijákom je <b>%1</b> s <b>%2</b> zabitiami počas ťahu.</p> @@ -321,12 +325,64 @@ <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>Celkovo bol v tomto kole zabitý <b>jeden</b> ježko.</p> <p>Celkovo boli v tomto kole zabití <b>%1</b> ježkovia.</p> <p>Celkovo boli v tomto kole zabití <b>%1</b> ježkovia.</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -409,11 +465,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -459,7 +510,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -652,6 +818,35 @@ Random Maze Náhodné bludisko + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + Clear + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -739,6 +934,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -773,6 +972,10 @@ Load (Load a previously saved game) Načítať (načíta v minulosti uloženú hru) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -857,7 +1060,7 @@ Reduced quality - Znížená kvalita + Znížená kvalita Show ammo menu tooltips @@ -902,6 +1105,54 @@ Mission Misia + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Východzie + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1106,6 +1357,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1389,6 +1644,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_sv.qm Binary file share/hedgewars/Data/Locale/hedgewars_sv.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_sv.ts --- a/share/hedgewars/Data/Locale/hedgewars_sv.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_sv.ts Wed Oct 27 14:02:20 2010 +0200 @@ -86,6 +86,10 @@ Please select record from the list above Var god välj inspelning från listan ovanför + + DefaultTeam + + HWGame @@ -308,22 +312,72 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Priset för bästa skott går till <b>%1</b> med <b>%2</b> poäng.</p> + <p>Priset för bästa skott går till <b>%1</b> med <b>%2</b> poäng.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>Den bästa mördaren är <b>%1</b> med <b>%2</b> dödad på samma tur.</p> <p>Den bästa mördaren är <b>%1</b> med <b>%2</b> dödade på samma tur.</p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>Totalt <b>%1</b> igelkott dödades denna omgång.</p> <p>Totalt <b>%1</b> igelkottar dödades denna omgång.</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -406,11 +460,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -456,7 +505,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -647,6 +811,35 @@ Random Maze Slumpad labyrint + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + Clear + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -734,6 +927,10 @@ Disable land objects when generating random maps. Avaktivera landföremål när slumpade kartor genereras. + + AI respawns on death. + + PageSelectWeapon @@ -768,6 +965,10 @@ Load (Load a previously saved game) Ladda (ladda ett tidigare sparat spel) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -852,7 +1053,7 @@ Reduced quality - Minskad kvalité + Minskad kvalité Show ammo menu tooltips @@ -897,6 +1098,54 @@ Mission Uppdrag + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Standard + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1101,6 +1350,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1384,6 +1637,10 @@ Disable Land Objects Avaktivera landföremål + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_tr_TR.qm Binary file share/hedgewars/Data/Locale/hedgewars_tr_TR.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_tr_TR.ts --- a/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_tr_TR.ts Wed Oct 27 14:02:20 2010 +0200 @@ -85,6 +85,10 @@ Please select record from the list above Lütfen üstteki listeden kaydı seçin + + DefaultTeam + + HWGame @@ -297,20 +301,56 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>En iyi atış ödülünü <b>%2</b> puanla <b>%1</b> kazandı.</p> + <p>En iyi atış ödülünü <b>%2</b> puanla <b>%1</b> kazandı.</p> + + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + - <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. - <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> + A total of <b>%1</b> hedgehog(s) were killed during this round. + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -393,11 +433,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -443,7 +478,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -630,6 +780,35 @@ Random Maze + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -717,6 +896,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -751,6 +934,10 @@ Load (Load a previously saved game) Yükle (Kaydedilmiş bir oyunu yükleyin) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -830,10 +1017,6 @@ Kayıt dosyasının sonuna tarihi ve saati ekle - Reduced quality - - - Check for updates at startup @@ -880,6 +1063,54 @@ Mission + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + Öntanımlı + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1078,6 +1309,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1361,6 +1596,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_uk.qm Binary file share/hedgewars/Data/Locale/hedgewars_uk.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_uk.ts --- a/share/hedgewars/Data/Locale/hedgewars_uk.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_uk.ts Wed Oct 27 14:02:20 2010 +0200 @@ -87,6 +87,10 @@ Please select record from the list above Виберіть запис зі списку + + DefaultTeam + + HWGame @@ -309,11 +313,11 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>Нагороду за кращий постріл отримує <b>%1</b> з <b>%2</b> пунктами нанесених втрат.</p> + <p>Нагороду за кращий постріл отримує <b>%1</b> з <b>%2</b> пунктами нанесених втрат.</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>Кращим вбивцею є <b>%1</b> з <b>%2</b> вбивством за хід.</p> <p>Кращим вбивцею є <b>%1</b> з <b>%2</b> вбивствами за хід.</p> <p>Кращим вбивцею є <b>%1</b> з <b>%2</b> вбивствами за хід.</p> @@ -321,12 +325,64 @@ <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p><b>%1</b> їжак був вбитий протягом раунду.</p> <p><b>%1</b> їжаки були вбиті протягом раунду.</p> <p><b>%1</b> їжаків було вбито протягом раунду.</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -409,11 +465,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -459,7 +510,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -652,6 +818,35 @@ Random Maze Випадковий лабіринт + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -739,6 +934,10 @@ Disable land objects when generating random maps. Вимкнути декорації при генеруванні випадкової мапи + + AI respawns on death. + + PageSelectWeapon @@ -773,6 +972,10 @@ Load (Load a previously saved game) Завантаження (Завантажити попередньо збережені ігри) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -857,7 +1060,7 @@ Reduced quality - Знижена якість + Знижена якість Show ammo menu tooltips @@ -902,6 +1105,54 @@ generated maze... згенерований лабіринт... + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + За замовчуванням + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1106,6 +1357,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1389,6 +1644,10 @@ Disable Land Objects Вимкнути Декорації + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_zh_CN.qm Binary file share/hedgewars/Data/Locale/hedgewars_zh_CN.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_zh_CN.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_CN.ts Wed Oct 27 14:02:20 2010 +0200 @@ -33,30 +33,30 @@ Edit schemes - 修改游戏设置 + 修改游戏设置 Edit weapons - 修改武器设置 + 修改武器 HWChatWidget %1 *** %2 has been removed from your ignore list - + %1 *** %2 已经从您的忽略列表中移除 %1 *** %2 has been added to your ignore list - + %1 *** %2 已经添加到您的忽略列表中 %1 *** %2 has been removed from your friends list - + %1 *** %2 已经从您的朋友列表中移除 %1 *** %2 has been added to your friends list - + %1 *** %2 已经添加到您的朋友列表中 @@ -85,6 +85,10 @@ Please select record from the list above 请选择一个记录 + + DefaultTeam + + HWGame @@ -137,31 +141,31 @@ Type - + 类型 Small tunnels - + 小型洞窟 Medium tunnels - + 中型洞窟 Large tunnels - + 大型洞窟 Small floating islands - + 小型浮动岛屿 Medium floating islands - + 重型浮动岛屿 Large floating islands - + 大型浮动岛屿 @@ -236,7 +240,10 @@ registered on Hedgewars.org Please provide your password below or pick another nickname in game config: - + 您的昵称%1 +在Hedgewars.org已注册 +请输入您的密码 +或从游戏配置中选择另一个昵称: @@ -262,27 +269,27 @@ Fetch data - + 获取数据 Server message for latest version: - + 最新版本的服务器信息 Server message for previous versions: - + 之前版本的服务器信息 Latest version protocol number: - + 最新版本的通讯协议号码: MOTD preview: - + MOTD预览: Set data - + 设定数据 @@ -307,26 +314,74 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>最佳射手是 <b>%1</b>。伤害 <b>%2</b>点。</p> + <p>最佳射手奖给与 <b>%1</b>:伤害 <b>%2</b>点。</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>最佳杀手是 <b>%1</b>单回合击杀刺猬数:<b>%2</b></p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>本轮总共有<b>%1</b>只刺猬被击杀</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain Local Game (Play a game on a single computer) - 本地游戏(在一台电脑上) + 单机游戏(在一台电脑上) Network Game (Play a game across a network) @@ -335,126 +390,246 @@ Simply pick the same color as a friend to play together as a team. Each of you will still control his or her own hedgehogs but they'll win or lose together. Tips - + 点击同色作为同一组的友军。控制权不分享,但是共同胜利/失败。 Some weapons might do only low damage but they can be a lot more devastating in the right situation. Try to use the Desert Eagle to knock multiple hedgehogs into the water. Tips - + 有些武器可能威力低下但是有毁灭性的效果。比如沙漠之鹰能把多个刺猬打入水中。 If you're unsure what to do and don't want to waste ammo, skip one round. But don't let too much time pass as there will be Sudden Death! Tips - + 加入不确定怎么做,不要浪费弹药,跳过此回合。但是注意突然时间! Want to save ropse? Release the rope in mid air and then shoot again. As long as you don't touch the ground you'll reuse your rope without wasting ammo! Tips - + 保存绳子?在半空释放然后再次射出。只要不接触地面停止就可以继续使用同一根不会浪费! If you'd like to keep others from using your preferred nickname on the official server, register an account at http://www.hedgewars.org/. Tips - + 如果您确定好了一个昵称不想让别人使用,那么在 http://www.hedgewars.org/. 注册一个帐号吧 You're bored of default gameplay? Try one of the missions - they'll offer different gameplay depending on the one you picked. Tips - + 厌倦了默认的玩法?试试任务—— By default the game will always record the last game played as a demo. Select 'Local Game' and pick the 'Demos' button on the lower right corner to play or manage them. Tips - + 默认情况下游戏记录最后的游戏作为Demo,选择单机游戏——然后Demo——然后点击右下角开始回放或者整理。 Hedgewars is Open Source and Freeware we create in our spare time. If you've got problems, ask on our forums but please don't expect 24/7 support! Tips - + 刺猬大作战是一个开放源代码的免费软件,它充分利用了我们的业余时间。如果您有问题,到论坛来吧,不过7×24小时支持不可能! Hedgewars is Open Source and Freeware we create in our spare time. If you like it, help us with a small donation or contribute your own work! Tips - + 刺猬大作战是一个开放源代码的免费软件,它充分利用了我们的业余时间。如果您喜欢它,我们接受您的捐赠/感谢! Hedgewars is Open Source and Freeware we create in our spare time. Share it with your family and friends as you like! Tips - + 刺猬大作战是一个开放源代码的免费软件,它充分利用了我们的业余时间。与他人分享它吧! From time to time there will be official tournaments. Upcoming events will be announced at http://www.hedgewars.org/ some days in advance. Tips - + 官方的竞赛一直存在。临近时去 http://www.hedgewars.org/ 即可看到。 Hedgewars is available in many languages. If the translation in your language seems to be missing or outdated, feel free to contact us! Tips - + Hedgewars 被翻译成多种语言,中文是刺猬大作战——同样为翻译名。如果您的语言翻译有什么缺失/过时/遗漏或任何问题,来联系我们吧! Hedgewars can be run on lots of different operating systems including Microsoft Windows, Mac OS X and Linux. Tips - + 刺猬大作战可以运行的操作系统包括:GNU/Linux、Mac OS X、MicroSoft Windows。 Always remember you're able to set up your own games in local and network/online play. You're not restricted to the 'Simple Game' option. Tips - + 您可以建立自己的网络游戏/局域网游戏。不仅限于 "简单游戏" 选项。 Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. Tips - + 在官方服务器 http://www.hedgewars.org/ 建立自己的帐号——就能一直使用最喜欢的昵称 While playing you should give yourself a short break at least once an hour. Tips - + 最好玩一个小时就休息一下,如果你要继续用电脑。 If your graphics card isn't able to provide hardware accelerated OpenGL, try to enable the low quality mode to improve performance. Tips - + 假如你的显卡不能提供OpenGL硬件加速,试着用降低效果的方式运行 We're open to suggestions and constructive feedback. If you don't like something or got a great idea, let us know! Tips - + 我们接受意见和建设性反馈。假如您有好电子或者不喜欢的东西,告诉我们! Especially while playing online be polite and always remember there might be some minors playing with or against you as well! Tips - + 特别是网络游戏,请有礼貌记住对方也和您一样是人! Special game modes such as 'Vampirism' or 'Karma' allow you to develop completely new tactics. Try them in a custom game! Tips - + 特别游戏模式“吸血“、”因果报应“需要全新的战术。现在自定义游戏里试试! The Windows version of Hedgewars supports Xfire. Make sure to add Hedgwars to its game list so your friends can see you playing. Tips - + Windows版本的刺猬大作战支持Xfire。添加它到游戏列表里让您的朋友看到。 You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead! Tips - + 您不应该在不属于您的计算机上安装刺猬大作战——比如学校/工作场所。 Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well. Tips - + 刺猬大作战适合短时间休息,不需要太多刺猬挤在大地图上。 No hedgehogs were harmed in making this game. Tips - + 制作这个游戏时不曾伤害任何刺猬 Connect one or more gamepads before launching the game to be able to assign their controls to your teams. Tips + 在运行游戏前连接游戏板 + + + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. + Tips @@ -506,23 +681,23 @@ Delete team - + 删除队伍 New weapon scheme - + 新武器配置 Edit weapon scheme - + 修改武器配置 Delete weapon scheme - + 删除武器配置 You can't edit teams from team selection. Go back to main menu to add, edit or delete teams. - + 您不能在队伍选择界面修改队伍,请返回主页面添加/修改/删除队伍。 @@ -584,27 +759,27 @@ Room Name: - 房间名: + 房间名: This game is in lobby. You may join and start playing once the game starts. - 游戏正在等待中。 + 游戏正在大厅中。 您可以加入等待游戏开始。 This game is in progress. You may join and spectate now but you'll have to wait for the game to end to start playing. - 游戏正在进行中。 + 游戏正在进行中。 您可以加入观战但必须等游戏结束才能参与游戏。 %1 is the host. He may adjust settings and start the game. - %1 是房主,他可以调整设置、开始游戏。 + %1 是房主,他可以调整设置、开始游戏。 Random Map - 随机地图 + 随机地图 Games may be played on precreated or randomized maps. @@ -612,21 +787,21 @@ The Game Scheme defines general options and preferences like Round Time, Sudden Death or Vampirism. - 游戏设置包括一般选项例如回合时间,突然死亡或吸血模式。 + 游戏设置包括一般选项例如回合时间,突然死亡或吸血模式。 The Weapon Scheme defines available weapons and their ammunition count. - 武器设置包括可以选用的武器和弹药数量。 + 武器配置包括可以选用的武器和弹药数量。 There are %1 clients connected to this room. - + 有 %1 个客户端连接到这个房间。 There are %1 teams participating in this room. - + 有 %1 个队伍加入这个房间。 @@ -640,6 +815,35 @@ Random Maze + 随机迷宫 + + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + Num Lock / Clear + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? @@ -719,14 +923,18 @@ Ammo is shared between all teams that share a colour. - + 同色队伍共享所有弹药。 Disable girders when generating random maps. - + 禁止随机生成地图使用梁 Disable land objects when generating random maps. + 禁止随机生成地图使用地面物体 + + + AI respawns on death. @@ -763,6 +971,10 @@ Load (Load a previously saved game) 读取 (读取之前保存的游戏) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -796,19 +1008,19 @@ Ignore - + 忽略 Add friend - + 添加朋友 Unignore - + 取消忽略 Remove friend - + 移除朋友 @@ -819,7 +1031,7 @@ Enable sound - 开启游戏音效 + 开启游戏音效 Fullscreen @@ -835,7 +1047,7 @@ Enable music - 开启游戏音乐 + 开启游戏音乐 Frontend fullscreen @@ -847,23 +1059,23 @@ Reduced quality - 降低显示效果 + 降低显示效果 Show ammo menu tooltips - 显示武器提示信息 + 显示武器菜单提示 Enable frontend sounds - 开启菜单音效 + 开启界面音效 Enable frontend music - 开启菜单音乐 + 开启界面音乐 Frontend effects - + 界面效果 @@ -882,14 +1094,62 @@ (System default) - + (系统默认) generated maze... - + 生成的迷宫 Mission + 任务 + + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + 默认 + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy @@ -937,11 +1197,11 @@ Team Settings - + 队伍设定 Misc - + 杂项 @@ -1048,46 +1308,50 @@ % Dud Mines - + % 地雷哑弹 Name - + 名称 Type - + 类型 Grave - + 墓碑 Flag - + 旗帜 Voice - + 声音 Locale - + Locale Restart game to apply - + 重新启动游戏应用 Explosives - + 爆炸物 Tip: - + 提示: This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + 开发版本。自己承担风险使用。 + + + Quality @@ -1145,7 +1409,7 @@ Can not overwrite default weapon set '%1'! - + 不能覆盖默认的武器配置 '%1' @@ -1164,11 +1428,11 @@ Nickname - 昵称 + 昵称 Please enter your nickname - 请输入您的昵称 + 请输入您的昵称 @@ -1235,57 +1499,57 @@ Random Team - 随机队伍分配 + 随机分配队伍 QTableWidget Room Name - 房间名 + 房间名 C - 人数 + 人数限制 T - 队伍 + 时间限制 Owner - 创建者 + 创建者 Map - 地图 + 地图 Rules - 规则 + 规则 Weapons - 武器 + 武器 SelWeaponWidget Weapon set - 武器设置 + 武器设置 Probabilities - 几率 + 几率 Ammo in boxes - + 弹药箱 Delays - + 延迟 @@ -1351,26 +1615,30 @@ Random Order - 随机顺序 + 随机顺序 King - 国王模式 + 国王模式 Place Hedgehogs - 手动放置 + 手动放置刺猬 Clan Shares Ammo - + 团队共享弹药 Disable Girders - + 禁止梁 Disable Land Objects + 禁止地面物件 + + + AI Survival Mode @@ -1458,7 +1726,7 @@ capture - 夺取 + 截取 quit @@ -1516,148 +1784,148 @@ zoom in - 放大 + 放大 zoom out - 缩小 + 缩小 reset zoom - 重置 + 重置 long jump - 跳远 + 远跳 high jump - 跳高 + 高跳 slot 10 - slot 10 + slot 10 binds (categories) Basic controls - 基本控制 + 基本控制 Weapon controls - 武器控制 + 武器控制 Camera and cursor controls - 镜头和光标控制 + 镜头和光标控制 Other - 其他 + 其他 binds (descriptions) Move your hogs and aim: - 移动、瞄准: + 移动您的刺猬同时瞄准: Traverse gaps and obstacles by jumping: - 越过障碍: + 使用跳跃越过沟渠、障碍: Fire your selected weapon or trigger an utility item: - 开火、使用物品: + 使用选择的武器开火、使用物品: Pick a weapon or a target location under the cursor: - 选取武器、目的地: + 失去一个武器、或者瞄准光标下的地点: Switch your currently active hog (if possible): - 切换刺猬(如果可用): + 切换到您当前活动的刺猬(如果可用): Pick a weapon or utility item: - 选取武器、物品: + 选择一个武器或物品: Set the timer on bombs and timed weapons: - 设置定时炸弹等武器时间: + 设置定时炸弹等武器起爆时间: Move the camera to the active hog: - 移动镜头到选中刺猬: + 移动镜头到选中的刺猬: Move the cursor or camera without using the mouse: - 不用鼠标移动光标或镜头: + 不用鼠标移动光标或镜头: Modify the camera's zoom level: - 调整镜头放大倍数: + 调整镜头放大倍数: Talk to your team or all participants: - 同队友或全部参与者对话: + 同队友或全部参与者对话: Pause, continue or leave your game: - 暂停、继续或离开游戏: + 暂停、继续或离开游戏: Modify the game's volume while playing: - 调整游戏时音量: + 调整游戏时音量: Toggle fullscreen mode: - 全屏模式: + 全屏模式: Take a screenshot: - 截图: + 截图: Toggle labels above hedgehogs: - 切换刺猬标签显示方式: + 切换刺猬头顶标签的显示方式: binds (keys) Axis - + Axis轴 (Up) - + (上) (Down) - + (下) Hat - 帽子 + 帽子 (Left) - + (左) (Right) - + (右) Button - 按键 + 按键 Keyboard - 键盘 + 键盘 Mouse: Left button @@ -1685,15 +1953,15 @@ Tab - 制表键 + Tab Clear - 清除 + Num Lock / Clear Return - 返回 + 回车 Pause @@ -1861,43 +2129,43 @@ A button - + A 键 B button - + B 键 X button - + X 键 Y button - + Y 键 LB button - + LB 键 RB button - + RB 键 Back button - + 返回键 Start button - + 开始键 Left stick - + 左摇杆 Right stick - + 右摇杆 Left stick (Right) @@ -1941,7 +2209,7 @@ DPad - + DPad板 diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_zh_TW.qm Binary file share/hedgewars/Data/Locale/hedgewars_zh_TW.qm has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hedgewars_zh_TW.ts --- a/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/hedgewars_zh_TW.ts Wed Oct 27 14:02:20 2010 +0200 @@ -85,6 +85,10 @@ Please select record from the list above 請選擇一個記錄 + + DefaultTeam + + HWGame @@ -307,20 +311,68 @@ PageGameStats <p>The best shot award was won by <b>%1</b> with <b>%2</b> pts.</p> - <p>最佳射手是<b>%1</b>。傷害 <b>%2</b>點。</p> + <p>最佳射手是<b>%1</b>。傷害 <b>%2</b>點。</p> <p>The best killer is <b>%1</b> with <b>%2</b> kills in a turn.</p> - + <p>最佳殺手是<b>%1</b>单回合擊殺刺蝟數<b>%2</b></p> <p>A total of <b>%1</b> hedgehog(s) were killed during this round.</p> - + <p>本輪總共有<b>%1</b>只刺蝟被擊殺</p> + + Details + + + + Health graph + + + + Ranking + + + + The best shot award was won by <b>%1</b> with <b>%2</b> pts. + + + + The best killer is <b>%1</b> with <b>%2</b> kills in a turn. + + + + + + A total of <b>%1</b> hedgehog(s) were killed during this round. + + + + + + (%1 kill) + + + + (%1 kills) + + + + <b>%1</b> thought it's good to shoot his own hedgehogs with <b>%2</b> pts. + + + + <b>%1</b> killed <b>%2</b> of his own hedgehogs. + + + + <b>%1</b> was scared and skipped turn <b>%2</b> times. + + PageMain @@ -403,11 +455,6 @@ - Create an account on http://www.hedgewars.org/ to keep others from using your most favourite nickname while playing on the official server. - Tips - - - While playing you should give yourself a short break at least once an hour. Tips @@ -453,7 +500,122 @@ - Connect one or more gamepads before launching the game to be able to assign their controls to your teams. + Hedgewars is Open Source and Freeware we create in our spare time. If someone sold you the game, you should try get a refund! + Tips + + + + Connect one or more gamepads before starting the game to be able to assign their controls to your teams. + Tips + + + + Create an account on %1 to keep others from using your most favourite nickname while playing on the official server. + Tips + + + + If your graphics card isn't able to provide hardware accelerated OpenGL, try to update the associated drivers. + Tips + + + + There are three different jumps available. Tap [high jump] twice to do a very high/backwards jump. + Tips + + + + Afraid of falling off a cliff? Hold down [precise] to turn [left] or [right] without actually moving. + Tips + + + + Some weapons require special strategies or just lots of training, so don't give up on a particular tool if you miss an enemy once. + Tips + + + + Most weapons won't work once they touch the water. The Homing Bee as well as the Cake are exceptions to this. + Tips + + + + The Old Limbuger only causes a small explosion. However the wind affected smelly cloud can poison lots of hogs at once. + Tips + + + + The Piano Strike is the most damaging air strike. You'll lose the hedgehog performing it, so there's a huge downside as well. + Tips + + + + The Homing Bee can be tricky to use. It's turn radius depends on it's velocity, so try to not use full power. + Tips + + + + Sticky Mines are a perfect tool to create small chain reactions knocking enemy hedgehogs into dire situations ... or water. + Tips + + + + The Hammer is most effective when used on bridges or girders. Hit hogs will just break through the ground. + Tips + + + + If you're stuck behind an enemy hedgehog, use the Hammer to free yourself without getting damaged by an explosion. + Tips + + + + The Cake's maximum walking distance depends on the ground it has to pass. Use [attack] to detonate it early. + Tips + + + + The Flame Thrower is a weapon but it can be used for tunnel digging as well. + Tips + + + + Use the Incinerating Grenade to temporary keep hedgehogs from passing terrain such as tunnels or platforms. + Tips + + + + Want to know who's behind the game? Click on the Hedgewars logo in the main menu to see the credits. + Tips + + + + Like Hedgewars? Become a fan on %1 or join our group at %2. You could follow us on %3 as well! + Tips + + + + Feel free to draw your own graves, hats, flags or even maps and themes! But note that you'll have to share them somewhere to use them online. + Tips + + + + Really want to wear a specific hat? Donate to us and receive an exclusive hat of your choice! + Tips + + + + Keep your video card drivers up to date to avoid issues playing the game. + Tips + + + + You can find your Hedgewars configuration files under "My Documents\Hedgewars". Create backups or take the files with you, but don't edit them by hand. + Tips + + + + You can find your Hedgewars configuration files under "Hedgewars" in your home directory. Create backups or take the files with you, but don't edit them by hand. Tips @@ -642,6 +804,35 @@ Random Maze + + State: + + + + Rules: + + + + Weapons: + + + + Search: + + + + Clear + 清除 + + + Warning + + + + The game you are trying to join has started. +Do you still want to join the room? + + PageScheme @@ -729,6 +920,10 @@ Disable land objects when generating random maps. + + AI respawns on death. + + PageSelectWeapon @@ -763,6 +958,10 @@ Load (Load a previously saved game) 讀取 (讀取之前保存的遊戲) + + Campaign Mode (...). IN DEVELOPMENT + + QAction @@ -847,7 +1046,7 @@ Reduced quality - 降低顯示效果 + 降低顯示效果 Show ammo menu tooltips @@ -892,6 +1091,54 @@ Mission + + Community + + + + Any + + + + In lobby + + + + In progress + + + + Default + 默認 + + + Pro mode + + + + Shoppa + + + + Basketball + + + + Minefield + + + + Barrel mayhem + + + + Tunnel hogs + + + + Crazy + + QGroupBox @@ -1090,6 +1337,10 @@ This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk! + + Quality + + QLineEdit @@ -1373,6 +1624,10 @@ Disable Land Objects + + AI Survival Mode + + binds diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/hu.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Locale/hu.txt Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,447 @@ +; Hungarian locale + +00:00=Gránát +00:01=Repeszgránát +00:02=Aknavető +00:03=Méhecske +00:04=Puska +00:05=Légkalapács +00:06=Kör kihagyása +00:07=Kötél +00:08=Akna +00:09=Desert Eagle +00:10=Dinamit +00:11=Baseball ütő +00:12=Felütés +00:13=mp +00:14=Ejtőernyő +00:15=Légicsapás +00:16=Akna eső +00:17=Fúrópajzs +00:18=Építkezés +00:19=Teleportálás +00:20=Süncsere +00:21=Mortar +00:22=Ostor +00:23=Kamikaze +00:24=Torta +00:25=Csábítás +00:26=Dinnye Bomba +00:27=Pokoli gránát +00:28=Ásórakéta +00:29=Labdavető +00:30=Napalm +00:31=RC Repülő +00:32=Alancsony gravitáció +00:33=Extra sebzés +00:34=Sérthetetlenség +00:35=Extra idő +00:36=Lézeres mutató +00:37=Vámpírizmus +00:38=Orvlövész puska +00:39=Repülő csészealj +00:40=Molotov koktél +00:41=Madárka + +01:00=Mindent bele! +01:01=Döntetlen +01:02=%1 nyert! +01:03=Hangerő %1% +01:04=Szünet +01:05=Valóban Kilépsz? (Y/Esc) +01:06=Hirtelen halál! +01:07=%1 maradt +01:08=Töltet +01:09=Szinkronizálás... +01:10=A kör nem ér véget ennek a használatával! +01:11=Ez a fegyver vagy eszköz még nem elérhető! + +; Event messages +; Hog (%1) died +02:00=%1 beadta a kulcsot! +02:00=%1 meglátta a fényt! +02:00=%1 sosem hitte volna... +02:00=%1 búcsúzik! +02:00=%1 jobblétre szenderült! +02:00=%1 találkozott a teremtőjével! +02:00=%1 már nem bírta tovább! +02:00=%1 bevégezte a dolgát! +02:00=%1 meghozta a végső áldozatot! +02:00=%1 Elhagyta porhüvelyét! +02:00=%1 Külföldre ment. Oszlóban van! +02:00=%1 felett eljárt az idő! +02:00=%1 feldobta a talpát! +02:00=%1 nem halt meg hiába! +02:00=%1 nem SÜNdörög többet! +02:00=%1 hátrahagyott egy nőt és egy gyereket +02:00=%1 kilőtte az utolsó rakétát +02:00=%1 eldobta az utolsó gránátot +02:00=%1 megsütötte utolsó tortáját +02:00=%1 megmászta utolsó kötelét +02:00=%1 elküldte utolsó repülőjét +02:00=%1 utoljára húzta meg a ravaszt +02:00=%1 eldobta az utolsó dinnyét +02:00=%1 is holtig tanult. +02:00=%1 elment az örök vadászmezőkre +02:00=%1 nem vette be a gyógyszerét +02:00=%1 elment valami jobbal játszani +02:00=%1 kipurcant +02:00=%1 elbukott +02:00=Szegény %1... +02:00=%1 inkább a wormux-re szavaz +02:00=%1 odatartotta a másik orcáját is +02:00=%1 neve fennmarad örökké +02:00=%1 végre a Valhallába került +02:00=%1 elhagyta az épületet +02:00=%1 követi a dínók példáját +02:00=%1 közelebb hozza a süniket a kihaláshoz +02:00=%1 könnyet csal a szemekbe +02:00=%1 már csak ex-sün +02:00=%1 alulról szagolja az ibolyát +02:00=%1 megSÜNt létezni +02:00=Viszlát, %1 ! +02:00=%1 reménytelen eset +02:00=%1 elérkezett a végső felvonáshoz +02:00=%1 egzisztenciális gondokkal küzd +02:00=%1 már odaát van +02:00=%1 nincs többé +02:00=%1 lejárt a szavatossága +02:00=Nyugodj békében, %1 +02:00=%1 nem bírta a kiképzést +02:00=%1 nem volt macska, hogy kilenc élete legyen +02:00=Van itt orvos? + +; Hog (%1) drowned +02:01=%1 tengeralattjárósdit játszik! +02:01=%1 A Titanic-ot utánozza! +02:01=%1 úszik, mint egy kő! +02:01=%1 Lebeg, mint a tégla! +02:01=%1 a dolgok mélyére jár +02:01=%1 gargalizál kicsit +02:01=%1 placcsant +02:01=%1 otthonhagyta az úszógumit +02:01=%1 vehetett volna úszóleckét +02:01=%1 nem hozta a szörfdeszkát +02:01=%1 vizes takarítást kért +02:01=%1 meglátogatta a vizes blokkot +02:01=%1 nem hozott mentőmellényt +02:01=%1 kacsázik... +02:01=%1 felcsapott haleledelnek +02:01=%1 szerint a víz rosszul lett implementálva +02:01=%1 szomjas lehet +02:01=%1 biztos nem lesz tengeribeteg +02:01=%1 nem hozta a búvárszerkót +02:01=%1 tengeri temetést kap +02:01=%1 mély érzéseket táplál... +02:01=%1 hátúszást gyakorol +02:01=%1 elmerült az élvezetekben +02:01=%1 nem tud vízen járni +02:01=%1 Nemo nyomában +02:01=Vajon hány süni lehet már odalenn? +02:01=%1 egy picit emeli a vízszintet +02:01=%1 nem jelentkezett tengerésznek +02:01=%1 döglött halat imitál +02:01=Legalább nem a vécén húztak le, %1 +02:01=Sonic nem tudott úszni, %1 sem. +02:01=%1 Eccot, a delfint játssza +02:01=%1 meglátogatja Aquaria-t +02:01=%1 meglelte Atlantiszt +02:01=%1 a Bioshock 3 főszerepére vágyik +02:01=A kutyaúszásod még nem tőkéletes, %1 +02:01=%1 hozhatott volna jet ski-t is +02:01=%1 nem szereti a vízisportokat +02:01=%1 szerint a sós víz jó a bőrnek +02:01=%1 csobban egyet +02:01=%1 elment fürödni +02:01=%1 megfulladt +02:01=%1 majdnem jobb, mint Búvár Kund! +02:01=Ilyen mélyre süllyedni, %1 + +; Round starts +02:02=Küzdjetek! +02:02=Fegyverbe! +02:02=Most kezdődik a tánc! +02:02=Ki nevet a végén? +02:02=Indulás! +02:02=Nosza! +02:02=Hajrá! +02:02=Kezdődik... +02:02=Üdvözöl a Hedgewars +02:02=Üdvözöl a pokol! +02:02=Isten hozott a fronton! És az ördög vigyen el... +02:02=Győzzön a jobbik! +02:02=Győzelem vagy halál +02:02=A háború istenei ma mosolyognak +02:02=Hedgewars, a Hedgewars.org által! +02:02=GL HF +02:02=Örülj, hogy nem Tiyuri van ellened... +02:02=Örülj, hogy nem unC0Rr van ellened... +02:02=Örülj, hogy nem Nemo van ellened... +02:02=Örülj, hogy nem Smaxx van ellened... +02:02=Örülj, hogy nem Jessor van ellened... +02:02=A vesztes mosogat! +02:02=Kezdődjön az évezred harca! +02:02=Kezdődjön az évszázad csatája! +02:02=Kezdődjön az évtized küzdelme! +02:02=Kezdődjön az év harca! +02:02=Kezdődjön a hónap csatája! +02:02=Kezdődjön a hét küzdelme! +02:02=Kezdődjön a nap harca! +02:02=Kezdődjön az óra csatája! +02:02=Csak ügyesen! +02:02=Pusztítsd az ellent! +02:02=Sok sikert! +02:02=Jó szórakozást! +02:02=Harcolj jól! +02:02=Küzdj alantasan! +02:02=Küzdj becsülettel! +02:02=Ne add fel! +02:02=Sose add meg magad! +02:02=Kezdődjön a mészárlás! +02:02=Remélem, készen állsz! +02:02=Gyerünk! +02:02=Sünik, előre! +02:02=Szedd őket miszlikbe! + +; Round ends (win; unused atm) +02:03=... + +; Round ends (draw; unused atm) +02:04=... + +; New health crate +02:05=Egy kis segítség! +02:05=Felcser! +02:05=Kötszerek az égből! +02:05=Egy kis gyógyszer... +02:05=Jó egészséget...doboz alakút! +02:05=Hív a doktor +02:05=Friss kötszerek! +02:05=Ettől majd jobban leszel +02:05=Élet lötyi! Izé, másik játék... +02:05=Egészségedre! +02:05=Vedd fel! +02:05=Egy jóleső falat... +02:05=Fájdalomcsillapító +02:05=Megfelelő adagolás: Amennyit csak tudsz! +02:05=Gyorsposta! +02:05=Ellátmány! +02:05=Kígyónak lábsó... + +; New ammo crate +02:06=Még több fegyver! +02:06=Utánpótlás! +02:06=Ha fogytán lennél... +02:06=Vajon mi lehet benne? +02:06=Ellátmány! +02:06=Mit rejt a doboz? +02:06=Korán jött a karácsony a Hedgewars-ban +02:06=Ajándék! +02:06=Alig jutott át a vámon... +02:06=Pusztító játékok az égiektől +02:06=Vigyázat! Robban! +02:06=Felveszed, vagy felrobbantod, a döntés a tied! +02:06=Jóságos ég! +02:06=Mmmmm, lőszer +02:06=Kicsi a doboz, de robban! +02:06=Légiposta! +02:06=Bármi is ez, tuti nem pizza! +02:06=Szerezd meg! +02:06=Fegyverszállítmány érkezik! +02:06=Nehogy az ellen kezébe jusson! +02:06=Szép, csillogó játékok! +02:06=Egy rejtélyes doboz! + +; New utility crate +02:07=Tooltime! +02:07=Ez jól jöhet... +02:07=Cuccok! +02:07=Használd okosan! +02:07=Vigyázat odalent! +02:07=Még több szerszám! +02:07=Nesze, pár cucc! +02:07=Ez jó kell legyen! +02:07=Csak ésszel! +02:07=Ohó, ez nehéz! +02:07=Ez még kellhet... + +; Hog (%1) skips his turn +02:08=%1 unalmas... +02:08=%1 hiába fáradt +02:08=%1 eléggé lusta +02:08=%1 ötlettelen +02:08=%1 feladta +02:08=%1 szégyentelenül kihagyta +02:08=%1 buddhista lehet +02:08=%1 kicsit alulmotivált +02:08=%1 békeszerető +02:08=%1 tart egy kis szüntetet +02:08=%1 pihenget kicsit +02:08=%1 lazul +02:08=%1 nem hisz a képességeiben +02:08=%1 úgy dönt, nem tesz semmit +02:08=%1 hagyja, hogy az ellen magát pusztítsa +02:08=%1 uncsi lenne bulikon +02:08=%1 kihagyja a lehetőséget +02:08=%1 úgy dönt, hogy a legjobb, amit tehet ... semmit. +02:08=%1 egy puhány +02:08=%1, te gyáva nyúl! +02:08=%1 meghúzza magát +02:08=%1 egy gyáva! +02:08=%1 a hirtelen halálra vár +02:08=%1 nem egy harcos típus +02:08=%1 élete értelmén gondolkodik +02:08=%1 sosem volt a legmenőbb +02:08=%1 nem akart belépni a seregbe +02:08=Ne húzd az időt, %1 +02:08=Csalódtam benned, %1 +02:08=Ugyan, tudsz te ennél többet is, %1 +02:08=%1 akarata megtört +02:08=%1 épp mással foglalkozik +02:08=%1 elaludt + +; Hog (%1) hurts himself only +02:09=%1 gyakorolhatna kicsit! +02:09=%1 látszólag utálja magát +02:09=%1 rossz oldalra állt! +02:09=%1 emonak néz ki +02:09=%1 rosszul fogta fegyverét +02:09=%1 egy kicsit szadista +02:09=%1 egy kicsit mazohista +02:09=%1 elég kicsi túlélési ösztönnel bír +02:09=%1 elrontotta +02:09=%1 elbaltázta +02:09=Ez gyenge volt, %1 +02:09=%1 kicsit hanyagul bánik a fegyverekkel +02:09=%1 választhatna másik pályát +02:09=Ez. A. Legrosszabb. Lövés! +02:09=Neeem, %1, az ELLENFELET lődd! +02:09=%1 inkább az ellent lőhetné +02:09=%1 öngyilkosságon töri a fejét +02:09=%1 segíti az ellenfelet +02:09=Ez nem volt okos lépés, %1 +02:09=%1 szerint áldozat nélkül nincs győzelem! +02:09=%1 kicsit zavart +02:09=%1 megvágta magát a nagy hadonászásban +02:09=%1 hajlamos lejáratni magát +02:09=%1 ügyetlenkedik +02:09=%1 megmutatja, mire képes! +02:09=%1 sem lehet mindig tökéletes +02:09=Ne aggódj, %1, senki sem tökéletes! +02:09=%1 szándékosan csinálta! +02:09=én hallgatok, ha te is, %1 +02:09=Ez szégyenletes! +02:09=Senki sem látta, %1 +02:09=%1 átnézhetné a kézi könyvet +02:09=%1 fegyvere rosszul működik + +; Hog shot an home run (using the bat and another hog) +02:10=Hazafutás! +02:10=Tágas égen andalog... +02:10=Egy mínusz! + +; Weapon Categories +03:00=Időzíthető gránát +03:01=Időzíthető gránát +03:02=Ballisztikus rakéta +03:03=Irányított fegyver +03:04=Lőfegyver (több lövés) +03:05=ásó eszköz +03:06=Cselekvés +03:07=Szállító eszköz +03:08=Kis hatósugarú bomba +03:09=Lőfegyver (több lövés) +03:10=BUMM! +03:11=PAFF! +03:12=Harcművészet +03:13=NEM HASZNÁLT +03:14=Szállító eszköz +03:15=Légicsapás +03:16=Légicsapás +03:17=Ásó eszköz +03:18=Eszköz +03:19=Szállító eszköz +03:20=Cselekvés +03:21=Ballisztikus rakéta +03:22=Az én nevem Indiana! +03:23=(igazán) Harcművészet +03:24=The cake is NOT a lie! +03:25=Álruha +03:26=Ízletes gránát +03:27=Pokoli gránát +03:28=Ballisztikus rakéta +03:29=Ballisztikus rakéta +03:30=Légicsapás +03:31=Távvezérelt bomba +03:32=Ideiglenes hatás +03:33=Ideiglenes hatás +03:34=Ideiglenes hatás +03:35=Ideiglenes hatás +03:36=Ideiglenes hatás +03:37=Ideiglenes hatás +03:38=Lőfegyver (több lövés) +03:39=Szállító eszköz +03:40=Felperzselő gránát +03:41=A csőrösök nagy hívője + +; Weapon Descriptions (use | as line breaks) +04:00=Az ellenfél megdobása egy szimpla gránáttal.|Amint lejár az időzítő, felrobban.|1-5: időzítő beállítása|Támadás: Tartsd nyomva, és nő a távolság +04:01=Az ellenfél megtámadása egy repeszgránáttal.|Kisebb darabokra esik, ha lejár az időzítő.|1-5: időzítő beállítása|Támadás: Tartsd nyomva, és nő a távolság +04:02=Az ellenfél meglövése egy ballisztikus rakétával|aminek pályáját a szél befolyásolja|Támadás: Tartsd nyomva, és nő a távolság +04:03=Egy robbanó méhecske eleresztése, ami|elindul a célpont felé. Ne lőjj teljes erőből,|hogy a célzás pontosabb legyen.|Kurzor: Célpont kiválasztása|Támadás: Tartsd nyomva, és nő a távolság +04:04=Az ellenfél meglövése egy kétlövetű puskával.|A szórásnak hála nem kell pontosnak lenned,|hogy kárt okozz.|Támadás: Lövés (többszöri alkalommal) +04:05=Menj a föld alá! Használd a légkalapácsot, hogy|lyukat fúrj a talajba, és elérj új zónákat.|Támadás: Fúrás indítása vagy leállítása +04:06=Unod? Nem tudsz támadni? Halmozod a lőszert?|Semmi gond! Hagyd ki ezt a kört, te gyáva!|Támadás: Kör kihagyása harc nélkül +04:07=Küzdj le nagy távolságokat a kötél használatával.|A lendületed segítségével szállj neki más sünöknek|vagy ejts rájuk gránátot vagy más finomságot.|Támadás: Kötél kilövése vagy visszahúzása|Hosszú ugrás: Gránát meg hasonlók leejtése +04:08=Tartsd távol ellenfeleid aknák lerakásával szűk|átjárókba vagy éppen a lábuk elé. A biztonságos|távot vedd fel, nehogy te magad aktiváld!|Támadás: Akna lerakása a lábad elé +04:09=Nem vagy az a biztos kezű? Használd a |pisztolyod akár négy lövés erejéig is.|Támadás: Lövés (többszöri alkalommal) +04:10=A nyers erőszak mindig megoldás. Rakd le ezt a klasszikus|robbanószert az ellenfeleidhez, majd vonulj vissza.|Támadás: Dinamit leejtése a lábad elé +04:11=Szabadulj meg a többi süntől egy jópofa|pályán túlra vagy vízbe repítéssel. Netán|egy akna átpöckölése a másikhoz?|Támadás: Mindent megütsz magad előtt +04:12=Kerülj hozzá igazán közel, hogy alkalmazd|ezt a majdnem halálos harcművész technikát.|Támadás: A felütés végrehajtása +04:13=NEM HASZNÁLT +04:14=Tériszonyod van? Használj ejtőrenyőt. Magától| kinyílik, ha netán túl nagyot esnél, és így|elkerülöd a sérüléseket.|Támadás: Ejtőernyő kinyitása|Hosszú ugrás: Gránátok és egyebek leejtése +04:15=Repülőgép hívása, hogy az ellenfeleid|megszórd bombákkal.|Jobbra/Balra: Irány megadása|Kurzor: Célterület kiválasztása +04:16=Repülőgép hívása, hogy aknákat ejts|a területen levőkre.|Jobbra/Balra: Irány megadása|Kurzor: Célterület kiválasztása +04:17=Fedezék kellene? Használd a fúrópajzsot, hogy|pofás alagutat vájj a talajba, ami megvéd.|Támadás: Fúrás megkezdése vagy leállítása +04:18=További védelem kellene, vagy lehetetlen terepen|is átkelnél? Helyezd el a gerendákat, ahogy jólesik.|Jobbra/Balra: Gerendák forgatása|Kurzor: Gerenda érvényes helyre való lerakása +04:19=A jókor használt teleportálás olykor|többet ér, mint bármilyen más fegyver,|hiszen másodpercek alatt kimenekíti|a sünidet, ha már szorul a hurok.|Kurzor: Célterület kiválasztása +04:20=Lehetővé teszi, hogy az aktuális köröd egy|másik sünnel játszd le.|Támadás: Sünök cseréjének bekapcsolása +04:21=Egy gránátszerű lövedék kilövése, ami majdan|becsapódáskor további repeszeket enged szét.|Támadás: Kilövés maximális erővel +04:22=Nem csak Indiana Jonesnak! Az ostor sokszor|bizonyította már hatékonyságát. Különösen,|ha lelöknél valakit a sziklafalról.|Támadás: Mindent megcsapsz magad előtt +04:23=Ha már nem maradt veszteni valód, akkor ez jól|jöhet. Áldozd fel a sünöd, annak kilövésével az|általad meghatározott irányba, ami megsebez|mindent az útjában, végül felrobban.|Támadás: A végzetes támadás elindítása +04:24=Boldog szülinapot! Engedd el útjára a tortát,|az odasétál hozzájuk, kirobbanó siker lesz!|A torta bármilyen terepen átgyalogol, de így|lehet, hogy idő előtt felrobban.|Támadás: A torta indítása vagy robbantása +04:25=Használd ezt az álruhát, hogy ellenfeleid|feléd ugorjanak (valami gödörfélébe)!|Támadás: Többi sün elcsábítása álruhában +04:26=Egy fincsi görögdinnye eldobása az ellenfeleknek.|Ha lejár az időzítő, további robbanó darabra esik.|1-5: Időzítő beállítása|Támadás: Tartsd nyomva, és nő a távolság +04:27=Engedd rá a pokol tüzét az ellenfeleidre ezzel a|ördögi robbanószerkezettel! Tartsd magad távol|a robbanástól, mert a kis tüzek tovább éghetnek!|Támadás: Tartsd nyomva, és nő a távolság +04:28=A kilövés után nemsokkal a rakéta elkezd|utat vájni a talajba, és felrobban, ha lejár| az időzítője vagy újra felszínre ér.|Támadás: Tartsd nyomva, és nő a távolság +04:29=Nem gyerek kezébe való! A labdavető megannyi|apró, színes labdát lő ki, robbanó eleggyel töltve.|Támadás: Tüzelés teljes erőből|Fel/Le: Célzás folytatása +04:30=Repülőgép hívása egy kis napalmcsapáshoz.|Megfelelő célzással képes hatalmas területet|eltörölni, az ottlévő sünikkel együtt.|Jobbra/Balra: Támadás irányának megadása|Kurzor: Célterület kiválasztása +04:31=Az RC repülő az ideális fegyver csomagok begyűjtésére vagy|messzi sünök kilövésére. Vezesd neki az ellenségnek, vagy|ejts le pár bombát előbb.|Támadás: Repülő indítása vagy bombák ledobása|Hosszú ugrás: A valkűrök csatába küldése|Fel/Le: A repülő kormányzása +04:32=Az alacsony gravitáció jobb, mint a diétázás! Ugorj|magasabbra vagy messzebbre, vagy repítsd az ellent|még messzebbre.|Támadás: Aktiválás +04:33=Néha szükség van egy kis többleterőre, hogy a|sebzés igazán szép legyen.|Támadás: Aktiválás +04:34=Nem érhetsz el!|Támadás: Aktiválás +04:35=Néha az idő túl gyorsan telik. Szerezz pár extra|másodperced a támadás véghezviteléhez.|Támadás: Aktiválás +04:36=Hát, megesik, hogy rosszul célzol. A biztonság|kedvéért vess be egy kis modern technológiát!|Támadás: Aktiválás +04:37=Ne félj a napfénytől! Csak egyetlen körig tart,|de lehetővé teszi a más sünök által vesztett|életerő felszívását.|Támadás: Aktiválás +04:38=A mesterlövész puska lehet a leghalálosabb fegyvered|az összes közül, ugyanakkor nem éri meg kis távra|használni. Az okozott sebzés mértéke a távolsággal|egyenes arányban nő.|Támadás: Lövés (kétszer) +04:39=Repülj más részekre a csészealj segítségével.|Ez a nehezen kezelhető jármű képes bárhova|eljuttatni téged a csatamezőn.|Támadás: Aktiválás|Fel/Jobbra/Balra: Tolósugarak alkalmazása|Hosszú ugrás: Gránát meg egyebek leejtése +04:40=Csinálj egy szép tűzszőnyeget ezzel a|(hamarosan) égő folyadékkal!|Támadás: Tartsd nyomva, és nő a távolság +04:41=A természet csodája tán még a csészealjon|is túltesz. A madárka cipel téged, illetve|tojásokat ejt az ellenfelekre!|Támadás: Aktiváld vagy ejts tojásokat|Fel/Jobbra/Balra: Abba az irányba csapkodjon + +; Game goal strings +05:00=Játék módok +05:01=Az alábbi szabályok érvényesek: +05:02=Erődök: Védd meg a sajátod, pusztítsd el az ellenfeledet! +05:03=Alacsony gravitáció: Vigyázz, hova lépsz! +05:04=Sérthetetlenség: A sünök (majdnem) sérthetetlenek +05:05=Vámpírizmus: A sünök visszagyógyulnak a sebzések arányában +05:06=Karma: A sünök is sérülnek az általuk okozott sebek által +05:07=Óvd Őfelségét: Ne hagyd a királyt meghalni!|Király elhelyezése: Válassz egy védett helyet, ahova lerakod őfelségét +05:08=Sünök Lerakása: A játék kezdete előtt te választod ki a kezdőhelyet +05:09=Tüzérség: A sünök nem mozoghatnak +05:10=Lebonthatatlan talaj:A legtöbb fegyver nem tudja szétrobbantani a földet +05:11=Közös lőszer: Az egyszínű csapatoknak közös a lőszerkészlete +05:12=Akna időzítés: Az aknák %1 másodperc után robbanak +05:13=Akna időzítés: Az aknák azonnal berobbannak +05:14=Akna időzítés: Az aknák 0 - 3 másodperc után robbannak +05:15=Sebzés módosító: Minden fegyver %1%-al sebez az eredetihez képest diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/pl.txt --- a/share/hedgewars/Data/Locale/pl.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/pl.txt Wed Oct 27 14:02:20 2010 +0200 @@ -18,7 +18,7 @@ 00:15=Nalot 00:16=Zrzut min 00:17=Palnik -00:18=Budowanie +00:18=Belka 00:19=Teleportacja 00:20=Zmień jeża 00:21=Moździerz @@ -47,6 +47,8 @@ 00:44=Cuchnący ser 00:45=Sinusoidalna giwera 00:46=Miotacz ognia +00:47=Mina samoprzylepna +00:48=Młotek 01:00=Walczmy! 01:01=Remis @@ -60,6 +62,8 @@ 01:09=Synchronizuję... 01:10=Użycie tej broni nie zakończy tury. 01:11=Ta broń nie jest jeszcze dostępna. +01:12=To już ostatnia runda przed Nagłą Śmiercią! +01:13=Zostało %1 rund do Nagłej Śmierci! ; Event messages ; Hog (%1) died @@ -67,10 +71,10 @@ 02:00=%1 ujrzał światło! 02:00=%1 nie zobaczy już niczego więcej! 02:00=%1 macha na pożegnanie! -02:00=%1 odszedł to piękniejszego świata! +02:00=%1 odszedł do piękniejszego świata! 02:00=%1 spotkał stwórcę! 02:00=%1 już dłużej nie wytrzyma! -02:00=%1 skończył służbę! +02:00=%1 zakończył służbę! 02:00=%1 poświęcił się dla ogółu! 02:00=%1 zrezygnował z trudu życia! 02:00=Tak jak liść opuszcza drzewo, tak nas opuszcza %1! @@ -79,18 +83,18 @@ 02:00=%1 miał tętniaka! 02:00=%1 opuścił żonę i dziecko! 02:00=%1 już nie strzeli z bazooki w tym życiu... -02:00=%1 już nie porzuca granatem w tym życiu... -02:00=%1 nie będzie piekł już ciast... +02:00=%1 już nie rzuci granatem w tym życiu... +02:00=%1 nie upiecze więcej ciast... 02:00=%1 więcej nie pobawi się w Tarzana... 02:00=%1 nie będzie więcej wzywał nalotów... -02:00=%1 po raz ostatni wystrzelił ze strzelby... +02:00=%1 już nie będzie strzelał z dubeltówki.. 02:00=%1 już nie będzie rzucał w innych owocami... 02:00=%1 nie postrzela już ze strzelby... -02:00=%1 przyjął jeden strzał za dużo. +02:00=%1 przyjął o jeden strzał za dużo. 02:00=A mógł zebrać tą skrzynkę z życiem... 02:00=%1 poszedł pograć w lepszą grę... 02:00=%1 przytupnął nóżką i umarł -02:00=%1 ponosi całkowitą klęskę. +02:00=%1 poniósł całkowitą klęskę. 02:00=Biedny %1 ... 02:00=%1 woli grać w Wormux 02:00=%1 blokuje strzały własną twarzą @@ -98,11 +102,11 @@ 02:00=%1 opuścił budynek 02:00=%1 podąża drogą dinozaurów 02:00=%1 przybliża jeże o krok do wyginięcia -02:00=%1 powoduje, że chce mi się płakać +02:00=%1 sprawia, że chce mi się płakać 02:00=%1 to ex-jeż 02:00=%1 wącha kwiatki... od spodu 02:00=%1 zakończył egzystencję -02:00=Powiedzmy "Pa Pa" dla %1 +02:00=Musimy Cię pożegnać, %1 02:00=Nie ma nadziei dla %1 02:00=%1 spuszcza kurtynę 02:00=%1 gryzie piach @@ -112,13 +116,24 @@ 02:00=%1 przestał istnieć 02:00=Nie chcąc dłużej żyć, %1 umiera w pokoju. 02:00=%1 dołącza do chórków anielskich. -02:00=Żegnaj %1, ledwo co Cię znaliśmy! +02:00=Żegnaj %1, dopiero Cię poznaliśmy! 02:00=%1 ma niską tolerancję na bycie postrzelonym. 02:00=%1 mógł użyć dodatkowego życia. 02:00=Czy jest na sali jakiś doktor? 02:00=To z pewnością był toczeń! -02:00=Ale Urwał!!! 02:00=Ale to było dobre!!! +02:00=%1 przeszedł na emeryturę +02:00=%1 poszedł do innej piaskownicy +02:00=%1 się tak nie bawi +02:00=%1 wykitował +02:00=%1 nie kot, ma tylko jedno życie +02:00=%1, a nie mówiłem, żeby zbierać apteczki? +02:00=%1 poległ w boju +02:00=%1 zginął na polu bitwy +02:00=%1 wydał ostatnie tchnienie +02:00=%1 przeszedł do historii +02:00=%1 ewakuował się z tego świata + ; Hog (%1) drowned 02:01=%1 robi za łódź podwodną! 02:01=%1 udaje Titanica! @@ -130,12 +145,12 @@ 02:01=%1 zapomniał o rękawkach 02:01=%1 powinien brać lekcje pływania 02:01=%1 zostawił w domu deskę do pływania. -02:01=%1 się umył! -02:01=%1 jest już przemoczony +02:01=%1 doszedł do wniosku, że czas na kąpiel! +02:01=%1 przemókł do suchej nitki! 02:01=%1 zapomniał o kamizelce ratunkowej -02:01=%1 idzie się popluskać +02:01=%1 poszedł się popluskać 02:01=%1 śpi z rybami -02:01=%1 uważa, że fizyka płynów w tej grze ssie +02:01=%1 uważa, że fizyka płynów w tej grze jest do bani! 02:01=%1 wygląda na spragnionego 02:01=Morze Ciebie wzywa, %1 02:01=%1 zaginął na morzu @@ -145,17 +160,17 @@ 02:01=%1 ćwiczy pływanie na plecach 02:01=%1 szuka Titanica 02:01=%1 to z pewnością nie jest Jezus. -02:01=%1 pyta się "Gdzie jest Nemo?" +02:01=%1 postanowił odnaleźć Nemo! 02:01=%1 wyczuwa przeciek -02:01=Nie uwierzysz ile ich jest tam na dole! +02:01=Nie uwierzysz ile ich już utonęło! 02:01=%1 podnosi poziom oceanu 02:01=%1 nie zapisał się do marynarki. 02:01=%1 robi za śniętą rybę... 02:01=Przynajmmniej nie utonąłeś w muszli klozetowej, %1 -02:01=Sonic nie umiał pływać więc ty także, %1 +02:01=%1 nie pobił Sonica w pływaniu 02:01=%1 będzie grał w "Uwolnić Orkę" 02:01=%1 szuka rybek do akwarium! -02:01=%1 znalazł Atlantydę! +02:01=%1 odnalazł Atlantydę! 02:01=%1 chce być główną postacią w Bioshock 3 02:01=Trzeba było się uczyć pływać... 02:01=%1 powinien ze sobą zabrać narty wodne @@ -164,12 +179,24 @@ 02:01=%1 nie ma tratwy 02:01=%1 uważa, że słona woda dobrze robi na cerę 02:01=%1 moczy rany w słonej wodzie -02:01=%1 znalazł się za burtą +02:01=%1 wypadł za burtę 02:01=%1 bierze kąpiel 02:01=%1 jest bardzo, bardzo mokry -02:01=%1 przemoczy swoje igły +02:01=%1 przemoczył sobie igły 02:01=%1 był bardzo spragniony 02:01=%1 weźmie udział w "Szczękach"... jako przynęta! +02:01=%1 lubi nurkować +02:01=%1 skoczył na główkę +02:01=%1 skoczył na bombę +02:01=%1 nie zdążył zadzwonić po WOPR +02:01=%1 ma za mało tlenu +02:01=%1 się pochlapał +02:01=%1 przemoczył sobie wdzianko +02:01=%1 utonął +02:01=%1 ma za małą wyporność +02:01=%1 chciał sobie pogadać z rybkami +02:01=%1, uważaj na rekiny! +02:01=%1 pływa po Warszawsku. Tyłkiem po piasku! ; Round starts 02:02=Walczmy! 02:02=Cel! Pal! @@ -234,21 +261,29 @@ 02:05=Dobre życie... w formie skrzyneczki! 02:05=Ktoś dzwonił po doktora? 02:05=Świeże bandaże! -02:05=To pomoże poczuć Tobie się lepiej -02:05=Hi-Potion! Eeee... To chyba nie ta nazwa. -02:05=Zbierz-mnie! +02:05=To pomoże poczuć się Tobie lepiej +02:05=Pomniejszy Eliksir Żywotności! Eeee... To chyba nie ta nazwa. +02:05=Zbierz mnie! 02:05=Zbierz to! 02:05=Zdrowa przekąska! 02:05=Środek przeciwbólowy 02:05=Dawkowanie: ile tylko znajdziesz! 02:05=Ważna przesyłka -02:05=Zapasy! +02:05=Najwięcej witaminy mają paczki od rodziny! 02:05=Czy ktoś wzywał doktor Zosię? 02:05=Oby to nie był Pavulon! 02:05=Codziena dawka Panadolu! 02:05=Chyba Goździkowa maczała w tym palce... 02:05=Gdzie jest Doktor Queen? 02:05=U mnie to jak u lekarza! +02:05=Zawartość refundowana przez NFZ! +02:05=Dr. House przysyła leki +02:05=Darmowe leczenie! +02:05=Życie w pigułce +02:05=Rozdajemy darmowe HP! +02:05=W Hedgewars opieka zdrowotna naprawdę wymiata! +02:05=Na zdrowie! +02:05=Szczepionka! ; New ammo crate 02:06=Więcej broni! 02:06=Posiłki! @@ -273,6 +308,13 @@ 02:06=Tajemnicza skrzynia! 02:06=KABUM! KABUM! KABUM! 02:06=Skrzynka pełna niespodzianek +02:06=Cokolwiek tam jest, na pewno się przyda +02:06=Darmowa broń bez zezwolenia! +02:06=Gadżety! +02:06=Odjazdowy sprzęt! +02:06=Wyślij SMS na numer 7400 do wygrania zawartość zasobnika! +02:06=Czy to ptak...? Czy to samolot...? +02:06=Spadające gwiazdy nie spełniają życzeń, ale zasobniki jak najbardziej ; New utility crate 02:07=Czas na narzędzia! 02:07=To może się przydać... @@ -287,9 +329,13 @@ 02:07=Możesz tego potrzebować. 02:07=Keczup prosto od MacGyvera! 02:07=Zestaw Małego Majsterkowicza +02:07=Darmowa paczka narzędzi! +02:07=Zasobniki prosto z Ameryki! +02:07=Zapasy materiałów eksploatacyjnych! +02:07=Dorwij przeciwnika szybciej z nowymi narzędziami ; Hog (%1) skips his turn 02:08=%1 jest taki nudny... -02:08=%1 nie powinienem być rozpraszany +02:08=%1 próbuje się skupić 02:08=%1 jest leniwy 02:08=%1 jest bezmyślny 02:08=%1 poddał się. @@ -302,11 +348,11 @@ 02:08=%1 odpoczywa 02:08=%1 dał sobie na wstrzymanie 02:08=%1 nie wierzy we własne możliwości. -02:08=%1 decyduje by nie robić niczego. +02:08=%1 decyduje się nic nie robić 02:08=%1 pozwala przeciwnikowi zniszczyć się samemu. 02:08=%1 byłby marny w imprezowaniu 02:08=%1 ukrywa się -02:08=%1 postanowił nie skorzystać z okazji +02:08=%1 skorzystał z okazji 02:08=%1 uważa, że najlepszą rzeczą jaką może zrobić to... nic 02:08=%1 jest mięczakiem 02:08=Niuch, Niuch, %1 śmierdzi tchórzem @@ -328,6 +374,15 @@ 02:08=NIE SPAĆ!!! ZWIEDZAĆ!!! 02:08=%1 stracił kontakt z bazą... 02:08=Co za leń... +02:08=%1, obudź się! +02:08=Czy się stoi, czy się leży, dobra pensja się należy! +02:08=%1, nie za to ci płacą! +02:08=%1, bierz się do roboty! +02:08=%1 zachwyca się przyrodą +02:08=%1 nie docenia rywala +02:08=%1 ma wszystko w nosie +02:08=%1 nie chce połamać sobie igieł +02:08=%1 ma stracha ; Hog (%1) hurts himself only 02:09=%1 powinien potrenować celowanie! 02:09=%1 najwidoczniej nienawidzi samego siebie.. @@ -347,7 +402,7 @@ 02:09=%1 powinien celować w przeciwnika 02:09=%1 zbliża się małymi kroczkami do samobójstwa... 02:09=%1 pomaga wrogowi -02:09=To było głupie %1 +02:09=To było głupie, %1 02:09=%1 żyje według mantry : "nie ryzykujesz, nie zyskujesz" 02:09=%1 jest rozkojarzony 02:09=%1 przez swoje rozkojarzenie uderza samego siebie. @@ -358,14 +413,24 @@ 02:09=Nie można się spodziewać by %1 był cały czas perfekcyjny. 02:09=Nie martw się %1, Dikt nie jest noskonały... 02:09=%1 zrobił to celowo. -02:09=Jeśli ty o tym nie powiesz, ja też dotrzymam tajemnicy %1 +;02:09=Jeśli ty o tym nie powiesz, ja też dotrzymam tajemnicy %1 02:09=ŻENUA!!! -02:09=Jestem pewny, że nikt nie widział %1 +02:09=Na pewno nikt tego nie zobaczył, %1 02:09=%1 powinien przejrzeć podręcznik walki na froncie... -02:09=Wiesz co %1? Ktoś ci popsuł giwerę! +02:09=%1, ktoś popsuł ci giwerę! 02:09=Nie ma takiego strzelania!!! 02:09=%1 miał ciężki weekend. 02:09=KHY! KHY! KHY... +02:09=Ale Urwał!!! +02:09=%1, ale z ciebie frajer! +02:09=%1 próbował zjeść arbuza +02:09=%1 zapomniał rzucić granatem +02:09=%1 trzymał karabin za spust +02:09=%1 walczy o nagrodę Darwina +02:09=%1 postanowił się rozerwać... na strzępy +02:09=%1 ma już dość tego świata +02:09=%1 dostał łapówkę +02:09=%1 przywalił, jak łysy czupryną o kant kuli ; Hog shot an home run (using the bat and another hog) 02:10=Home Run! 02:10=To ptak? To samolot? @@ -373,9 +438,12 @@ 02:10=Małysz idzie w odstawkę! 02:10=Iiii Leciiii... 02:10=Bzziuuuuu! +02:10=Niezły rzut! +02:10=Chyba padnie rekord Guinessa w rzucie jeżem! +02:10=To było odlotowe! ; Weapon Categories -03:00=Granat czasowy -03:01=Granat czasowy +03:00=Granat z zapalnikiem +03:01=Granat z zapalnikiem 03:02=Pocisk 03:03=Bzyku, bzyk! 03:04=Strzelba (kilka strzałów) @@ -422,8 +490,8 @@ 03:44=Stary i baaaaardzo śmierdzący ; Weapon Descriptions (use | as line breaks) -04:00=Atakuj przeciwników zwykłym granatem.|Wybuchnie kiedy czas detonatora wyniesie zero.|1-5: Ustawia czas granatu|Atak: Przytrzymaj by rzucić z większą siłą -04:01=Atakuj przeciwników granatem odłamkowym.|Rozpadnie się on na kilka odłamków gdy jego czas|wyniesie zero.|1-5: Ustawia czas granatu|Atak: Przytrzymaj by rzucić z większą siłą +04:00=Atakuj przeciwników zwykłym granatem.|Wybuchnie kiedy zapalnik skończy odliczanie.|1-5: Ustawia zapalnik|Atak: Przytrzymaj by rzucić z większą siłą +04:01=Atakuj przeciwników granatem odłamkowym.|Rozpadnie się on na kilka odłamków gdy zapalnik|skończy odliczanie.|1-5: Ustawia zapalnik|Atak: Przytrzymaj by rzucić z większą siłą 04:02=Atakuj przeciwników pociskiem balistycznym,|który jest podatny na wiatr.|Atak: Przytrzymaj by strzelić z większą siłą 04:03=Wypuść zdenerwowaną pszczołe, która "użądli"|zaznaczony cel. By zwiększyć precyzję nie|strzelaj pełną mocą|Kursor: Wybierz cel|Atak: Przytrzymaj by strzelić z większą siłą 04:04=Atakuj przeciwników strzelbą z dwoma strzałami.|Działa obszarowo, więc nie musisz dokładnie|celować by zranić przeciwników.|Atak: Strzel (kilka razy) @@ -466,7 +534,7 @@ 04:41=Natura może być na równi z technologią!|Ptaszek uniesie Ciebie ponad ziemię oraz|zrzuci jajka w przeciwników|Atak: Atywacja ptaka i zrzucanie jajek|Góra/Lewo/Prawo: Leć w wybranym kierunku 04:42=HUGE SUCCESS| | |(but missing texts!) 04:43=(missing text) -04:44=To nie jest zwykły ser. To broń biologiczna!|Nie spowoduje dużych obrażeń kiedy|licznik dojdzie do zera, ale z pewnością|zatruje każdego nieszczęśnika|który będzie w pobliżu|1-5: Ustawia czas granatu|Atak: Przytrzymaj by rzucić z większą siłą +04:44=To nie jest zwykły ser. To broń biologiczna!|Wybuch z pewnością nie będzie potężny, ale gdy|licznik dojdzie do zera, chmura gazu zatruje|każdego nieszczęśnika który będzie w pobliżu|1-5: Ustawia czas granatu|Atak: Przytrzymaj by rzucić z większą siłą ; Game goal strings 05:00=Ustawienia gry diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/pt_BR.txt --- a/share/hedgewars/Data/Locale/pt_BR.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/pt_BR.txt Wed Oct 27 14:02:20 2010 +0200 @@ -42,10 +42,13 @@ 00:39=Disco Voador 00:40=Coquetel Molotov 00:41=Pássaro -00:42=Gerador de Portal +00:42=Gerador de Portais 00:43=Ataque com Piano -00:44=Granada de Gás +00:44=Queijo Fedorento 00:45=Arma Senóide +00:46=Lança Chamas +00:47=Mina aderente +00:48=Martelo 01:00=Hora de lutar! 01:01=Partida empatou @@ -80,7 +83,9 @@ 02:00=%1 vai comer o pão que o diabo amassou! 02:00=%1 já era! 02:00=%1 devia ter feito seguro de vida! -02:00=%1 foi embora para Passargada +02:00=%1 foi embora para Passárgada +02:00=%1 foi comprar cigarros +02:00=%1 empacotou ; Hog (%1) drowned 02:01=%1 bebeu água até não poder mais @@ -89,23 +94,39 @@ 02:01=%1 afunda como uma pedra! 02:01=%1 não sabe nadar 02:01=%1 diz blup blup blup -02:01=%1 foi pescar e não voltou mais +02:01=%1 foi pescar e não voltou 02:01=%1 está conversando com os peixes 02:01=%1 afundou o barco -02:01=%1 foi procurar Atlântida 02:01=%1 está procurando Nemo 02:01=%1 tá se achando Bob Esponja +02:01=%1 foi procurar Atlântida +02:01=%1 não vai mais se queimar +02:01=%1 foi tomar um belo banho +02:01=%1 esqueceu o barco +02:01=%1 não sabia andar sobre a água +02:01=%1 esqueceu o snorkel +02:01=%1 esqueceu a bóia +02:01=%1 não viu o tsunami +02:01=%1 não prendeu a respiração por tempo suficiente +02:01=%1 tem TOC de limpeza ; Match starts 02:02=Vamos lutar! 02:02=Armado e preparado! -02:02=3..2..1.Fight! +02:02=3..2..1...! 02:02=Cúpula do Trovão!Cúpula do Trovão!Cúpula do Trovão! 02:02=Abrem-se as curtinas e começa o espetáculo 02:02=A bola está em jogo! 02:02=Bobeou....dançou! 02:02=Só os melhores sobrevivem! 02:02=A Batalha do século! +02:02=Que o melhor vença +02:02=Hora de lutar +02:02=Independência ou morte! +02:02=Veni, vidi, vici +02:02=Começa a partida +02:02=Vamos a luta companheiros +02:02=Pela Pátria! ; Round ends (win; unused atm) 02:03=... @@ -113,11 +134,6 @@ ; Round ends (draw; unused atm) 02:04=... -; Hog shot an home run (using the bat and another hog) -02:10=Humilhooooouuu! -02:10=É uma passáro, É um avião, ... -02:10=Esse aí está fora! - ; New health crate 02:05=Socorro a caminho! 02:05=Para-médicos! @@ -125,7 +141,10 @@ 02:05=Mais um suspiro! 02:05=Chamando doutor Hans Chucrutes 02:05=Colírio para os olhos! -02:05=Sedex 10 +02:05=O Motoboy da farmácia chegou! +02:05=Curativos! +02:05=Energia extra! +02:05=Energéticos! ; New ammo crate 02:06=Mais armas! @@ -139,6 +158,9 @@ 02:06=Mmmmm Armas 02:06=Ou dá ou desce! 02:06=Brinquedinho novo.... +02:06=Suprimentos +02:06=O que faltava para você vencer! +02:06=Qual será a surpresa? ; New utility crate 02:07=Hora das compras @@ -150,6 +172,7 @@ 02:07=Cuidado aí embaixo 02:07=A esperança veio voando! 02:07=A cegonha chegou +02:07=Não esqueça o seu cinto de utilidades ; Hog (%1) skips his turn 02:08=%1 está entediado @@ -157,9 +180,20 @@ 02:08=%1 não tem criatividade 02:08=%1 perdeu o ônibus 02:08=%1 desencanou -02:08=%1 preferiu ficar na rede +02:08=%1 preferiu ficar navegando 02:08=%1 é pacífico 02:08=%1 dormiu no ponto +02:08=%1 está se balançando na rede +02:08=%1 prefere só ficar olhando +02:08=%1 desaponta a todos +02:08=%1 ficou filosofando +02:08=%1 amarelou +02:08=%1 tá de boa +02:08=%1 pegou no sono +02:08=%1 cochilou +02:08=%1 prefere Gandhi a Mandela +02:08=%1 foi ler um livro +02:08=%1 está procurando algo melhor para fazer ; Hog (%1) hurts himself only 02:09=%1 se machucou @@ -170,7 +204,20 @@ 02:09=%1 não tem amor próprio 02:09=%1 está para lá de Bagdá 02:09=%1 arrancou a tampa do dedão +02:09=%1 é um masoquista +02:09=%1 estragou tudo +02:09=%1 não precisa de inimigos +02:09=%1 precisa consultar o oculista +02:09=%1 não sabe para quem está jogando +02:09=%1 é um vira casaca +02:09=%1 mudou de equipe +; Hog shot an home run (using the bat and another hog) +02:10=Humilhooooouuu! +02:10=É uma passáro, É um avião, ... +02:10=Esse aí está fora! +02:10=Home Run! +02:10=Ouriço perdido! ; Hog (%1) has to leave (team is gone) 02:11=%1 foi nanar @@ -222,63 +269,69 @@ 03:39=Utilidade de Transporte 03:40=Granada Inceneradora 03:41=Grande fan de Squawks -03:42=Fazendo anotações aqui.... -; the misspelled "Beethoven" is intentional (-> to beat) -03:43=Executando a sonata mortal de Beethoven +03:42=Última tecnologia +03:43=Musical +03:44=Velho e fedorento +03:45=Trigonometria pura +03:46=Incendiário +03:47=Bomba de proximidade +03:48=Não desgrude ; Weapon Descriptions (use | as line breaks) 04:00=Ataque seus inimigos usando uma granada simples|Ela explodirá assim que o tempo passar|1-5: Escolha o tempo da granada|Ataque: Quanto mais tempo, mais forte o lançamento. -04:01=Ataque seus inimigos usando uma bomba de estilhaços|Ela se dividirá em bombas menores assim que o tempo passar|1-5: Escolha o tempo da granada|Ataque: Quanto mais tempo, mais forte o lançamento. +04:01=Ataque seus inimigos usando uma bomba de estilhaço|Ela se dividirá em bombas menores quando explodir|1-5: Escolha o tempo da granada|Ataque: Quanto mais tempo, mais forte o lançamento. 04:02=Ataque seus inimigos usando um projétil balístico|que pode ser influenciado pelo vento.|Ataque: Quanto mais tempo, mais forte o lançamento. -04:03=Lance uma abelha explosiva que irá se voar até o alvo selecionado.|Atire com a força adequeda para que ela tenha chance de acertar.|Cursor: Escolha um alvo|Ataque: Quanto mais tempo, mais forte o lançamento. -04:04=Ataque seu inimigo usando uma escopeta de dois tiros.|Uma vez que ela se espalha, você não tem que acertar em cheio|Ataque: Atira (múltiplas vezes) +04:03=Lance uma abelha explosiva que irá se voar até o|alvo selecionado. Atire com a força adequeda|para que ela tenha chance de acertar.|Cursor: Escolha um alvo|Ataque: Quanto mais tempo, mais forte o lançamento. +04:04=Ataque seu inimigo usando uma escopeta de dois|tiros. Como os tiros se espalham você nao tem|que acertar em cheio|Ataque: Atira (múltiplas vezes) -04:05=Mova sob o solo! Use a escavadeira para cavar|um burado no solo e alcançar outras áreas.|Ataque: Inicia e para a escavação -04:06=Entediado? Não tem como atacar? Quer poupar o arsenal?|Sem problema! Apenas passe o turno covarde!|Ataque: Passa o turno sem lutar +04:05=Mova sob o solo! Use a escavadeira para cavar|um buraco no solo e alcançar outras áreas.|Ataque: Inicia e para a escavação +04:06=Entediado? Não tem como atacar? Quer poupar o arsenal?|Sem problema! Apenas passe o turno, covarde!|Ataque: Passa o turno sem lutar 04:07=Atravesse grandes distancias usando a corda.|Use seu momento para deslizar outros ouriços|ou jogue granadas ou outros armas neles.|Ataque: Atira ou solta a corda|Salto longo: Joga granadas ou outras armas. -04:08=Mantenha seus inimigos longes usando minas|em passagens estreitas ou sob os pés deles.|Corra antes que você mesmo detone ela!|Ataque: Deixa a mina próxima aos seus pés +04:08=Mantenha seus inimigos longes usando minas|em passagens estreitas ou sob os pés deles.|Corra antes que você mesmo a detone!|Ataque: Deixa a mina próxima aos seus pés 04:09=Não tem certeza de sua mira? Use a Desert|Eagle para atirar até 4 vezes.|Ataque: Dispara (múltiplas vezes) - 04:10=Força bruta é sempre uma opção. Deixe este clássico|explosivo próximo a seus inimigos e se proteja.|Ataque: Deixa a dinamite próxima aos seus pés 04:11=Se livre dos ouriços inimigos mandando eles para|longe das bordas do mapa ou na água. Ou então|acerte algumas minas.|Ataque: Arremesse tudo próximo a você 04:12=Chegue perto e descarregue o poder desta|técnica de arte marcial quase letal.|Ataque: Executa o fogo de soco 04:13=Sem Uso -04:14=Medo de altura? Melhor usar um paraquedas.|Ele se abrirá automaticamente se necessário evitando|danos decorrente de quedas no seu ouriço|Ataque: Abre o paraquedas|Solto longo: Joga granadas ou outras armas. +04:14=Medo de altura? Melhor usar um paraquedas. Ele|abrirá automaticamente se necessário evitando|danos decorrente de quedas no seu ouriço|Ataque: Abre o paraquedas|Solto longo: Joga granadas ou outras armas. 04:15=Chame um avião para bombadear seus inimigos.|Esquerda/Direita: Determina a direção do ataque|Cursor: Seleciona a região do ataque 04:16=Chame um avião para lançar diversas minas|na área alvo.|Esquerda/Direita: Determina a direção do ataque|Cursor: Seleciona a região do ataque -04:17=Precisa de abrigo? Use o maçarico para|cavar um túnel quete de cobertura.|Ataque:Liga/Desliga o maçarico +04:17=Precisa de abrigo? Use o maçarico para|cavar um túnel que te de cobertura.|Ataque:Liga/Desliga o maçarico 04:18=Precisa de proteção adicional ou quer atravessar|um lugar difícil? Coloque algumas vigas.|Esquerda/Direita: Seleciona a viga a colocar|Cursor: Coloca a viga em uma posição válida. -04:19=Usada no momento certo, teleportar-se pode ser mais|poderosa que todas as outras armas, permitindo|a você salvar alguns ouriços|em situação perigosa|Cursor: Seleciona o destino do teletransporte. +04:19=Usada no momento certo, teleportar-se pode ser mais|poderosa que todas as outras armas, permitindo|salvar alguns ouriços em situação perigosa|Cursor: Seleciona o destino do teletransporte. 04:20=Permite você jogar este turno com um ouriço diferente.|Ataque: Ativa|Tab: Alterna o ouriço 04:21=Atire um morteiro que lancará múltiplas bombas|após o impacto|Ataque: Atira a força total 04:22=Não apenas para o Indiana Jones ! O chicote é|uma arma útil em muitas situações. Especialmente|quando você quer lançar alguém de um penhasco.|Ataque: Acerta tudo na sua frente -04:23=Se você não tem nada a perder, isto pode vir a calhar.|Sacrifique o seu ouriço lançando-o em uma determinada direção|machucando todos que estiverem no caminho, e explodindo ao final .|Ataque: Lança o devastador e mortal ataque -04:24=Feliz Aniversário! Jogue este bolo, deixo andar até seu inimigo|fazendo com que eles tenham uma festa explosiva!|O bolo pode caminhar por quase todo o terreno|mas ele pode acabar detonando antes.|Ataque: Faz o bolo caminhar ou parar para que exploda +04:23=Se não tem nada a perder, isto pode vir a calhar.|Sacrifique o seu ouriço lançando-o em uma direção|e machucando todos que estiverem no caminho,|e explodindo ao final .|Ataque: Lança o devastador e mortal ataque +04:24=Feliz Aniversário! Jogue este bolo, deixo andar até|seu inimigo e dê uma festa explosiva! O bolo pode|caminhar por quase todo o terreno mas ele não|caminhará eternamente.|Ataque: Faz o bolo caminhar e depois detonar 04:25=Use este disfarce para fazer com que o inimigo pule|aos seus pés (ou um buraco).|Ataque: Usa o kit e tenta seduzir outro ouriço - 04:26=Jogue este suculento melão em seus inimigos.|Quando o tempo acabar ele se dividirá em vários|pedaços explosivos.|1-5: Escolha o tempo do melão|Ataque: Quanto mais tempo, mais forte o lançamento 04:27=Deixe o inferno tocar seus inimigos usando este|tenebroso explosivo. Não fique muito perto|da explosão que algumas chamas podem te acertar|Ataque: Quanto mais tempo, mais forte o lançamento -04:28=Pouco tempo de lançar este foguete, ele começará|a cavar através do terreno e explodirá quando ativado|ou quando sair do terreno|Ataque: Quanto mais tempo, mais forte o lançamento -04:29=Isto não é para crianças pequenas! A arma de bolinhas dispara|dezenas de bolas coloridas recheadas de explosivos|Ataque: Atira com força total|Cima e Baixo: Continua mirando -04:30=Chame um avião para lançar napalm.|Se usado corretamente este ataque pode destruir grandes partes do terreno,|incluindo alguns ouriços que estejam no caminho|Esquerda/Direita: Determina a direção do ataque|Cursor: Seleciona a região do ataque +04:28=Pouco tempo de lançar este foguete, ele começará a|cavar através do terreno e explodirá no tempo limite|ou quando sair do terreno|Ataque: Quanto mais tempo, mais forte o lançamento +04:29=Isto não é para crianças pequenas! Esta arma dispara|dezenas de bolas coloridas recheadas de explosivos|Ataque: Atira com força total|Cima e Baixo: Continua mirando +04:30=Chame um avião para lançar napalm. Usado de forma|correta o ataque pode destruir grandes partes do|terreno, incluindo alguns ouriços no caminho.|Esquerda/Direita: Determina a direção do ataque|Cursor: Seleciona a região do ataque 04:31=O Aeromodelo é a arma ideal para coletar caixas ou|atacar ouriços distantes. Jogue o em algum inimigo ou|bombardeie primeiro.|Ataque: Lança o avião ou bombardeia|Salto Longo: Desconhecido|Esquerda/Direita: Manobra o aeromodelo 04:32=Baixa gravidade é mais efetiva que uma dieta!|Salte mais alto e por longas distâncias ou faça|seu inimigo voar mais longe!.|Ataque: Ativa 04:33=Algumas vezes você precisa de um pouco mais de efeito|para causar mais danos em seus ataques.|Ataque: Ativa 04:34=Não me toque!|ataque: Ativa 04:35=Algumas vezes o tempo parece passar muito rápido.|Ganhe alguns segundos para concluir sua jogada.|Ataque: Ativar +04:36=As vezes você não é tão bom de mira.|Use a tecnologia moderna para auxílio.|Ataque: Ativa +04:37=Não tema a luz do dia! Isto durará somente um turno|mas permitirá que você absorva os danos causados|a outros ouriços|Ataque: Ativa +04:38=O rifle sniper é uma arma devastadora do seu|arsenal, mas é inefetiva a curto alcance pois o dano|causado aumenta com a distancia do alvo.|Ataque: Dispara (duas vezes) +04:39=Voe para outras partes do mapa usando o disco voador.|Este veículo difícil de manobrar permite chegar a quase|qualquer posição do campo de batalha|Ataque: Ativa|Cima/Esquerda/Direita: Desloca o veículo na direção|Salto Longo: Joga granadas ou armas similares -04:36=As vezes você não é tão bom de mira.|use a tecnologia moderna para lhe auziliar.|Ataque: Ativa -04:37=Não tema a luz do dia! Isto durará somente um turno mas pemitirá|que você absorva os danos causados a outros ouriços|Ataque: Ativa -04:38=O rifle sniper pode ser a arma mais devastadora|do seu arsenal, contudo é inefetiva a curta alcance,|já que o dano causado aumenta com a distancia do alvo|Ataque: Dispara (duas vezes) -04:39=Voe para outras partes do mapa usando o disco voador.|Este veículo difícil de manobrar permite chegar|a quase qualquer posição do campo de batalha|Ataque: Ativa|Cima/Esquerda/Direita: Desloca o veículo na direção|Salto Longo: Joga granadas ou armas similares 04:40=Ponha um pouco de fogo no chão com esta garrafa|cheia de líquido inflamável.|Ataque: Quanto mais tempo, mais forte o lançamento - -04:41=A natureza pode ser mais poderosa que um disco voador.|O pássaro pode carregar seu ouriço e jogar ovos no inimigo!|Ataque: Ativa e joga ovos|Cima/Esquerda/Direita: Bate asas na respectiva direção -04:42=Grande Sucesso| | |(mas faltando textos!) -04:43=(texto faltando) +04:41=A natureza é mais poderosa que um disco voador.|O pássaro pode carregar seu ouriço e jogar ovos|no inimigo!|Ataque: Ativa e joga ovos|Cima/Esquerda/Direita: Bate asas na respectiva direção +04:42=Utilize o gerador para criar portais, por onde você|poderá mover caixas, ouriços até disparar armas|através deles.|Ataque: Dispara o portal|Tab: Alterna a cor do portal. +04:43=Execute a sonata Mortal de Bethoven, caindo dos |céus e destruindo tudo abaixo. Seu ouriço não|irá resistir ao esforço exigido!|Ataque: Venha do céu e destrua tudo abaixo +04:44=Isso não é somente um queijo, é uma arma biológioca!|Não causa muitos danos mas envenenará ouriços|próximos quando detonar|1-5: Ajusta o tempo de detonação|Ataque: Quanto mais tempo, mais forte o lançamento. +04:45=Use as suas aulas de trigonometria nesta poderosa |arma. Ela irá disparar um raio em forma de seno.| Ataque: Disapara a arma de raio +04:46=Que tal um churrasco? Use o lança chamas para|torrar o inimigo ou destruir o solo.|Ataque: Ativa o lança chamas +04:47=Uma simples mina não basta? A mina aderente pode|ser arremessada e ficará aderida ao tocar no solo,| em um objeto, e até em um ouriço!|Ataque:Quanto mais tempo, mais forte o lançamento. +04:48=Vamos a obra? Use esta arma para martelar|o inimigo no solo, ou através dele!!|Ataque: ativa o martelo ; Game goal strings 05:00=Modos de Jogo diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/pt_PT.txt --- a/share/hedgewars/Data/Locale/pt_PT.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/pt_PT.txt Wed Oct 27 14:02:20 2010 +0200 @@ -42,6 +42,14 @@ 00:39=Disco Voador 00:40=Coquetail Molotov 00:41=Passarito +00:42=Arma de Portais Portátil +00:43=Ataque Piano +00:44=Limburger Venho +00:45=Arma Seno (beta) +00:46=Lança-chamas +00:47=Mina Pegajosa +00:48=Martelo +00:49=Ressuscitador 01:00=Vamos lutar! 01:01=Ronda empatada @@ -49,12 +57,15 @@ 01:03=Volume %1% 01:04=Pausado 01:05=Deseja realmente sair (Y/Esc)? -01:06=Morte súbita! +01:06=Morte Súbita! 01:07=%1 restante 01:08=Combustível 01:09=A sincronizar... 01:10=Usar este utilitário não termina o turno! 01:11=Esta arma ou utilitário ainda não está disponível! +01:12=Último turno até Morte Súbita! +01:13=%1 turnos até Morte Súbita! +01:14=Prepara-te! ; Event messages ; Hog (%1) died @@ -62,7 +73,7 @@ 02:00=%1 não viu a luz ao fundo do túnel! 02:00=%1 não esperava por esta! 02:00=%1 acena um adeus! -02:00=%1 foi para um local melhor! +02:00=%1 foi para um lugar melhor! 02:00=%1 conhece o seu criador! 02:00=%1 não aguentou mais! 02:00=%1 cumpriu o seu dever! @@ -88,7 +99,7 @@ 02:00=%1 desligou-se da vida 02:00=%1 falhou 02:00=Pobrezinho do %1... -02:00=%1 prefere wormux +02:00=%1 prefere Wormux 02:00=%1 esteve a bloquear tiros com a tromba 02:00=%1 é um herói agora... no céu 02:00=%1 encontrou o seu descanso @@ -101,9 +112,9 @@ 02:00=%1 deixou de existir 02:00=Diga adeus a %1 02:00=Não há mais esperança para %1 -02:00=%1 vê o túnel final +02:00=%1 desligou-se da Matrix 02:00=A vida de %1 foi curta -02:00=%1 desligou-se da Matrix +02:00=%1 sofreu combustão espontânea 02:00=%1 passou à história 02:00=%1 está morto que nem uma pedra 02:00=%1 foi-se @@ -130,16 +141,16 @@ 02:01=%1 está encharcado até aos ossos 02:01=%1 esqueceu-se do salva-vidas 02:01=%1 faz splish splash splish -02:01=%1 está a dormir com os peixinhos +02:01=%1 foi dormir com os peixinhos 02:01=%1 nunca gostou de aquários -02:01=%1 disse que tinha sede +02:01=%1 tinha sede 02:01=O mar reclama %1 02:01=%1 está perdido no mar 02:01=%1 devia ter trazido o equipamento de mergulho 02:01=%1 vai ter um funeral no mar 02:01=%1 está com aquela sensação de se estar a afundar 02:01=%1 pratica costas -02:01=%1 vai à procura do Titanic +02:01=%1 foi à procura do Titanic 02:01=%1 não é Jesus 02:01=%1 anda à procura do Nemo 02:01=%1 tinha uma fuga de água @@ -153,8 +164,8 @@ 02:01=%1 foi visitar o Oceanário 02:01=%1 encontrou a Atlântida perdida 02:01=%1 inscreve-se no papel principal do Bioshock 3 -02:01=O teu pato insuflável ficou triste, %1 -02:01=%1 devia ter comprado uma mota aquática +02:01=O teu pato insuflável ficou triste %1 +02:01=%1 devia ter comprado uma mota de água 02:01=%1 não gosta de desportos náuticos 02:01=%1 adora ver bolhinhas 02:01=%1 não aterrou na jangada @@ -232,7 +243,7 @@ 02:05=Médico! 02:05=Primeiros-socorros atirados dos céus! 02:05=Um pacote de vida para ti -02:05=Energia.. em forma de caixa! +02:05=Energia... em forma de caixa! 02:05=O doutor chama 02:05=Ligaduras frescas! 02:05=Isto irá fazer-te sentir melhor @@ -258,7 +269,7 @@ 02:06=Deu-me um trabalhão enfiar a arma nesta caixa 02:06=Brinquedos destrutivos a cair do paraíso 02:06=Aviso! Conteúdo volátil -02:06=Agarrar ou rebentar, é contigo +02:06=Apanhar ou rebentar, é contigo 02:06=Coisas giras! 02:06=Mmmmm Munições 02:06=Uma caixa de poder destrutivo @@ -272,21 +283,21 @@ ; New utility crate 02:07=Hora das ferramentas! -02:07=Isto poderá ser útil... +02:07=Isto pode ser útil... 02:07=Utilidades! 02:07=Utilize esta caixa 02:07=Cuidado aí em baixo 02:07=Mais ferramentas! 02:07=Ferramentas para ti! -02:07=Isto poderá ser bom! +02:07=Isto pode ser bom! 02:07=Use com cabeça 02:07=Ooo esta caixa é pesada -02:07=Poderás precisar disto +02:07=Podes precisar disto ; Hog (%1) skips his turn -02:08=%1 é tãaao aborrecido... +02:08=%1 é tão aborrecido... 02:08=%1 não se quis incomodar -02:08=%1 é um ouriço preguiçoso +02:08=%1 é um ouriço tão preguiçoso 02:08=%1 não conseguiu pensar 02:08=%1 desistiu 02:08=Espirras-te, perdes-te a vez, %1 @@ -297,7 +308,7 @@ 02:08=%1 ficou sem fôlego 02:08=%1 tem um pequeno descanso 02:08=%1 relaxa -02:08=%1 não tem fé nas suas capacidades +02:08=%1 não confia nas suas próprias capacidades 02:08=%1 decide... não fazer nada 02:08=%1 deixa que o inimigo se mate sozinho 02:08=%1 iria ser terrível em festas @@ -308,16 +319,16 @@ 02:08=Cócórócócó, %1 é uma galinha 02:08=%1 está meio amarelo 02:08=%1 é um cobardolas! -02:08=%1 fica à espera da morte súbita +02:08=%1 está à espera da morte súbita 02:08=%1 não gosta de violência -02:08=%1 está à procura do sentido da vida +02:08=%1 anda à procura do sentido da vida 02:08=%1 não valia grande coisa de qualquer maneira -02:08=%1 não se queria alistar no exército sequer -02:08=Pára de nos fazer perder tempo, %1 +02:08=%1 nem sequer se queria alistar no exército +02:08=Pára de nos fazer perder tempo %1 02:08=Estou desapontado contigo %1 02:08=Vá lá, consegues fazer melhor que isso %1 02:08=A vontade de %1 foi-se -02:08=%1 tem coisas melhores para fazer +02:08=%1 tem mais que fazer 02:08=%1 está cheio de medo 02:08=%1 adormeceu @@ -362,6 +373,12 @@ 02:10=Será uma ave, um avião, ... 02:10=%1 está fora de jogo! +; Hog (%1) has to leave (team is gone) +02:11=%1 tem de ir para a cama! +02:11=%1 parece demasiado ocupado para jogar +02:11=Beam him up, Scotty!|%1 teve de ir por a cusquiçe em dia +02:11=%1 tem de ir embora + ; Weapon Categories 03:00=Granada Temporizada 03:01=Granada Temporizada @@ -387,7 +404,7 @@ 03:21=Arma Balística 03:22=Chama-me Indiana! 03:23=(Mesmo) Artes Marciais -03:24=O bolo NÃO é uma mentira! +03:24=Afinal o bolo NÃO é mentira! 03:25=Kit de Vestuário 03:26=Granada Sumarenta 03:27=Granada Escaldante @@ -405,6 +422,14 @@ 03:39=Utilitário de Transporte 03:40=Granada Incendiária 03:41=Enorme fã do Squawks +03:42=I'm making a note here... HUGE SUCCESS +; just to make it easier to compare... +03:43=A composição musical mais letal de sempre +03:44=Consumir de preferência antes de: 1923 +03:45=O poder da ciência +03:46=Labaredas enormes! +03:47=Cola-as onde achares mais útil! +03:48=Garantia vitalícia! ; Weapon Descriptions (use | as line breaks) 04:00=Ataca os teus inimigos usando uma simples granada.|Explodirá quando o tempo chegar a zero.|1-5: Define o temporizador da granada|Ataque: Deixa premido para lançar com mais força @@ -412,7 +437,7 @@ 04:02=Ataca os teus inimigos usando um projéctil balístico|que pode ser influenciado pelo vento.|Ataque: Deixa premido para disparar com mais força 04:03=Lança uma abelha teleguiada que ira perseguir o|alvo seleccionado. Não dispares com muita força|para aumentar a precisão.|Cursor: Escolher o alvo|Ataque: Deixa premido para disparar com mais força 04:04=Ataca o teu inimigo utilizando uma caçadeira com dois tiros.|Como o tiro se espalha não precisas de acertar em cheio|para magoar os teus oponentes.|Ataque: Disparar (múltiplas vezes) -04:05=Move-te pelo subsolo! Usa o martelo pneumático para|escavar um buraco no chão e alcançar outras áreas.|Ataque: Começar ou parar de escavar +04:05=Move-te pelo subsolo! Usa o martelo pneumático para|escavar um buraco no solo e alcançar outras áreas.|Ataque: Começar ou parar de escavar 04:06=Aborrecido? Não tens maneira de atacar?|Preferes guardar as munições?|Não há problema! Passa o turno, covarde!|Ataque: Passa o turno 04:07=Ultrapassa enormes distancias, usa a velocidade adquirida|para deslizar e empurrar outros ouriços ou larga granadas|(ou outras armas) em cima deles.|Ataque: Dispara ou solta a corda|Saltar: Larga granadas ou armas similares 04:08=Mantém os teus inimigos bem longe largando uma mina numa|passagem estreita ou mesmo por baixo dos seus pés.|Tem apenas cuidado para não a activares tu mesmo!|Ataque: Larga uma mina aos teus pés @@ -433,7 +458,7 @@ 04:23=Se não tens nada a perder, isto pode ser|muito útil. Sacrifica o teu ouriço lançando-o|na direcção desejada destruindo tudo o|que esteja no caminho e explodindo no fim.|Ataque: Lança um devastador e mortífero ataque 04:24=Feliz aniversário! Lança este bolo, deixa-o caminhar até|aos teus inimigos e oferece-lhes uma festa explosiva.|O bolo pode andar em quase qualquer terreno mas isso|faz com que detone mais cedo.|Ataque: Larga o bolo ou pára-o para que expluda 04:25=Usa este kit de vestuário para fazer os teus inimigos saltar|para o teu ouriço (e para alguma falha ou buraco).|Ataque: Usa este kit e tenta seduzir outro ouriço -04:26=Atira esta sumarenta melancia aos teus inimigos.|Assim que o tempo termine, dividir-se-à em vários|pedaços explosivos.|1-5: Define o temporizador da melancia|Ataque: Deixa premido para lançar com mais força +04:26=Atira esta sumarenta melancia aos teus inimigos.|Assim que o tempo termine, dividir-se-à em várias|fatias explosivas.|1-5: Define o temporizador da melancia|Ataque: Deixa premido para lançar com mais força 04:27=Deixa as chamas do inferno chover sobre os teus|oponentes usando este demoníaco explosivo.|Não fiques muito perto da explosão pois as pequenas|chamas são igualmente perigosas.|Ataque: Deixa premido para lançar com mais força 04:28=Pouco depois de lançares este rocket, ira começar a|escavar através do solo e explodir assim que o rastilho|acabe ou alcance a superfície novamente.|Ataque: Deixa premido para disparar com mais força 04:29=Não recomendada para crianças!|A arma de bolas disparamontes de pequenas|e coloridas bolas recheadas de explosivos.|Ataque: Dispara com a força máxima|Cima/Baixo: Continua a apontar @@ -444,11 +469,18 @@ 04:34=Não me podes tocar!|Ataque: Activar 04:35=Por vezes o tempo passa demasiado depressa.|Agarra uns segundos extra para acabar o teu ataque.|Ataque: Activar 04:36=Há dias em que a tua pontaria anda simplesmente terrível.|Obtém alguma ajuda utilizando a tecnologia moderna.|Ataque: Activar -04:37=Não temas a luz do dia. Só vai durar um turno|mas vais poder absorver o dano que fizeres|aos outros ouriços.|Ataque: Activar -04:38=A sniper pode ser a arma mais devastadora no teu|arsenal, mas é muito pouco eficiente ao perto.|O dano aumenta proporcionalmente à distancia do alvo.|Ataque: Disparar (duas vezes) +04:37=Não temas a luz do dia. Só vai durar um turno|mas vais poder absorver parte do dano que|fizeres aos outros ouriços.|Ataque: Activar +04:38=Embora a sniper tenha a capacidade de ser tornar uma|das armas mais devastadoras do teu arsenal é|infelizmente muito pouco eficiente a curta distancia.|O dano aumenta proporcionalmente à distancia do alvo.|Ataque: Disparar (duas vezes) 04:39=Voa para outras partes do mapa usando o disco voador.|Este utilitário difícil de controlar é capaz de te levar|a quase qualquer posição no campo de batalha.|Ataque: Activar|Cima/Esquerda/Direita: Aplica força nessa direcção|Saltar: Larga granadas ou armas similares 04:40=Pôe o chão a arder com esta garrafa cheia de|liquido altamente inflamável.|Ataque: Deixa premido para atirar com mais força -04:41=Prova que a natureza está mais avançada que o que|poderiam imaginar. Este passarito consegue transportar|o teu ouriço e largar ovos nos teus enimigos!|Attack: Activar e largar ovos|Cima/Esquerda/Direita: Bater as asas nessa direcção +04:41=Prova que a natureza está mais avançada que o que|poderiamos imaginar. Este passarito consegue transportar|o teu ouriço e largar ovos nos teus enimigos!|Attack: Activar e largar ovos|Cima/Esquerda/Direita: Bater as asas nessa direcção +04:42=Este dispositivo de portais portatil é capaz de|instantaneamente teletransportar os teus inimigos,|o teu arsenal ou a ti entre dois pontos no terreno.|Embora dificil de usar ao inicio, com prática pode-se|tornar uma das armas mais letais do teu arsenal.|Ataque: Disparar um portal|Trocar: Alterar (alternar) o portal de cor +04:43=Faz da tua estreia musical um sucesso explosivo!|Larga este piano do céu, mas cuidado... alguem|precisa de o tocar o que te pode custar vida!|Cursor: Selecciona a zona alvo|F1-F9: Tocar piano +04:44=Isto não é apenas queijo, é uma arma biologica!|Pode não causar muito dano quando o tempo|chegue a zero, mas vai definitivamente envenenar|qualquer ouriço que tenha a infelicidade de o cheirar.|1-5: Define o temporizador da granada|Ataque: Deixa premido para lançar com mais força +04:45=Finalmente todas aquelas aulas de fisica vão ser úteis.|Liberta uma devastadora onda Seno nos teus enimigos,|mas cuidado, esta arma responde com o grande coiçe.|(Esta arma está incompleta)|Ataque: Disparar +04:46=Cobre os teus inimigos com este viscoso e|flamejante liquido de aquecer o coração!|Ataque: Activar|Cima/Baixo: Apontar|Esquerda/Direita: Modificar a pressão +04:47=Duplica a diversão com estas duas minas autocolantes!|Utiliza-as para atacar ou defender. É contigo!|Ataque: Deixa pressionado para disparar mais longe +04:48=Porque é que têm as toupeiras de ser sempre as vitimas?|Dar marteladas em ouriços pode ser igualmente divertido!|Uma boa martelada rapidamente remove um terço da vida|de um ouriço e ainda o enterra no solo!|Ataque: Activar ; Game goal strings 05:00=Modos de Jogo diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/sv.txt --- a/share/hedgewars/Data/Locale/sv.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/sv.txt Wed Oct 27 14:02:20 2010 +0200 @@ -13,7 +13,7 @@ 00:10=Dynamit 00:11=Basebollträ 00:12=Flammande näve -00:13=s +00:13=sek 00:14=Fallskärm 00:15=Luftangrepp 00:16=Minangrepp @@ -42,6 +42,13 @@ 00:39=Flygande tefat 00:40=Molotovcocktail 00:41=Birdy +00:42=Portabel portalapparat +00:43=Pianoangrepp +00:44=Gammal limburger +00:45=Sinusgevär (beta) +00:46=Eldkastare +00:47=Fästande mina +00:48=Hammare 01:00=Nu kör vi! 01:01=Oavgjort @@ -55,6 +62,9 @@ 01:09=Synkroniserar... 01:10=Detta verktyg avslutar inte din tur! 01:11=Detta vapen eller verktyg är inte tillgängligt än! +01:12=Sista rundan till sudden death! +01:13=%1 rundor till sudden death! +01:14=Gör dig redo, %1! ; Event messages ; Hog (%1) died @@ -145,7 +155,7 @@ 02:01=%1 letar efter Titanic 02:01=%1 är inte Jesus 02:01=%1 hittar Nemo -02:01=%1 springs a leak +;02:01=%1 springs a leak 02:01=Du måste undra hur många igelkottar som finns där nere 02:01=%1 gör havsnivån något högre 02:01=%1 gick inte med i flottan @@ -348,7 +358,8 @@ 02:09=%1 är förvirrad ;02:09=%1 hurt itself in its confusion 02:09=%1 är duktig på att skämma ut sig själv -02:09=%1 är klumpig! +02:09=%1 är en klant! +02:09=%1 är klumpig 02:09=%1 visar fienden vad han kan 02:09=%1 kan inte förväntas vara perfekt hela tiden ;02:09=Don't worry %1, pobody's nerfect @@ -364,6 +375,12 @@ 02:10=Är det en fågel, är det ett flygplan... ;02:10=That one is out! +; Hog (%1) has to leave (team is gone) +02:11=%1 måste gå och lägga sig! +02:11=%1 verkar vara för upptagen för att spela +;02:11=Beam him up, Scotty! +02:11=%1 måste gå + ; Weapon Categories 03:00=Tidsinställd granat 03:01=Tidsinställd granat @@ -407,6 +424,14 @@ 03:39=Transportverktyg 03:40=Förbrännande granat 03:41=Stor beundrare av Squawks +03:42=I'm making a note here... +; the misspelled "Beethoven" is intentional (-> to beat) +03:43=Spelandes Beathovens dödliga sonata +03:44=Bäst före: 1923 +03:45=Vetenskapens makt +03:46=Hett Hett Hett! +03:47=Fäst de här på ett användbart ställe! +03:48=Dags att banka järnet! ; Weapon Descriptions (use | as line breaks) 04:00=Attackera fienden med en enkel granat.|Exploderar när tiden når noll.|1-5: Ställ in granatens tid|Attack: Håll ner för att kasta med mer kraft @@ -451,6 +476,13 @@ 04:39=Flyg till andra delar av kartan med det flygande|tefatet. Det här svårhanterliga verktyget kan ta|dig till nästan alla positioner på slagfältet.|Attack: Aktivera|Upp/Vänster/Höger: Skjut ifrån åt ett håll|Långhopp: Släpp granater eller liknande vapen 04:40=Sätt eld på lite mark med den här flaskan fylld|med (snart) brinnande vätska.|Attack: Håll ner för att kasta med mer kraft 04:41=Beviset på att naturen kanske till och med kan slå|det flygande tefatet. Birdy kan bära runt på din|igelkott och släppa ägg på fienden!|Attack: Aktivera och släpp ägg|Upp/Vänster/Höger: Flaxa åt ett håll +04:42=Denna portabla portalapparat kan omedelbart|flytta dig, dina fiender, eller dina vapen mellan|två punkter på banan. Använd den klokt och|ditt uppdrag kommer bli en...|HUGE SUCCESS!|Attack: Skjut en portal|Byt: Växla portalfärger +04:43=Gör din debut på den musikaliska scenen en|exploderande succe! Släpp ett piano från himlen,|men se upp...|någon måste spela och det kan kosta dig livet!|Markör: Välj målområde|F1-F9: Spela pianot +04:44=Det här är inte bara ost, det är biologisk krigsföring!|Den kommer inte göra så stor skada när tiden tar slut|men den kommer definitivt förgifta alla oturliga nog|att känna av lukten!|1-5: Ange ostens tid|Attack: Håll ner för att skjuta med mer kraft +04:45=All den där tiden med fysikboken har äntligen lönat|av sig, frammana en ödesdiger sinusvåg mot fienden.|Men se upp, detta vapnet har en ganska stark rekyl.|(Det här vapnet är ofärdigt)|Attack: Skjut +04:46=Täck dina fiender med ett fräsande eldhav.|Hjärtvärmande!|Attack: Aktivera|Upp/Ner: Fortsätt sikta|Vänster/Höger: Justera kraft +04:47=Det är dubbelt så roligt med två farliga, fantastiska,|fästande minor. Skapa en kedjereaktion eller försvara|dig själv (eller både och!)|Attack: Håll ner för att skjuta med mer kraft (två gånger) +04:48=Varför ska mullvadarna få all misshandel? Att|drämma till en igelkott kan vara minst lika roligt!|Ett rejält slag med den här hammaren kan skala|av en tredjedel av en igelkotts hälsa och slå ner|dem i marken.|Attack: Aktivera ; Game goal strings 05:00=Spellägen @@ -469,3 +501,4 @@ 05:13=Mintider: Minor detoneras direkt 05:14=Mintider: Minor detoneras efter 0 - 3 sekunder 05:15=Skademängd: Alla vapen gör %1% skada + diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Locale/zh_CN.txt --- a/share/hedgewars/Data/Locale/zh_CN.txt Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Locale/zh_CN.txt Wed Oct 27 14:02:20 2010 +0200 @@ -3,7 +3,7 @@ 00:00=手榴弹 00:01=集束炸弹 00:02=反坦克火箭筒 -00:03=飞碟 +00:03=归巢的蜜蜂 00:04=霰弹枪 00:05=鹤嘴锤 00:06=跳过回合 @@ -17,8 +17,8 @@ 00:14=空降 00:15=空袭 00:16=地雷空袭 -00:17=喷火灯 -00:18=建造 +00:17=喷灯 +00:18=建设工具 00:19=传送 00:20=切换刺猬 00:21=迫击炮 @@ -28,10 +28,10 @@ 00:25=引诱 00:26=西瓜炸弹 00:27=地狱礼花 -00:28=钻地火箭 +00:28=钻头火箭 00:29=弹珠炮 00:30=汽油弹 -00:31=轰炸机 +00:31=遥控轰炸机 00:32=低重力 00:33=额外伤害 00:34=无敌 @@ -41,32 +41,43 @@ 00:38=狙击枪 00:39=飞盘 00:40=燃烧瓶 +00:41=鸟儿 +00:42=移动传送器 +00:43=飞来的钢琴 +00:44=毒奶酪 +00:45=正弦能量炮 +00:46=火焰喷射器 +00:47=固定地雷 +00:48=大锤 01:00=开战! 01:01=平局 01:02= %1 胜利! 01:03=音量 %1% 01:04=暂停 -01:05=确定要退出 (是Y/否Esc)? -01:06=突然死亡! +01:05=确定要退出? (是Y/否Esc) +01:06=死亡模式! 01:07=%1 剩余 01:08=燃料 01:09=同步中... 01:10=使用本工具不会结束回合! -01:11=本武器/工具解冻中! +01:11=您还不能用它! +01:12=死亡模式前最后一回合! +01:13=%1 回合倒计时! +01:14=预备上, %1! ; Event messages ; Hog (%1) died ; 02:00=%1 has kicked the bucket! -02:00=%1 踢到了炸药桶! +02:00=%1 离去! ; 02:00=%1 has seen the light! -02:00=%1 看到了圣光! +02:00=%1 目睹圣光降临! ; 02:00=%1 never saw that coming! -02:00=%1 没料到会这样。。。 +02:00=%1 既不得知,死有何苦! ; 02:00=%1 waves goodbye! -02:00=%1 向大家挥手道别。。。 +02:00=%1 向大家挥手道别。 ; 02:00=%1 has gone to a better place! -02:00=%1 去了西方极乐世界! +02:00=%1 去了极乐世界! ; 02:00=%1 meets his maker! 02:00=%1 去见造物主了! ; 02:00=%1 can hang on no longer! @@ -76,19 +87,19 @@ ; 02:00=%1 makes the ultimate sacrifice! 02:00=%1 做了最大的牺牲! ; 02:00=%1 departs this mortal coil! -02:00=%1 摆脱了命运的束缚! +02:00=%1 摆脱了躯壳的束缚! ; 02:00=%1 makes like a tree and leaves! -02:00=%1 叶落归根了! +02:00=%1 叶落归根。 ; 02:00=%1 has timed out! -02:00=%1 大限到了。。。 +02:00=%1 大限已至。 ; 02:00=%1 says peace out! -02:00=%1 悄然离场了。。。 +02:00=%1 悄然离场了。 ; 02:00=%1 will be fondly remembered! 02:00=%1 永远活在我们心中! ; 02:00=%1 has an aneurysm! -02:00=%1 身患绝症不治而亡。。。 +02:00=%1 不治而亡。 ; 02:00=%1 leaves behind a wife and child -02:00=%1 留下一家孤儿寡母。。。 +02:00=%1 留下一家孤儿寡母。 ; 02:00=%1 has launched his last bazooka 02:00=%1 发射了最后一发火箭弹 ; 02:00=%1 has tossed his last grenade @@ -96,15 +107,15 @@ ; 02:00=%1 has baked his last cake 02:00=%1 烘烤了最后一块蛋糕 ; 02:00=%1 has swung on his last rope -02:00=%1 甩出了最后一根绳索 +02:00=%1 最后一次甩出了绳索 ; 02:00=%1 has called his last airstrike -02:00=%1 呼叫了最后一次空袭 +02:00=%1 最后一次呼叫空袭 ; 02:00=%1 has pumped his last shotgun -02:00=%1 抽出了最后一把霰弹枪 +02:00=%1 最后一次抽出了霰弹枪 ; 02:00=%1 has thrown his last melon -02:00=%1 扔出了最后一个西瓜炸弹 +02:00=%1 最后一次扔出了西瓜炸弹 ; 02:00=%1 has drawn his last deagle -02:00=%1 拔出了最后一把沙鹰 +02:00=%1 最后一次拔出了沙鹰 ; 02:00=%1 took one shot too many 02:00=%1 挨了太多枪了 ; 02:00=%1 could really have used a health crate @@ -118,21 +129,21 @@ ; 02:00=Poor poor %1... 02:00=可怜的 %1... ; 02:00=%1 prefers wormux -02:00=%1 更喜欢玩百战癫虫 +02:00=%1 更喜欢 Wormux ; 02:00=%1 has been blocking shots with his face -02:00=%1 被爆头了 +02:00=%1 勇于面对,结果相当惨烈 ; 02:00=%1 is a hero amongst me...err..hogs 02:00=%1 是我的英雄! ; 02:00=%1 finds his place in Valhalla -02:00=%1 在天堂找到房子了 +02:00=%1 在勇者纪念碑上找到了位置 ; 02:00=%1 has left the building 02:00=%1 离开了这间屋子 ; 02:00=%1 goes the way of the dinosaurs -02:00=%1 去找恐龙了 +02:00=%1 步上了恐龙的道路 ; 02:00=%1 brings hedgehogs one step closer to extinction 02:00=%1 让刺猬物种灭绝更近了一步 ; 02:00=%1 brings a tear to my eye -02:00=%1 让我为他的离去而落泪 +02:00=%1 带走了我一滴眼泪 ; 02:00=%1 is an ex-hog 02:00=%1 生前是一只刺猬 ; 02:00=%1 is pushing up the daisies @@ -140,35 +151,35 @@ ; 02:00=%1 has ceased to be 02:00=%1 被“删除”了 ; 02:00=Say goodbye to %1 -02:00=对%1 说永别吧 +02:00=对 %1 说再见 ; 02:00=No hope left for %1 -02:00=%1 没有幸存的希望了 +02:00=%1 没有希望了 ; 02:00=%1 faces the final curtain -02:00=%1 落下了最后的帷幕 +02:00=%1 面容被落下的帷幕遮住了 ; 02:00=Smoke 'em if you got 'em, %1 02:00=%1 抓紧时间实现你最后的愿望吧 ; 02:00=%1 suffers a Spontaneous Massive Existence Failure 02:00=%1 遭遇了自发性大规模故障(出自星河舰队) ; 02:00=%1 has passed on -02:00=%1 逝去了 +02:00=%1 走了 ; 02:00=%1 is stone dead 02:00=%1 永垂不朽 ; 02:00=%1 is no more 02:00=%1 不在了 ; 02:00=%1 has expired -02:00=%1 断气了 +02:00=%1 已故 ; 02:00=Bereft of life, %1 rests in peace 02:00=%1 安详地躺着 ; 02:00=%1 joins the choir invisible 02:00=%1 加入了隐形唱诗班 ; 02:00=Farewell %1, we hardly knew ye! -02:00=%1 永别了,我们还不认识你呢! +02:00=%1, 永别了,我们还不认识你呢! ; 02:00=%1 had a low tolerance for being shot 02:00=%1 抗打击能力不足 ; 02:00=%1 could have used an extra life 02:00=%1 本该用另一条命的 ; 02:00=Is there a doctor in the house? -02:00=快打120! +02:00=有医生吗? ; Hog (%1) drowned ; 02:01=%1 plays submarine! @@ -181,8 +192,10 @@ 02:01=%1 说要去检查深水区 ;02:01=%1 goes glug glug glug 02:01=%1 :“咕噜咕噜咕噜……” -02:01=%1 goes splash -02:01=%1 forgot his armbands +;02:01=%1 goes splash +02:01=%1 栽入水花里 +;02:01=%1 forgot his armbands +02:01=%1 忘记了戴臂章 ;02:01=%1 really should have taken swimming lessons 02:01=%1 真的该去学游泳的 ;02:01=%1 left his surfboard at home @@ -193,7 +206,8 @@ 02:01=%1 湿掉了 ;02:01=%1 forgot to bring his life jacket 02:01=%1 忘记带他的救生衣了 -02:01=%1 goes splish splash splish +;02:01=%1 goes splish splash splish +02:01=%1 实现了水上飘,落水,身后一片水花荡漾 ;02:01=%1 is sleeping with the fishes 02:01=%1 将会和鱼睡在一起 ;02:01=%1 thinks the water physics suck in this game @@ -209,7 +223,7 @@ ;02:01=%1 gets a burial at sea 02:01=%1 享受到了海葬待遇 ;02:01=%1 has that sinking feeling -02:01=%1 觉得自己老在下沉 +02:01=%1 觉得自己在下沉 ;02:01=%1 is practicing his backstroke 02:01=%1 终于能实践自己的游泳理论了 ;02:01=%1 goes in search of the Titanic @@ -218,7 +232,8 @@ 02:01=很遗憾 %1 不是耶稣 ;02:01=%1 is finding Nemo 02:01=%1 找尼莫去了 -02:01=%1 springs a leak +;02:01=%1 springs a leak +02:01=%1 钻入了一个水洼 ;02:01=You've gotta wonder how many hogs are down there 02:01=你会知道海底还会有多少同伴的 ;02:01=%1 makes the ocean slightly higher @@ -266,8 +281,8 @@ ; Round starts ; 02:02=Let's fight! +02:02=开战! ; 02:02=Armed and ready! -02:02=开战! 02:02=准备! ;02:02=Let's get ready to rumble! 02:02=准备对轰! @@ -292,7 +307,7 @@ ;02:02=Crush your enemies! 02:02=目标:粉碎你的敌人! ;02:02=May the best hog win -02:02=胜利属于最厉害的那只! +02:02=祝愿胜利属于最厉害的刺猬! ;02:02=Victory or death 02:02=胜利或死亡 ;02:02=To the victor goes the spoils @@ -302,7 +317,7 @@ ;02:02=Cry havoc! Let loose the hogs of war! 02:02=哭吧! 这是刺猬的战争 ;02:02=Hedgewars, brought to you by Hedgewars.org -02:02=欢迎来到刺猬大作战, 官方网站 Hedgewars.org +02:02=欢迎来到刺猬大作战, Hedgewars.org 为你呈现 02:02=GL HF ;02:02=Just count yourself lucky you're not up against Tiyuri 02:02=你看你多幸运你不是在对战 Tiyuri @@ -340,33 +355,35 @@ 02:02=目标: 摧毁敌人 ;02:02=Good luck 02:02=祝你好运 -02:02=Have fun~ -;02:02=开心玩~ +;02:02=Have fun~ +02:02=开心玩~ ;02:02=Fight the good fight -02:02=要赢! +02:02=漂亮的战斗 ;02:02=Fight dirty -02:02=不择手段也行! +02:02=不择手段 ;02:02=Fight with honour -02:02=请注意文明用语 +02:02=满载荣誉而战 ;02:02=Don't give up 02:02=教练告诉你: 别放弃 ;02:02=Never surrender 02:02=永不屈服! ;02:02=Rock 'em and sock 'em! -02:02=杀!杀!杀! +02:02=蹂虐对手 ;02:02=Let the fragfest begin! 02:02=积分赛开始! ;02:02=I hope you're ready for a tussle! 02:02=你准备好恶战了么? -02:02=Go Go Go! +;02:02=Go Go Go! +02:02=上! ;02:02=Hedgehogs advance! -02:02=刺猬历险记! +02:02=刺猬向前冲! ;02:02=Bring it to them! 02:02=炸飞他们! ;02:02=Have no fear! -02:02=勇敢前进! +02:02=无所畏惧! ;02:02=Be brave and conquer 02:02=敢于征服! + ; Round ends (win; unused atm) 02:03=回合结束(胜利) @@ -374,7 +391,7 @@ 02:04=回合结束(平局) ; New health crate -; 02:05=Incoming aid! +;02:05=Incoming aid! 02:05=医疗包! ;02:05=Medic! 02:05=急救包! @@ -385,18 +402,19 @@ ;02:05=Good health.. in box form! 02:05=生命就在那箱子里! ;02:05=The doctor calls -02:05=急救医生到了 +02:05=医生的紧急呼叫 ;02:05=Fresh band-aids! 02:05=新鲜创可贴! ;02:05=This will make you feel better 02:05=吃了这个感觉会好些的... ;02:05=A Hi-Potion! Whoops wrong game +02:05=兴奋剂!呃。。。走错地方了 ;02:05=A pick-me-up! 02:05=万金油! ;02:05=Grab it -02:05=就是他了! +02:05=捉住它 ;02:05=A healthy snack -02:05=半吊子春哥来了(无复活技能) +02:05=健康食品 ;02:05=A remedy to pain 02:05=止痛饼来了 ;02:05=Correct Dosage: as many as you can find! @@ -404,7 +422,7 @@ ;02:05=Urgent delivery 02:05=紧急物资 ;02:05=Supplies! -02:05=补给用品! +02:05=补给! ; New ammo crate ; 02:06=More weapons! @@ -416,7 +434,7 @@ ;02:06=I wonder what weapon is in there? 02:06=我要的那个会在的吧... ;02:06=Supplies! -02:06=补给用品! +02:06=补给! ;02:06=What could be inside? 02:06=里面会有啥呢? ;02:06=Christmas comes early in Hedgewars @@ -428,13 +446,13 @@ ;02:06=It was a nightmare getting this through customs 02:06=本局的噩梦来了 ;02:06=Destructive toys from the heavens -02:06=有个玩具在天堂掉下来了 +02:06=玩具从天堂掉下来了 ;02:06=Warning! Contents Volatile -02:06=警告! 危险品 +02:06=警告! 内含危险物品 ;02:06=Pick it up or blow it up, choice is yours -02:06=拿走或打掉, 随你 +02:06=拿走或打爆, 随你 ;02:06=Goodies! -02:06=好玩的玩意! +02:06=好玩意儿! ;02:06=Mmmmm Ammo 02:06=弹药!!!! ;02:06=A box of destructive power @@ -453,6 +471,7 @@ 02:06=新玩具! ;02:06=A mysterious box! 02:06=谜的箱子... + ; New utility crate ; 02:07=Tooltime! 02:07=工具箱! @@ -476,6 +495,7 @@ 02:07=好重...好重... ;02:07=You might need this 02:07=会有用的 + ; Hog (%1) skips his turn ; 02:08=%1 is sooo boring... 02:08=%1 太无聊了... @@ -586,46 +606,54 @@ ;02:09=%1 moves one step closer to suicide 02:09=%1 正在走向自杀 ;02:09=%1 aids the enemy -02:09=%1 造反了! +02:09=%1 帮助敌人 ;02:09=That was stupid %1 -02:09=%1 是笨蛋 +02:09= %1 是笨蛋 ;02:09=%1 lives by the mantra of "no pain, no gain" -02:09=%1 试验苦肉计 +02:09=%1 贯彻“不付出,何收获“的原则 ;02:09=%1 is confused -02:09=%1 搞混队伍了 +02:09=%1 思维混乱了 ;02:09=%1 hurt itself in its confusion 02:09=%1 在混乱中攻击自己 ;02:09=%1 has a knack for embarrassing himself -02:09=%1 正在为自己的点子尴尬 +02:09=%1 正在为自己尴尬 ;02:09=%1 is a klutz! 02:09=%1 就是一个笨蛋! ;02:09=%1 is clumsy -02:09=%1 太笨了 +02:09=%1 笨手笨脚的 ;02:09=%1 shows the enemy what he's capable of -02:09=%1 把自己的能力让对手知道了 +02:09=%1 展示了自己的能力 ;02:09=%1 can't be expected to be perfect all the time -02:09=%1 不是每次都是完美的 +02:09=%1 不能每次都完美 ;02:09=Don't worry %1, pobody's nerfect -02:09=不用担心 %1 , 每人都不是完美的 +02:09=不用担心 %1 , 人都不是完美的 ;02:09=%1 totally did that on purpose -02:09=%1 真的没有任何目的 +02:09=%1 这么做真的是有目的 ;02:09=I won't tell anyone if you don't, %1 02:09=我不会把 %1 的事情到处说的 ;02:09=How embarrassing! -02:09=这是何等的失态! +02:09=何等的失态! ;02:09=I'm sure nobody saw that %1 -02:09=真的没人看到 %1 在做什么 +02:09=保证,决没人看到 %1 做什么 ;02:09=%1 needs to review his field manual -02:09=%1 需要看看说明书了 +02:09=%1 需要复习说明书 ;02:09=%1's weapon clearly malfunctioned 02:09=%1 的武器很明显坏了 + ; Hog shot an home run (using the bat and another hog) ; 02:10=Home Run! 02:10=全垒打! ; 02:10=A bird, a plane, ... -02:10=看到鸟了!飞机!飞碟! +02:10=一只鸟,一架飞机,... ; 02:10=That one is out! 02:10=那一位出界了! + +; Hog (%1) has to leave (team is gone) +02:11=%1 必须上床了 +02:11=%1 玩的过火了,休息一下 +02:11=发射!这位已经被送出去 +02:11=%1 必须走了 + ; Weapon Categories 03:00=定时手雷 03:01=定时手雷 @@ -638,7 +666,7 @@ 03:08=接近式炸弹 03:09=枪 (多发子弹) 03:10=BOOM! -03:11=Bonk! +03:11=咚! 03:12=武术 03:13=UNUSED 03:14=移动工具 @@ -659,38 +687,58 @@ 03:29=弹道武器 03:30=空投打击 03:31=遥控飞机(不是玩具!) -03:32=额外效果 -03:33=额外效果 -03:34=额外效果 -03:35=额外效果 -03:36=额外效果 -03:37=额外效果 +03:32=临时效果 +03:33=临时效果 +03:34=临时效果 +03:35=临时效果 +03:36=临时效果 +03:37=临时效果 03:38=枪 (多发子弹) 03:39=移动工具 03:40=燃烧弹 +;03:41=Huge fan of Squawks +03:41=噪音 +;03:42=I'm making a note here... +03:42=我将在此记录... + +; the misspelled "Beethoven" is intentional (-> to beat) +;03:43=Performing Beathoven's deadly sonata +03:43=特殊的圣诞表演 +;03:44=Best before: 1923 +03:44=此日期前最佳:1923 +;03:45=The power of science +03:45=科学的力量 +;03:46=Hot Hot Hot! +03:46=好烫烫烫! +;03:47=Stick these somewhere useful! +03:47= 呆在有利的地方! +;03:48=It's Hammer time! +03:48=大锤威武! + + ; Weapon Descriptions (use | as line breaks) 04:00=使用简单的手榴弹攻击敌人.|定时器倒数到0就会爆炸.|1-5: 设定定时器|攻击键: 按住蓄力. 04:01=使用集束手雷攻击敌人.|定时器倒数到0就会爆炸并裂开成几块.|1-5: 设定定时器|攻击键: 按住蓄力. 04:02=使用弹道导弹攻击敌人.|受风力影响.|攻击键: 按住蓄力. -04:03=发射一个制导导弹攻击所选目标.|如果要精确打击就不要使用全力发射.|鼠标: 选定目标|攻击键: 按住蓄力. -04:04=霰弹枪有两颗子弹.|因为是霰弹枪所以不一定要对准敌人.|攻击键: 开枪 (可以开几枪) +04:03=发射一个制导导弹攻击所选目标.|如果要精确打击就不要使用全力发射.|光标: 选定目标|攻击键: 按住蓄力. +04:04=霰弹枪有两排子弹.|因为是霰弹枪所以不一定要对准敌人.|攻击键: 开枪 (两发) 04:05=向地底出发! 使用他就能在地面|打个洞, 就能去其他地方.|攻击键: 开始/停止打洞 04:06=闷了? 没法打? 保存体力? 没问题!|跳过这回合就可以了, 懦夫!|攻击键: 跳过回合 04:07=用绳索就可以去很远的地方.|还能空降到别的刺猬身上丢手榴弹呢.|攻击键: 发射/收回绳索|长跳键: 发射手榴弹或其他武器 04:08=你能用地雷阻止敌人靠近.|还能静悄悄的放在敌人脚下.|一定要在爆炸前逃离到安全的地方!|攻击键: 把地雷放在你的脚下 -04:09=自我感觉准头不行? |沙漠之鹰有4颗子弹呢.|攻击键: 开枪 (可以开几枪) +04:09=自我感觉准头不行? |沙漠之鹰有4颗子弹呢.|攻击键: 开枪 (四发) 04:10=使用强力炸药就是一个明智的选择.|这是最经典的轰炸方式.|攻击键: 把炸药放在你的脚下 04:11=把敌人打飞, 飞出地图或者飞进水里.|或者把地雷打过去?|攻击键: 敲打你面前的所有东西 04:12=这就是武术的威力!|致命的气功!|攻击键: 使用升龙拳 04:13=UNUSED 04:14=有恐高症? 拿降落伞吧.|他能慢慢的安全的把你带到地面.|攻击键: 展开降落伞 -04:15=呼叫一架飞机轰炸你的敌人.|左/右方向键: 决定攻击方向|鼠标: 选定目标 -04:16=呼叫一架飞机投下大量地雷.|左/右方向键: 决定攻击方向|鼠标: 选定目标 +04:15=呼叫一架飞机轰炸你的敌人.|左/右方向键: 决定攻击方向|光标: 选定目标 +04:16=呼叫一架飞机投下大量地雷.|左/右方向键: 决定攻击方向|光标: 选定目标 04:17=需要个安全的地方? 使用喷灯为你挖掘一条安全的隧道!|攻击键: 开始/停止挖掘 -04:18=喷灯还不够?还要个更安全的地方?|建造若干条大梁挡住吧.|左/右方向键: 选择梁的方向|鼠标: 建造 -04:19=适当的时候撤退是比所有的攻击|更安全的选择|鼠标: 选择传送目标 +04:18=喷灯还不够?还要个更安全的地方?|建造若干条大梁挡住吧.|左/右方向键: 选择梁的方向|光标: 建造 +04:19=适当的时候撤退是比所有的攻击|更安全的选择|光标: 选择传送目标 04:20=可以让你更换当前使用的刺猬.|攻击键: 启动切换功能 -04:21=用炮弹发射器发射一个手榴弹样|的东西. 在爆炸之后会裂开成小块|攻击键: 用全力发射 +04:21=用炮弹发射器发射一个手榴弹样|的东西. 在爆炸之后会裂开成小块|攻击键: 全力发射 04:22=这不只是女王才用的东西!|这鞭子能解决很多问题, 比如说那些|喜欢站在悬崖边上的小屁孩.|攻击键: 鞭打你面前的一切东西 04:23=自杀式炸弹袭击向来好用!|用你的一条命攻击直线上的一切东西并爆炸.|攻击键: 启动自杀性攻击 04:24=生日快乐! 嗱, 放下这个蛋糕, 他|就会走到敌人身边然后爆炸.| 而且能贴着地形走.|攻击键: 让蛋糕开始/结束走路 @@ -699,14 +747,61 @@ 04:27=让地狱的礼花在敌人头上绽放!|这真的是危险品, 使用时候记得原理|爆炸之后还会燃烧好一阵子|攻击键: 按住蓄力. 04:28=本火箭在发射后将会钻到地里|一旦燃料用完或者打穿地面就会爆炸.|攻击键: 按住蓄力. 04:29=还记得小时候玩的玻璃球么?|不过这个是炸弹版. 发射大量的小玻|璃球然后爆炸|攻击键: 全力发射|上/下方向键: 发射过程中更换方向 -04:30=呼叫一架飞机空投燃烧弹.|用得好的话会造成巨大伤害.|左/右方向键: 决定攻击方向|鼠标: 选定目标 -04:31=啊哈, 遥控飞机除了能帮你|收集物品之外. 还能空投炸弹.|攻击键: 飞机起飞/投放炸弹|长跳键: Let the valkyries ride into battle|上/下方向键: 控制方向 +04:30=呼叫一架飞机空投燃烧弹.|用得好的话会造成巨大伤害.|左/右方向键: 决定攻击方向|光标: 选定目标 +04:31=啊哈, 遥控飞机除了能帮你|收集物品之外. 还能空投炸弹.|攻击键: 飞机起飞/投放炸弹|长跳键: 战场之神|上/下方向键: 控制方向 04:32=低重力装置能影响更多东西!| 除了跳得更远之外还能让|敌人飞得更远.|攻击键: 激活 04:33=有时候致命打击还是不够过瘾.|攻击键: 激活 04:34=你打不到我!|攻击键: 激活 04:35=时间流逝得很快, 你也知道|刺猬腿短.|攻击键: 激活 04:36=好吧, 你最后还是承认自己眼神不好.|高科技还是能帮你不少的.|攻击键: 激活 04:37=不用害怕白天.|这只能本回合有效, 可以把造成的伤害变|成自己的血量 .|攻击键: 激活 -04:38=你也知道CS里狙击枪的威力,|能打比较远的地方.|攻击键: 射击 (2发子弹) -04:39=用飞盘可以飞到地图上的任何角落.|不过这个东西连发明者都|认为很难用.|攻击键: 激活|上/左/右方向键: 向某方向飞 +04:38=你也知道狙击枪的威力,|能打比较远的地方.|攻击键: 射击 (2发子弹) +04:39=驾驶飞碟可以飞到地图上的任何角落.|不过这个东西连发明者都认为很难用.|攻击键: 激活|上/左/右方向键: 向某方向飞|前跳:攻击敌人 04:40=把地面填满汽油然后....|攻击键: 按住蓄力. +;04:41=自然的力量要盖过飞盘。|带着刺猬的鸟竟然毫不犹豫的空中下蛋!|攻击键: 激活和放蛋|上/左/右方向键: 向某方向飞 +;04:42=This portable portal device is capable|of instantly transporting you, your enemies,|or your weaponry between two points on the|terrain.|Use it wisely and your campaign will be a...|HUGE SUCCESS!|Attack: Shoot a portal|Switch: Cycle portal colours +04:42=移动传送装置|迅速传输自己或者敌人或者|你的武器,直接连接|地表的两个不同位置。|用的聪明那么。。。|攻击键: 发射一个传送点|切换键: 改变颜色 +;04:43=Make your musical debut an explosive success!|Drop a piano from the heavens, but beware...|someone needs to play it, and that may cost you|your life!|Cursor: Select target region|F1-F9: Play the piano +04:43=音乐细胞的迸发!|钢琴从天堂降落,带|着演奏者最终回归天堂|光标: 选择目标区域|F1-F9:演奏钢琴 +04:44=这不是奶酪!而是生化武器!|爆炸只有一次,带来的毒害是深远的!|1-5: 设定定时器|攻击键: 按住蓄力 +;04:45=All those physics classes have finally |paid off, launch a devastating Sine |wave at your foes. |Watch out, this weapon packs quite a kick. (This weapon is incomplete)|Attack: Shoot +04:45=全部物理阶级最终|转化为正弦波动|留心,力是相对的|攻击键: 发射 +;04:46=Cover your foes with sizzling liquid flame.|Heartwarming!|Attack: Activate|Up/Down: Continue aiming|Left/Right: Modify spitting power +04:46= 用满腔的火焰虐待你的对手吧。|攻击键: 激活|上/下方向键: 改变攻击方向|左/右方向键: 调整喷射距离 +;04:47=Double the fun with two spiky, sneaky, sticky mines.|Set up a chain reaction or defend yourself (or both!)|Attack: Hold to shoot with more power (twice) +04:47=两次机会双重乐趣,隐蔽且黏着的地雷。|利用脑力造成连锁反应!|攻击键: 按住蓄力(两发) +;04:48=Why should the moles get all the abuse?|Wacking a hog can be just as fun! A good|blow from this hammer will shave off one|third of a hog's health and plunge them|underground.|Attack: Activate +04:48=痛扁刺猬:用力一锤|将使中者镶入地表,削减它健康的1/3.|攻击键: 打 + + +; Game goal strings +;05:01=The following rules apply +05:01= 将应用以下规则 +;05:02=Forts: Defend your fortress; vanquish your enemies! +05:02= 城堡: 守住你的城堡; 削平你的敌人! +;05:03=Low Gravity: Watch your step +05:03= 低重力: 注意脚步 +;05:04=Invulnerability: Hogs are (almost) invulnerable +05:04=无敌: 刺猬不受伤害 +;05:05=Vampirism: Hogs will be healed for the damage dealt +05:05=吸血: 敌人失去的就是我的 +;05:06=Karma: Hogs will be damaged for the damage dealt +05:06=因果效应: 伤害有多少,自己都知道 +;05:07=Protect the King: Don't let your king die!|Place the King: Pick a protected starting point for your King +05:07=保护国王: 国王不能死!|放置国王: 为国王选择安全的起始地点 +;05:08=Place Hedgehogs: Place your hogs before the game starts +05:08=选择起始点: 游戏开始前手动放置刺猬 +;05:09=Artillery: Hogs can't walk to change position +05:09=远程打击: 不许动! +;05:10=Indestructible Terrain: Most weapons won't destroy terrain +05:10=无损地表: 多数武器无法改变地形 +;05:11=Shared Ammo: All teams of the same color share their ammunition +05:11=共享装备: 同色的刺猬共享它们的装备 +;05:12=Mine Timers: Mines will detonate after %1 second(s) +05:12=地雷定时器: %1 秒起爆 +;05:13=Mine Timers: Mines will detonate instantly +05:13=地雷定时器: 立即起爆 +;05:14=Mine Timers: Mines will detonate after 0 - 3 seconds +05:14=地雷定时器: 0-3 秒起爆 +;05:15=Damage Modifier: All weapons will do %1% damage +05:15=伤害修正: 武器伤害使用 %1% 修正值 diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Maps/FlightJoust/map.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/FlightJoust/map.cfg Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,2 @@ +Nature +4 \ No newline at end of file diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Maps/FlightJoust/map.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/FlightJoust/map.lua Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,79 @@ +local hogs = {} +local spawncrate = 0 + +function mapM_(func, tbl) + for i,v in pairs(tbl) do + func(v) + end +end + +function map(func, tbl) + local newtbl = {} + for i,v in pairs(tbl) do + newtbl[i] = func(v) + end + return newtbl +end + +function filter(func, tbl) + local newtbl = {} + for i,v in pairs(tbl) do + if func(v) then + table.insert(newtbl, v) + end + end + return newtbl +end + +function onGameInit() + GameFlags = gfSolidLand + gfDivideTeams + TurnTime = 10000 + CaseFreq = 0 + LandAdds = 0 + Explosives = 0 + Delay = 500 + SuddenDeathTurns = 99999 -- "disable" sudden death + Theme = Compost +end + +function onGameStart() + local offset = 50 + local team1hh = filter(function(h) return GetHogClan(h) == 0 end, hogs) + local team2hh = filter(function(h) return GetHogClan(h) == 1 end, hogs) + + for i,h in ipairs(team1hh) do + SetGearPosition(h, 250+(i-1)*offset, 1000) + end + for i,h in ipairs(team2hh) do + SetGearPosition(h, 3500-(i-1)*offset, 1000) + end + + SpawnHealthCrate(1800, 1150) +end + +function onAmmoStoreInit() + SetAmmo(amRCPlane, 9, 0, 0, 0) + SetAmmo(amSkip, 9, 0, 0, 0) +end + +function onGearAdd(gear) + if GetGearType(gear) == gtRCPlane then + SetTimer(gear,60000) + end + if GetGearType(gear) == gtHedgehog then + table.insert(hogs, gear) + end +end + +function onGameTick() + if (TurnTimeLeft == 9999 and spawncrate == 1) then + SpawnHealthCrate(1800, 1150) + spawncrate = 0 + end +end + +function onGearDelete(gear) + if GetGearType(gear) == gtCase then + spawncrate = 1 + end +end \ No newline at end of file diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Maps/FlightJoust/map.png Binary file share/hedgewars/Data/Maps/FlightJoust/map.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Maps/FlightJoust/preview.png Binary file share/hedgewars/Data/Maps/FlightJoust/preview.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua Wed Oct 27 14:02:20 2010 +0200 @@ -0,0 +1,242 @@ +-- IMPORTANT -- THIS IS WORK IN PROGRESS AND VERY LIKELY TO BE CHANGED AGAIN +-- IMPORTANT -- SAVE YOURSELF THE WORK AND DON'T TRANSLATE THE TEXTS IF YOU FEAR STARTING OVER LATER! + +local teamnames = {} +local hognames = {} +teamnames[0] = { + ["en"] = "Bloody Rookies", + ["de"] = "Blutige Anfnger" +} + +teamnames[1] = { + ["en"] = "Instructors", + ["de"] = "Ausbilder" +} + +hognames[0] = { + ["en"] = "Joker", + ["de"] = "Joker" +} + +hognames[1] = { + ["en"] = "Harthog", + ["de"] = "Harthog" +} + +local caption = { + ["en"] = "Boot Camp", + ["de"] = "Grundausbildung" +} + +local subcaption = { + ["en"] = "Follow the instructions!", + ["de"] = "Befolge die Anweisungen!" +} + +local goals = {} + +goals[0] = { + ["en"] = "Listen to your Drill Instructor and follow his lead!", + ["de"] = "Hre deinem Ausbilder zu und befolge seine Anweisungen!" +} + +goals[1] = { + ["en"] = "Destroy the target to finish this mission!", + ["de"] = "Zerstre das Ziel, um diese Mission abzuschlieen!" +} + +goals[2] = { + ["en"] = "Excellent! You've passed the Boot Camp!", + ["de"] = "Ausgezeichnet! Du hast das Ausbildungslager bestanden!" +} + +local failed = { + ["en"] = "You failed! Follow the instructions and shoot the target only!", + ["de"] = "Du hast versagt! Befolge die Anweisungen und schie nur auf das Ziel!" +} + +local drill = {} + +drill[0] = { + ["en"] = "Allright, maggot!", + ["de"] = "Also gut, du Made!" +} + +drill[1] = { + ["en"] = "Show that you aren't that useless.", + ["de"] = "Zeig, dass du nicht so nutzlos bist." +} + +drill[2] = { + ["en"] = "Use [left] to move to the left!", + ["de"] = "Benutze [Links], um nach links zu gehen!" +} + +drill[3] = { + ["en"] = "Good! Now use [right] to come back!", + ["de"] = "Gut! Nun komm mit [Rechts] zurck!" +} + +drill[4] = { + ["en"] = "Excellent!", + ["de"] = "Ausgezeichnet!" +} + +drill[5] = { + ["en"] = "Now jump to the left using [return]!", + ["de"] = "Jetzt springe mit [Eingabetaste] nach links!" +} + +drill[6] = { + ["en"] = "Use [up] and [down] to aim.", + ["de"] = "Benutze [Hoch] und [Runter], um zu zielen." +} + +drill[7] = { + ["en"] = "Hold [space] to power up your shot and then release it to shoot.", + ["de"] = "Halte [Leertaste], um deinen Schuss aufzuladen, und lasse dann rechtzeitig los." +} + +drill[8] = { + ["en"] = "Destroy the target to finish your basic training!", + ["de"] = "Zerstre das Ziel, um deine Grundausbildung abzuschlieen!" +} + +local function loc(text) + if text == nil then return "**missing**" + elseif text[L] == nil then return text["en"] + else return text[L] + end +end + +local player = nil +local instructor = nil +local target = nil + +function onGameStart() + +end + +local player_start_x = 2300 +local player_start_y = 1250 +local target_x = 1900 +local target_y = 1250 +local player_health = 100 +local instructor_health = 100 +local teamcolor = 14483456 + +local progress = 0 +local time_start = 0 + +function onGameTick() + if progress == -1 and (time_start + 2500) == GameTime then + EndGame() + elseif progress == -1 then + + elseif progress > 0 and ((TurnTimeLeft == 0) or (GetHealth(player) ~= player_health) or (GetHealth(instructor) ~= instructor_health)) then + progress = -1 + ShowMission(loc(caption), loc(subcaption), loc(failed), -amBazooka, 0); + time_start = GameTime + PlaySound(sndNooo) + TurnTimeLeft = 0 + elseif GameTime == 0 then + ShowMission(loc(caption), loc(subcaption), loc(goals[0]), -amBazooka, 0); + TurnTimeLeft = 60000 + elseif GameTime == 2500 then + FollowGear(instructor) + HogSay(instructor, loc(drill[0]), SAY_SAY) + elseif GameTime == 5000 then + FollowGear(instructor) + HogSay(instructor, loc(drill[1]), SAY_SAY) + elseif GameTime == 7500 then + FollowGear(instructor) + HogSay(instructor, loc(drill[2]), SAY_SHOUT) + progress = 1 + TurnTimeLeft = 10000 + elseif progress == 1 then + local x, y = GetGearPosition(player); + if x < player_start_x - 50 then + progress = 2 + FollowGear(instructor) + HogSay(instructor, loc(drill[3]), SAY_SHOUT) + TurnTimeLeft = 10000 + end + elseif progress == 2 then + local x, y = GetGearPosition(player); + if x > player_start_x then + progress = 3 + FollowGear(instructor) + HogSay(instructor, loc(drill[4]), SAY_SAY) + time_start = GameTime + end + elseif progress == 3 and (time_start + 2500 == GameTime) then + progress = 4 + FollowGear(instructor) + HogSay(instructor, loc(drill[5]), SAY_SHOUT) + HogTurnLeft(player, true) + TurnTimeLeft = 10000 + elseif progress == 4 then + local x, y = GetGearPosition(player); + if y < player_start_y then + progress = 5 + FollowGear(instructor) + HogSay(instructor, "Yeah!", SAY_SAY) + time_start = GameTime + TurnTimeLeft = 30000 + end + elseif progress == 5 and (time_start + 2500 == GameTime) then + FollowGear(instructor) + HogSay(instructor, loc(drill[6]), SAY_SAY) + elseif progress == 5 and (time_start + 5000 == GameTime) then + FollowGear(instructor) + HogSay(instructor, loc(drill[7]), SAY_SAY) + elseif progress == 5 and (time_start + 7500 == GameTime) then + FollowGear(instructor) + HogSay(instructor, loc(drill[8]), SAY_SHOUT) + ShowMission(loc(caption), loc(subcaption), loc(goals[1]), 1, 0); + target = AddGear(target_x, target_y, gtTarget, 0, 0, 0, 0) + TurnTimeLeft = 60000 + elseif progress == 5 and (time_start + 10000 == GameTime) then + FollowGear(target) + elseif progress == 6 then + progress = 7 + ShowMission(loc(caption), loc(subcaption), loc(goals[2]), 0, 0); + PlaySound(sndVictory); + time_start = GameTime + elseif progress == 7 and (time_start + 2500 == GameTime) then + EndGame() + end +end + +function onGameInit() + Seed = 0 + GameFlags = gfMultiWeapon + gfOneClanMode + TurnTime = 25000 + CaseFreq = 0 + LandAdds = 0 + Explosives = 0 + Delay = 2500 + Map = "Mushrooms" + Theme = "Nature" + + AddTeam(loc(teamnames[0]), teamcolor, "Simple", "Island", "Default") + player = AddHog(loc(hognames[0]), 0, player_health, "NoHat") + SetGearPosition(player, player_start_x, player_start_y); + + AddTeam(loc(teamnames[1]), teamcolor + 1, "Simple", "Island", "Default") + instructor = AddHog(loc(hognames[1]), 0, instructor_health, "NoHat") + SetGearPosition(instructor, player_start_x + 100, player_start_y) + HogTurnLeft(instructor, true) + + FollowGear(player); +end + +function onAmmoStoreInit() + SetAmmo(amBazooka, 9, 0, 0, 0) +end + +function onGearDelete(gear) + if GetGearType(gear) == gtTarget then + progress = 6 + end +end \ No newline at end of file diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Music/Art.ogg Binary file share/hedgewars/Data/Music/Art.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Music/Compost.ogg Binary file share/hedgewars/Data/Music/Compost.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Names/types.ini --- a/share/hedgewars/Data/Names/types.ini Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Names/types.ini Wed Oct 27 14:02:20 2010 +0200 @@ -80,9 +80,96 @@ StarHogs ##### darthvader +stormtrooper +stormtrooper ##### Hogtrix ##### Sunglasses +##### +Hog Fighters +##### +Balrog +Blanka +BlankaToothless +Chunli +Guile +Honda +Ken +Ryu +Vega +##### +Mushroom Kingdom +##### +Mario +Luigi +PrincessPeach +PrincessDaisy +Toad +Wario +##### +Honor +##### +Samurai +##### +Straw +##### +StrawHat +StrawHatEyes +StrawHatFacial +##### +Rainbow +##### +GreenHair +BlueHair +RedHair +OrangeHair +YellowHair +PurpleHair +GreyHair +##### +Pride +##### +laurel +##### +Green Hill +##### +sth_Amy +sth_AmyClassic +sth_Eggman +sth_Knux +sth_Metal +sth_Shadow +sth_Sonic +sth_Super +sth_Tails +##### +Pocket Pros +##### +ash +charmander +chikorita +diglett +jigglypuff +lugia +mudkip +pikachu +slowpoke +squirtle +voltorb +##### +Vikings +##### +Viking +##### +Guardian Angels +##### +angel +##### +Snipers +Sniper Team +##### +Sniper +anzac *END* diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Sounds/baseballbat.ogg Binary file share/hedgewars/Data/Sounds/baseballbat.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Sounds/bump.ogg Binary file share/hedgewars/Data/Sounds/bump.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Sounds/drillgun.ogg Binary file share/hedgewars/Data/Sounds/drillgun.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Sounds/hogchant3.ogg Binary file share/hedgewars/Data/Sounds/hogchant3.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Sounds/parachute.ogg Binary file share/hedgewars/Data/Sounds/parachute.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Sounds/ropeattach.ogg Binary file share/hedgewars/Data/Sounds/ropeattach.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Sounds/roperelease.ogg Binary file share/hedgewars/Data/Sounds/roperelease.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Sounds/ropeshot.ogg Binary file share/hedgewars/Data/Sounds/ropeshot.ogg has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/BlueWater.png Binary file share/hedgewars/Data/Themes/Art/BlueWater.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Border.png Binary file share/hedgewars/Data/Themes/Art/Border.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Chunk.png Binary file share/hedgewars/Data/Themes/Art/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Clouds.png Binary file share/hedgewars/Data/Themes/Art/Clouds.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Droplet.png Binary file share/hedgewars/Data/Themes/Art/Droplet.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Flake.png Binary file share/hedgewars/Data/Themes/Art/Flake.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Girder.png Binary file share/hedgewars/Data/Themes/Art/Girder.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/LandBackTex.png Binary file share/hedgewars/Data/Themes/Art/LandBackTex.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/LandTex.png Binary file share/hedgewars/Data/Themes/Art/LandTex.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Mona.png Binary file share/hedgewars/Data/Themes/Art/Mona.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Schrei.png Binary file share/hedgewars/Data/Themes/Art/Schrei.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Sky.png Binary file share/hedgewars/Data/Themes/Art/Sky.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Soup.png Binary file share/hedgewars/Data/Themes/Art/Soup.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Splash.png Binary file share/hedgewars/Data/Themes/Art/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Splash.sifz Binary file share/hedgewars/Data/Themes/Art/Splash.sifz has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Thumbs.db Binary file share/hedgewars/Data/Themes/Art/Thumbs.db has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/Zeit.png Binary file share/hedgewars/Data/Themes/Art/Zeit.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/horizont.png Binary file share/hedgewars/Data/Themes/Art/horizont.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/icon.png Binary file share/hedgewars/Data/Themes/Art/icon.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Art/theme.cfg --- a/share/hedgewars/Data/Themes/Art/theme.cfg Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Themes/Art/theme.cfg Wed Oct 27 14:02:20 2010 +0200 @@ -1,18 +1,18 @@ -7 13 40 -13 17 22 -$01 $3b $66 -$01 $3b $66 $80 -Art.ogg -0 -4 -Soup -3 3 220 130 18 1 0 0 142 150 -Mona -2 0 190 191 8 1 0 0 191 150 -Schrei -1 0 345 130 1 1 0 0 160 175 -Zeit -2 0 153 45 5 1 90 20 106 105 -0 -0 -30 0 0 0 +7 13 40 +13 17 22 +$01 $3b $66 +$01 $3b $66 $80 +Art.ogg +0 +4 +Soup +3 3 220 130 18 1 0 0 142 150 +Mona +2 0 190 191 8 1 0 0 191 150 +Schrei +1 0 345 130 1 1 0 0 160 175 +Zeit +2 0 153 45 5 1 90 20 106 105 +0 +0 +30 0 0 0 diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Bamboo/Chunk.png Binary file share/hedgewars/Data/Themes/Bamboo/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Bath/Chunk.png Binary file share/hedgewars/Data/Themes/Bath/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/BlueWater.png Binary file share/hedgewars/Data/Themes/Brick/BlueWater.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/Border.png Binary file share/hedgewars/Data/Themes/Brick/Border.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/Chunk.png Binary file share/hedgewars/Data/Themes/Brick/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/Droplet.png Binary file share/hedgewars/Data/Themes/Brick/Droplet.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/Flake.png Binary file share/hedgewars/Data/Themes/Brick/Flake.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/Girder.png Binary file share/hedgewars/Data/Themes/Brick/Girder.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/LandBackTex.png Binary file share/hedgewars/Data/Themes/Brick/LandBackTex.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/LandTex.png Binary file share/hedgewars/Data/Themes/Brick/LandTex.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/Sky.png Binary file share/hedgewars/Data/Themes/Brick/Sky.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/Splash.png Binary file share/hedgewars/Data/Themes/Brick/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/horizont.png Binary file share/hedgewars/Data/Themes/Brick/horizont.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/icon.png Binary file share/hedgewars/Data/Themes/Brick/icon.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/plant1.png Binary file share/hedgewars/Data/Themes/Brick/plant1.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/plant2.png Binary file share/hedgewars/Data/Themes/Brick/plant2.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/plant3.png Binary file share/hedgewars/Data/Themes/Brick/plant3.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/plant4.png Binary file share/hedgewars/Data/Themes/Brick/plant4.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/plant5.png Binary file share/hedgewars/Data/Themes/Brick/plant5.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/plant6.png Binary file share/hedgewars/Data/Themes/Brick/plant6.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/plant7.png Binary file share/hedgewars/Data/Themes/Brick/plant7.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/plant8.png Binary file share/hedgewars/Data/Themes/Brick/plant8.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/plant9.png Binary file share/hedgewars/Data/Themes/Brick/plant9.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/spray1.png Binary file share/hedgewars/Data/Themes/Brick/spray1.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/spray2.png Binary file share/hedgewars/Data/Themes/Brick/spray2.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Brick/spray3.png Binary file share/hedgewars/Data/Themes/Brick/spray3.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Cake/Splash.png Binary file share/hedgewars/Data/Themes/Cake/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Castle/Chunk.png Binary file share/hedgewars/Data/Themes/Castle/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Castle/Splash.png Binary file share/hedgewars/Data/Themes/Castle/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Cheese/Chunk.png Binary file share/hedgewars/Data/Themes/Cheese/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/City/Chunk.png Binary file share/hedgewars/Data/Themes/City/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Compost/Chunk.png Binary file share/hedgewars/Data/Themes/Compost/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Compost/Splash.png Binary file share/hedgewars/Data/Themes/Compost/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/CrazyMission/Splash.png Binary file share/hedgewars/Data/Themes/CrazyMission/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Deepspace/Splash.png Binary file share/hedgewars/Data/Themes/Deepspace/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Desert/Chunk.png Binary file share/hedgewars/Data/Themes/Desert/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Desert/Splash.png Binary file share/hedgewars/Data/Themes/Desert/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/EarthRise/Chunk.png Binary file share/hedgewars/Data/Themes/EarthRise/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Eyes/Splash.png Binary file share/hedgewars/Data/Themes/Eyes/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Freeway/Chunk.png Binary file share/hedgewars/Data/Themes/Freeway/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Halloween/Chunk.png Binary file share/hedgewars/Data/Themes/Halloween/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Halloween/Splash.png Binary file share/hedgewars/Data/Themes/Halloween/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Hell/Chunk.png Binary file share/hedgewars/Data/Themes/Hell/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Hell/Splash.png Binary file share/hedgewars/Data/Themes/Hell/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Island/Chunk.png Binary file share/hedgewars/Data/Themes/Island/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Nature/Chunk.png Binary file share/hedgewars/Data/Themes/Nature/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Olympics/Chunk.png Binary file share/hedgewars/Data/Themes/Olympics/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/Chunk.png Binary file share/hedgewars/Data/Themes/Sheep/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/Clouds.png Binary file share/hedgewars/Data/Themes/Sheep/Clouds.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/Sky.png Binary file share/hedgewars/Data/Themes/Sheep/Sky.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/SkyL.png Binary file share/hedgewars/Data/Themes/Sheep/SkyL.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/SkyR.png Binary file share/hedgewars/Data/Themes/Sheep/SkyR.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/barriere.png Binary file share/hedgewars/Data/Themes/Sheep/barriere.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/fleur.png Binary file share/hedgewars/Data/Themes/Sheep/fleur.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/fleurland.png Binary file share/hedgewars/Data/Themes/Sheep/fleurland.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/fleurland2.png Binary file share/hedgewars/Data/Themes/Sheep/fleurland2.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/fleurland3.png Binary file share/hedgewars/Data/Themes/Sheep/fleurland3.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/fleurland4.png Binary file share/hedgewars/Data/Themes/Sheep/fleurland4.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/grass.png Binary file share/hedgewars/Data/Themes/Sheep/grass.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/grass2.png Binary file share/hedgewars/Data/Themes/Sheep/grass2.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/grassp.png Binary file share/hedgewars/Data/Themes/Sheep/grassp.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/grassp2.png Binary file share/hedgewars/Data/Themes/Sheep/grassp2.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/mouton1.png Binary file share/hedgewars/Data/Themes/Sheep/mouton1.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/mouton2.png Binary file share/hedgewars/Data/Themes/Sheep/mouton2.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/mouton3.png Binary file share/hedgewars/Data/Themes/Sheep/mouton3.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/mouton4.png Binary file share/hedgewars/Data/Themes/Sheep/mouton4.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Sheep/rocher.png Binary file share/hedgewars/Data/Themes/Sheep/rocher.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Snow/Chunk.png Binary file share/hedgewars/Data/Themes/Snow/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/Bass.png Binary file share/hedgewars/Data/Themes/Stage/Bass.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/BlueWater.png Binary file share/hedgewars/Data/Themes/Stage/BlueWater.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/Box.png Binary file share/hedgewars/Data/Themes/Stage/Box.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/Chunk.png Binary file share/hedgewars/Data/Themes/Stage/Chunk.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/Droplet.png Binary file share/hedgewars/Data/Themes/Stage/Droplet.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/Flake.png Binary file share/hedgewars/Data/Themes/Stage/Flake.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/Girder.png Binary file share/hedgewars/Data/Themes/Stage/Girder.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/LandBackTex.png Binary file share/hedgewars/Data/Themes/Stage/LandBackTex.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/LandTex.png Binary file share/hedgewars/Data/Themes/Stage/LandTex.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/Light.png Binary file share/hedgewars/Data/Themes/Stage/Light.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/MicL.png Binary file share/hedgewars/Data/Themes/Stage/MicL.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/MicR.png Binary file share/hedgewars/Data/Themes/Stage/MicR.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/Sky.png Binary file share/hedgewars/Data/Themes/Stage/Sky.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/SkyL.png Binary file share/hedgewars/Data/Themes/Stage/SkyL.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/SkyR.png Binary file share/hedgewars/Data/Themes/Stage/SkyR.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/Splash.png Binary file share/hedgewars/Data/Themes/Stage/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/drum.png Binary file share/hedgewars/Data/Themes/Stage/drum.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/horizont.png Binary file share/hedgewars/Data/Themes/Stage/horizont.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/icon.png Binary file share/hedgewars/Data/Themes/Stage/icon.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/poster1.png Binary file share/hedgewars/Data/Themes/Stage/poster1.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/poster2.png Binary file share/hedgewars/Data/Themes/Stage/poster2.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/poster3.png Binary file share/hedgewars/Data/Themes/Stage/poster3.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/poster4.png Binary file share/hedgewars/Data/Themes/Stage/poster4.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Stage/theme.cfg --- a/share/hedgewars/Data/Themes/Stage/theme.cfg Thu Aug 26 23:59:18 2010 +0200 +++ b/share/hedgewars/Data/Themes/Stage/theme.cfg Wed Oct 27 14:02:20 2010 +0200 @@ -1,30 +1,30 @@ -0 0 0 -106 106 106 -72 105 127 -37 76 91 128 -Rock.ogg -0 -6 -MicR -1 0 28 7 24 1 25 0 125 52 -MicL -1 145 27 5 25 1 0 0 110 52 -Bass -1 243 373 20 5 1 0 0 330 310 -Light -1 10 0 65 10 1 0 42 140 122 -Box -1 0 170 150 8 1 0 0 150 145 -drum -1 0 202 239 4 1 39 0 200 150 -4 -poster1 -2 -poster2 -2 -poster3 -2 -poster4 -2 -100 -3 99999999 10 20 +0 0 0 +106 106 106 +72 105 127 +37 76 91 128 +Rock.ogg +0 +6 +MicR +1 0 28 7 24 1 25 0 125 52 +MicL +1 145 27 5 25 1 0 0 110 52 +Bass +1 243 373 20 5 1 0 0 330 310 +Light +1 10 0 65 10 1 0 42 140 122 +Box +1 0 170 150 8 1 0 0 150 145 +drum +1 0 202 239 4 1 39 0 200 150 +4 +poster1 +2 +poster2 +2 +poster3 +2 +poster4 +2 +100 +3 99999999 10 20 diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Underwater/Clouds.png Binary file share/hedgewars/Data/Themes/Underwater/Clouds.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Underwater/Flake.png Binary file share/hedgewars/Data/Themes/Underwater/Flake.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Underwater/Sky.png Binary file share/hedgewars/Data/Themes/Underwater/Sky.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Underwater/Splash.png Binary file share/hedgewars/Data/Themes/Underwater/Splash.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Underwater/clam.png Binary file share/hedgewars/Data/Themes/Underwater/clam.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Underwater/crab.png Binary file share/hedgewars/Data/Themes/Underwater/crab.png has changed diff -r 793386610068 -r b1c2c2f6fc5e share/hedgewars/Data/Themes/Underwater/horizont.png Binary file share/hedgewars/Data/Themes/Underwater/horizont.png has changed