Logo Search packages:      
Sourcecode: freecraft version File versions  Download package

_viewport_ Struct Reference

#include <ui.h>

List of all members.


Detailed Description

Viewport typedef.

A map viewport.

A part of the map displayed on sceen.

Viewport::X Viewport::Y Viewport::EndX Viewport::EndY

upper left corner of this viewport is located at pixel coordinates (X, Y) with respect to upper left corner of freecraft's window, similarly lower right corner of this viewport is (EndX, EndY) pixels away from the UL corner of freecraft's window.

Viewport::MapX Viewport::MapY Viewport::MapWidth Viewport::MapHeight

Tile coordinates of UL corner of this viewport with respect to UL corner of the whole map.

Viewport::Unit

Viewport is bound to an unit. If the unit moves the viewport changes the position together with the unit.

Todo:
binding to a group.

Definition at line 103 of file ui.h.


Public Attributes

int EndX
 Screen pixel upper corner y coordinate.
int EndY
 Screen pixel right x coordinate.
int MapHeight
 Width in map tiles.
int MapWidth
 Map tile upper corner y coordinate.
int MapX
 Screen pixel bottom y coordinate.
int MapY
 Map tile left corner x coordinate.
UnitUnit
 Height in map tiles.
int X
int Y
 Screen pixel left corner x coordinate.

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index