#include <PalmOS.h>
#include <StringMgr.h>
#include <Form.h>
#include <stddef.h>
#include <zakdef.h>
#include <simcity.h>
#include <globals.h>
#include <handler.h>
#include <locking.h>
#include <logging.h>
#include <palmutils.h>
#include <simcity_resconsts.h>
#include <resCompat.h>
#include <savegame_be.h>
#include <mem_compat.h>
#include <pack.h>
#include <beam.h>
Go to the source code of this file.
Functions | |
int | ReadCityRecord (MemHandle rec, GameStruct *gs, MemPtr *wp, MemPtr *fp) SAVE_SECTION |
Read the city record. | |
void | WriteCityRecord (MemHandle rec, GameStruct *gs, MemPtr wp, MemPtr fp) SAVE_SECTION |
Write the city record. | |
int | SaveGameByIndex (UInt16 index) SAVE_SECTION |
Save a game into the database of savegames. | |
int | LoadGameByIndex (UInt16 index) SAVE_SECTION |
Load a game by index from the savegames. | |
void | getAutoSaveName (char *name) SAVE_SECTION |
Get the name of the autosave city. | |
void | DeleteGameByIndex (UInt16 index) SAVE_SECTION |
Delete the savegame from the list of savegames. | |
Int16 | comparator (void *p1, void *p2, Int32 other) SAVE_SECTION |
comparison function for CityNames list | |
DmOpenRef | OpenMyDB (void) |
Open up the savegame database. | |
void | CloseMyDB (void) |
close the savegame database | |
UInt16 | FindGameByName (char *name) |
Find a savegame by the name passed. | |
void | ResetViewable (void) |
set the tile size | |
int | GameExists (char *name) |
Check if a saved city by this name exists. | |
void | SaveGameByName (char *name) |
save the city that is currently being used by the name passed | |
int | LoadGameByName (char *name) |
Load a game by name. | |
Int32 | BeamCityByName (Char *cityName) |
beam the city named | |
int | LoadAutoSave (void) |
Load the autosave city. | |
void | SetAutoSave (char *name) |
set the autosave name | |
void | DeleteAutoSave (void) |
Clear the autosave name. | |
void | DeleteGameByName (char *name) |
Delete a city from the DB by name. | |
int | RenameCity (char *oldname, char *newname) |
rename a city | |
char ** | CityNames (int *count) |
Get The City Names. | |
void | FreeCityNames (char **names) |
release the list of city names returned using cityNames |
Definition in file savegame_be.c.
|
beam the city named
Definition at line 354 of file savegame_be.c. References BeamSend(), Char, FindGameByName(), Int32, OpenMyDB(), UInt16, and UInt8. |
|
Get The City Names.
Definition at line 592 of file savegame_be.c. References CITYNAMELEN, comparator(), OpenMyDB(), and UInt16. Referenced by UpdateSaveGameList(). |
|
close the savegame database This will close the savegame database if it is open, otherwise it will do nothing. Needed for the game shutdown routine Definition at line 79 of file savegame_be.c. Referenced by BeamReceive(). |
|
comparison function for CityNames list
Definition at line 586 of file savegame_be.c. References Int32. Referenced by CityNames(). |
|
Delete the savegame from the list of savegames.
Definition at line 472 of file savegame_be.c. References OpenMyDB(), and UInt16. Referenced by DeleteGameByName(). |
|
Delete a city from the DB by name.
Definition at line 489 of file savegame_be.c. References DeleteGameByIndex(), FindGameByName(), and UInt16. Referenced by DeleteFromList(). |
|
Find a savegame by the name passed.
Definition at line 88 of file savegame_be.c. References Char, _game_struct06a::cityname, OpenMyDB(), and UInt16. Referenced by BeamCityByName(), BeamReceive(), DeleteGameByName(), GameExists(), LoadGameByName(), and SaveGameByName(). |
|
release the list of city names returned using cityNames
Definition at line 639 of file savegame_be.c. Referenced by CleanSaveGameList(), and UpdateSaveGameList(). |
|
Check if a saved city by this name exists.
Definition at line 256 of file savegame_be.c. References FindGameByName(). Referenced by cnCreateButtonPressed(). |
|
Get the name of the autosave city.
Definition at line 386 of file savegame_be.c. References CITYNAMELEN, and OpenMyDB(). Referenced by LoadAutoSave(). |
|
Load a game by index from the savegames.
Definition at line 309 of file savegame_be.c. References LockZone(), lz_flags, lz_world, NUM_OF_OBJECTS, NUM_OF_UNITS, OpenMyDB(), PostLoadGame(), ReadCityRecord(), ResetViewable(), UInt16, and UnlockZone(). Referenced by LoadAutoSave(), and LoadGameByName(). |
|
Load a game by name.
Definition at line 343 of file savegame_be.c. References FindGameByName(), LoadGameByIndex(), and UInt16. Referenced by cnCreateButtonPressed(), LoadAutoSave(), and LoadFromList(). |
|
Open up the savegame database.
Definition at line 40 of file savegame_be.c. References Char, CITYNAMELEN, GetCreatorID(), and UInt16. Referenced by BeamCityByName(), BeamReceive(), CityNames(), DeleteGameByIndex(), FindGameByName(), getAutoSaveName(), LoadGameByIndex(), RenameCity(), SaveGameByIndex(), and SetAutoSave(). |
|
Read the city record.
Definition at line 154 of file savegame_be.c. References Int32, _game_struct06a::mapx, _game_struct06a::mapy, SAVEGAMEVERSION, UInt32, and UnpackBits(). Referenced by LoadGameByIndex(). |
|
rename a city
Definition at line 498 of file savegame_be.c. References Char, _game_struct06a::cityname, OpenMyDB(), and UInt16. |
|
set the tile size We set the tile size (16 pels). We reserve 2 tiles (one at the top, one at the bottom) for use with status information. Definition at line 128 of file savegame_be.c. References UInt16. Referenced by LoadGameByIndex(), and main(). |
|
Save a game into the database of savegames.
Definition at line 220 of file savegame_be.c. References LockZone(), lz_flags, lz_world, OpenMyDB(), UInt16, UnlockZone(), and WriteCityRecord(). Referenced by SaveGameByName(). |
|
save the city that is currently being used by the name passed
Definition at line 262 of file savegame_be.c. References FindGameByName(), SaveGameByIndex(), and UInt16. Referenced by cnCreateButtonPressed(), and UISaveMyCity(). |
|
set the autosave name
Definition at line 423 of file savegame_be.c. References CITYNAMELEN, and OpenMyDB(). Referenced by BeamReceive(), DeleteAutoSave(), and UISaveAutoGame(). |
|
Write the city record.
Definition at line 194 of file savegame_be.c. References _game_struct06a::mapx, _game_struct06a::mapy, PackBits(), and UInt32. Referenced by SaveGameByIndex(). |