#include <locking.h>
#include <ui.h>
#include <zakdef.h>
#include <globals.h>
#include <drawing.h>
#include <simulation.h>
Go to the source code of this file.
Functions | |
void | InitGraphic (void) |
initialize the graphics. | |
void | Goto (UInt16 x, UInt16 y, goto_code center) |
Set the map position to that location. | |
void | RedrawAllFields (void) |
Draw everything on the screen. | |
void | ScrollDisplay (dirType direction) |
Scroll the map in the direction specified. | |
void | MoveCursor (dirType direction) |
Move the cursor in the location specified. | |
void | DrawField (UInt16 xpos, UInt16 ypos) |
Draw the field at the specified location. | |
void | DrawCross (UInt16 xpos, UInt16 ypos, UInt16 xsize, UInt16 ysize) |
Draw all zones around the point that is being painted. | |
void | DrawFieldWithoutInit (UInt16 xpos, UInt16 ypos) |
draw a field without initializing something. | |
welem_t | GetGraphicNumber (UInt32 pos) |
Get the graphic to use for the position in question. |
This module contains all the routines that are used to paint and place items on the display
Definition in file drawing.c.
|
Draw all zones around the point that is being painted.
Definition at line 149 of file drawing.c. References DrawFieldWithoutInit(), getMapHeight, getMapWidth, UIFinishDrawing(), UIInitDrawing(), and UInt16. Referenced by Build_Defence(), Build_Destroy(), Build_Generic(), Build_Generic4(), Build_PowerLine(), Build_Rail(), Build_Road(), Build_WaterPipe(), BurnField(), CreateWaste(), MoveAllObjects(), RemoveAllDefence(), and RemoveDefence(). |
|
Draw the field at the specified location.
Definition at line 139 of file drawing.c. References DrawFieldWithoutInit(), UIFinishDrawing(), UIInitDrawing(), and UInt16. Referenced by CreateDragon(), CreateMonster(), MoveAllObjects(), and MoveCursor(). |
|
draw a field without initializing something. ONLY call this function if you make sure to call UIInitDrawing and UIFinishDrawing in the caller Also remember to call (Un)lockWorld (2 functions) This function will not try to draw outside the bounds of the current world, or the defined 'clipping region'
Definition at line 177 of file drawing.c. References CarryPower(), CarryWater(), GetGraphicNumber(), getMapHeight, getMapWidth, getWorldAndFlag(), Int8, NUM_OF_OBJECTS, NUM_OF_UNITS, orWorldFlags(), PAINTEDBIT, POWEREDBIT, selem_t, UIClipped(), UInt16, UInt32, UIPaintCursor(), UIPaintField(), UIPaintMapField(), UIPaintMapStatus(), UIPaintPowerLoss(), UIPaintSpecialObject(), UIPaintSpecialUnit(), UIPaintWaterLoss(), WATEREDBIT, welem_t, and WORLDPOS. Referenced by DowngradeZone(), DrawCross(), DrawField(), UIDrawPlayArea(), UIPaintPlayArea(), and UIScrollDisplay(). |
|
Get the graphic to use for the position in question.
Definition at line 229 of file drawing.c. References getWorld(), IsPowerLine(), IsRail(), IsRoad(), IsWaterPipe(), UInt32, and welem_t. Referenced by BuildSomething(), and DrawFieldWithoutInit(). |
|
Set the map position to that location.
Definition at line 24 of file drawing.c. References getMapHeight, getMapWidth, goto_code, Int16, Int8, RedrawAllFields(), and UInt16. Referenced by DoSpecificDisaster(), hMap(), and scrollbar(). |
|
Move the cursor in the location specified.
Definition at line 93 of file drawing.c. References dirType, DrawField(), dtDown, dtLeft, dtRight, dtUp, getMapHeight, getMapWidth, LockZone(), lz_flags, lz_world, ScrollDisplay(), UInt16, and UnlockZone(). |
|
Draw everything on the screen. The Game area, Credits and population. Definition at line 48 of file drawing.c. References addGraphicUpdate(), and gu_all. Referenced by CreateMeteor(), DrawGame(), Goto(), and UIScrollDisplay(). |
|
Scroll the map in the direction specified.
Definition at line 54 of file drawing.c. References dirType, dtDown, dtLeft, dtRight, dtUp, getMapHeight, getMapWidth, Int8, and UIScrollDisplay(). Referenced by doButtonEvent(), and MoveCursor(). |