Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

linux-gtk/main.c File Reference

the main GTK routines for the simulation More...

#include <gtk/gtk.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <main.h>
#include <savegame_fe.h>
#include <budget.h>
#include <logging.h>
#include <locking.h>
#include <ui.h>
#include <handler.h>
#include <drawing.h>
#include <globals.h>
#include <build.h>
#include <simulation.h>
#include <disaster.h>
#include <compilerpragmas.h>
#include <nix_utils.h>
#include <simulation-ui.h>
#include <zonemon.h>

Go to the source code of this file.

Data Structures

struct  image_pms
 image pixmaps More...

struct  main_window
 the main window's contents More...


Defines

#define PATHSEARCH   ".:./graphic:./graphic/icons:../graphic"
 path to search for graphics


Functions

void SetUpMainWindow (void)
 set up and configure the main window.

gint mainloop_callback (gpointer data)
 time ticker that loops every second

void QuitGame (void)
 terminate the game.

void SetSpeed (gpointer data, guint action, GtkWidget *w)
 set the game speed

void cleanupPixmaps (void)
 clean up the pixmaps

void ResetViewable (void)
 set the tile size

void forceRedistribute (void)
 force a redistribution next iteration

int main (int argc, char **argv)
 the main routine

gint toolbox_callback (GtkWidget *widget, gpointer data)
 set the item that will be build upon clicking on the play surface

void scrollbar (GtkAdjustment *adj)
 slide the scrollbar

void ResizeCheck (int width, int height)
 check the size of the screen.

void check_configure (GtkContainer *widget, GdkEventConfigure *event, gpointer data)
 the configure event handler for the play area.

gint delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
 when the close button is clicked, this event is called

gint drawing_exposed_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
 the drawing area is exposed, and needs to be painted.

gint drawing_realized_callback (GtkWidget *widget, GdkEvent *event, gpointer data)
 Realize the drawing area once it is created.

gint button_press_event (GtkWidget *widget, GdkEventButton *event)
 someone clicked on the play area.

gint motion_notify_event (GtkWidget *widget, GdkEventMotion *event)
 somethings moved

GtkWidget * setupToolBox (void)
 set up the toolbox

GtkAccelGroup * createMenu (GtkWidget *main_box)
 create the keyboard and menu accelerator groups

gboolean hoveringDrawing (GtkWidget *widget, GdkEventMotion *event, gpointer data)
 hovering over the drawing area

void UIInitGraphic (void)
 initialize the graphics

void UIDisplayError1 (char *error)
 Display and error dialog with one parameter.

void UIProblemNotify (problem_t problem)
 notify that theres a problem in the city.

void UIInitDrawing (void)
 Initialize the drawing area.

void UIFinishDrawing (void)
 finish up using the drawing area

void UIPostLoadGame (void)
 UI post load game handler.

void UIUnlockScreen (void)
 unlock the screen, allow any paused repainting to happen

void UILockScreen (void)
 lock the screen, pause any painting operations to happen

void UIDrawBorder (void)
void UIDrawCredits (void)
 set the labels for the credits and time

void UIDrawDate (void)
 update/draw the date on screen

void UIDrawLoc (void)
 Draw the Location on screen.

void UIDrawPop (void)
 draw the population

void UIDrawSpeed (void)
 Draw the speed/update the seed icon on screen.

void UIDrawBuildIcon (void)
 Draw the build icon on the display.

void UIUpdateBuildIcon (void)
void UIGotoForm (Int16 n)
void UICheckMoney (void)
 Check if we've got dosh to do what we're asking to do.

void UIScrollDisplay (dirType direction)
 scroll the map in the appropriate direction

void _UIDrawRect (Int16 nTop, Int16 nLeft, Int16 nHeight, Int16 nWidth)
 in theory draw a rectangle.

void UIPaintField (UInt16 xpos, UInt16 ypos, welem_t nGraphic)
 draw a field

void UIPaintSpecialObject (UInt16 xpos, UInt16 ypos, Int8 i)
 Draw a special object.

void UIPaintSpecialUnit (UInt16 xpos, UInt16 ypos, Int8 i)
 draw a special unit on the screen

void UIDrawMapZone (Int16 xpos, Int16 ypos, welem_t nGraphic, GdkDrawable *drawable)
 draw a field for the map

void UIDrawMapSpecialObject (Int16 xpos, Int16 ypos, Int16 i, GdkDrawable *drawable)
 draw a special object for the map

