DynRPG v0.32 Unofficial
Plugin SDK
|
Used for accessing and manipulating the current map environment. More...
#include <Map.h>
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. | |
int | getLowerLayerTileId (int x, int y) |
Gets the tile ID for the lower layer tile at the specified coordinate. | |
int | getUpperLayerTileId (int x, int y) |
Gets the tile ID for the upper layer tile at the specified coordinate. | |
int | getTerrainId (int tileId) |
Gets the terrain ID for the tile ID specified. | |
int | getEventAt (int x, int y) |
Gets the event ID at the position specified, or. | |
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 | |
int | encounterRateNew |
If the encounter rate is changed by event command, it's stored here. | |
int | chipsetIdNew |
If the chipset id is changed by event command, it's stored here. | |
Chipset * | chipset |
Pointer to the map's chipset (not yet implemented) | |
NamedCatalogPtr< Event * > | events |
Array of events (use event ID as index) | |
unsigned char | lowerTileIdNew [144] |
Lower tile ID? if changed via tile substitution event command (zero-based. index = old tile id, value = new tile id) | |
unsigned char | upperTileIdNew [144] |
Upper tile ID? if changed via tile substitution event command (zero-based. index = old tile id, value = new tile id) | |
DStringPtr | panoramaFilenameNew |
The filename of the panorama's image (if set by event command) | |
bool | horScrollNew |
Is horizontal scrolling enabled? (if set by event command) | |
bool | verScrollNew |
Is vertical scrolling enabled? (if set by event command) | |
bool | horAutoscrollNew |
Is horizontal auto-scrolling enabled? (if set by event command) | |
int | horScrollSpeedNew |
If horizontal scrolling enabled, this is the defined speed (if set by event command) | |
bool | verAutoscrollNew |
Is vertical auto-scrolling enabled? (if set by event command) | |
int | verScrollSpeedNew |
If horizontal scrolling enabled, this is the defined speed (if set by event command) | |
Static Public Attributes | |
static MapProperties *& | properties |
Returns the map properties information for the map that is currently loaded. | |
Used for accessing and manipulating the current map environment.
Gets the event ID at the position specified, or.
x | The Y coordinate of the event |
y | The Y coordinate of the event |
Gets the tile ID for the lower layer tile at the specified coordinate.
x | The Y coordinate of the tile |
y | The Y coordinate of the tile |
Gets the terrain ID for the tile ID specified.
tileId | The tile's id |
Gets the tile ID for the upper layer tile at the specified coordinate.
x | The Y coordinate of the tile |
y | The Y coordinate of the tile |
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) |
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.
|
static |
Returns the map properties information for the map that is currently loaded.