instance map: add complex tile rendering
This commit is contained in:
@@ -61,4 +61,6 @@ public interface Actor extends Renderable
|
||||
Point getCanvasSpriteLocation(Graphics2D graphics, SpritePixels sprite, int zOffset);
|
||||
|
||||
Point getMinimapLocation();
|
||||
|
||||
Point getRegionLocation();
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Perspective
|
||||
{
|
||||
private static final double UNIT = Math.PI / 1024d; // How much of the circle each unit of SINE/COSINE is
|
||||
|
||||
private static final int LOCAL_COORD_BITS = 7;
|
||||
public static final int LOCAL_COORD_BITS = 7;
|
||||
public static final int LOCAL_TILE_SIZE = 1 << LOCAL_COORD_BITS; // 128 - size of a tile in local coordinates
|
||||
|
||||
public static final int[] SINE = new int[2048]; // sine angles for each of the 2048 units, * 65536 and stored as an int
|
||||
|
||||
@@ -27,4 +27,8 @@ package net.runelite.api;
|
||||
public interface Region
|
||||
{
|
||||
Tile[][][] getTiles();
|
||||
|
||||
int[][] getTileMask2d();
|
||||
|
||||
int[][] getTileRotation2d();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Adam <Adam@sigterm.info>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.api;
|
||||
|
||||
public interface SceneTileModel
|
||||
{
|
||||
int getModelUnderlay();
|
||||
|
||||
int getModelOverlay();
|
||||
|
||||
int getShape();
|
||||
|
||||
int getRotation();
|
||||
}
|
||||
@@ -42,4 +42,10 @@ public interface Tile
|
||||
WallObject getWallObject();
|
||||
|
||||
SceneTilePaint getSceneTilePaint();
|
||||
|
||||
SceneTileModel getSceneTileModel();
|
||||
|
||||
Point getWorldLocation();
|
||||
|
||||
Point getLocalLocation();
|
||||
}
|
||||
|
||||
@@ -31,4 +31,7 @@ package net.runelite.api;
|
||||
*/
|
||||
public interface WallObject extends TileObject
|
||||
{
|
||||
int getOrientationA();
|
||||
|
||||
int getOrientationB();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user