diff --git a/bin/RabiClone.jar b/bin/RabiClone.jar index 8962d3f..24ee248 100644 Binary files a/bin/RabiClone.jar and b/bin/RabiClone.jar differ diff --git a/src/sig/map/Maps.java b/src/sig/map/Maps.java index bb52597..5a67438 100644 --- a/src/sig/map/Maps.java +++ b/src/sig/map/Maps.java @@ -37,4 +37,22 @@ public enum Maps { return Tile.values()[this.map.tiles[index]]; } } + + public View getView(int x,int y) { + int index = (y/Tile.TILE_SCREEN_COUNT_Y)*(Map.MAP_WIDTH/Tile.TILE_WIDTH)+x/Tile.TILE_SCREEN_COUNT_X; + if (index<0||index>=this.map.views.length) { + return View.DIRECT_FOLLOW; + } else { + return View.values()[this.map.views[index]]; + } + } + + public Type getType(int x,int y) { + int index = (y/Tile.TILE_SCREEN_COUNT_Y)*(Map.MAP_WIDTH/Tile.TILE_WIDTH)+x/Tile.TILE_SCREEN_COUNT_X; + if (index<0||index>=this.map.types.length) { + return Type.NONE; + } else { + return Type.values()[this.map.types[index]]; + } + } } diff --git a/src/sig/map/Tile.java b/src/sig/map/Tile.java index f4ca9fc..08ad072 100644 --- a/src/sig/map/Tile.java +++ b/src/sig/map/Tile.java @@ -1,5 +1,7 @@ package sig.map; +import sig.RabiClone; + public enum Tile { VOID(0,0,true,CollisionType.NONE), //File is populated by 0s by default. This represents the void. WALL(0,0,CollisionType.BLOCK), @@ -11,6 +13,8 @@ public enum Tile { final public static int TILE_WIDTH=32; final public static int TILE_HEIGHT=32; + final public static int TILE_SCREEN_COUNT_X=RabiClone.BASE_WIDTH/TILE_WIDTH; + final public static int TILE_SCREEN_COUNT_Y=RabiClone.BASE_HEIGHT/TILE_HEIGHT; int spriteSheetX,spriteSheetY; boolean invisible; diff --git a/src/sig/map/Type.java b/src/sig/map/Type.java new file mode 100644 index 0000000..ed5bd88 --- /dev/null +++ b/src/sig/map/Type.java @@ -0,0 +1,9 @@ +package sig.map; + +public enum Type { + NONE, + POI, + SAVE, + WARP, + SPECIAL_ITEM; +} diff --git a/src/sig/objects/EditorRenderer.java b/src/sig/objects/EditorRenderer.java index 95a8113..89edd96 100644 --- a/src/sig/objects/EditorRenderer.java +++ b/src/sig/objects/EditorRenderer.java @@ -114,6 +114,8 @@ public class EditorRenderer extends LevelRenderer{ double tileY = y*Tile.TILE_HEIGHT-this.getY(); DrawTransparentTile(tileX,tileY,selectedTile,Alpha.ALPHA160); Draw_Text(tileX+2,tileY-Font.PROFONT_12.getGlyphHeight()-2,new StringBuilder(selectedTile.toString()),Font.PROFONT_12); + Draw_Text(tileX+2,tileY+2,new StringBuilder("View: ").append(PaletteColor.EMERALD).append(RabiClone.CURRENT_MAP.getView(x,y).ordinal()),Font.PROFONT_12); + Draw_Text(tileX+2,tileY+Font.PROFONT_12.getGlyphHeight()+2,new StringBuilder("Type: ").append(PaletteColor.MIDNIGHT_BLUE).append(RabiClone.CURRENT_MAP.getType(x,y).ordinal()),Font.PROFONT_12); Draw_Text_Ext(tileX+2,tileY+Tile.TILE_HEIGHT+2,new StringBuilder(RabiClone.CURRENT_MAP.getTile(x,y).toString()),Font.PROFONT_12,Alpha.ALPHA0,PaletteColor.CRIMSON); } }