void UIDrawMapSpecialUnit (Int16 xpos, Int16 ypos, Int16 i, GdkDrawable *drawable)
 draw a special unit on the map

void UIPaintCursor (UInt16 xpos, UInt16 ypos)
 draw a cursor at the location specified

void DrawOverlay (UInt16 xpos, UInt16 ypos, welem_t offset)
 draw an overlay icon on the screen

void UIPaintPowerLoss (UInt16 xpos, UInt16 ypos)
 Draw a power loss overlay on the screen at the specified location.

void UIPaintWaterLoss (UInt16 xpos, UInt16 ypos)
 Draw a water loss overlay on the screen at the specified location.

BuildCode UIGetSelectedBuildItem (void)
 get the selected item to build

void clearPaintedFlag (void)
 clear the painted flag

void setPaintedFlag (void)
 set the painted flag

int getPaintedFlag (void)
 test painted flag

void UIDrawPlayArea (void)
void UIMapResize (void)
 map being resized, do UI related elements

Int8 UIClipped (UInt16 xpos, UInt16 ypos)
 check if the map location is being clipped by the game

void LockZone (lockZone zone)
 lock the zone specified for writing

void UnlockZone (lockZone zone)
 unlock the zone specified. don't write to it anymore

void ReleaseZone (lockZone zone)
 release the memory allocated to this zone

UInt32 GetRandomNumber (UInt32 max)
 get a random number between 0 and max

void MapHasJumped (void)
 the map has jumped to another location


Variables

main_window mw
 the main window's contents

char * exec_dir
 the execution directory of the program

const GtkItemFactoryEntry menu_items []
 the menu items for the main application

UInt8 selectedBuildItem = 0
 handle to the bitmap masks for rendering the units

image_pms image_pixmaps []
 image pixmaps

int painted_flag
 painted flag - for play area back-buffer


Detailed Description

the main GTK routines for the simulation

This file contains all the major routines to perform the simulation in the GTK environment.

Definition in file main.c.


Function Documentation

gint button_press_event GtkWidget *    widget,
GdkEventButton *    event
[static]
 

someone clicked on the play area.

The play area has a button pressed upon it. As a consequence we need to either build something or bulldoze the area.

Parameters:
widget  unused
event  contains the buttons that were pressed.

Definition at line 392 of file main.c.

References Build_Bulldoze(), and BuildSomething().

Referenced by SetUpMainWindow().

void check_configure GtkContainer *    widget,
GdkEventConfigure *    event,
gpointer    data
 

the configure event handler for the play area.

Resizes the playing area elements to ensure that the play area is displayed with the correct size on screen.

Parameters:
widget  the widget that caused the configure event.
event  te event that isssued this configure event
data  extra data for the event.

Definition at line 305 of file main.c.

References ResizeCheck().

Referenced by SetUpMainWindow().

GtkAccelGroup* createMenu GtkWidget *    main_box
 

create the keyboard and menu accelerator groups

Returns:
the accelerator group.

Definition at line 540 of file main.c.

References menu_items.

Referenced by SetUpMainWindow().

gint delete_event GtkWidget *    widget,
GdkEvent *    event,
gpointer    data
[static]
 

when the close button is clicked, this event is called

MAkes the main event loop terminate.

Parameters:
widget  unused
event  unused
data  unused
Returns:
FALSE, to stop the event being processed again
Todo:
Change the code to perform an auto save / ask to save.

Definition at line 323 of file main.c.

Referenced by SetUpMainWindow().

gint drawing_exposed_callback GtkWidget *    widget,
GdkEventExpose *    event,
gpointer    data
[static]
 

the drawing area is exposed, and needs to be painted.

This is an expose event for the drawing area to cause the screen to be repainted. Redraws all the fields that are on the screen.

Parameters:
widget  unused
event  unused
data  unused
Returns:
FALSE, to make sure nothing else tries to handle the signal

Definition at line 342 of file main.c.

References mw, and main_window::p_play.

Referenced by SetUpMainWindow().

gint drawing_realized_callback GtkWidget *    widget,
GdkEvent *    event,
gpointer    data
[static]
 

Realize the drawing area once it is created.

This call is issued once the drawing area is initially created. It allows us to create a new game and make sure the screen is the correct size.

Parameters:
widget  unused
event  unused
data  unused
Returns:
FALSE, make sure that no one else reacts to the signal.

Definition at line 376 of file main.c.

Referenced by SetUpMainWindow().

