DynRPG  v0.14a
RM2k3 Plugin SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Public Attributes
RPG::Map Class Reference

Used for accessing and manipulating the current map environment. More...

List of all members.

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
Chipsetchipset
 Pointer to the map's chipset (not yet implemented)
NamedCatalogPtr< Event * > events
 Array of events (use event ID as index)

Detailed Description

Used for accessing and manipulating the current map environment.

See also:
RPG::map

Member Function Documentation

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)

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)

Returns the height of the current map.

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.

Parameters:
offsetXAmount of pixels to move horizontally (may also be negative)
offsetYAmount of pixels to move vertically (may also be negative)
speedExact speed, in units of 3.75 pixels per second (1/16 tile per frame)
See also:
RPG::Character::customExactSpeed
void RPG::Map::setCamera ( int  x,
int  y 
)

Sets a new camera position.

Parameters:
xNew X position (pixels)
yNew Y position (pixels)
Note:
This method also updates the camera "memory", so that the "Return to origin" function works

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.


Member Data Documentation

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)

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator