#include <PalmOS.h>
#include <StringMgr.h>
#include <unix_string.h>
#include <unix_stdlib.h>
#include <StdIOPalm.h>
#include <stddef.h>
#include <simcity.h>
#include <simcity_resconsts.h>
#include <savegame.h>
#include <savegame_be.h>
#include <logging.h>
#include <globals.h>
#include <zakdef.h>
#include <drawing.h>
#include <build.h>
#include <handler.h>
#include <simulation.h>
#include <resCompat.h>
#include <palmutils.h>
#include <repeathandler.h>
Go to the source code of this file.
Defines | |
#define | LASTGAME ((UInt16)~0) |
constant for 'add new game' | |
#define | MAXSAVEGAMECOUNT 50 |
maximum number of savegames in the Palm OS | |
Functions | |
void | UpdateSaveGameList (void) SAVE_SECTION |
Update the list of save games. | |
void | CleanSaveGameList (void) SAVE_SECTION |
clean up the savegame list. | |
void | DeleteFromList (void) SAVE_SECTION |
Delete a game from the list of savegames. | |
int | LoadFromList (void) SAVE_SECTION |
Load a game from the list of save games. | |
FormPtr | filesSetup (FormPtr form) SAVE_SECTION |
set up the files form | |
void | cnCreateButtonPressed (void) SAVE_SECTION |
the create button is pressed in the new city form | |
FormPtr | cityNewSetup (FormPtr form) SAVE_SECTION |
Set up the new file form. | |
void | cnFieldContentChanged (UInt16 fieldID) SAVE_SECTION |
deal with the width or height being changed directly | |
void | cnRepeatPressed (EventPtr event) SAVE_SECTION |
deal with the repeat buttons being pressed | |
int | UILoadAutoGame (void) |
Load the game form the auto-save slot. | |
void | UIClearAutoSaveSlot (void) |
Delete the game stored in the auto-save slot. | |
void | UISaveMyCity (void) |
save the city that is currently being used. | |
void | UISaveAutoGame (void) |
Save the autosave game. | |
Boolean | hFilesNew (EventPtr event) |
Handler for the new file form. | |
Boolean | hFiles (EventPtr event) |
Handler for the list of cities dialog. | |
Variables | |
char ** | citylist |
list of cities n the savegame | |
buttonmapping_t | mapsize_map [] |
structure for the map size manipulation |
Definition in file savegame.c.
|
Set up the new file form.
Definition at line 296 of file savegame.c. References GetObjectPtr(), and UInt16. Referenced by hFilesNew(). |
|
clean up the savegame list. free the memory that has been allocated in the files form. Makes sure that all the objects allocated have been released. Definition at line 477 of file savegame.c. References citylist, FreeCityNames(), and GetObjectPtr(). Referenced by cnCreateButtonPressed(), and hFiles(). |
|
deal with the width or height being changed directly
Definition at line 184 of file savegame.c. References processRepeater(), and UInt16. Referenced by hFilesNew(). |
|
deal with the repeat buttons being pressed
Definition at line 173 of file savegame.c. References processRepeater(), and UInt16. Referenced by hFilesNew(). |
|
Delete a game from the list of savegames. uses the index into the list to choose the city to delete This is agian because the array is unsorted Definition at line 524 of file savegame.c. References DeleteGameByName(), GetObjectPtr(), and Int16. Referenced by hFiles(). |
|
set up the files form
Definition at line 392 of file savegame.c. References UpdateSaveGameList(). Referenced by hFiles(). |
|
Handler for the list of cities dialog. Ensures that the list is populated with all the cities in the save game slots. Definition at line 323 of file savegame.c. References CleanSaveGameList(), DeleteFromList(), filesSetup(), formID_pocketCity, Int16, LoadFromList(), and UpdateSaveGameList(). |
|
Handler for the new file form. Makes sure that the text field is given focus. Definition at line 90 of file savegame.c. References cityNewSetup(), cnCreateButtonPressed(), cnFieldContentChanged(), cnRepeatPressed(), and UInt16. |
|
Load a game from the list of save games. Uses the index into the array, as the array is unsorted, and maps 1:1 with the underlying savegames Definition at line 501 of file savegame.c. References GetObjectPtr(), and LoadGameByName(). Referenced by hFiles(). |
|
Save the autosave game. The autosave slot is simply the name of the current autosave city. Definition at line 80 of file savegame.c. References SetAutoSave(), and UISaveMyCity(). |
|
save the city that is currently being used. Needs to find the city in the set of saved cities Definition at line 71 of file savegame.c. References SaveGameByName(). Referenced by UISaveAutoGame(). |
|
Update the list of save games. Can be called from 2 contexts ... from the delete items dialog or from the main save game dialog. That's the reason for the check agains the active form and the formID_files pointer Definition at line 433 of file savegame.c. References citylist, CityNames(), FreeCityNames(), GetObjectPtr(), and UInt16. Referenced by cnCreateButtonPressed(), filesSetup(), and hFiles(). |
|
Initial value: { { rbutton_widthdown, rbutton_widthup, fieldID_width, 50, 120, 0, 0 }, { rbutton_heightdown, rbutton_heightup, fieldID_height, 50, 120, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 } }
Definition at line 162 of file savegame.c. |