instance map: draw map icons, objects, doors, and improve walls

This commit is contained in:
Toocanzs
2017-11-21 19:04:35 -05:00
committed by Adam
parent 1cad0c1504
commit 6c14b08384
17 changed files with 642 additions and 93 deletions

View File

@@ -0,0 +1,35 @@
/*
* 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.rs.api;
import net.runelite.api.Area;
import net.runelite.mapping.Import;
public interface RSArea extends RSCacheableNode, Area
{
@Import("getMapIcon")
@Override
RSSpritePixels getMapIcon(boolean var1);
}

View File

@@ -129,10 +129,10 @@ public interface RSClient extends RSGameEngine, Client
@Import("collisionMaps")
RSCollisionData[] getCollisionMaps();
@Import("playerIndexesCount")
int getPlayerIndexesCount();
@Import("playerIndices")
int[] getPlayerIndices();
@@ -204,6 +204,7 @@ public interface RSClient extends RSGameEngine, Client
@Import("sendGameMessage")
void sendGameMessage(int var1, String var2, String var3);
@Override
@Import("getObjectDefinition")
RSObjectComposition getObjectDefinition(int objectId);
@@ -304,4 +305,16 @@ public interface RSClient extends RSGameEngine, Client
*/
@Import("widgetRoot")
int getWidgetRoot();
@Import("mapAreaType")
@Override
RSArea[] getMapAreas();
@Import("mapscene")
@Override
RSIndexedSprite[] getMapScene();
@Import("mapIcons")
@Override
RSSpritePixels[] getMapIcons();
}

View File

@@ -66,6 +66,7 @@ public interface RSGameObject extends GameObject
@Override
int getHash();
@Override
@Import("flags")
int getFlags();
}

View File

@@ -0,0 +1,59 @@
/*
* 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.rs.api;
import net.runelite.api.IndexedSprite;
import net.runelite.mapping.Import;
public interface RSIndexedSprite extends IndexedSprite
{
@Import("pixels")
@Override
byte[] getPixels();
@Import("palette")
@Override
int[] getPalette();
@Import("originalWidth")
@Override
int getOriginalWidth();
@Import("height")
@Override
int getHeight();
@Import("offsetX")
@Override
int getOffsetX();
@Import("offsetY")
@Override
int getOffsetY();
@Import("width")
@Override
int getWidth();
}

View File

@@ -24,13 +24,23 @@
*/
package net.runelite.rs.api;
import net.runelite.api.ObjectComposition;
import net.runelite.mapping.Import;
public interface RSObjectComposition
public interface RSObjectComposition extends ObjectComposition
{
@Import("name")
@Override
String getName();
@Import("actions")
String[] getActions();
@Import("mapSceneId")
@Override
int getMapSceneId();
@Import("mapIconId")
@Override
int getMapIconId();
}

View File

@@ -48,4 +48,8 @@ public interface RSWallObject extends WallObject
@Import("orientationB")
@Override
int getOrientationB();
@Import("config")
@Override
int getConfig();
}