Package: biniax2 / 1.30-4

warnings.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
From: Miriam Ruiz <little_miry@yahoo.es>
Date: Fri, 5 Apr 2013 00:36:51 +0200
Subject: warnings

---
 biniax.c      |   17 ++++++++---------
 desktop/gfx.c |    8 ++++----
 desktop/inp.c |    2 ++
 3 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/biniax.c b/biniax.c
index 5cc5765..06f2500 100755
--- a/biniax.c
+++ b/biniax.c
@@ -111,7 +111,6 @@ int main( int argc, char *argv[] )
 	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 @@ void initPlayer( BNX_GAME *game )
 		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 @@ void initPlayer( BNX_GAME *game )
 		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 @@ BNX_BOOL moveUp( BNX_GAME *game, BNX_INT16 pIndex )
 	{
 		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 @@ BNX_BOOL moveDown( BNX_GAME *game, BNX_INT16 pIndex )
 	{
 		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 @@ BNX_BOOL moveLeft( BNX_GAME *game, BNX_INT16 pIndex )
 	{
 		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 @@ BNX_BOOL moveRight( BNX_GAME *game, BNX_INT16 pIndex )
 	{
 		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 @@ BNX_BOOL clearColumn( BNX_GAME *game )
 	{
 		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;
 			}
 		}
 	}
diff --git a/desktop/gfx.c b/desktop/gfx.c
index c834026..3e2e206 100755
--- a/desktop/gfx.c
+++ b/desktop/gfx.c
@@ -194,7 +194,7 @@ void gfxRenderGame( BNX_GAME *game )
 		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 @@ void gfxRenderGame( BNX_GAME *game )
 		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 @@ void gfxRenderGame( BNX_GAME *game )
 			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 @@ void gfxRenderGame( BNX_GAME *game )
 			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 );
diff --git a/desktop/inp.c b/desktop/inp.c
index e9a49fd..72a42af 100755
--- a/desktop/inp.c
+++ b/desktop/inp.c
@@ -124,6 +124,8 @@ void inpUpdate()
 					case SDLK_PAGEDOWN : 
 						_Inp.keyPageDown= BNX_TRUE;
 						break;
+					default:
+						break;
 				}
 				if ( event.key.keysym.sym >= SDLK_a && event.key.keysym.sym <= SDLK_z )
 				{