@@ -150,20 +150,20 @@ else if(isTeammate)
150
150
if (npc != null ) {
151
151
int npcX = -(Player .localPlayer .worldX / 32 ) + npc .worldX / 32 ;
152
152
int npcY = npc .worldY / 32 - Player .localPlayer .worldY / 32 ;
153
- MovedStatics . drawMinimapMark (minimapMarkers [1 ], npcX , npcY );
153
+ drawMinimapIcon (minimapMarkers [1 ], npcX , npcY );
154
154
}
155
155
}
156
156
if (Player .headIconDrawType == 2 ) {
157
157
int hintX = -(Player .localPlayer .worldY / 32 ) + 2 + 4 * (-Class26 .baseY + MovedStatics .hintIconPosY );
158
158
int hintY = 4 * (ProducingGraphicsBuffer .hintIconPosX - MovedStatics .baseX ) - (-2 + Player .localPlayer .worldX / 32 );
159
- MovedStatics . drawMinimapMark (minimapMarkers [1 ], hintY , hintX );
159
+ drawMinimapIcon (minimapMarkers [1 ], hintY , hintX );
160
160
}
161
161
if (Player .headIconDrawType == 10 && ProducingGraphicsBuffer .anInt1623 >= 0 && Player .trackedPlayers .length > ProducingGraphicsBuffer .anInt1623 ) {
162
162
Player player = Player .trackedPlayers [ProducingGraphicsBuffer .anInt1623 ];
163
163
if (player != null ) {
164
164
int playerX = -(Player .localPlayer .worldY / 32 ) + player .worldY / 32 ;
165
165
int playerY = player .worldX / 32 - Player .localPlayer .worldX / 32 ;
166
- MovedStatics . drawMinimapMark (minimapMarkers [1 ], playerY , playerX );
166
+ drawMinimapIcon (minimapMarkers [1 ], playerY , playerX );
167
167
}
168
168
}
169
169
}
@@ -187,6 +187,27 @@ public static void createMinimapRaster() {
187
187
mapbackProducingGraphicsBuffer .prepareRasterizer ();
188
188
}
189
189
190
+ private static void drawMinimapIcon (ImageRGB sprite , int mapX , int mapY ) {
191
+ int len = mapX * mapX + mapY * mapY ;
192
+ if (len > 4225 && len < 90000 ) {
193
+ int theta = 0x7ff & Main .playerCamera .getYaw ();
194
+ int sine = Model .SINE [theta ];
195
+ int cosine = Model .COSINE [theta ];
196
+ int zoom = 0 ;
197
+
198
+ sine = sine * 256 / (zoom + 256 );
199
+ cosine = cosine * 256 / (zoom + 256 );
200
+ int y = cosine * mapY - sine * mapX >> 16 ;
201
+ int x = mapX * cosine + mapY * sine >> 16 ;
202
+ double angle = Math .atan2 (x , y );
203
+ int drawX = (int ) (Math .sin (angle ) * 63.0 );
204
+ int drawY = (int ) (57.0 * Math .cos (angle ));
205
+ MovedStatics .minimapEdge .drawRotated (-10 + 94 + drawX + 4 , 83 + -drawY + -20 , 15 , 15 , 20 , 20 , 256 , angle );
206
+ } else {
207
+ drawOnMinimap (mapY , mapX , sprite );
208
+ }
209
+ }
210
+
190
211
public void drawResizableMiniMapArea (int x , int y ) {
191
212
ScreenController .drawFramePiece (resizableMiniMapimage , x , y );
192
213
}
0 commit comments