[PI] 525 Minimap Help!

The picture above shows how there is a white space that just doesn’t load. I checked the Sprite and I have ripped the sprite from other clients that have it working and still no luck.

I had the old 317 RS Gameframe from a clean PI client but now after I followed this tutorial: http://www.rune-server.org/runescape-development/rs2-client/tutorials/458411-pi-adding-525-gameframe-orbs.html

This is the only problem I’m having.

Any help please?

here is the drawminimap method:

[CODE] private void drawMinimap() {
aRSImageProducer_1164.initDrawingArea();
if(anInt1021 == 2) {
byte abyte0[] = mapBack.aByteArray1450;
int ai[] = DrawingArea.pixels;
int k2 = abyte0.length;
for(int i5 = 0; i5 < k2; i5++)
if(abyte0[i5] == 0)
ai[i5] = 0;
compass.method352(33, minimapInt1, anIntArray1057, 256, anIntArray968, 25, 8, 8, 33, 25);
aRSImageProducer_1165.initDrawingArea();
return;
}
int i = minimapInt1 + minimapInt2 & 0x7ff;
int j = 48 + myPlayer.x / 32;
int l2 = 464 - myPlayer.y / 32;
for (int x = 0; x < anIntArray1229.length; x++){
anIntArray1229[x] = 170;
anIntArray1052[x] = -23;
}
aClass30_Sub2_Sub1_Sub1_1263.method352(151, i, anIntArray1229, 256 + minimapInt3, anIntArray1052, l2, 10, 45, 146, j);
compass.method352(33, minimapInt1, anIntArray1057, 256, anIntArray968, 25, 8, 8, 33, 25);
for(int j5 = 0; j5 < anInt1071; j5++) {
int k = (anIntArray1072[j5] * 4 + 2) - myPlayer.x / 32;
int i3 = (anIntArray1073[j5] * 4 + 2) - myPlayer.y / 32;
markMinimap(aClass30_Sub2_Sub1_Sub1Array1140[j5], k, i3);
}

	for(int k5 = 0; k5 < 104; k5++) {
		for(int l5 = 0; l5 < 104; l5++) {
			NodeList class19 = groundArray[plane][k5][l5];
			if(class19 != null) {
				int l = (k5 * 4 + 2) - myPlayer.x / 32;
				int j3 = (l5 * 4 + 2) - myPlayer.y / 32;
				markMinimap(mapDotItem, l, j3);
			}
		}
	}

	for(int i6 = 0; i6 < npcCount; i6++) {
		NPC npc = npcArray[npcIndices[i6]];
		if(npc != null && npc.isVisible()) {
			EntityDef entityDef = npc.desc;
			if(entityDef.childrenIDs != null)
				entityDef = entityDef.method161();
			if(entityDef != null && entityDef.aBoolean87 && entityDef.aBoolean84) {
				int i1 = npc.x / 32 - myPlayer.x / 32;
				int k3 = npc.y / 32 - myPlayer.y / 32;
				markMinimap(mapDotNPC, i1, k3);
			}
		}
	}

	for(int j6 = 0; j6 < playerCount; j6++) {
		Player player = playerArray[playerIndices[j6]];
		if(player != null && player.isVisible()) {
			int j1 = player.x / 32 - myPlayer.x / 32;
			int l3 = player.y / 32 - myPlayer.y / 32;
			boolean flag1 = false;
			long l6 = TextClass.longForName(player.name);
			for(int k6 = 0; k6 < friendsCount; k6++) {
				if(l6 != friendsListAsLongs[k6] || friendsNodeIDs[k6] == 0)
				continue;
				flag1 = true;
				break;
			}
			boolean flag2 = false;
			if(myPlayer.team != 0 && player.team != 0 && myPlayer.team == player.team)
				flag2 = true;
			if(flag1)
				markMinimap(mapDotFriend, j1, l3);
			else
				markMinimap(mapDotPlayer, j1, l3);
		}
	}

	if(anInt855 != 0 && loopCycle % 20 < 10) {
		if(anInt855 == 1 && anInt1222 >= 0 && anInt1222 < npcArray.length) {
				NPC class30_sub2_sub4_sub1_sub1_1 = npcArray[anInt1222];
				if(class30_sub2_sub4_sub1_sub1_1 != null)
				{
					int k1 = class30_sub2_sub4_sub1_sub1_1.x / 32 - myPlayer.x / 32;
					int i4 = class30_sub2_sub4_sub1_sub1_1.y / 32 - myPlayer.y / 32;
					method81(mapMarker, i4, k1);
				}
		}
		if(anInt855 == 2) {
			int l1 = ((anInt934 - baseX) * 4 + 2) - myPlayer.x / 32;
			int j4 = ((anInt935 - baseY) * 4 + 2) - myPlayer.y / 32;
			method81(mapMarker, j4, l1);
		}
		if(anInt855 == 10 && anInt933 >= 0 && anInt933 < playerArray.length)
		{
			Player class30_sub2_sub4_sub1_sub2_1 = playerArray[anInt933];
			if(class30_sub2_sub4_sub1_sub2_1 != null) {
				int i2 = class30_sub2_sub4_sub1_sub2_1.x / 32 - myPlayer.x / 32;
				int k4 = class30_sub2_sub4_sub1_sub2_1.y / 32 - myPlayer.y / 32;
				method81(mapMarker, k4, i2);
			}
		}
	}
	if(destX != 0) {
		int j2 = (destX * 4 + 2) - myPlayer.x / 32;
		int l4 = (destY * 4 + 2) - myPlayer.y / 32;
		markMinimap(mapFlag, j2, l4);
	}
	DrawingArea.drawPixels(3, 78+5, 97+20, 0xffffff, 3);
	mapArea.drawSprite(0, 0);
	drawWorldMapButton();
	drawHP();
	drawPrayer();
	drawRunOrb();
	drawXPCounter();
	aRSImageProducer_1165.initDrawingArea();
}[/CODE]

Going to take a chance here and say:
A) The sprite is too small.
B) The sprite is not positioned correctly.

Don’t need the drawMinimap method, need the code that draws that map background sprite.

Update: The drawMinimap method isn’t a problem… I have no idea what is causing this!

[CODE] private void drawMinimap() {
aRSImageProducer_1164.initDrawingArea();
if(anInt1021 == 2) {
byte abyte0[] = mapBack.aByteArray1450;
int ai[] = DrawingArea.pixels;
int k2 = abyte0.length;
for(int i5 = 0; i5 < k2; i5++)
if(abyte0[i5] == 0)
ai[i5] = 0;
compass.method352(33, minimapInt1, anIntArray1057, 256, anIntArray968, 25, 8, 8, 33, 25);
aRSImageProducer_1165.initDrawingArea();
return;
}
int i = minimapInt1 + minimapInt2 & 0x7ff;
int j = 48 + myPlayer.x / 32;
int l2 = 464 - myPlayer.y / 32;
for (int x = 0; x < anIntArray1229.length; x++){
anIntArray1229[x] = 170;
anIntArray1052[x] = -23;
}
aClass30_Sub2_Sub1_Sub1_1263.method352(151, i, anIntArray1229, 256 + minimapInt3, anIntArray1052, l2, 10, 45, 146, j);
compass.method352(33, minimapInt1, anIntArray1057, 256, anIntArray968, 25, 8, 8, 33, 25);
for(int j5 = 0; j5 < anInt1071; j5++) {
int k = (anIntArray1072[j5] * 4 + 2) - myPlayer.x / 32;
int i3 = (anIntArray1073[j5] * 4 + 2) - myPlayer.y / 32;
markMinimap(aClass30_Sub2_Sub1_Sub1Array1140[j5], k, i3);
}

	for(int k5 = 0; k5 < 104; k5++) {
		for(int l5 = 0; l5 < 104; l5++) {
			NodeList class19 = groundArray[plane][k5][l5];
			if(class19 != null) {
				int l = (k5 * 4 + 2) - myPlayer.x / 32;
				int j3 = (l5 * 4 + 2) - myPlayer.y / 32;
				markMinimap(mapDotItem, l, j3);
			}
		}
	}

	for(int i6 = 0; i6 < npcCount; i6++) {
		NPC npc = npcArray[npcIndices[i6]];
		if(npc != null && npc.isVisible()) {
			EntityDef entityDef = npc.desc;
			if(entityDef.childrenIDs != null)
				entityDef = entityDef.method161();
			if(entityDef != null && entityDef.aBoolean87 && entityDef.aBoolean84) {
				int i1 = npc.x / 32 - myPlayer.x / 32;
				int k3 = npc.y / 32 - myPlayer.y / 32;
				markMinimap(mapDotNPC, i1, k3);
			}
		}
	}

	for(int j6 = 0; j6 < playerCount; j6++) {
		Player player = playerArray[playerIndices[j6]];
		if(player != null && player.isVisible()) {
			int j1 = player.x / 32 - myPlayer.x / 32;
			int l3 = player.y / 32 - myPlayer.y / 32;
			boolean flag1 = false;
			long l6 = TextClass.longForName(player.name);
			for(int k6 = 0; k6 < friendsCount; k6++) {
				if(l6 != friendsListAsLongs[k6] || friendsNodeIDs[k6] == 0)
				continue;
				flag1 = true;
				break;
			}
			boolean flag2 = false;
			if(myPlayer.team != 0 && player.team != 0 && myPlayer.team == player.team)
				flag2 = true;
			if(flag1)
				markMinimap(mapDotFriend, j1, l3);
			else
				markMinimap(mapDotPlayer, j1, l3);
		}
	}

	if(anInt855 != 0 && loopCycle % 20 < 10) {
		if(anInt855 == 1 && anInt1222 >= 0 && anInt1222 < npcArray.length) {
				NPC class30_sub2_sub4_sub1_sub1_1 = npcArray[anInt1222];
				if(class30_sub2_sub4_sub1_sub1_1 != null)
				{
					int k1 = class30_sub2_sub4_sub1_sub1_1.x / 32 - myPlayer.x / 32;
					int i4 = class30_sub2_sub4_sub1_sub1_1.y / 32 - myPlayer.y / 32;
					method81(mapMarker, i4, k1);
				}
		}
		if(anInt855 == 2) {
			int l1 = ((anInt934 - baseX) * 4 + 2) - myPlayer.x / 32;
			int j4 = ((anInt935 - baseY) * 4 + 2) - myPlayer.y / 32;
			method81(mapMarker, j4, l1);
		}
		if(anInt855 == 10 && anInt933 >= 0 && anInt933 < playerArray.length)
		{
			Player class30_sub2_sub4_sub1_sub2_1 = playerArray[anInt933];
			if(class30_sub2_sub4_sub1_sub2_1 != null) {
				int i2 = class30_sub2_sub4_sub1_sub2_1.x / 32 - myPlayer.x / 32;
				int k4 = class30_sub2_sub4_sub1_sub2_1.y / 32 - myPlayer.y / 32;
				method81(mapMarker, k4, i2);
			}
		}
	}
	if(destX != 0) {
		int j2 = (destX * 4 + 2) - myPlayer.x / 32;
		int l4 = (destY * 4 + 2) - myPlayer.y / 32;
		markMinimap(mapFlag, j2, l4);
	}
	DrawingArea.drawPixels(3, 78+5, 97+20, 0xffffff, 3);
	mapArea.drawSprite(0, 0);
	drawWorldMapButton();
	drawHP();
	drawPrayer();
	drawRunOrb();
	drawXPCounter();
	aRSImageProducer_1165.initDrawingArea();
}[/CODE]

Map background:

Unpacking in method90

[code] for(int j6 = 0; j6 < 33; j6++)
{
int k6 = 999;
int i7 = 0;
for(int k7 = 0; k7 < 34; k7++)
{
if(mapBack.aByteArray1450[k7 + j6 * mapBack.anInt1452] == 0)
{
if(k6 == 999)
k6 = k7;
continue;
}
if(k6 == 999)
continue;
i7 = k7;
break;
}

            anIntArray968[j6] = k6;
            anIntArray1057[j6] = i7 - k6;
        }
        
        for(int l6 = 5; l6 < 156; l6++)
        {
            int j7 = 999;
            int l7 = 0;
            for(int j8 = 25; j8 < 172; j8++)
            {
                if(mapBack.aByteArray1450[j8 + l6 * mapBack.anInt1452] == 0 && (j8 > 34 || l6 > 34))
                {
                    if(j7 == 999)
                        j7 = j8;
                    continue;
                }
                if(j7 == 999)
                    continue;
                l7 = j8;
                break;
            }
            
            anIntArray1052[l6 - 5] = j7 - 25;
            anIntArray1229[l6 - 5] = l7 - j7;
        }[/code]

Seeing as you’re using a custom gameframe, and a custom map sprite… I do not believe that’s the right variable. That one is the one loaded from the packed cache files, yours will be loaded by a directory in the sprites folder for your cache.

