# HG changeset patch # User koda # Date 1258760424 0 # Node ID 9eb131794a6e411e560166f067d5f673d42967cb # Parent 0c1d3c12ded90e0a6e3e5d4d8f540a733870efc1 trailing mods from previous commit diff -r 0c1d3c12ded9 -r 9eb131794a6e hedgewars/CCHandlers.inc --- a/hedgewars/CCHandlers.inc Fri Nov 20 22:02:49 2009 +0000 +++ b/hedgewars/CCHandlers.inc Fri Nov 20 23:40:24 2009 +0000 @@ -600,13 +600,17 @@ AddFileLog('Prepare to change video parameters...'); {$ENDIF} -{$IFNDEF IPHONEOS} -SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); -{$ELSE} -// remove these if they cause incompatibility +{$IFDEF IPHONEOS} SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0); SDL_GL_SetAttribute(SDL_GL_RETAINED_BACKING, 1); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0); +SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); +SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8); +SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8); +SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8); +SDL_GL_SetAttribute(SDL_GL_BUFFER_SIZE, 32); +{$ELSE} +SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); {$ENDIF} {$IFNDEF SDL13} diff -r 0c1d3c12ded9 -r 9eb131794a6e hedgewars/SDLh.pas --- a/hedgewars/SDLh.pas Fri Nov 20 22:02:49 2009 +0000 +++ b/hedgewars/SDLh.pas Fri Nov 20 23:40:24 2009 +0000 @@ -88,9 +88,19 @@ SDL_SWSURFACE = $00000000; SDL_HWSURFACE = $00000001; SDL_SRCALPHA = $00010000; - SDL_INIT_VIDEO = $00000020; + + SDL_INIT_TIMER = $00000001; SDL_INIT_AUDIO = $00000010; + SDL_INIT_VIDEO = $00000020; SDL_INIT_JOYSTICK = $00000200; +{$IFDEF SDL13} + SDL_INIT_HAPTIC = $00001000; +{$ELSE} + SDL_INIT_CDROM = $00000100; +{$ENDIF} + SDL_INIT_NOPARACHUTE = $00100000; + SDL_INIT_EVENTTHREAD = $01000000; + SDL_INIT_EVERYTHING = $0000FFFF; SDL_APPINPUTFOCUS = 2; SDL_BUTTON_WHEELDUP = 4; diff -r 0c1d3c12ded9 -r 9eb131794a6e hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Fri Nov 20 22:02:49 2009 +0000 +++ b/hedgewars/hwengine.pas Fri Nov 20 23:40:24 2009 +0000 @@ -116,7 +116,7 @@ SDL_GL_SwapBuffers(); {$IFNDEF IPHONEOS} -//not going to make captures on the iPhone +// not going to make captures on the iPhone if flagMakeCapture then begin flagMakeCapture:= false; @@ -316,7 +316,7 @@ WriteLnToConsole('********************************************* accelerometer'); - tiltValue:= SDL_JoystickGetAxis(uKeys.theJoystick,≤ 0); + tiltValue:= SDL_JoystickGetAxis(uKeys.theJoystick, 0); if (CurrentTeam <> nil) then begin @@ -541,7 +541,7 @@ for i:= 0 to ParamCount do AddFileLog(inttostr(i) + ': ' + ParamStr(i)); {$IFDEF IPHONEOS} -WriteLnToConsole('Saving debug file at: ' + get_documents_path()); + WriteLnToConsole('Saving debug file at: ' + get_documents_path()); {$ENDIF} {$ENDIF} end; @@ -549,9 +549,9 @@ ///////////////////////// procedure ShowMainWindow; begin -if cFullScreen then ParseCommand('fullscr 1', true) - else ParseCommand('fullscr 0', true); -SDL_ShowCursor(0) + if cFullScreen then ParseCommand('fullscr 1', true) + else ParseCommand('fullscr 0', true); + SDL_ShowCursor(0) end; /////////////// diff -r 0c1d3c12ded9 -r 9eb131794a6e hedgewars/uSound.pas --- a/hedgewars/uSound.pas Fri Nov 20 22:02:49 2009 +0000 +++ b/hedgewars/uSound.pas Fri Nov 20 23:40:24 2009 +0000 @@ -122,10 +122,7 @@ begin s:= Pathz[Soundz[i].Path] + '/' + voicepacks[t].name + '/' + Soundz[i].FileName; WriteToConsole(msgLoading + s + ' '); - // {$IFNDEF IPHONEOS} - //broken for unknown reasons (most likely poor SDL_Mixer) voicepacks[t].chunks[i]:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), 'rb'), 1); - // {$ENDIF} if voicepacks[t].chunks[i] = nil then WriteLnToConsole(msgFailed) else diff -r 0c1d3c12ded9 -r 9eb131794a6e hedgewars/uStore.pas --- a/hedgewars/uStore.pas Fri Nov 20 22:02:49 2009 +0000 +++ b/hedgewars/uStore.pas Fri Nov 20 23:40:24 2009 +0000 @@ -1110,9 +1110,9 @@ if MaxTextureSize = 0 then begin - MaxTextureSize:= 1024; + MaxTextureSize:= 1024; {$IFDEF DEBUGFILE} - AddFileLog('OpenGL Warning - driver didn''t provide any valid max texture size; assuming 1024'); + AddFileLog('OpenGL Warning - driver didn''t provide any valid max texture size; assuming 1024'); {$ENDIF} end;