Used for accessing and manipulating the current map environment.
More...
#include <Map.h>
|
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.
|
|
|
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)
|
|
Used for accessing and manipulating the current map environment.
- See also
- RPG::map
◆ getEventAt()
int RPG::Map::getEventAt |
( |
int | x, |
|
|
int | y ) |
Gets the event ID at the position specified, or.
- Parameters
-
x | The Y coordinate of the event |
y | The Y coordinate of the event |
- Returns
- The event ID, or 0 if no event was found
◆ getLowerLayerTileId()
int RPG::Map::getLowerLayerTileId |
( |
int | x, |
|
|
int | y ) |
Gets the tile ID for the lower layer tile at the specified coordinate.
- Parameters
-
x | The Y coordinate of the tile |
y | The Y coordinate of the tile |
- See also
- RPG::Tileset::lowerTilePassability
◆ getTerrainId()
int RPG::Map::getTerrainId |
( |
int | tileId | ) |
|
◆ getUpperLayerTileId()
int RPG::Map::getUpperLayerTileId |
( |
int | x, |
|
|
int | y ) |
Gets the tile ID for the upper layer tile at the specified coordinate.
- Parameters
-
x | The Y coordinate of the tile |
y | The Y coordinate of the tile |
- See also
- RPG::Tileset::upperTilePassability
◆ moveCamera()
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.
- Parameters
-
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) |
- See also
- RPG::Character::customExactSpeed
◆ setCamera()
void RPG::Map::setCamera |
( |
int | x, |
|
|
int | y ) |
Sets a new camera position.
- Parameters
-
x | New X position (pixels) |
y | New Y position (pixels) |
- Note
- This method also updates the camera "memory", so that the "Return to origin" function works
◆ updateEvents()
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.
◆ properties
The documentation for this class was generated from the following file: