package mapped;

import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSVarpDefinition;

@ObfuscatedName("gv")
public class VarpDefinition extends DualNode implements RSVarpDefinition {
   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "Lol;"
   )
   static AbstractArchive VarpDefinition_archive;
   @ObfuscatedName("ah")
   @ObfuscatedGetter(
      intValue = 821023847
   )
   public static int field1815;
   @ObfuscatedName("ar")
   @ObfuscatedSignature(
      descriptor = "Llk;"
   )
   static EvictingDualNodeHashTable VarpDefinition_cached;
   @ObfuscatedName("ki")
   @ObfuscatedSignature(
      descriptor = "[Lup;"
   )
   static IndexedSprite[] mapSceneSprites;
   @ObfuscatedName("ku")
   @ObfuscatedSignature(
      descriptor = "[Luz;"
   )
   static SpritePixels[] crossSprites;
   @ObfuscatedName("ao")
   @ObfuscatedGetter(
      intValue = 872876049
   )
   public int type;

   static {
      VarpDefinition_cached = new EvictingDualNodeHashTable(64);
   }

   VarpDefinition() {
      this.type = 0;
   }

   @ObfuscatedName("ar")
   @ObfuscatedSignature(
      descriptor = "(Luj;B)V",
      garbageValue = "-51"
   )
   void method3555(Buffer var1) {
      while(true) {
         int var2 = var1.readUnsignedByte_base();
         if(var2 == 0) {
            return;
         }

         this.method3543(var1, var2);
      }
   }

   @ObfuscatedName("ao")
   @ObfuscatedSignature(
      descriptor = "(Luj;II)V",
      garbageValue = "-521810807"
   )
   void method3543(Buffer var1, int var2) {
      if(var2 == 5) {
         this.type = var1.readUnsignedShort_base();
      }

   }

   public int getType() {
      return this.type;
   }

   @ObfuscatedName("ah")
   @ObfuscatedSignature(
      descriptor = "(IIII)I",
      garbageValue = "-634068040"
   )
   static int method3549_base(int var0, int var1, int var2) {
      return var0 << 28 | var1 << 14 | var2;
   }
}
