openrune: just about finish rework, gets to login

This commit is contained in:
therealunull
2020-12-13 15:12:37 -05:00
parent 11a239e94e
commit b54ff7f7db
693 changed files with 11362 additions and 3943 deletions

View File

@@ -932,7 +932,7 @@ public interface Client extends GameShell
* @return the corresponding object composition
* @see ObjectID
*/
ObjectDefinition getObjectDefinition(int objectId);
ObjectDefinition getObjectComposition(int objectId);
/**
* Gets the NPC composition corresponding to an NPCs ID.
@@ -1010,7 +1010,7 @@ public interface Client extends GameShell
* @param height the height
* @return the sprite image
*/
SpritePixels createSprite(int[] pixels, int width, int height);
SpritePixels createSpritePixels(int[] pixels, int width, int height);
/**
* Gets the location of the local player.
@@ -1863,7 +1863,7 @@ public interface Client extends GameShell
void setSelectedSpellName(String name);
boolean isSpellSelected();
boolean getSpellSelected();
String getSelectedSpellActionName();

View File

@@ -37,18 +37,18 @@ public class MenuEntry implements Cloneable
/**
* The option text added to the menu (ie. "Walk here", "Use").
*/
private String option;
private String menuOption;
/**
* The target of the action (ie. Item or Actor name).
* <p>
* If the option does not apply to any target, this field
* will be set to empty string.
*/
private String target;
private String menuTarget;
/**
* An identifier value for the target of the action.
*/
private int identifier;
private int type;
/**
* The action the entry will trigger.
* {@link MenuAction}
@@ -57,11 +57,11 @@ public class MenuEntry implements Cloneable
/**
* An additional parameter for the action.
*/
private int param0;
private int actionParam0;
/**
* A second additional parameter for the action.
*/
private int param1;
private int widgetId;
/**
* If this field is true and you have single mouse button on and this entry is
* the top entry the right click menu will not be opened when you left click
@@ -70,14 +70,14 @@ public class MenuEntry implements Cloneable
*/
private boolean forceLeftClick;
public MenuEntry(String option, String target, int identifier, int opcode, int param0, int param1, boolean forceLeftClick)
public MenuEntry(String menuOption, String menuTarget, int type, int opcode, int actionParam0, int widgetId, boolean forceLeftClick)
{
this.option = option;
this.target = target;
this.identifier = identifier;
this.menuOption = menuOption;
this.menuTarget = menuTarget;
this.type = type;
this.opcode = opcode;
this.param0 = param0;
this.param1 = param1;
this.actionParam0 = actionParam0;
this.widgetId = widgetId;
this.forceLeftClick = forceLeftClick;
}
@@ -97,7 +97,7 @@ public class MenuEntry implements Cloneable
/**
* Get opcode, but as it's enum counterpart
*/
public MenuAction getMenuOpcode()
public MenuAction getMenuAction()
{
return MenuAction.of(getOpcode());
}

View File

@@ -59,7 +59,7 @@ public interface NPC extends Actor
*
* @return the composition
*/
NPCComposition getDefinition();
NPCComposition getComposition();
/**
* Get the composition for this NPC and transform it if required

View File

@@ -31,7 +31,7 @@ public class BeforeRender implements Event
{
public static final BeforeRender INSTANCE = new BeforeRender();
private BeforeRender()
public BeforeRender()
{
// noop
}

View File

@@ -24,14 +24,14 @@
*/
package net.runelite.api.events;
import lombok.Value;
import lombok.Data;
import net.runelite.api.GameObject;
import net.runelite.api.Tile;
/**
* An event where a {@link GameObject} is added to a {@link Tile}.
*/
@Value
@Data
public class GameObjectSpawned implements Event
{
/**

View File

@@ -45,7 +45,7 @@ public class GameTick implements Event
{
public static final GameTick INSTANCE = new GameTick();
private GameTick()
public GameTick()
{
// noop
}

View File

@@ -86,12 +86,12 @@ public class MenuOptionClicked extends MenuEntry implements Event
public void setMenuEntry(MenuEntry e)
{
setOption(e.getOption());
setTarget(e.getTarget());
setIdentifier(e.getIdentifier());
setMenuOption(e.getMenuOption());
setMenuTarget(e.getMenuTarget());
setType(e.getType());
setOpcode(e.getOpcode());
setParam0(e.getParam0());
setParam1(e.getParam1());
setActionParam0(e.getActionParam0());
setWidgetId(e.getWidgetId());
setForceLeftClick(e.isForceLeftClick());
}
}

View File

@@ -29,7 +29,6 @@ import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import net.runelite.api.MainBufferProvider;
import net.runelite.api.events.Event;
import net.runelite.api.widgets.WidgetItem;
/**
@@ -38,18 +37,18 @@ import net.runelite.api.widgets.WidgetItem;
public interface Callbacks
{
/**
* Post an event. See the events in api.events.
* Post an event. See the events in net.runelite.api.events.
*
* @param event the event
*/
<T extends Event, E extends T> void post(Class<T> eventClass, E event);
void post(Object event);
/**
* Post a deferred event, which gets delayed until the next cycle.
*
* @param event the event
*/
<T extends Event, E extends T> void postDeferred(Class<T> eventClass, E event);
void postDeferred(Object event);
/**
* Called each client cycle.
@@ -71,6 +70,8 @@ public interface Callbacks
*/
void drawAboveOverheads();
void drawAfterWidgets();
/**
* Client top-most draw method, rendering over top of most of game interfaces.
*
@@ -170,4 +171,4 @@ public interface Callbacks
* @param keyEvent the key event
*/
void keyTyped(KeyEvent keyEvent);
}
}