#include <IsoScroller.h>
Collaboration diagram for IsoScroller:
Public Methods | |
IsoScroller () | |
~IsoScroller () | |
RECT * | getScreenSpace () |
Returns a pointer to the screen space RECT. More... | |
int | getScreenSpaceWidth () |
Returns the width of the screen space. More... | |
int | getScreenSpaceHeight () |
Returns the height of the screen space. More... | |
void | setScreenSpace (RECT *newScreenSpace) |
Sets the screen space RECT to a new value. More... | |
void | adjustScreenSpace (int leftAdjust, int topAdjust, int rightAdjust, int bottomAdjust) |
Adjusts the screen space by the values specified. More... | |
RECT * | getWorldSpace () |
Returns a pointer to the world space RECT. More... | |
int | getWorldSpaceWidth () |
Returns the width of the world space. More... | |
int | getWorldSpaceHeight () |
Returns the height of the world space. More... | |
void | setWorldSpace (RECT *newWorldSpace) |
Sets the world space RECT to a new value. More... | |
void | adjustWorldSpace (int leftAdjust, int topAdjust, int rightAdjust, int bottomAdjust) |
Adjusts the world space by the values specified. More... | |
void | calcWorldSpace (IsoTilePlotter *tilePlotter, RECT *extent, int mapWidth, int mapHeight) |
Calculates worldspace based on a tile plotter, a tile extent rectangle, and a map's height and width. More... | |
RECT * | getAnchorSpace () |
Returns a pointer to the anchor space RECT. More... | |
int | getAnchorSpaceWidth () |
Returns the width of the anchor space. More... | |
int | getAnchorSpaceHeight () |
Returns the height of the anchor space. More... | |
void | setAnchorSpace (RECT *newAnchorSpace) |
Sets the anchor space RECT to a new value. More... | |
void | adjustAnchorSpace (int leftAdjust, int topAdjust, int rightAdjust, int bottomAdjust) |
Adjusts the anchor space by the values specified. More... | |
void | calcAnchorSpace () |
Calculates anchor space based on world space and screen space. More... | |
POINT * | getAnchor () |
Returns the point where the anchor is located. More... | |
void | setAnchor (POINT *newAnchor, bool wrap=true) |
Sets the new location for the anchor. More... | |
void | moveAnchor (int xAdjust, int yAdjust, bool wrap=true) |
Moves anchor by the specifid quantities in x and y directions. More... | |
void | wrapAnchor () |
Applies clipping or wrapping to the anchor. More... | |
POINT | ScreenToWorld (POINT screenCoords) |
Converts screen coordinates to world coordinates. More... | |
POINT | WorldToScreen (POINT worldCoords) |
Converts world coordinates to screen coordinates. More... | |
SCROLLERWRAPMODE | getHWrapMode () |
Returns the currently set horizontal wrap mode. More... | |
SCROLLERWRAPMODE | getVWrapMode () |
Returns the currently set vertical wrap mode. More... | |
void | setHWrapMode (SCROLLERWRAPMODE newWrapMode) |
Sets the horizontal wrap mode. More... | |
void | setVWrapMode (SCROLLERWRAPMODE newWrapMode) |
Sets the vertical wrap mode. More... | |
bool | isWorldCoord (POINT coord) |
Returns true if the coordinate passed in is within the world rectangle. More... | |
bool | isScreenCoord (POINT coord) |
Returns true if the coordinate passed in is within the screen rectangle. More... | |
bool | isAnchorCoord (POINT coord) |
Returns true if the point passed in is within the anchor space. More... |
Takes care of automatically clipping or wrapping the anchor, thus keeping the view always on the map, and potentially allowing to make cylindrical and toral worlds.
Definition at line 34 of file IsoScroller.h.
|
Definition at line 16 of file IsoScroller.cpp. References setHWrapMode, setRectEmpty, setVWrapMode, SWM_NONE, POINT::x, and POINT::y. |
|
Definition at line 31 of file IsoScroller.cpp. |
|
Adjusts the anchor space by the values specified.
Definition at line 207 of file IsoScroller.cpp. References RECT::bottom, RECT::left, RECT::right, and RECT::top. |
|
Adjusts the screen space by the values specified.
Definition at line 68 of file IsoScroller.cpp. References RECT::bottom, RECT::left, RECT::right, and RECT::top. |
|
Adjusts the world space by the values specified.
Definition at line 112 of file IsoScroller.cpp. References RECT::bottom, RECT::left, RECT::right, and RECT::top. |
|
Calculates anchor space based on world space and screen space.
Definition at line 218 of file IsoScroller.cpp. References RECT::bottom, CopyRect, getScreenSpaceHeight, getScreenSpaceWidth, RECT::left, RECT::right, SWM_WRAP, and RECT::top. Referenced by initializeEngine, and programLoop. |
|
Calculates worldspace based on a tile plotter, a tile extent rectangle, and a map's height and width.
Definition at line 127 of file IsoScroller.cpp. References RECT::bottom, CopyRect, RECT::left, OffsetRect, IsoTilePlotter::plotTile, RECT::right, setRectEmpty, tilePlotter, RECT::top, POINT::x, and POINT::y. Referenced by initializeEngine, and programLoop. |
|
Returns the point where the anchor is located.
Definition at line 246 of file IsoScroller.cpp. Referenced by initializeEngine, and programLoop. |
|
Returns a pointer to the anchor space RECT.
Definition at line 181 of file IsoScroller.cpp. |
|
Returns the height of the anchor space.
Definition at line 191 of file IsoScroller.cpp. References RECT::bottom, and RECT::top. Referenced by wrapAnchor. |
|
Returns the width of the anchor space.
Definition at line 186 of file IsoScroller.cpp. References RECT::left, and RECT::right. Referenced by wrapAnchor. |
|
Returns the currently set horizontal wrap mode.
Definition at line 365 of file IsoScroller.cpp. |
|
Returns a pointer to the screen space RECT.
Definition at line 42 of file IsoScroller.cpp. |
|
Returns the height of the screen space.
Definition at line 52 of file IsoScroller.cpp. References RECT::bottom, and RECT::top. Referenced by calcAnchorSpace. |
|
Returns the width of the screen space.
Definition at line 47 of file IsoScroller.cpp. References RECT::left, and RECT::right. Referenced by calcAnchorSpace. |
|
Returns the currently set vertical wrap mode.
Definition at line 370 of file IsoScroller.cpp. |
|
Returns a pointer to the world space RECT.
Definition at line 86 of file IsoScroller.cpp. |
|
Returns the height of the world space.
Definition at line 96 of file IsoScroller.cpp. References RECT::bottom, and RECT::top. |
|
Returns the width of the world space.
Definition at line 91 of file IsoScroller.cpp. References RECT::left, and RECT::right. |
|
Returns true if the point passed in is within the anchor space.
Definition at line 401 of file IsoScroller.cpp. |
|
Returns true if the coordinate passed in is within the screen rectangle.
Definition at line 396 of file IsoScroller.cpp. |
|
Returns true if the coordinate passed in is within the world rectangle.
Definition at line 391 of file IsoScroller.cpp. |
|
Moves anchor by the specifid quantities in x and y directions.
Definition at line 261 of file IsoScroller.cpp. References wrapAnchor, POINT::x, and POINT::y. Referenced by programLoop, and renderMap. |
|
Converts screen coordinates to world coordinates.
Definition at line 331 of file IsoScroller.cpp. Referenced by IsoMouseMap::mapMouse. |
|
Sets the new location for the anchor.
Definition at line 251 of file IsoScroller.cpp. References wrapAnchor, POINT::x, and POINT::y. |
|
Sets the anchor space RECT to a new value.
Definition at line 196 of file IsoScroller.cpp. References CopyRect. |
|
Sets the horizontal wrap mode.
Definition at line 375 of file IsoScroller.cpp. Referenced by initializeEngine, and IsoScroller. |
|
Sets the screen space RECT to a new value.
Definition at line 57 of file IsoScroller.cpp. References CopyRect. Referenced by initializeEngine. |
|
Sets the vertical wrap mode.
Definition at line 380 of file IsoScroller.cpp. Referenced by initializeEngine, and IsoScroller. |
|
Sets the world space RECT to a new value.
Definition at line 101 of file IsoScroller.cpp. References CopyRect. |
|
Converts world coordinates to screen coordinates.
Definition at line 345 of file IsoScroller.cpp. Referenced by renderMap. |
|
Applies clipping or wrapping to the anchor.
Definition at line 271 of file IsoScroller.cpp. References RECT::bottom, getAnchorSpaceHeight, getAnchorSpaceWidth, RECT::left, RECT::right, SWM_CLIP, SWM_WRAP, RECT::top, POINT::x, and POINT::y. Referenced by moveAnchor, and setAnchor. |