void DrawOverlay UInt16    xpos,
UInt16    ypos,
welem_t    offset
[static]
 

draw an overlay icon on the screen

Parameters:
xpos  the horizontal location
ypos  the vertical location
offset  the offst of the item to paint.

Definition at line 1138 of file main.c.

References HORIZONTAL_TILESIZE, mw, main_window::p_play, main_window::p_zones, main_window::p_zones_m, UInt16, and welem_t.

Referenced by UIPaintPowerLoss(), and UIPaintWaterLoss().

int getPaintedFlag void   
 

test painted flag

Returns:
the painted flag state

Definition at line 1201 of file main.c.

UInt32 GetRandomNumber UInt32    max
 

get a random number between 0 and max

Parameters:
max  the maximum limit of the value to obtain
Returns:
the random number

Definition at line 1274 of file main.c.

References UInt32.

Referenced by CreateDragon(), CreateForest(), CreateForests(), CreateFullRiver(), CreateMeteor(), CreateMonster(), DoCommitmentNasties(), DoNastyStuffTo(), DoRandomDisaster(), DoSpecificDisaster(), GetRandomZone(), MeteorDisaster(), MonsterCheckSurrounded(), MoveAllObjects(), and UpdateDisasters().

gboolean hoveringDrawing GtkWidget *    widget,
GdkEventMotion *    event,
gpointer    data
[static]
 

hovering over the drawing area

Parameters:
widget  unused
event  unused
data  unused

Definition at line 565 of file main.c.

References hoverUpdate().

Referenced by SetUpMainWindow().

void LockZone lockZone    zone
 

lock the zone specified for writing

Parameters:
zone  the zone to lock

Definition at line 1253 of file main.c.

References lockZone.

Referenced by Build_Bulldoze(), Build_Defence(), Build_Generic(), Build_Generic4(), Build_PowerLine(), Build_Rail(), Build_Road(), Build_WaterPipe(), BuildSomething(), BurnField(), CreateDragon(), CreateForest(), CreateFullRiver(), CreateMeteor(), CreateMonster(), CreateWaste(), DoDistribute(), DoNastyStuffTo(), DoRandomDisaster(), DowngradeZone(), FindScoreForZones(), GetRandomZone(), GetZoneScore(), hoverUpdate(), LoadGameByIndex(), MoveAllObjects(), MoveCursor(), querySetup(), ReleaseZone(), RenderMaps(), ResizeWorld(), SaveGameByIndex(), setMapSize(), UIPaintPlayArea(), UIScrollDisplay(), UpdateDisasters(), and UpdateVolatiles().

int main int    argc,
char **    argv
 

the main routine

Sets up the windows and starts the simulation

Parameters:
argc  count of arguments on the command line
argv  array of the arguments

Definition at line 114 of file main.c.

References cleanupPixmaps(), ConfigureNewGame(), exec_dir, InitGameStruct(), main(), mainloop_callback(), PCityMain(), PurgeWorld(), ResetViewable(), and SetUpMainWindow().

Referenced by main().

gint mainloop_callback gpointer    data [static]
 

time ticker that loops every second

Parameters:
data  unused in this context
Returns:
true, call me again in a second

Definition at line 193 of file main.c.

References main_window::drawing, getMonthsElapsed, MoveAllObjects(), mw, Sim_DoPhase(), SIM_GAME_LOOP_DISASTER, SPEED_PAUSED, UIUpdateBudget(), and UpdateDisasters().

Referenced by main().

void MapHasJumped void   
 

the map has jumped to another location

Ensure that the scroll bars are moved correctly.

Definition at line 1284 of file main.c.

References main_window::drawing, mw, main_window::sc_hor, and main_window::sc_vert.

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

gint motion_notify_event GtkWidget *    widget,
GdkEventMotion *    event
[static]
 

somethings moved

Ooooooooo.... I have no clue

Definition at line 414 of file main.c.

References Build_Bulldoze(), and BuildSomething().

Referenced by SetUpMainWindow().

void QuitGame void    [static]
 

terminate the game.

Invoked when the quit option is selected from the menu

Definition at line 1299 of file main.c.

void ReleaseZone lockZone    zone
 

release the memory allocated to this zone

Parameters:
zone  the zone to release

Definition at line 1265 of file main.c.

References lockZone, and lz_world.

Referenced by PurgeWorld().

void ResetViewable void    [static]
 

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 241 of file main.c.

References UInt16.

Referenced by LoadGameByIndex(), and main().

