|
| | Radar (void) |
| |
| virtual | ~Radar (void) |
| |
| virtual void | init (void) |
| | subsystem initialization
|
| |
| virtual void | reset (void) |
| | subsystem reset
|
| |
| virtual void | update (void) |
| | subsystem per frame update
|
| |
| Bool | isRadarWindow (GameWindow *window) |
| |
| Bool | radarToWorld (const ICoord2D *radar, Coord3D *world) |
| | radar point to world point on terrain
|
| |
| Bool | radarToWorld2D (const ICoord2D *radar, Coord3D *world) |
| | radar point to world point (x,y only!)
|
| |
| Bool | worldToRadar (const Coord3D *world, ICoord2D *radar) |
| | translate world point to radar (x,y)
|
| |
| Bool | localPixelToRadar (const ICoord2D *pixel, ICoord2D *radar) |
| | translate pixel (with UL of radar being (0,0)) to logical radar coords
|
| |
| Bool | screenPixelToWorld (const ICoord2D *pixel, Coord3D *world) |
| | translate pixel (with UL of the screen being (0,0)) to world position in the world
|
| |
| Object * | objectUnderRadarPixel (const ICoord2D *pixel) |
| | return the object (if any) represented by the pixel coords passed in
|
| |
| void | findDrawPositions (Int startX, Int startY, Int width, Int height, ICoord2D *ul, ICoord2D *lr) |
| | make translation for screen area of radar square to scaled aspect ratio preserving points inside the radar area
|
| |
| Bool | isPriorityVisible (RadarPriorityType priority) const |
| | is the priority passed in a "visible" one on the radar
|
| |
| void | createEvent (const Coord3D *world, RadarEventType type, Real secondsToLive=4.0f) |
| | create radar event at location in world
|
| |
| void | createPlayerEvent (Player *player, const Coord3D *world, RadarEventType type, Real secondsToLive=4.0f) |
| | create radar event using player colors
|
| |
| Bool | getLastEventLoc (Coord3D *eventPos) |
| | get last event loc (if any)
|
| |
| void | tryUnderAttackEvent (const Object *obj) |
| | try to make an "under attack" event if it's the proper time
|
| |
| void | tryInfiltrationEvent (const Object *obj) |
| | try to make an "infiltration" event if it's the proper time
|
| |
| Bool | tryEvent (RadarEventType event, const Coord3D *pos) |
| | try to make a "stealth" event
|
| |
| void | addObject (Object *obj) |
| | add object to radar
|
| |
| void | removeObject (Object *obj) |
| | remove object from radar
|
| |
| void | examineObject (Object *obj) |
| | re-examine object and resort if needed
|
| |
| void | hide (Bool hide) |
| | hide/unhide the radar
|
| |
| Bool | isRadarHidden (void) |
| | is radar hidden
|
| |
| void | forceOn (Bool force) |
| | force the radar to be on
|
| |
| Bool | isRadarForced (void) |
| | is radar forced on?
|
| |
| virtual void | refreshTerrain (TerrainLogic *terrain) |
| | refresh the water values for the radar
|
| |
| virtual void | queueTerrainRefresh (void) |
| | queue a refresh of the terran at the next available time
|
| |
| virtual void | newMap (TerrainLogic *terrain) |
| | reset radar for new map
|
| |
| virtual void | draw (Int pixelX, Int pixelY, Int width, Int height)=0 |
| | draw the radar
|
| |
| virtual void | clearShroud ()=0 |
| | empty the entire shroud
|
| |
| virtual void | setShroudLevel (Int x, Int y, CellShroudStatus setting)=0 |
| | set the shroud level at shroud cell x,y
|
| |
| | Snapshot (void) |
| |
| | ~Snapshot (void) |
| |
| | SubsystemInterface () |
| |
| virtual | ~SubsystemInterface () |
| |
| virtual void | postProcessLoad () |
| |
| virtual void | draw (void) |
| |
| void | UPDATE (void) |
| |
| void | DRAW (void) |
| |
| AsciiString | getName (void) |
| |
| void | setName (AsciiString name) |
| |
Interface for the radar
Definition at line 155 of file Radar.h.
make translation for screen area of radar square to scaled aspect ratio preserving points inside the radar area
Given the RELATIVE SCREEN start X and Y, the width and height of the area to draw the whole radar in, compute what the upper left (ul) and lower right (lr) local coordinates are that represent the actual terrain image part of the radar that will preserve the aspect ratio of the map
Definition at line 901 of file Radar.cpp.
translate pixel (with UL of radar being (0,0)) to logical radar coords
Translate an actual pixel location (relative pixel with (0,0) being the top left of the radar area) to the "logical" radar coords that would cover the entire area of display on the screen. This is needed because some maps are "long" or "tall" and need a translation to any radar image that has been scaled to preserve the map aspect ratio
Definition at line 716 of file Radar.cpp.
| void Radar::queueTerrainRefresh |
( |
void | | ) |
|
|
virtual |
queue a refresh of the terran at the next available time
Queue a refresh of the radar terrain, we have this so that if there is code that rapidly needs to refresh the radar, it should use this so we aren't continually rebuilding the radar graphic because that process is slow. If you need to update the terrain on the radar immediately use refreshTerrain()
Definition at line 1358 of file Radar.cpp.
radar point to world point (x,y only!)
Translate a 2D spot on the radar (from (0,0) to (RADAR_CELL_WIDTH,RADAR_CELL_HEIGHT) to a 3D spot in the world. Does not determine Z value! Return TRUE if the radar points translates to a valid world position Return FALSE if the radar point is not a valid world position
Definition at line 624 of file Radar.cpp.
| void Radar::tryInfiltrationEvent |
( |
const Object * | obj | ) |
|
try to make an "infiltration" event if it's the proper time
Try to create a radar event for "infiltration". This happens whenever a unit is hijacked, defected, converted to carbomb, hacked, or otherwise snuck into
- Todo
- Should make an INI data driven table for radar event strings, and audio events
Definition at line 1257 of file Radar.cpp.