#include <gtk/gtk.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <main.h>
#include <globals.h>
#include <handler.h>
#include <ui.h>
#include <simulation.h>
#include <netinet/in.h>
#include <inttypes.h>
#include <strings.h>
#include <savegame_fe.h>
#include <savegame_be.h>
#include <compilerpragmas.h>
#include <uibits.h>
Go to the source code of this file.
Data Structures | |
struct | city_listselect |
private city list selection object More... | |
struct | ng_form_tag |
new game form entities More... | |
Functions | |
void | free_listselect (struct city_listselect *sel) |
free the list selection strucure | |
void | ImportOneFromGame (GtkWidget *widget, gint response, gpointer data) |
load one of the palm games from the pdb file | |
void | lsrow_activated (gpointer data) |
row double clicked function | |
void | loadCities (savegame_t *sg) |
load the cities | |
void | doOpen (gchar *filename) |
load a game | |
void | open_afile (GtkObject *sel, gpointer data) |
open a savegame | |
void | free_object (GtkObject *obj, gpointer data) |
free the widget and the data pointer | |
void | opengame_handler (void) |
handle an open choice | |
gint | close_newgame (GtkWidget *widget, gpointer data) |
deal with the closing of the newgame form | |
void | newgame_handler (void) |
handle a new game menu choice | |
void | store_filename (GtkWidget *sel, gpointer data) |
set the save game name | |
void | savegameas_handler (void) |
handle a savegame as menu choice | |
void | savegame_handler (void) |
handle a save choice | |
Variables | |
ng_form_tag | ng |
new game form entities |
Does all the gtk-related processing for the savegames. The idea is to separate the front end from the back end, allowing us to use a common set of routines to read and write savegames on unix platforms.
Definition in file savegame_fe.c.
|
deal with the closing of the newgame form
Definition at line 237 of file savegame_fe.c. References ng_form_tag::form, and ng. Referenced by newgame_handler(). |
|
load a game Called by the open dialog handler.
Definition at line 150 of file savegame_fe.c. References DrawGame(), loadCities(), MapHasJumped(), PostLoadGame(), savegame_citycount(), savegame_close(), savegame_getcity(), savegame_open(), and setCityFileName(). Referenced by open_afile(). |
|
free the list selection strucure
Definition at line 46 of file savegame_fe.c. References savegame_close(), city_listselect::sg, and city_listselect::store. Referenced by ImportOneFromGame(). |
|
free the widget and the data pointer
Definition at line 196 of file savegame_fe.c. Referenced by opengame_handler(). |
|
load one of the palm games from the pdb file The OK button was clicked on the list of games from the list of the palm cities.
Definition at line 64 of file savegame_fe.c. References DrawGame(), free_listselect(), city_listselect::list, MapHasJumped(), PostLoadGame(), savegame_getcity(), and city_listselect::sg. Referenced by loadCities(), and lsrow_activated(). |
|
load the cities
Definition at line 108 of file savegame_fe.c. References city_listselect::dlg, ImportOneFromGame(), city_listselect::list, lsrow_activated(), savegame_citycount(), city_listselect::sg, and city_listselect::store. Referenced by doOpen(). |
|
row double clicked function happens when a row is double clicked. We emulate clicking the OK response in the dialog.
Definition at line 96 of file savegame_fe.c. References city_listselect::dlg, and ImportOneFromGame(). Referenced by loadCities(). |
|
handle a new game menu choice
Definition at line 248 of file savegame_fe.c. References ng_form_tag::cityName, close_newgame(), create_right_label(), ng_form_tag::form, and ng. |
|
open a savegame
Definition at line 182 of file savegame_fe.c. References doOpen(). Referenced by opengame_handler(). |
|
handle an open choice
Definition at line 207 of file savegame_fe.c. References free_object(), and open_afile(). |
|
set the save game name
Definition at line 289 of file savegame_fe.c. References save_defaultfilename(), and setCityFileName(). Referenced by savegameas_handler(). |