I believe in your instance it’s named “mapArea”

While you’re at it; take a look at your sprites in your cache.
Dimensions of the sprite should be about 249x168. If it’s like 5 pixels smaller, that’s your issue.

Edit:
It may be this line:
aClass30_Sub2_Sub1_Sub1_1263.method352(151, i, anIntArray1229, 256 + minimapInt3, anIntArray1052, l2, 10, 45, 146, j);
Looking at another client, they have the “10, 45” set to 9, and 38.

[quote=“sk8rdude461, post:4, topic:554407”]Seeing as you’re using a custom gameframe, and a custom map sprite… I do not believe that’s the right variable. That one is the one loaded from the packed cache files, yours will be loaded by a directory in the sprites folder for your cache.

I believe in your instance it’s named “mapArea”

While you’re at it; take a look at your sprites in your cache.
Dimensions of the sprite should be about 249x168. If it’s like 5 pixels smaller, that’s your issue.

Edit:
It may be this line:
aClass30_Sub2_Sub1_Sub1_1263.method352(151, i, anIntArray1229, 256 + minimapInt3, anIntArray1052, l2, 10, 45, 146, j);
Looking at another client, they have the “10, 45” set to 9, and 38.[/quote]

update: Changing those numbers to 9 and 38 didn’t change anything.
Re-sizing the sprite from 246x168 to 249x268 added a little white border inside of the sprite =/

The sprite itself is not the problem because even if I remove the sprite, the blank space still appears and the area where the sprite is drawn is just blacked out.

