# Copyright (C) 2008 by Miriam Ruiz <little_miry@yahoo.es>
# Distributed under the same license as the game. See debian/copyright
--- biniax2.orig/desktop/inp.c
+++ biniax2/desktop/inp.c
@@ -124,6 +124,8 @@
case SDLK_PAGEDOWN :
_Inp.keyPageDown= BNX_TRUE;
break;
+ default:
+ break;
}
if ( event.key.keysym.sym >= SDLK_a && event.key.keysym.sym <= SDLK_z )
{
--- biniax2.orig/desktop/gfx.c
+++ biniax2/desktop/gfx.c
@@ -194,7 +194,7 @@
pos.y = cGfxZeroY + game->player[ cPlayer1 ].y * cGfxPairPlusY;
if ( pos.y <= cGfxZeroY )
{
- SDL_BlitSurface( _Gfx.cursors[cursor], NULL, _Gfx.screen, &pos );
+ SDL_BlitSurface( _Gfx.cursors[ (int)cursor ], NULL, _Gfx.screen, &pos );
}
/* RENDER MAIN (WHITE) PLAYER */
@@ -202,7 +202,7 @@
pos.y = cGfxZeroY + game->player[ cPlayer1 ].y * cGfxPairPlusY;
if ( pos.y <= cGfxZeroY )
{
- SDL_BlitSurface( _Gfx.elements[game->player[ cPlayer1 ].e], NULL, _Gfx.screen, &pos );
+ SDL_BlitSurface( _Gfx.elements[ (int)game->player[ cPlayer1 ].e], NULL, _Gfx.screen, &pos );
if ( game->score[ cPlayer1 ] != prevScore[ cPlayer1 ] )
{
gfxNewParticle( pos.x + (cGfxNextPlusX >> 1), pos.y );
@@ -229,7 +229,7 @@
pos.y = cGfxZeroY + game->player[ cPlayer2 ].y * cGfxPairPlusY;
if ( pos.y <= cGfxZeroY )
{
- SDL_BlitSurface( _Gfx.cursors[cursor], NULL, _Gfx.screen, &pos );
+ SDL_BlitSurface( _Gfx.cursors[ (int)cursor ], NULL, _Gfx.screen, &pos );
}
/* RENDER GREEN PLAYER */
@@ -237,7 +237,7 @@
pos.y = cGfxZeroY + game->player[ cPlayer2 ].y * cGfxPairPlusY;
if ( pos.y <= cGfxZeroY )
{
- SDL_BlitSurface( _Gfx.elements[game->player[ cPlayer2 ].e], NULL, _Gfx.screen, &pos );
+ SDL_BlitSurface( _Gfx.elements[ (int)game->player[ cPlayer2 ].e], NULL, _Gfx.screen, &pos );
if ( game->score[ cPlayer2 ] != prevScore[ cPlayer2 ] )
{
gfxNewParticle( pos.x + (cGfxNextPlusX >> 1), pos.y );
--- biniax2.orig/biniax.c
+++ biniax2/biniax.c
@@ -111,7 +111,6 @@
BNX_BOOL bquit = BNX_FALSE;
BNX_INT16 enterState = cStateMainMenu;
BNX_INT16 nmenu = 0;
- BNX_INT16 mmenu = 0;
UNREF( argc );
UNREF( argv );
@@ -318,7 +317,7 @@
if ( game->grid[ i ][ nearLine ] != 0 )
{
game->player[ cPlayer1 ].e = pairLeft( game->grid[ i ][ nearLine ] );
- game->grid[ game->player[ cPlayer1 ].x ][ game->player[ cPlayer1 ].y ] = cPlayerFlag;
+ game->grid[ (int)game->player[ cPlayer1 ].x ][ (int)game->player[ cPlayer1 ].y ] = cPlayerFlag;
break;
}
}
@@ -330,7 +329,7 @@
if ( game->grid[ i ][ nearLine ] != 0 )
{
game->player[ cPlayer2 ].e = pairRight( game->grid[ i ][ nearLine ] );
- game->grid[ game->player[ cPlayer2 ].x ][ game->player[ cPlayer2 ].y ] = cPlayerFlag;
+ game->grid[ (int)game->player[ cPlayer2 ].x ][ (int)game->player[ cPlayer2 ].y ] = cPlayerFlag;
break;
}
}
@@ -532,7 +531,7 @@
{
if ( takePair( game, p->x, newY, pIndex ) == BNX_TRUE )
{
- game->grid[ p->x ][ p->y ] = 0;
+ game->grid[ (int)p->x ][ (int)p->y ] = 0;
p->y = newY;
return BNX_TRUE;
}
@@ -550,7 +549,7 @@
{
if ( takePair( game, p->x, newY, pIndex ) == BNX_TRUE )
{
- game->grid[ p->x ][ p->y ] = 0;
+ game->grid[ (int)p->x ][ (int)p->y ] = 0;
p->y = newY;
return BNX_TRUE;
}
@@ -568,7 +567,7 @@
{
if ( takePair( game, newX, p->y, pIndex ) == BNX_TRUE )
{
- game->grid[ p->x ][ p->y ] = 0;
+ game->grid[ (int)p->x ][ (int)p->y ] = 0;
p->x = newX;
return BNX_TRUE;
}
@@ -586,7 +585,7 @@
{
if ( takePair( game, newX, p->y, pIndex ) == BNX_TRUE )
{
- game->grid[ p->x ][ p->y ] = 0;
+ game->grid[ (int)p->x ][ (int)p->y ] = 0;
p->x = newX;
return BNX_TRUE;
}
@@ -644,9 +643,9 @@
{
for ( y = 0; y < cGridY; ++y )
{
- if ( game->grid[ game->player[ cPlayer1 ].x ][ y ] != cPlayerFlag )
+ if ( game->grid[ (int)game->player[ cPlayer1 ].x ][ y ] != cPlayerFlag )
{
- game->grid[ game->player[ cPlayer1 ].x ][ y ] = 0;
+ game->grid[ (int)game->player[ cPlayer1 ].x ][ y ] = 0;
}
}
}