[Xbubble-commits] xbubble-sdl/src game.c,1.4,1.5 xbubble.c,1.5,1.6
Martin Quinson
mquinson at alioth.debian.org
Thu Sep 14 08:52:56 UTC 2006
Update of /cvsroot/xbubble/xbubble-sdl/src
In directory haydn:/tmp/cvs-serv10545
Modified Files:
game.c xbubble.c
Log Message:
Yet more cleanups
Index: game.c
===================================================================
RCS file: /cvsroot/xbubble/xbubble-sdl/src/game.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- game.c 14 Sep 2006 08:48:19 -0000 1.4
+++ game.c 14 Sep 2006 08:52:54 -0000 1.5
@@ -119,7 +119,6 @@
ruleset_t ruleset[2];
};
-game_t current_game = NULL;
sigjmp_buf restart_thinking;
const char *player_name[][2] = {
@@ -528,13 +527,10 @@
}
}
-static void frame_update() {
+static void frame_update(game_t game) {
int i;
int lost1;
int lost2;
- game_t game = current_game;
- if ( game == NULL )
- return;
switch ( game->state ) {
@@ -693,7 +689,6 @@
enum e_game_state state;
game->state = game_state_stopped;
- current_game = game;
/* FIXME: start the opponent threads */
@@ -718,16 +713,15 @@
do {
game_get_cmds(game);
/* Update the game */
- frame_update();
+ frame_update(game);
SDL_Flip(screen);
/* keep the fps constant */
fps_delay();
- } while ( (current_game->state != game_state_finished) &&
- (current_game->state != game_state_stopped) );
+ } while ( (game->state != game_state_finished) &&
+ (game->state != game_state_stopped) );
- current_game = NULL;
return game->result;
}
Index: xbubble.c
===================================================================
RCS file: /cvsroot/xbubble/xbubble-sdl/src/xbubble.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- xbubble.c 13 Sep 2006 22:51:22 -0000 1.5
+++ xbubble.c 14 Sep 2006 08:52:54 -0000 1.6
@@ -7,7 +7,6 @@
#include "game.h"
#include "cell.h"
-SDL_Surface *screen;
int main(int argc, char *argv[]) {
int zoom = DEFAULT_SCALE;
int MAX_X = game_win_width(zoom);
More information about the Xbubble-commits
mailing list