package mapped;

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

@ObfuscatedName("jq")
public class WorldMapIcon_0 extends AbstractWorldMapIcon implements RSWorldMapIcon_0 {
   @ObfuscatedName("ul")
   @ObfuscatedGetter(
      intValue = -2119811283
   )
   static int field2529;
   @ObfuscatedName("at")
   @ObfuscatedGetter(
      intValue = -1185793619
   )
   final int element;
   @ObfuscatedName("ah")
   @ObfuscatedSignature(
      descriptor = "Ljk;"
   )
   final WorldMapLabel label;
   @ObfuscatedName("ar")
   @ObfuscatedGetter(
      intValue = 1255469535
   )
   final int subWidth;
   @ObfuscatedName("ao")
   @ObfuscatedGetter(
      intValue = 1995138313
   )
   final int subHeight;

   @ObfuscatedSignature(
      descriptor = "(Lmh;Lmh;ILjk;)V"
   )
   WorldMapIcon_0(Coord var1, Coord var2, int var3, WorldMapLabel var4) {
      super(var1, var2);
      this.element = var3;
      this.label = var4;
      WorldMapElement var5 = class141.method3209(this.getElement_base());
      SpritePixels var6 = var5.method3564(false);
      if(var6 != null) {
         this.subWidth = var6.subWidth;
         this.subHeight = var6.subHeight;
      } else {
         this.subWidth = 0;
         this.subHeight = 0;
      }

   }

   @ObfuscatedName("ah")
   @ObfuscatedSignature(
      descriptor = "(I)I",
      garbageValue = "574784276"
   )
   public int getElement_base() {
      return this.element;
   }

   @ObfuscatedName("ar")
   @ObfuscatedSignature(
      descriptor = "(B)Ljk;",
      garbageValue = "34"
   )
   WorldMapLabel vmethod4977() {
      return this.label;
   }

   @ObfuscatedName("ao")
   @ObfuscatedSignature(
      descriptor = "(I)I",
      garbageValue = "472460923"
   )
   int getSubWidth_base() {
      return this.subWidth;
   }

   @ObfuscatedName("ab")
   @ObfuscatedSignature(
      descriptor = "(I)I",
      garbageValue = "-653051141"
   )
   int getSubHeight_base() {
      return this.subHeight;
   }

   @ObfuscatedName("ay")
   @ObfuscatedSignature(
      descriptor = "(IIIB)I",
      garbageValue = "-4"
   )
   static final int method4849_base(int var0, int var1, int var2) {
      int var3 = var0 / var2;
      int var4 = var0 & var2 - 1;
      int var5 = var1 / var2;
      int var6 = var1 & var2 - 1;
      int var7 = FadeOutTask.method7829_base(var3, var5);
      int var8 = FadeOutTask.method7829_base(var3 + 1, var5);
      int var9 = FadeOutTask.method7829_base(var3, var5 + 1);
      int var10 = FadeOutTask.method7829_base(var3 + 1, var5 + 1);
      int var12 = 65536 - Rasterizer3D.Rasterizer3D_cosine[var4 * 1024 / var2] >> 1;
      int var11 = ((65536 - var12) * var7 >> 16) + (var8 * var12 >> 16);
      int var14 = 65536 - Rasterizer3D.Rasterizer3D_cosine[var4 * 1024 / var2] >> 1;
      int var13 = ((65536 - var14) * var9 >> 16) + (var14 * var10 >> 16);
      int var16 = 65536 - Rasterizer3D.Rasterizer3D_cosine[var6 * 1024 / var2] >> 1;
      int var15 = ((65536 - var16) * var11 >> 16) + (var13 * var16 >> 16);
      return var15;
   }
}
