# HG changeset patch # User koda # Date 1303778200 -7200 # Node ID b850b544addc5c2b708b903ae4b5b040738148c1 # Parent b9539115608d30695e95e3f0bc47476acfeff6ed remove unusued voices also for ios small tweak that allows us to avoid modifying sdl sourcecode to work diff -r b9539115608d -r b850b544addc hedgewars/SDLh.pas --- a/hedgewars/SDLh.pas Mon Apr 25 17:56:26 2011 -0400 +++ b/hedgewars/SDLh.pas Tue Apr 26 02:36:40 2011 +0200 @@ -767,6 +767,8 @@ function SDL_CreateRenderer(window: PSDL_Window; index, flags: LongInt): PSDL_Renderer; cdecl; external SDLLibName; function SDL_DestroyRenderer(renderer: PSDL_Renderer): LongInt; cdecl; external SDLLibName; function SDL_DestroyWindow(window: PSDL_Window): LongInt; cdecl; external SDLLibName; +function SDL_GetRenderer(window: PSDL_Window): PSDL_Renderer; cdecl; external SDLLibName; + procedure SDL_VideoQuit; cdecl; external SDLLibName; function SDL_GetNumVideoDisplays: LongInt; cdecl; external SDLLibName; @@ -782,6 +784,7 @@ function SDL_PixelFormatEnumToMasks(format: TSDL_ArrayByteOrder; bpp: PLongInt; Rmask, Gmask, Bmask, Amask: PLongInt): boolean; cdecl; external SDLLibName; procedure SDL_WarpMouseInWindow(window: PSDL_Window; x, y: LongInt); cdecl; external SDLLibName; +function SDL_SetHint(name, value: PChar): boolean; cdecl; external SDLLibName; {$ENDIF} function SDL_GetMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; diff -r b9539115608d -r b850b544addc project_files/HedgewarsMobile/Audio/Music/main theme.ogg Binary file project_files/HedgewarsMobile/Audio/Music/main theme.ogg has changed diff -r b9539115608d -r b850b544addc project_files/HedgewarsMobile/Audio/Sounds/hogchant3.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/hogchant3.ogg has changed diff -r b9539115608d -r b850b544addc project_files/HedgewarsMobile/Audio/Sounds/plane.ogg Binary file project_files/HedgewarsMobile/Audio/Sounds/plane.ogg has changed diff -r b9539115608d -r b850b544addc project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m --- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Mon Apr 25 17:56:26 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Tue Apr 26 02:36:40 2011 +0200 @@ -158,7 +158,7 @@ [NSNumber numberWithInt:self.parentController.interfaceOrientation],@"orientation", [self.systemSettings objectForKey:@"menu"],@"menu", nil]; - [self performSelector:@selector(displayOverlayLater:) withObject:overlayOptions afterDelay:0.1]; + [self performSelector:@selector(displayOverlayLater:) withObject:overlayOptions afterDelay:3]; [overlayOptions release]; // SYSTEMS ARE GO!! diff -r b9539115608d -r b850b544addc project_files/HedgewarsMobile/Classes/OverlayViewController.h --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.h Mon Apr 25 17:56:26 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.h Tue Apr 26 02:36:40 2011 +0200 @@ -20,7 +20,6 @@ #import -#import "SDL_sysvideo.h" @class InGameMenuViewController; @class HelpPageViewController; diff -r b9539115608d -r b850b544addc project_files/HedgewarsMobile/Classes/OverlayViewController.m --- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m Mon Apr 25 17:56:26 2011 -0400 +++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m Tue Apr 26 02:36:40 2011 +0200 @@ -26,8 +26,6 @@ #import "PascalImports.h" #import "CommodityFunctions.h" #import "CGPointUtils.h" -#import "SDL_config_iphoneos.h" -#import "SDL_mouse.h" #import "ObjcExports.h" #define HIDING_TIME_DEFAULT [NSDate dateWithTimeIntervalSinceNow:2.7] @@ -55,8 +53,14 @@ if (isGameRunning() == NO) return; + UIView *sdlView = nil; + for (UIView *oneView in [[[UIApplication sharedApplication] keyWindow] subviews]) + if ([oneView isMemberOfClass:[SDL_uikitopenglview class]]) { + sdlView = (UIView *)oneView; + break; + } + UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; - UIView *sdlView = [[[UIApplication sharedApplication] keyWindow] viewWithTag:SDL_VIEW_TAG]; NSInteger angle_left = (self.initialOrientation == UIInterfaceOrientationLandscapeLeft) ? 180 : 0; NSInteger angle_right = (self.initialOrientation == UIInterfaceOrientationLandscapeLeft) ? 0 : 180; diff -r b9539115608d -r b850b544addc project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj --- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Mon Apr 25 17:56:26 2011 -0400 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Tue Apr 26 02:36:40 2011 +0200 @@ -1336,7 +1336,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\n\n#create config.inc\necho \"Updating config file...\"\nPROTO=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep HEDGEWARS_PROTO_VER | cut -d ' ' -f 3`\nMAJN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MAJOR | xargs | cut -d ' ' -f 3`\nMINN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MINOR | xargs | cut -d ' ' -f 3`\nPATN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_PATCH | xargs | cut -d ' ' -f 3 | cut -d '$' -f 1`\nREVN=`/usr/local/bin/hg id -n ${PROJECT_DIR}/../../`\necho \"const cNetProtoVersion = $PROTO; const cVersionString = '${MAJN}.${MINN}.${PATN}-${REVN}'; const cLuaLibrary = '';\" > ${PROJECT_DIR}/../../hedgewars/config.inc\n\necho \"Copying Data...\"\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\necho \"Fetching additional graphics 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/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn/\ncp ${PROJECT_DIR}/../../QTfrontend/res/StatsMedal*.png ${PROJECT_DIR}/Data/Graphics/Btn/\ncp ${PROJECT_DIR}/../../QTfrontend/res/StatsR.png ${PROJECT_DIR}/Data/Graphics/Btn/StatsStar.png\ncp ${PROJECT_DIR}/../../QTfrontend/res/ammopic.png ${PROJECT_DIR}/Data/Graphics/Btn/iconAmmo.png\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels/\n\necho \"Removing text and dummy files...\"\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, misc stuff\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,Ruler}\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/{TeamCap,TeamHeadband,TeamHair}\nrm -rf ${PROJECT_DIR}/Data/misc/\n\n#delete forbidden maps\nrm -rf ${PROJECT_DIR}/Data/Maps/{Cheese,FlightJoust}\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\necho \"Copying mono audio...\"\n#copy mono audio\ncp -R ${PROJECT_DIR}/audio/* ${PROJECT_DIR}/Data/\n\necho \"Tweaking Data contents...\"\n#move Lua maps in Missions\nmkdir ${PROJECT_DIR}/Data/Missions/Maps/\nmv ${PROJECT_DIR}/Data/Maps/{Basketball,Knockball,TrophyRace,CTF_Blizzard,Control} ${PROJECT_DIR}/Data/Missions/Maps/\n#workaround for missing map in CTF_Blizzard\nln -s ../../../Maps/Blizzard/map.png ${PROJECT_DIR}/Data/Missions/Maps/CTF_Blizzard/map.png\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 Beach and Digital themes as well as Islqnd (from Maps and Themes folders)\nrm -rf ${PROJECT_DIR}/Data/Themes/{Beach,Digital}\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\necho \"Done\""; + shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\n\n#create config.inc\necho \"Updating config file...\"\nPROTO=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep HEDGEWARS_PROTO_VER | cut -d ' ' -f 3`\nMAJN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MAJOR | xargs | cut -d ' ' -f 3`\nMINN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_MINOR | xargs | cut -d ' ' -f 3`\nPATN=`cat ${PROJECT_DIR}/../../CMakeLists.txt | grep CPACK_PACKAGE_VERSION_PATCH | xargs | cut -d ' ' -f 3 | cut -d '$' -f 1`\nREVN=-`/usr/local/bin/hg id -n ${PROJECT_DIR}/../../`\necho \"const cNetProtoVersion = $PROTO; const cVersionString = '${MAJN}.${MINN}.${PATN}${REVN}'; const cLuaLibrary = '';\" > ${PROJECT_DIR}/../../hedgewars/config.inc\n\necho \"Copying Data...\"\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\necho \"Fetching additional graphics 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/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn/\ncp ${PROJECT_DIR}/../../QTfrontend/res/StatsMedal*.png ${PROJECT_DIR}/Data/Graphics/Btn/\ncp ${PROJECT_DIR}/../../QTfrontend/res/StatsR.png ${PROJECT_DIR}/Data/Graphics/Btn/StatsStar.png\ncp ${PROJECT_DIR}/../../QTfrontend/res/ammopic.png ${PROJECT_DIR}/Data/Graphics/Btn/iconAmmo.png\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels/\n\necho \"Removing text and dummy files...\"\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, misc stuff\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,Ruler}\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/{TeamCap,TeamHeadband,TeamHair}\nrm -rf ${PROJECT_DIR}/Data/misc/\n\n#delete forbidden maps\nrm -rf ${PROJECT_DIR}/Data/Maps/{Cheese,FlightJoust}\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\necho \"Handling audio files...\"\n#delete the Classic voice\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/Classic\n#delete the main theme file\nrm -rf ${PROJECT_DIR}/Data/Music/main_theme.ogg\n#copy mono audio\ncp -R ${PROJECT_DIR}/Audio/* ${PROJECT_DIR}/Data/\n#remove unused voices\nfor i in {Amazing,Brilliant,Bugger,Bungee,Cutitout,Drat,Excellent,Fire,Gonnagetyou,Grenade,Hello,Hmm,Justyouwait,Leavemealone,Ohdear,Ouch,Perfect,Revenge,Runaway,Solong,Thisoneismine,Victory,Watchthis,Whatthe,Whoopsee}; do find Data/Sounds/voices/ -name $i.ogg -delete; done\n\necho \"Tweaking Data contents...\"\n#move Lua maps in Missions\nmkdir ${PROJECT_DIR}/Data/Missions/Maps/\nmv ${PROJECT_DIR}/Data/Maps/{Basketball,Knockball,TrophyRace,CTF_Blizzard,Control} ${PROJECT_DIR}/Data/Missions/Maps/\n#workaround for missing map in CTF_Blizzard\nln -s ../../../Maps/Blizzard/map.png ${PROJECT_DIR}/Data/Missions/Maps/CTF_Blizzard/map.png\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 Beach and Digital themes as well as Islqnd (from Maps and Themes folders)\nrm -rf ${PROJECT_DIR}/Data/Themes/{Beach,Digital}\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\necho \"Done\""; showEnvVarsInLog = 0; }; 9283011B0F10CB2D00CC5A3C /* Build libfpc.a */ = { diff -r b9539115608d -r b850b544addc project_files/HedgewarsMobile/SDL.patch --- a/project_files/HedgewarsMobile/SDL.patch Mon Apr 25 17:56:26 2011 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -diff -r 8a04b596b472 Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj ---- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Tue Apr 05 09:50:25 2011 -0700 -+++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj Tue Apr 05 22:19:33 2011 +0200 -@@ -1602,6 +1602,7 @@ - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_DEBUGGING_SYMBOLS = full; -+ GCC_THUMB_SUPPORT = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = NO; - IPHONEOS_DEPLOYMENT_TARGET = 3.1.3; -@@ -1619,6 +1620,7 @@ - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; -+ GCC_THUMB_SUPPORT = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = NO; - IPHONEOS_DEPLOYMENT_TARGET = 3.1.3; -diff -r 8a04b596b472 include/SDL_config_iphoneos.h ---- a/include/SDL_config_iphoneos.h Tue Apr 05 09:50:25 2011 -0700 -+++ b/include/SDL_config_iphoneos.h Tue Apr 05 22:19:33 2011 +0200 -@@ -107,7 +107,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 -@@ -128,15 +128,18 @@ - - /* 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 - #define SDL_VIDEO_RENDER_OGL_ES 1 --#define SDL_VIDEO_RENDER_OGL_ES2 1 -+#define SDL_VIDEO_RENDER_OGL_ES2 0 - - /* Enable system power support */ --#define SDL_POWER_UIKIT 1 -+#define SDL_POWER_UIKIT 0 -+ -+/* enable joystick subsystem */ -+#define SDL_JOYSTICK_DISABLED 1 - - /* enable iPhone keyboard support */ - #define SDL_IPHONE_KEYBOARD 1 -@@ -146,4 +149,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 8a04b596b472 src/video/uikit/SDL_uikitopengles.m ---- a/src/video/uikit/SDL_uikitopengles.m Tue Apr 05 09:50:25 2011 -0700 -+++ b/src/video/uikit/SDL_uikitopengles.m Tue Apr 05 22:19:33 2011 +0200 -@@ -117,6 +117,7 @@ - majorVersion: _this->gl_config.major_version]; - - data->view = view; -+ view.tag = SDL_VIEW_TAG; - view->viewcontroller = data->viewcontroller; - if (view->viewcontroller != nil) { - [view->viewcontroller setView:view];