# HG changeset patch # User Xeli # Date 1308840743 -7200 # Node ID abfc41832374fbb44bbd05f6e8e6da95b0f25322 # Parent e73f1c043c8589bc859846dbdb57382ee8a9ee08 Reverted back to tip and changed the correct IFDEF IPHONEOS to MOBILE without breaking other iphoneos diff -r e73f1c043c85 -r abfc41832374 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Thu Jun 23 16:29:46 2011 +0200 +++ b/hedgewars/uWorld.pas Thu Jun 23 16:52:23 2011 +0200 @@ -528,8 +528,8 @@ var i, w, h, lw, lh, rw, rh, sw: LongInt; begin sw:= round(cScreenWidth / cScaleFactor); - if (SpritesData[sprL].Texture = nil) or (SpritesData[sprR].Texture = nil) then - begin + if ((SpritesData[sprL].Texture = nil) or (SpritesData[sprR].Texture = nil)) and (SpritesData[spr].Texture <> nil) then + begin w:= SpritesData[spr].Width * SpritesData[spr].Texture^.Scale; h:= SpritesData[spr].Height * SpritesData[spr].Texture^.Scale; i:= Shift mod w; @@ -539,9 +539,9 @@ DrawTexture(i, WorldDy + LAND_HEIGHT + OffsetY - h, SpritesData[spr].Texture, SpritesData[spr].Texture^.Scale); inc(i, w) until i > sw - end - else - begin + end + else if SpritesData[spr].Texture <> nil then + begin w:= SpritesData[spr].Width * SpritesData[spr].Texture^.Scale; h:= SpritesData[spr].Height * SpritesData[spr].Texture^.Scale; lw:= SpritesData[sprL].Width * SpritesData[spr].Texture^.Scale; @@ -553,18 +553,18 @@ i:= Shift - lw; while i >= -sw - lw do - begin + begin DrawTexture(i, WorldDy + LAND_HEIGHT + OffsetY - lh, SpritesData[sprL].Texture, SpritesData[sprL].Texture^.Scale); dec(i, lw); - end; + end; i:= Shift + w; while i <= sw do - begin + begin DrawTexture(i, WorldDy + LAND_HEIGHT + OffsetY - rh, SpritesData[sprR].Texture, SpritesData[sprR].Texture^.Scale); inc(i, rw) + end end - end end; @@ -1159,7 +1159,7 @@ var EdgesDist, wdy, shs: LongInt; PrevSentPointTime: LongWord = 0; begin -{$IFNDEF IPHONE} +{$IFNDEF IPHONEOS} if (not (CurrentTeam^.ExtDriven and isCursorVisible and not bShowAmmoMenu)) and cHasFocus then uCursor.updatePosition(); {$ENDIF} @@ -1184,7 +1184,7 @@ if AMxShift < AMWidth then begin -{$IFDEF IPHONE} +{$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; if CursorPoint.Y < cScreenHeight - AMyOffset - SlotsNum * AMSlotSize then CursorPoint.Y:= cScreenHeight - AMyOffset - SlotsNum * AMSlotSize; diff -r e73f1c043c85 -r abfc41832374 project_files/Android-build/SDL-android-project/src/org/libsdl/app/SDLActivity.java --- a/project_files/Android-build/SDL-android-project/src/org/libsdl/app/SDLActivity.java Thu Jun 23 16:29:46 2011 +0200 +++ b/project_files/Android-build/SDL-android-project/src/org/libsdl/app/SDLActivity.java Thu Jun 23 16:52:23 2011 +0200 @@ -308,7 +308,7 @@ // Called when the surface is resized public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { - //Log.v("SDL", "surfaceChanged()"); + Log.d("SDL", "surfaceChanged()"+ width + " + " + height); int sdlFormat = 0x85151002; // SDL_PIXELFORMAT_RGB565 by default switch (format) {