void ResizeCheck int    width,
int    height
 

check the size of the screen.

intended to allow the play area to expand and contract; this code is used by the initial sizing algorithm, as well as the resize handler.

Todo:
fix this to constrain the width/height so as to not be too big
Parameters:
width  the new width of the area
height  the new height of the area

Definition at line 271 of file main.c.

References getMapHeight, getMapWidth, mw, main_window::sc_hor, and main_window::sc_vert.

Referenced by check_configure().

void scrollbar GtkAdjustment *    adj
 

slide the scrollbar

Moves the display to the appropriate location.

Parameters:
adj  the adjustment; unused

Definition at line 255 of file main.c.

References Goto(), mw, main_window::sc_hor, and main_window::sc_vert.

Referenced by SetUpMainWindow().

void SetSpeed gpointer    data,
guint    speed,
GtkWidget *    w
[static]
 

set the game speed

Parameters:
w  the widget that originated the speed message
speed  the speed
data  the speed number.

Definition at line 179 of file main.c.

void SetUpMainWindow void    [static]
 

set up and configure the main window.

Creates the main window. Creates all the elements of the main window including the toolbar (!grrrrr)

Definition at line 580 of file main.c.

References button_press_event(), check_configure(), createMenu(), delete_event(), main_window::drawing, drawing_exposed_callback(), drawing_realized_callback(), hoveringDrawing(), main_window::hscroll, main_window::l_credits, main_window::l_location, main_window::l_pop, main_window::l_time, motion_notify_event(), mw, main_window::sc_hor, main_window::sc_vert, scrollbar(), setupToolBox(), main_window::vscroll, and main_window::window.

Referenced by main().

GtkWidget* setupToolBox void   
 

set up the toolbox

Returns:
the widget containing the toolbox

Definition at line 450 of file main.c.

References PATHSEARCH, searchForFile(), and toolbox_callback().

Referenced by SetUpMainWindow().

gint toolbox_callback GtkWidget *    widget,
gpointer    data
[static]
 

set the item that will be build upon clicking on the play surface

Parameters:
widget  unused
data  the identifier of the toolbar item
Returns:
false, handled

Definition at line 233 of file main.c.

References selectedBuildItem.

Referenced by setupToolBox().

void UICheckMoney void   
 

Check if we've got dosh to do what we're asking to do.

unused

Definition at line 974 of file main.c.

Referenced by Sim_DoPhase().

Int8 UIClipped UInt16    xpos,
UInt16    ypos
 

check if the map location is being clipped by the game

Parameters:
xpos  the x position on the map
ypos  the y position on the map
Returns:
true if the point on the map is clipped, and therefore not visible

Definition at line 1246 of file main.c.

References UInt16.

Referenced by DrawFieldWithoutInit(), PaintLossIcon(), UIPaintField(), UIPaintSpecialObject(), and UIPaintSpecialUnit().

void UIDisplayError1 char *    error
 

Display and error dialog with one parameter.

Parameters:
error  the message to use in the dialog

Definition at line 755 of file main.c.

References mw, and main_window::window.

Referenced by BuildSomething(), and UIProblemNotify().

void UIDrawBorder void   
 

unused

Definition at line 883 of file main.c.

void UIDrawBuildIcon void   
 

Draw the build icon on the display.

Todo:
Impement this for this platform

Definition at line 953 of file main.c.

void UIDrawMapSpecialObject Int16    xpos,
Int16    ypos,
Int16    i,
GdkDrawable *    drawable
 

draw a special object for the map

Parameters:
i  the item to draw
xpos  the horizontal position
ypos  the vertical position
drawable  the drawable to paint on

Definition at line 1089 of file main.c.

References Int16, mw, and main_window::p_mapspecials.

void UIDrawMapSpecialUnit Int16    xpos,
Int16    ypos,
Int16    i,
GdkDrawable *    drawable
 

draw a special unit on the map

Parameters:
i  the unit do draw
xpos  the horizontal location on screen
ypos  the vertical location on screen
drawable  the drawable to paint on

Definition at line 1107 of file main.c.

References Int16, mw, and main_window::p_units.

void UIDrawMapZone Int16    xpos,
Int16    ypos,
welem_t    nGraphic,
GdkDrawable *    drawable
 

draw a field for the map

Parameters:
xpos  the horizontal position
ypos  the vertical position
nGraphic  the item to paint
drawable  the drawable surface to paint on

Definition at line 1072 of file main.c.

