Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

source/handler.c File Reference

routines that are used for event dispatching More...

#include <config.h>
#include <handler.h>
#include <drawing.h>
#include <zakdef.h>
#include <locking.h>
#include <ui.h>
#include <globals.h>
#include <build.h>
#include <simulation.h>
#include <compilerpragmas.h>
#include <string.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

void PCityMain (void)
 Application level initialization routines.

void setMapSize (UInt8 X, UInt8 Y)
 set the map size

void InitGameStruct (void)
 initialize the game structure.

void ConfigureNewGame (void)
 set up a game

void DrawGame (Int8 full)
 Draw the entire game arena.

void PostLoadGame (void)
 Things to do after loading the game.


Detailed Description

routines that are used for event dispatching

These routines are intended to multiplex the individual steps in the game.

Definition in file handler.c.


Function Documentation

void ConfigureNewGame void   
 

set up a game

Setting up a new game ... initialize the variables. the difficulty level should be set before calling this.

Definition at line 90 of file handler.c.

References CreateForests(), CreateFullRiver(), DrawGame(), and getDifficultyLevel().

Referenced by cnCreateButtonPressed(), main(), and NewGame().

void DrawGame Int8    full
 

Draw the entire game arena.

Parameters:
full  unused.

Definition at line 116 of file handler.c.

References Int8, and RedrawAllFields().

Referenced by ConfigureNewGame(), doOpen(), and ImportOneFromGame().

void InitGameStruct void   
 

initialize the game structure.

This is just prior to, say, making a new savegame. It makes sure that all the variables are set to the correct values

Definition at line 63 of file handler.c.

References AddGridUpdate, GRID_ALL, Int16, SAVEGAMEVERSION, SETAUTOBULLDOZE, setDisasterLevel(), and setMapSize().

Referenced by cnCreateButtonPressed(), main(), and NewGame().

void setMapSize UInt8    X,
UInt8    Y
 

set the map size

Does not allocate any extra memory.

Parameters:
X  the new map X size
Y  the new map Y size

Definition at line 40 of file handler.c.

References LockZone(), lz_world, ResizeWorld(), setMapVariables, UIMapResize(), UInt8, UnlockZone(), and WorldSize.

Referenced by cnCreateButtonPressed(), InitGameStruct(), and NewGame().


Generated on Mon Aug 30 19:44:18 2004 for pocketcity by doxygen1.2.18