Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

palm/map.c File Reference

Map rendering code. More...

#include <PalmOS.h>
#include <Window.h>
#include <Rect.h>
#include <Progress.h>
#include <simcity.h>
#include <simcity_resconsts.h>
#include <locking.h>
#include <logging.h>
#include <ui.h>
#include <map.h>
#include <globals.h>
#include <drawing.h>
#include <resCompat.h>
#include <palmutils.h>
#include <sections.h>

Go to the source code of this file.

Data Structures

struct  scr_map
 Map structure for the various maps to be displayed. More...


Typedefs

typedef enum e_map_type map_type
 map type s

typedef enum e_map_entries map_entry
 map entries

typedef scr_map scr_map_t
 Map structure for the various maps to be displayed.


Enumerations

enum  e_map_type { , mt_overlay }
 map type s More...

enum  e_map_entries { me_basemap = 0, me_end }
 map entries More...


Functions

void DrawMap (void) MAP_SECTION
 draw the active map

void RenderMaps (void) MAP_SECTION
 Render the Maps onto the offscreen.

void freemaps (void) MAP_SECTION
 release the map structures

void AddMap (WinHandle handle, map_type type, map_entry code) MAP_SECTION
 add a map to the list of maps

Boolean hMap (EventPtr event)
 Handler for the map.

void UIUpdateMap (UInt16 xpos, UInt16 ypos)
 update a map location

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

void UIPaintMapStatus (UInt16 xpos, UInt16 ypos, welem_t world, selem_t status)
 update a map status position

void UIPaintMapField (UInt16 xpos, UInt16 ypos, welem_t world)
 update an individual position on the map


Variables

map_entry currmap
 current map

scr_map_tthemaps
 the map structures ... it's a cheap ass array. 0 .. me_end-1


Detailed Description

Map rendering code.

Performs the rendering of the individual maps on the screen. The only functional map is the general area.

Definition in file map.c.


Enumeration Type Documentation

enum e_map_entries
 

map entries

Enumeration values:
me_basemap  basic map
me_end  end entry

Definition at line 33 of file map.c.

enum e_map_type
 

map type s

Enumeration values:
mt_overlay  overlay map

Definition at line 27 of file map.c.


Function Documentation

void AddMap WinHandle    handle,
map_type    type,
map_entry    code
[static]
 

add a map to the list of maps

Parameters:
handle  the handle to the map
type  type of map
code  the code of the map

Definition at line 64 of file map.c.

References scr_map::handle, map_entry, map_type, me_end, and scr_map::type.

Referenced by RenderMaps().

Boolean hMap EventPtr    event
 

Handler for the map.

Deals witht he pen clicks and setup/teardown for the map

Definition at line 93 of file map.c.

References DrawMap(), formID_pocketCity, freemaps(), getMapHeight, getMapWidth, Goto(), RenderMaps(), UIGotoForm(), and UInt16.

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 359 of file map.c.

void UIPaintMapField UInt16    xpos,
UInt16    ypos,
welem_t    elem
 

update an individual position on the map

this would consist of painting it's location, as well as the power and water items for that location. It is the map version of UIDrawField.

Parameters:
xpos  the x position
ypos  the y position
elem  the item to paint on the map

Definition at line 374 of file map.c.

References UInt16, and welem_t.

void UIPaintMapStatus UInt16    xpos,
UInt16    ypos,
welem_t    world,
selem_t    status
 

update a map status position

Parameters:
xpos  the x position on the map
ypos  the y position on the map
world  the world pointer
status  the status of the zone

Definition at line 365 of file map.c.

References selem_t, UInt16, and welem_t.

void UIUpdateMap UInt16    xpos,
UInt16    ypos
 

update a map location

Caused when the content on the map changes

Parameters:
xpos  the xposition on the map that changed
ypos  the y position on the map that changed

Definition at line 353 of file map.c.

References UInt16.


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