[quote=“de dust89, post:5, topic:554407”][quote author=sk8rdude461 link=topic=673330.msg4502428#msg4502428 date=1452853021]
Seeing as you’re using a custom gameframe, and a custom map sprite… I do not believe that’s the right variable. That one is the one loaded from the packed cache files, yours will be loaded by a directory in the sprites folder for your cache.

I believe in your instance it’s named “mapArea”

While you’re at it; take a look at your sprites in your cache.
Dimensions of the sprite should be about 249x168. If it’s like 5 pixels smaller, that’s your issue.

Edit:
It may be this line:
aClass30_Sub2_Sub1_Sub1_1263.method352(151, i, anIntArray1229, 256 + minimapInt3, anIntArray1052, l2, 10, 45, 146, j);
Looking at another client, they have the “10, 45” set to 9, and 38.

[/quote]

update: Changing those numbers to 9 and 38 didn’t change anything.
Re-sizing the sprite from 246x168 to 249x268 added a little white border inside of the sprite =/

The sprite itself is not the problem because even if I remove the sprite, the blank space still appears and the area where the sprite is drawn is just blacked out.[/quote]
Have you found the code for the map sprite?
You’ll know it’s the correct one because there will be an instance of it loading the sprite from the cache, eg: new Sprite("/Gameframe/525/MAPBACK")
But it most likely won’t be the same as that.

[quote=“sk8rdude461, post:6, topic:554407”][quote author=de dust89 link=topic=673330.msg4502429#msg4502429 date=1452854309]

update: Changing those numbers to 9 and 38 didn’t change anything.
Re-sizing the sprite from 246x168 to 249x268 added a little white border inside of the sprite =/

The sprite itself is not the problem because even if I remove the sprite, the blank space still appears and the area where the sprite is drawn is just blacked out.
[/quote]
Have you found the code for the map sprite?
You’ll know it’s the correct one because there will be an instance of it loading the sprite from the cache, eg: new Sprite("/Gameframe/525/MAPBACK")
But it most likely won’t be the same as that.[/quote]

This should be it but it is not drawn as new Sprite. it is drawn is new background

That’s what I’m saying… that is not the right variable.

compass = new Sprite(streamLoader_2, "compass", 0); mapEdge = new Sprite(streamLoader_2, "mapedge", 0);

This is the only thing I find similar to that? I doubt it is the right thing you’re looking for though

can you add me on skype? previn.savaya

[quote=“de dust89, post:9, topic:554407”][quote author=sk8rdude461 link=topic=673330.msg4502433#msg4502433 date=1452856364]
That’s what I’m saying… that is not the right variable.
[/quote]

compass = new Sprite(streamLoader_2, "compass", 0); mapEdge = new Sprite(streamLoader_2, "mapedge", 0);

This is the only thing I find similar to that? I doubt it is the right thing you’re looking for though

can you add me on skype? previn.savaya[/quote]
You’re not listening to me.
The sprite will be loaded from whatever directory you have the image in your cache… AKA: Search for that in the code.

[quote=“sk8rdude461, post:10, topic:554407”][quote author=de dust89 link=topic=673330.msg4502435#msg4502435 date=1452856688]

compass = new Sprite(streamLoader_2, "compass", 0); mapEdge = new Sprite(streamLoader_2, "mapedge", 0);

This is the only thing I find similar to that? I doubt it is the right thing you’re looking for though

can you add me on skype? previn.savaya
[/quote]
You’re not listening to me.
The sprite will be loaded from whatever directory you have the image in your cache… AKA: Search for that in the code.[/quote]

Oh, now I get what you mean. But which Sprite’s directory should I be searching for? I just went through my entire sprites folder and didn’t see anything that fits in the place of the background besides the maparea.png sprite which is loaded with;

but that is not what you’re looking for… is it?

Btw, in Sprites.java I have this:

which directs me straight to the sprites folder in my cache which is why I don’t really need a full directory to load the sprite

is the maparea.png the background of the map area?

Because if so, then yes, I was looking for that variable. And I’d like to see the related code for it.

[quote=“sk8rdude461, post:12, topic:554407”]is the maparea.png the background of the map area?

Because if so, then yes, I was looking for that variable. And I’d like to see the related code for it.[/quote]

This is the maparea.png file I have

Update: Still need help with this. Anyone?

[quote=“de dust89, post:13, topic:554407”][quote author=sk8rdude461 link=topic=673330.msg4502439#msg4502439 date=1452858039]
is the maparea.png the background of the map area?

Because if so, then yes, I was looking for that variable. And I’d like to see the related code for it.
[/quote]

This is the maparea.png file I have

Update: Still need help with this. Anyone?[/quote]
Then yes… that’s the file im talking about…
For the 5th time, can I see the code related to it?

[quote=“sk8rdude461, post:14, topic:554407”][quote author=de dust89 link=topic=673330.msg4502440#msg4502440 date=1452858564]

This is the maparea.png file I have

Update: Still need help with this. Anyone?
[/quote]
Then yes… that’s the file im talking about…
For the 5th time, can I see the code related to it?[/quote]

Declaration:

Startup() method: Unpacking custom Sprites:

drawMiniMap Method:

Under CleanupforQuit():

And thats all the code related to it. I know what you’re thinking, "mapArea.drawSprite(0, 0); change it to (0,10) or something. I’ve tried that. It doesn’t change anything… =/

Update: After a lot of diagnosis, the most logical thing I can come up with is that:

There must be something declaring how big the sprite should be, and allows me to draw the sprite at only that size. I have figured out how to move the sprite around.

I can move the sprite down the Y-Axis, but unfortunately, that doesn’t completely fix the problem, it reduces the little white space below the sprite to a smaller size, and in doing that, it creates another issue above the sprite.

What I think I need to do is:

  1. Make the Sprite roughly 3.25 pixels taller (Y Axis) (ALREADY DID THIS)
  2. Somehow allow me to draw a bigger sprite, because apparently, it still shrinks it back down to a size of (246, 168).

I am going to look into the code and see if there is anything I can see at that size.

Will update soon!

Update: I fixed it for the most part!!!

In the resetRSImageProducers() and resetRSImageProducers()2 methods, I had to change the image size being produced and kept tweaking it pixel by pixel until I actually ended up at what I started with, which was 168! It’s actually pretty insane how this stuff works!

aRSImageProducer_1164 = new RSImageProducer(246, 168, getGameComponent());

If anyone needs to resize a sprite without ruining the transperency, this is a great resource: http://images.my-addr.com/resize_png_online_tool-free_png_resizer_for_web.php