![]() |
DynRPG
v0.20
RM2k3 Plugin SDK
|
Used for accessing and manipulating the current map environment. More...
Public Member Functions | |
int | getCameraX () |
Returns the current X position of the camera in pixels (this value means the position of the upper-left screen pixel of the screen on the map) | |
int | getCameraY () |
Returns the current Y position of the camera in pixels (this value means the position of the upper-left screen pixel of the screen on the map) | |
void | setCamera (int x, int y) |
Sets a new camera position. | |
void | moveCamera (int offsetX, int offsetY, int speed) |
Moves the camera (pixel-exact) | |
int | getWidth () |
Returns the width of the current map. | |
int | getHeight () |
Returns the height of the current map. | |
void | updateEvents () |
Updates the start conditions of events after a change. | |
Public Attributes | |
int | cameraSubX |
X position of the camera in units of 1/16th of a pixel | |
int | cameraSubY |
Y position of the camera in units of 1/16th of a pixel | |
Chipset * | chipset |
Pointer to the map's chipset (not yet implemented) | |
NamedCatalogPtr< Event * > | events |
Array of events (use event ID as index) |
Used for accessing and manipulating the current map environment.
int RPG::Map::getCameraX | ( | ) |
Returns the current X position of the camera in pixels (this value means the position of the upper-left screen pixel of the screen on the map)
int RPG::Map::getCameraY | ( | ) |
Returns the current Y position of the camera in pixels (this value means the position of the upper-left screen pixel of the screen on the map)
int RPG::Map::getHeight | ( | ) |
Returns the height of the current map.
int RPG::Map::getWidth | ( | ) |
Returns the width of the current map.
void RPG::Map::moveCamera | ( | int | offsetX, |
int | offsetY, | ||
int | speed | ||
) |
Moves the camera (pixel-exact)
This function can move the camera the specified amount of pixels in the specified speed.
offsetX | Amount of pixels to move horizontally (may also be negative) |
offsetY | Amount of pixels to move vertically (may also be negative) |
speed | Exact speed, in units of 3.75 pixels per second (1/16 tile per frame) |
void RPG::Map::setCamera | ( | int | x, |
int | y | ||
) |
Sets a new camera position.
x | New X position (pixels) |
y | New Y position (pixels) |
void RPG::Map::updateEvents | ( | ) |
Updates the start conditions of events after a change.
This function can be used to re-check the start conditions of all events. This is necessary if you modify a switch from DynRPG which is start condition of an event, for example.
X position of the camera in units of 1/16th of a pixel
Y position of the camera in units of 1/16th of a pixel
Pointer to the map's chipset (not yet implemented)
Array of events (use event ID as index)