Skip to content

Commit

Permalink
Merge pull request open-osrs#3087 from SRLJustin/metrono
Browse files Browse the repository at this point in the history
client: fixed sound export
  • Loading branch information
SRLJustin authored Dec 10, 2021
2 parents 00bd7b2 + 74c3411 commit e974585
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object ProjectVersions {
const val launcherVersion = "2.2.0"
const val rlVersion = "1.8.6"

const val openosrsVersion = "4.16.1"
const val openosrsVersion = "4.16.2"

const val rsversion = 202
const val cacheversion = 165
Expand Down
8 changes: 4 additions & 4 deletions runescape-client/src/main/java/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -3428,7 +3428,7 @@ final void doCycleLoggedOut() {
var5.packetBuffer.method7407(VertexNormal.archive18.hash); // L: 3049
var5.packetBuffer.writeInt(class140.archive5.hash); // L: 3050
var5.packetBuffer.writeIntME(class131.archive2.hash); // L: 3051
var5.packetBuffer.method7407(KeyHandler.field151.hash); // L: 3052
var5.packetBuffer.method7407(KeyHandler.archive4.hash); // L: 3052
var5.packetBuffer.writeIntME(NetSocket.archive9.hash); // L: 3053
var5.packetBuffer.writeInt(class257.archive10.hash); // L: 3054
var5.packetBuffer.method7407(HealthBarUpdate.archive20.hash); // L: 3055
Expand Down Expand Up @@ -4082,7 +4082,7 @@ final void doCycleLoggedIn() {
SoundEffect var32 = soundEffects[var1]; // L: 3885
if (var32 == null) { // L: 3886
var10000 = null; // L: 3887
var32 = SoundEffect.readSoundEffect(KeyHandler.field151, soundEffectIds[var1], 0);
var32 = SoundEffect.readSoundEffect(KeyHandler.archive4, soundEffectIds[var1], 0);
if (var32 == null) { // L: 3888
continue;
}
Expand Down Expand Up @@ -4752,7 +4752,7 @@ final void drawLoggedIn() {
if (var5.stream1 == null) { // L: 5081
if (var5.soundEffectId >= 0) { // L: 5082
var10000 = null; // L: 5083
SoundEffect var8 = SoundEffect.readSoundEffect(KeyHandler.field151, var5.soundEffectId, 0);
SoundEffect var8 = SoundEffect.readSoundEffect(KeyHandler.archive4, var5.soundEffectId, 0);
if (var8 != null) { // L: 5084
RawSound var9 = var8.toRawSound().resample(BoundaryObject.decimator); // L: 5085
RawPcmStream var10 = RawPcmStream.createRawPcmStream(var9, 100, var7); // L: 5086
Expand All @@ -4769,7 +4769,7 @@ final void drawLoggedIn() {
if (var5.soundEffectIds != null && (var5.field789 -= var4) <= 0) { // L: 5095
int var12 = (int)(Math.random() * (double)var5.soundEffectIds.length); // L: 5096
var10000 = null; // L: 5097
SoundEffect var13 = SoundEffect.readSoundEffect(KeyHandler.field151, var5.soundEffectIds[var12], 0);
SoundEffect var13 = SoundEffect.readSoundEffect(KeyHandler.archive4, var5.soundEffectIds[var12], 0);
if (var13 != null) { // L: 5098
RawSound var14 = var13.toRawSound().resample(BoundaryObject.decimator); // L: 5099
RawPcmStream var11 = RawPcmStream.createRawPcmStream(var14, 100, var7); // L: 5100
Expand Down
3 changes: 2 additions & 1 deletion runescape-client/src/main/java/KeyHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public final class KeyHandler implements KeyListener, FocusListener {
@ObfuscatedSignature(
descriptor = "Lkz;"
)
static Archive field151;
@Export("archive4")
static Archive archive4;

static {
KeyHandler_instance = new KeyHandler(); // L: 14
Expand Down
2 changes: 1 addition & 1 deletion runescape-client/src/main/java/UrlRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static final void method2496() {
class115.archive1.clearFiles(); // L: 3632
class9.archive3.clearFiles(); // L: 3633
class19.archive4.clearFiles(); // L: 3634
KeyHandler.field151.clearFiles(); // L: 3635
KeyHandler.archive4.clearFiles(); // L: 3635
class140.archive5.clearFiles(); // L: 3636
WorldMapScaleHandler.archive6.clearFiles(); // L: 3637
class115.archive7.clearFiles(); // L: 3638
Expand Down
8 changes: 4 additions & 4 deletions runescape-client/src/main/java/UserComparator10.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static void load() {
class9.archive3 = VarcInt.newArchive(1, false, true, true); // L: 2189
class131.archive2 = VarcInt.newArchive(2, true, false, true); // L: 2190
class19.archive4 = VarcInt.newArchive(3, false, true, true); // L: 2191
KeyHandler.field151 = VarcInt.newArchive(4, false, true, true); // L: 2192
KeyHandler.archive4 = VarcInt.newArchive(4, false, true, true); // L: 2192
class140.archive5 = VarcInt.newArchive(5, true, true, true); // L: 2193
WorldMapScaleHandler.archive6 = VarcInt.newArchive(6, true, true, true); // L: 2194
class115.archive7 = VarcInt.newArchive(7, false, true, true); // L: 2195
Expand All @@ -97,7 +97,7 @@ static void load() {
var18 += class9.archive3.percentage() * 4 / 100; // L: 2216
var18 += class131.archive2.percentage() * 2 / 100; // L: 2217
var18 += class19.archive4.percentage() * 2 / 100; // L: 2218
var18 += KeyHandler.field151.percentage() * 6 / 100; // L: 2219
var18 += KeyHandler.archive4.percentage() * 6 / 100; // L: 2219
var18 += class140.archive5.percentage() * 4 / 100; // L: 2220
var18 += WorldMapScaleHandler.archive6.percentage() * 2 / 100; // L: 2221
var18 += class115.archive7.percentage() * 56 / 100; // L: 2222
Expand All @@ -122,7 +122,7 @@ static void load() {
} else {
NetFileRequest.method5587(class115.archive1, "Animations"); // L: 2240
NetFileRequest.method5587(class9.archive3, "Skeletons"); // L: 2241
NetFileRequest.method5587(KeyHandler.field151, "Sound FX"); // L: 2242
NetFileRequest.method5587(KeyHandler.archive4, "Sound FX"); // L: 2242
NetFileRequest.method5587(class140.archive5, "Maps"); // L: 2243
NetFileRequest.method5587(WorldMapScaleHandler.archive6, "Music Tracks"); // L: 2244
NetFileRequest.method5587(class115.archive7, "Models"); // L: 2245
Expand Down Expand Up @@ -152,7 +152,7 @@ static void load() {
JagexCache.pcmPlayer0.setStream(var37); // L: 2271
var2 = class133.archive15; // L: 2272
Archive var39 = ChatChannel.archive14; // L: 2273
Archive var29 = KeyHandler.field151; // L: 2274
Archive var29 = KeyHandler.archive4; // L: 2274
class260.musicPatchesArchive = var2; // L: 2276
class331.musicSamplesArchive = var39; // L: 2277
class260.soundEffectsArchive = var29; // L: 2278
Expand Down

0 comments on commit e974585

Please sign in to comment.