References HORIZONTAL_TILESIZE, Int16, mw, main_window::p_mapzones, and welem_t.

Referenced by UIPaintMapField().

void UIDrawPlayArea void   
 

Todo:
render the entire play area into an offscreen pixmap, making this call a non-op (the expose code for the drawing area will take care of it).

Definition at line 1211 of file main.c.

References DrawFieldWithoutInit(), main_window::drawing, getMapHeight, getMapWidth, getWorldFlags(), Int16, mw, PAINTEDBIT, and WORLDPOS.

void UIDrawPop void   
 

draw the population

Actually simply set the population label to the appropriate value.

Definition at line 931 of file main.c.

References getPopulation(), main_window::l_pop, and mw.

void UIDrawSpeed void   
 

Draw the speed/update the seed icon on screen.

Todo:
Implement this for the platform

Definition at line 944 of file main.c.

void UIFinishDrawing void   
 

finish up using the drawing area

unused

Definition at line 858 of file main.c.

Referenced by DrawCross(), DrawField(), performPaintDisplay(), and UIScrollDisplay().

BuildCode UIGetSelectedBuildItem void   
 

get the selected item to build

Returns:
the item that is selected.

Definition at line 1174 of file main.c.

Referenced by BuildSomething().

void UIGotoForm Int16    n
 

unused

Definition at line 967 of file main.c.

References Int16.

Referenced by hBudget(), and hMap().

void UIInitDrawing void   
 

Initialize the drawing area.

unused

Definition at line 852 of file main.c.

Referenced by DrawCross(), DrawField(), performPaintDisplay(), and UIScrollDisplay().

void UIInitGraphic void   
 

initialize the graphics

Todo:
fix this routine.

Definition at line 714 of file main.c.

References image_pms::filename, image_pixmaps, image_pms::mask, mw, PATHSEARCH, image_pms::pm, searchForFile(), and main_window::window.

Referenced by InitGraphic().

void UILockScreen void   
 

lock the screen, pause any painting operations to happen

unused

Definition at line 876 of file main.c.

Referenced by CreateMeteor().

void UIMapResize void   
 

map being resized, do UI related elements

The resizing of the map corresponds to recreating the backing map area as well as the backing play area.

Definition at line 1235 of file main.c.

References clearPaintedFlag(), getMapHeight, getMapWidth, mw, main_window::p_play, and resizeMap().

Referenced by PostLoadGame(), and setMapSize().

void UIPaintCursor UInt16    xpos,
UInt16    ypos
 

draw a cursor at the location specified

Parameters:
xpos  the xposition
ypos  the y position

Definition at line 1125 of file main.c.

References UInt16.

Referenced by DrawFieldWithoutInit(), and UIScrollDisplay().

void UIPaintField UInt16    xpos,
UInt16    ypos,
welem_t    nGraphic
 

draw a field

Parameters:
xpos  the horizontal position
ypos  the vertical position
nGraphic  the item to paint

Definition at line 1003 of file main.c.

References main_window::drawing, HORIZONTAL_TILESIZE, mw, main_window::p_play, main_window::p_zones, UInt16, and welem_t.

Referenced by DrawFieldWithoutInit().

void UIPaintPowerLoss UInt16    xpos,
UInt16    ypos
 

Draw a power loss overlay on the screen at the specified location.

The field has already been determined to not have power

Definition at line 1162 of file main.c.

References DrawOverlay(), and UInt16.

Referenced by DrawFieldWithoutInit().

void UIPaintSpecialObject UInt16    xpos,
UInt16    ypos,
Int8    i
 

Draw a special object.

Parameters:
xpos  the horizontal position
ypos  the vertical position
i  the item to draw

Definition at line 1022 of file main.c.

References main_window::drawing, Int8, mw, main_window::p_monsters, main_window::p_monsters_m, main_window::p_play, and UInt16.

Referenced by DrawFieldWithoutInit().

void UIPaintSpecialUnit UInt16    xpos,
UInt16    ypos,
Int8    i
 

draw a special unit on the screen

Parameters:
i  the unit number being painted (index)
xpos  the x position of the unit in tiles
ypos  the y position of the unit in tiles

Definition at line 1047 of file main.c.

References main_window::drawing, Int8, mw, main_window::p_play, main_window::p_units, main_window::p_units_m, and UInt16.

Referenced by DrawFieldWithoutInit().

void UIPaintWaterLoss UInt16    xpos,
UInt16    ypos
 

Draw a water loss overlay on the screen at the specified location.

