summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2006-04-27 14:53:18 +0000
committerBenjamin Otte <otte@gnome.org>2006-04-27 14:53:18 +0000
commit0df8435df5f7b694bb756c9a5c7604ed7deb4882 (patch)
treedd35488293d0a788b093b188cd011d6cf5ab177a /games
parent43f52c2fb16326bf2d7b66bbaf25013d95c2edae (diff)
* games/pacman/main.c: (new_game):
* games/sheep/main.c: (player_added_cb), (new_game): * games/tetris/main.c: (player_added_cb), (new_game): * libgame/Makefile.am: * libgame/game-board.c: (game_board_flush), (game_board_class_init): * libgame/game-container.c: (game_container_remove): * libgame/game-filter.c: (game_filter_foreach_added), (game_filter_set_container), (game_filter_get_property), (game_filter_set_property), (game_filter_to_string), (game_filter_flush), (game_filter_finalize), (game_filter_class_init), (game_filter_new), (game_filter_new_for_type): * libgame/game-game.c: (always_relevant), (game_game_init), (game_game_unset_match), (game_game_set_match), (game_game_get_player_count), (game_game_get_players): * libgame/game-game.h: * libgame/game-match.c: (game_match_tick_cb), (game_match_do_tick), (game_match_start_ticking), (game_match_stop_ticking), (game_match_get_property), (game_match_set_property), (game_match_pause), (game_match_start), (game_match_stop), (game_match_class_init), (game_match_init): * libgame/game-match.h: * libgame/game-recorder.c: (game_recorder_init), (game_recorder_dispose), (add_player), (game_recorder_start_recording), (game_recorder_stop_recording), (game_recorder_set_game), (game_recorder_is_recording): * libgame/game-recorder.h: * libgame/game-replay.c: (my_g_time_val_difference), (game_replay_tick), (game_replay_do_tick), (info_check_version), (info_set_seed), (info_player_create), (info_check_tick), (game_replay_dispose), (game_replay_get_property), (game_replay_set_property), (game_replay_class_init), (game_replay_init), (game_replay_get_type), (game_replay_new): * libgame/game-replay.h: * libgame/game-solo.c: (game_solo_match_get_property), (game_solo_match_set_property), (game_solo_match_game_set), (game_solo_match_class_init), (game_solo_match_init), (game_solo_match_get_type), (game_solo_match_new): * libgame/game-solo.h: * libgame/libgame.h: * src/gnome/gnome-window.c: (game_gnome_window_start_match), (add_player), (callback_new), (callback_host_response), (callback_host), (callback_replay), (callback_faster), (callback_slower), (callback_pause), (callback_end), (game_gnome_window_init), (game_gnome_window_update_replay), (game_gnome_window_update_pause), (game_gnome_window_update_match), (match_notify_callback), (game_gnome_window_set_match), (game_notify_callback), (game_gnome_window_set_game), (game_gnome_window_watch_replay): * src/gnome/gnome-window.h: rewrite for the new GameMatch infrastructure.
Diffstat (limited to 'games')
-rw-r--r--games/pacman/main.c4
-rw-r--r--games/sheep/main.c6
-rw-r--r--games/tetris/main.c4
3 files changed, 8 insertions, 6 deletions
diff --git a/games/pacman/main.c b/games/pacman/main.c
index 817ca4c..11140d1 100644
--- a/games/pacman/main.c
+++ b/games/pacman/main.c
@@ -104,8 +104,8 @@ new_game (GError **error)
g_object_unref (icon);
g_object_unref (port);
- g_signal_connect (game, "object-added", G_CALLBACK (player_added_cb), board);
- g_signal_connect (game, "object-removed", G_CALLBACK (player_removed_cb), board);
+ g_signal_connect (game_game_get_players (game), "object-added", G_CALLBACK (player_added_cb), board);
+ g_signal_connect (game_game_get_players (game), "object-removed", G_CALLBACK (player_removed_cb), board);
return game;
}
diff --git a/games/sheep/main.c b/games/sheep/main.c
index 76dc71d..f376de1 100644
--- a/games/sheep/main.c
+++ b/games/sheep/main.c
@@ -42,17 +42,19 @@ static const GameInfoScore scores[] = {
};
static void
-player_added_cb (GameGame *game, GameObject *object, gpointer stuff)
+player_added_cb (GameContainer *container, GameObject *object, gpointer stuff)
{
GameSprite *car;
GameBoard *board;
GamePlayer *player;
GameGraphic *port;
+ GameGame *game;
GamePoint p = { 0.0, - 10.0 };
if (!GAME_IS_PLAYER (object))
return;
+ game = object->game;
player = GAME_PLAYER (object);
board = sheep_board_new (game, stuff);
port = game_viewport_new_full (GAME_GRAPHIC (board),
@@ -90,7 +92,7 @@ new_game (GError **error)
"description", N_("Evade sheep and race up the track"),
"translation-domain", GETTEXT_PACKAGE, NULL);
- g_signal_connect (game, "object-added", G_CALLBACK (player_added_cb), stuff);
+ g_signal_connect (game_game_get_players (game), "object-added", G_CALLBACK (player_added_cb), stuff);
return game;
}
diff --git a/games/tetris/main.c b/games/tetris/main.c
index be9be5f..0dc3faf 100644
--- a/games/tetris/main.c
+++ b/games/tetris/main.c
@@ -45,7 +45,7 @@ static const GameInfoScore scores[] = {
};
static void
-player_added_cb (GameGame *game, GamePlayer *player, gpointer unused)
+player_added_cb (GameContainer *container, GamePlayer *player, gpointer unused)
{
if (!GAME_IS_PLAYER (player))
return;
@@ -73,7 +73,7 @@ new_game (GError **error)
"nick", N_("Tetris"), "description", N_("Make blocks fall correctly to erase rows"),
"translation-domain", GETTEXT_PACKAGE, NULL);
- g_signal_connect (game, "object-added", G_CALLBACK (player_added_cb), NULL);
+ g_signal_connect (game_game_get_players (game), "object-added", G_CALLBACK (player_added_cb), NULL);
return game;
}