|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--monrovia.client.ui.Map
This is the class for the game map which is built from bitmap tiles. The map can be redrawn when the game situation changes. The class has two inner structures. The other lists all the static objects and the other lists the dymanic objects which can change during the game. If the dynamic object for the file can't be found, the static tile will be drawn. Otherwise the dynamic will be drawn. Coordinates (0,0) represent the upper left corner of the map.
Constructor Summary | |
Map(int pScreenX,
int pScreenY,
int pTilesPerRow,
int pBitmapWidth)
Constructor for the map. |
Method Summary | |
void |
clear()
Clears the dynamic map objects. |
boolean |
init(short[][] pAreaMap)
Initializer for the map array structure of the bitmaps. |
void |
paint()
Paint the bitmaps which make the map on the screen. |
void |
registerBitmap(int pBitmapID,
short[] pBitmapData)
Introduce a new bitmap to be shown in the map. |
void |
updateMap(int pDX,
int pDY,
int pTileID)
Updates a dynamic map object. |
void |
updatePosition(int pX,
int pY)
Set a new center (player) position so that the map can be scrolled in the display. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Map(int pScreenX, int pScreenY, int pTilesPerRow, int pBitmapWidth)
pScreenX
- x coordinate of the upper left corner of the mappScreenY
- y coordinate of the upper left corner of the mappTilesPerRow
- number of the bitmap tiles per one map rowpBitmapWidth
- the width (and the height) of one bitmapMethod Detail |
public boolean init(short[][] pAreaMap)
pAreaMap
- the area map arraypublic void registerBitmap(int pBitmapID, short[] pBitmapData)
pBitmapID
- ID number of the new bitmappBitmapData
- data of the bitmap in Palm bitmap formpublic void updatePosition(int pX, int pY)
pX
- X coordinate of the positionpY
- Y coordinate of the positionpublic void clear()
public void updateMap(int pDX, int pDY, int pTileID)
pDX
- relative X coordinate of the new dynamic objectpDY
- relative Y coordinate of the new dynamic objectpTileID
- bitmap ID of the dynamic objectpublic void paint()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |