Nasty bug fixed inside SDL_image - the colorkey was not set in SDL 1.2 because of SDL 1.3 changes

Also updated Biniax2
This commit is contained in:
pelya
2012-09-18 20:15:28 +03:00
parent f342ad315c
commit 72b5f3c86a
10 changed files with 37 additions and 11 deletions

View File

@@ -16,22 +16,22 @@ SdlVideoResizeKeepAspect=n
CompatibilityHacks=n
CompatibilityHacksStaticInit=n
CompatibilityHacksTextInputEmulatesHwKeyboard=n
AppUsesMouse=n
AppUsesMouse=y
AppNeedsTwoButtonMouse=n
ShowMouseCursor=n
ForceRelativeMouseMode=n
AppNeedsArrowKeys=y
AppNeedsArrowKeys=n
AppNeedsTextInput=n
AppUsesJoystick=n
AppUsesAccelerometer=n
AppUsesMultitouch=n
NonBlockingSwapBuffers=n
RedefinedKeys="RETURN"
AppTouchscreenKeyboardKeysAmount=2
AppTouchscreenKeyboardKeysAmount=0
AppTouchscreenKeyboardKeysAmountAutoFire=0
RedefinedKeysScreenKb="RETURN SPACE"
StartupMenuButtonTimeout=0
HiddenMenuOptions=''
HiddenMenuOptions='DisplaySizeConfig'
FirstStartMenuOptions=''
MultiABI=n
AppVersionCode=1301

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -56,8 +56,8 @@ BNX_BOOL cfgInit()
_Cfg.sound = BNX_TRUE;
_Cfg.music = BNX_TRUE;
_Cfg.fullscreen = BNX_FALSE;
_Cfg.touch = BNX_FALSE;
_Cfg.fullscreen = BNX_TRUE;
_Cfg.touch = BNX_TRUE;
f = fopen( sysGetFullFileName( csConfigName ), "rt" );
if ( f == 0 )

View File

@@ -30,6 +30,7 @@ INCLUDES
#include <stdlib.h>
#include <stdio.h>
#include <android/log.h>
#include "inc.h"
#include "txt.h"

View File

@@ -28,6 +28,7 @@ For complete product license refer to LICENSE.TXT file
INCLUDES
******************************************************************************/
#include <string.h>
#include <SDL_screenkeyboard.h>
#include "inc.h"
@@ -95,10 +96,10 @@ BNX_BOOL hofInit()
for ( i = 0; i < cHofEntries; ++i )
{
strcpy( Hof.arcade[ i ].name, "JORDAN " );
Hof.arcade[ i ].score = (cHofEntries - i) * cHofInitScore;
Hof.arcade[ i ].score = (cHofEntries - i - 1) * cHofInitScore;
strcpy( Hof.tactic[ i ].name, "JORDAN " );
Hof.tactic[ i ].score = (cHofEntries - i) * cHofInitScore;
Hof.tactic[ i ].score = (cHofEntries - i - 1) * cHofInitScore;
}
if ( sysGetFileLen( sysGetFullFileName( csHOFName ) ) != cHOFFileSize )
@@ -221,11 +222,14 @@ BNX_BOOL hofEnter( BNX_GAME *game )
strcpy( recEntry->name, " " );
recEntry->score = game->score[ cPlayer1 ];
#ifdef __ANDROID__
//strcpy( recEntry->name, "Player" );
//SDL_ANDROID_GetScreenKeyboardTextInput(recEntry->name, 30);
#endif
inpInit();
do
{
startTime = sysGetTime();
gfxGetVirtualChar( game, inpDirect() );
cChar = inpGetChar();
if ( cChar > 0 )
@@ -286,7 +290,7 @@ void hofView()
sysUpdate();
}
}
while ( inpKeyA() == BNX_FALSE );
while ( inpKeyA() == BNX_FALSE && inpKeyB() == BNX_FALSE );
}
BNX_HALL *hofGet()

View File

@@ -261,7 +261,11 @@ IMG_LoadGIF_RW(SDL_RWops *src)
#ifdef USED_BY_SDL
if ( Gif89.transparent >= 0 ) {
#if (SDL_VERSION_ATLEAST(1,3,0))
SDL_SetColorKey(image, SDL_TRUE, Gif89.transparent);
#else
SDL_SetColorKey(image, SDL_SRCCOLORKEY, Gif89.transparent);
#endif
}
#endif

View File

@@ -253,7 +253,12 @@ SDL_Surface *IMG_LoadLBM_RW( SDL_RWops *src )
goto done;
if ( bmhd.mask & 2 ) /* There is a transparent color */
#if (SDL_VERSION_ATLEAST(1,3,0))
SDL_SetColorKey( Image, SDL_TRUE, bmhd.tcolor );
#else
SDL_SetColorKey( Image, SDL_SRCCOLORKEY, bmhd.tcolor );
#endif
/* Update palette informations */

View File

@@ -481,7 +481,11 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src)
(Uint8)transv->red,
(Uint8)transv->green,
(Uint8)transv->blue);
#if (SDL_VERSION_ATLEAST(1,3,0))
SDL_SetColorKey(surface, SDL_TRUE, ckey);
#else
SDL_SetColorKey(surface, SDL_SRCCOLORKEY, ckey);
#endif
}
/* Create the array of pointers to image data */

View File

@@ -235,7 +235,11 @@ SDL_Surface *IMG_LoadTGA_RW(SDL_RWops *src)
}
free(pal);
if(ckey >= 0)
SDL_SetColorKey(img, SDL_TRUE, ckey);
#if (SDL_VERSION_ATLEAST(1,3,0))
SDL_SetColorKey(img, SDL_TRUE, ckey);
#else
SDL_SetColorKey(img, SDL_SRCCOLORKEY, ckey);
#endif
} else {
/* skip unneeded colormap */
SDL_RWseek(src, palsiz, RW_SEEK_CUR);

View File

@@ -431,7 +431,11 @@ static SDL_Surface *load_xpm(char **xpm, SDL_RWops *src)
add_colorhash(colors, nextkey, cpp, pixel);
nextkey += cpp;
if(rgb == 0xffffffff)
#if (SDL_VERSION_ATLEAST(1,3,0))
SDL_SetColorKey(image, SDL_TRUE, pixel);
#else
SDL_SetColorKey(image, SDL_SRCCOLORKEY, pixel);
#endif
break;
}
}