make the injector more reliable

This commit is contained in:
ThatGamerBlue
2021-04-21 00:25:08 +01:00
parent e9f4e3ab58
commit 3e8318e18a
16 changed files with 168 additions and 83 deletions

View File

@@ -1,48 +0,0 @@
/*
* Copyright (c) 2020, Noodleeater <noodleeater4@gmail.com>
* 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;
/**
* Represents an archive of data, which is ordered into "groups" of "files".
*/
public interface AbstractArchive extends IndexDataBase
{
/**
* the methods bellow are usefull for reading byte data from the cache
*/
int getGroupCount();
byte[] getConfigData(int archiveId, int fileId);
int[] getFileIds(int groupId);
int[][] getFileIds();
byte[] getFile(int groupId, int fileId);
int getGroupFileCount(int groupId);
int[] getFileCounts();
}

View File

@@ -274,11 +274,6 @@ public interface Actor extends Renderable, Locatable
*/
void setSpotAnimFrame(int spotAnimFrame);
/**
* Get the number of cycles the SpotAnimation frame has been displayed for.
*/
int getSpotAnimFrameCycle();
/**
* Gets the canvas area of the current tile the actor is standing on.
*
@@ -372,16 +367,6 @@ public interface Actor extends Renderable, Locatable
int getActionFrame();
int getActionFrameCycle();
/*
This collection of methods gets extended debug information about the actor
Used by dev tools
*/
int getTurnLeftAnimation();
int getTurnRightAnimation();
/**
* Returns true if this NPC has died
*

View File

@@ -2148,27 +2148,27 @@ public interface Client extends GameEngine
/**
* various archives you might want to use for reading data from cache
*/
AbstractArchive getSequenceDefinition_skeletonsArchive();
IndexDataBase getSequenceDefinition_skeletonsArchive();
AbstractArchive getSequenceDefinition_archive();
IndexDataBase getSequenceDefinition_archive();
AbstractArchive getSequenceDefinition_animationsArchive();
IndexDataBase getSequenceDefinition_animationsArchive();
AbstractArchive getNpcDefinition_archive();
IndexDataBase getNpcDefinition_archive();
AbstractArchive getObjectDefinition_modelsArchive();
IndexDataBase getObjectDefinition_modelsArchive();
AbstractArchive getObjectDefinition_archive();
IndexDataBase getObjectDefinition_archive();
AbstractArchive getItemDefinition_archive();
IndexDataBase getItemDefinition_archive();
AbstractArchive getKitDefinition_archive();
IndexDataBase getKitDefinition_archive();
AbstractArchive getKitDefinition_modelsArchive();
IndexDataBase getKitDefinition_modelsArchive();
AbstractArchive getSpotAnimationDefinition_archive();
IndexDataBase getSpotAnimationDefinition_archive();
AbstractArchive getSpotAnimationDefinition_modelArchive();
IndexDataBase getSpotAnimationDefinition_modelArchive();
/**
* use createBuffer to create a new byte buffer

View File

@@ -24,7 +24,6 @@
*/
package net.runelite.api;
import net.runelite.api.hooks.DrawCallbacks;
import java.awt.Canvas;
/**
@@ -53,8 +52,6 @@ public interface GameEngine
*/
boolean isClientThread();
DrawCallbacks getDrawCallbacks();
void resizeCanvas();
void setReplaceCanvasNextFrame(boolean replace);

View File

@@ -38,4 +38,20 @@ public interface IndexDataBase
* Get the child file ids for a given group
*/
int[] getFileIds(int group);
/*
* the methods bellow are usefull for reading byte data from the cache
*/
int getGroupCount();
byte[] getConfigData(int archiveId, int fileId);
int[][] getFileIds();
byte[] getFile(int groupId, int fileId);
int getGroupFileCount(int groupId);
int[] getFileCounts();
}