Add animation smoothing plugin

This commit is contained in:
Adam
2018-04-08 18:44:26 -04:00
parent 6a78fb76dd
commit c66cb42a52
17 changed files with 992 additions and 0 deletions

View File

@@ -65,4 +65,31 @@ public interface RSActor extends RSRenderable, Actor
@Import("logicalHeight")
@Override
int getLogicalHeight();
@Import("actionFrame")
int getActionFrame();
@Import("actionFrame")
void setActionFrame(int frame);
@Import("actionFrameCycle")
int getActionFrameCycle();
@Import("poseFrame")
int getPoseFrame();
@Import("poseFrame")
void setPoseFrame(int frame);
@Import("poseFrameCycle")
int getPoseFrameCycle();
@Import("spotAnimFrame")
int getSpotAnimFrame();
@Import("spotAnimFrame")
void setSpotAnimFrame(int frame);
@Import("spotAnimFrameCycle")
int getSpotAnimFrameCycle();
}

View File

@@ -550,6 +550,18 @@ public interface RSClient extends RSGameEngine, Client
@Override
RSWorld createWorld();
@Import("animOffsetX")
void setAnimOffsetX(int animOffsetX);
@Import("animOffsetY")
void setAnimOffsetY(int animOffsetY);
@Import("animOffsetZ")
void setAnimOffsetZ(int animOffsetZ);
@Import("getFrames")
RSFrames getFrames(int frameId);
@Import("minimapSprite")
RSSpritePixels getMinimapSprite();

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2018, 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.Renderable;
import net.runelite.mapping.Import;
public interface RSDynamicObject extends Renderable, RSRenderable
{
@Import("id")
int getId();
@Import("animFrame")
int getAnimFrame();
@Import("animFrame")
void setAnimFrame(int frame);
@Import("animCycleCount")
int getAnimCycleCount();
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 2018, 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.mapping.Import;
public interface RSFrame
{
@Import("skin")
RSFrameMap getSkin();
@Import("transformCount")
int getTransformCount();
@Import("transformTypes")
int[] getTransformTypes();
@Import("translator_x")
int[] getTranslatorX();
@Import("translator_y")
int[] getTranslatorY();
@Import("translator_z")
int[] getTranslatorZ();
@Import("showing")
boolean isShowing();
}

View File

@@ -0,0 +1,39 @@
/*
* Copyright (c) 2018, 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.mapping.Import;
public interface RSFrameMap extends RSNode
{
@Import("count")
int getCount();
@Import("types")
int[] getTypes();
@Import("list")
int[][] getList();
}

View File

@@ -0,0 +1,33 @@
/*
* Copyright (c) 2018, 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.mapping.Import;
public interface RSFrames extends RSCacheableNode
{
@Import("skeletons")
RSFrame[] getFrames();
}

View File

@@ -54,6 +54,33 @@ public interface RSModel extends RSRenderable, Model
@Import("indices3")
int[] getTrianglesZ();
@Import("vertexGroups")
int[][] getVertexGroups();
@Import("animate")
void animate(int type, int[] list, int x, int y, int z);
@Import("resetBounds")
void resetBounds();
@Import("toSharedModel")
RSModel toSharedModel(boolean b);
@Import("toSharedSpotAnimModel")
RSModel toSharedSpotAnimModel(boolean b);
@Import("rotateY90Ccw")
void rotateY90Ccw();
@Import("rotateY180Ccw")
void rotateY180Ccw();
@Import("rotateY270Ccw")
void rotateY270Ccw();
void interpolateFrames(RSFrames frames, int frameId, RSFrames nextFrames, int nextFrameId, int interval,
int intervalCount);
/**
* Compute the convex hull of this model
* @param localX

View File

@@ -42,4 +42,10 @@ public interface RSSequence
@Import("interleaveLeave")
int[] getInterleaveLeave();
@Import("frameIDs")
int[] getFrameIDs();
@Import("frameLengths")
int[] getFrameLenths();
}