|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrlgamekit.map.data.LayeredMap
public class LayeredMap
A rectangular map structure consisting of several layers.
| Field Summary | |
|---|---|
int |
layoutType
0 = isometric 1 = rectangular 2 = isometric, horizontal-run |
| Constructor Summary | |
|---|---|
LayeredMap(int layerCount,
int width,
int height)
Constructs a new layered map with the given size and layer count. |
|
| Method Summary | |
|---|---|
int |
get(int layer,
int x,
int y)
Get the tile/graphics object index for a coordinate |
int |
getHeight()
|
int |
getLayerCount()
|
java.lang.String |
getScript(int x,
int y)
|
int |
getSpawnX()
Player spawn X coordinate |
int |
getSpawnY()
Player spawn Y coordinate |
java.lang.String |
getTileSetFileName(int layer)
|
int |
getWidth()
|
int |
getXoff(int layer,
int x,
int y)
Tile/graphics objects can be positioned at a certain offset from the map square's center. |
int |
getYoff(int layer,
int x,
int y)
Tile/graphics objects can be positioned at a certain offset from the map square's center. |
void |
insert(LayeredMap source,
int sx,
int sy,
int width,
int height,
int dx,
int dy)
Insert an area from a map into this map at a given location. |
void |
read(java.io.BufferedReader reader)
Read map data from a text file. |
void |
set(int layer,
int x,
int y,
int value)
Set the tile/graphics object index for a coordinate |
void |
setOutside(int layer,
int value)
Set the value for places outside this map. |
void |
setScript(int x,
int y,
java.lang.String script)
|
void |
setSpawnX(int x)
Player spawn X coordinate |
void |
setSpawnY(int y)
Player spawn Y coordinate |
void |
setTileSetFileName(int layer,
java.lang.String tileSetFileName)
|
void |
setXYoff(int layer,
int x,
int y,
int xoff,
int yoff)
Tile/graphics objects can be positioned at a certain offset from the map square's center. |
void |
write(java.io.Writer writer)
Write map data into a text file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int layoutType
| Constructor Detail |
|---|
public LayeredMap(int layerCount,
int width,
int height)
layerCount - The number of layers to constructwidth - The x axis extension of the mapheight - The y axis extension of the map| Method Detail |
|---|
public int getLayerCount()
public int getSpawnX()
public int getSpawnY()
public void setSpawnX(int x)
public void setSpawnY(int y)
public int getWidth()
public int getHeight()
public java.lang.String getTileSetFileName(int layer)
public void setTileSetFileName(int layer,
java.lang.String tileSetFileName)
public int get(int layer,
int x,
int y)
layer - The layer, 0 is lowermost layerx - The X coordinatey - The Y coordinate
public void set(int layer,
int x,
int y,
int value)
layer - The layer, 0 is lowermost layerx - The X coordinatey - The Y coordinatevalue - The tile/graphics object index to set
public void setOutside(int layer,
int value)
layer - the map layer to setvalue - the outside value to set
public int getXoff(int layer,
int x,
int y)
public int getYoff(int layer,
int x,
int y)
public void setXYoff(int layer,
int x,
int y,
int xoff,
int yoff)
layer - The layer number of the affected squarex - The X coordinate of the squarey - The Y coordinate of the squarexoff - The offset along the X axisyoff - the offset along the Y axis
public java.lang.String getScript(int x,
int y)
public void setScript(int x,
int y,
java.lang.String script)
public void insert(LayeredMap source,
int sx,
int sy,
int width,
int height,
int dx,
int dy)
source - the map to read fromsx - source x coordinatesy - source y coordinatewidth - width of the area to insertheight - height of the area to insertdx - destination x coordinatedy - destination y coordinate
public void write(java.io.Writer writer)
throws java.io.IOException
java.io.IOException
public void read(java.io.BufferedReader reader)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||