The Field has already been determined to not have water.

Definition at line 1168 of file main.c.

References DrawOverlay(), and UInt16.

Referenced by DrawFieldWithoutInit().

void UIPostLoadGame void   
 

UI post load game handler.

unused

Definition at line 864 of file main.c.

Referenced by PostLoadGame().

void UIProblemNotify problem_t    problem
 

notify that theres a problem in the city.

Parameters:
problem  the problem to notify.

Definition at line 801 of file main.c.

References peFineOnMoney, peFineOnPower, peFineOnWater, peLowOnMoney, peLowOnPower, peLowOnWater, peOutOfMoney, peOutOfPower, peOutOfWater, problem_t, and UIDisplayError1().

Referenced by Build_Bulldoze(), Build_Generic(), Build_Generic4(), Build_PowerLine(), Build_Rail(), Build_Road(), Build_WaterPipe(), DoDistribute(), and UICheckMoney().

void UIScrollDisplay dirType    direction
 

scroll the map in the appropriate direction

Todo:
double buffer to improve the rendering of the screen!

Definition at line 985 of file main.c.

References dirType, main_window::drawing, mw, and RedrawAllFields().

Referenced by ScrollDisplay().

void UIUpdateBuildIcon void   
 

unused

Definition at line 960 of file main.c.

void UnlockZone lockZone    zone
 

unlock the zone specified. don't write to it anymore

Parameters:
zone  the zone to unlock

Definition at line 1259 of file main.c.

References lockZone.

Referenced by Build_Bulldoze(), Build_Defence(), Build_Generic(), Build_Generic4(), Build_PowerLine(), Build_Rail(), Build_Road(), Build_WaterPipe(), BuildSomething(), BurnField(), CreateDragon(), CreateForest(), CreateFullRiver(), CreateMeteor(), CreateMonster(), CreateWaste(), DoDistribute(), DoNastyStuffTo(), DoRandomDisaster(), DowngradeZone(), FindScoreForZones(), GetRandomZone(), GetZoneScore(), hoverUpdate(), LoadGameByIndex(), MoveAllObjects(), MoveCursor(), querySetup(), RenderMaps(), ResizeWorld(), SaveGameByIndex(), setMapSize(), UIPaintPlayArea(), UIScrollDisplay(), UpdateDisasters(), and UpdateVolatiles().


Variable Documentation

const GtkItemFactoryEntry menu_items[]
 

Initial value:

 {
        { "/_File", NULL, NULL, 0, "<Branch>", 0 },
        { "/File/_New", "<control>N", newgame_handler, 0, NULL, 0 },
        { "/File/_Open", "<control>O", opengame_handler, 0, NULL, NULL },
        { "/File/_Save", "<control>S", savegame_handler, 0, NULL, 0 },
        { "/File/Save _As", NULL, savegameas_handler, 0, NULL, 0 },
        { "/File/sep1", NULL, NULL, 0, "<Separator>", 0 },
        { "/File/E_xit", "<alt>F4", QuitGame, 0, NULL, 0 },
        { "/_View", NULL, NULL, 0, "<Branch>", 0 },
        { "/View/_Budget", "<control>B", ViewBudget, 0, NULL, 0 },
        { "/View/_Map", "<control>M", showMap, 0, NULL, 0 },
        { "/View/_Hover", NULL, hoverShow, 0, NULL, 0 },
        { "/_Speed", NULL, NULL, 0, "<Branch>", 0 },
        { "/Speed/_Pause", "<control>0", SetSpeed, 1 + SPEED_PAUSED, NULL,
                NULL },
        { "/Speed/sep1", NULL, NULL, 0, "<Separator>", 0 },
        { "/Speed/_Slow", "<control>1", SetSpeed, 1 + SPEED_SLOW, NULL, NULL },
        { "/Speed/_Medium", "<control>2", SetSpeed, 1 + SPEED_MEDIUM, NULL,
                NULL },
        { "/Speed/_Fast", "<control>3", SetSpeed, 1 + SPEED_FAST, NULL, NULL },
        { "/Speed/_Turbo", "<control>4", SetSpeed, 1 + SPEED_TURBO, NULL,
                NULL },
        { "/S_imulation", NULL, NULL, 0, "<Branch>", 0 },
        { "/Simulation/_Redistribute", NULL, forceRedistribute, 0, NULL, NULL }

}
the menu items for the main application

Definition at line 78 of file main.c.

Referenced by createMenu().


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