Package worldBuilder
Class RPGMwriter
- java.lang.Object
-
- worldBuilder.RPGMwriter
-
public class RPGMwriter extends java.lang.Object
write out a series of levels-of-tiles as an RPGMaker map
-
-
Constructor Summary
Constructors Constructor Description RPGMwriter(java.io.FileWriter outfile)
crate an RPGMaker map writer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endList(java.lang.String end)
terminate an object or arrayvoid
epilogue()
terminate the list of tablesvoid
prologue(int height, int width, int tileset)
write out the prologue for a set of tablesvoid
startList(java.lang.String name, java.lang.String start)
write out the start of an object or arrayvoid
typeMap(int[] map)
set the level-to-TerrainType mapvoid
writeAdjustedTable(int[][] baseTiles, int[][] levels)
write out one table (numRows x numCols) w/autotile adjustmentsvoid
writeTable(int[][] tiles, boolean last)
write out one table (numRows x numCols)
-
-
-
Method Detail
-
typeMap
public void typeMap(int[] map)
set the level-to-TerrainType map- Parameters:
map
- new map
-
prologue
public void prologue(int height, int width, int tileset) throws java.io.IOException
write out the prologue for a set of tables- Parameters:
height
- (in tiles) of mapwidth
- (in tiles) of maptileset
- (number of the tileset to be used in this map)- Throws:
java.io.IOException
-
writeTable
public void writeTable(int[][] tiles, boolean last) throws java.io.IOException
write out one table (numRows x numCols)- Parameters:
tiles
- ... the array to be written outlast
- .... is this the last table to be written- Throws:
java.io.IOException
-
writeAdjustedTable
public void writeAdjustedTable(int[][] baseTiles, int[][] levels) throws java.io.IOException
write out one table (numRows x numCols) w/autotile adjustments- Parameters:
baseTiles
- ... the array to be written outlevels
- ... array of types for each tile Note: there is no auto-tiling for the last level (6)- Throws:
java.io.IOException
-
epilogue
public void epilogue() throws java.io.IOException
terminate the list of tables- Throws:
java.io.IOException
-
startList
public void startList(java.lang.String name, java.lang.String start) throws java.io.IOException
write out the start of an object or array- Parameters:
name
- name of List/Araystart
- starting character- Throws:
java.io.IOException
-
endList
public void endList(java.lang.String end) throws java.io.IOException
terminate an object or array- Parameters:
end
- ending character- Throws:
java.io.IOException
-
-