diff options
author | syeyoung <cyong06@naver.com> | 2021-01-12 21:28:01 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-01-12 21:28:01 +0900 |
commit | 900c57dd3ebfcd3deae9302029785b6e0ba78947 (patch) | |
tree | 9fb3f74f57210bbad4be1d69083670b9152e4989 /src/main/java/kr/syeyoung/dungeonsguide/features | |
parent | 2ed2a46f798139d8b321cea2390c56da2ebbfccb (diff) | |
download | Skyblock-Dungeons-Guide-900c57dd3ebfcd3deae9302029785b6e0ba78947.tar.gz Skyblock-Dungeons-Guide-900c57dd3ebfcd3deae9302029785b6e0ba78947.tar.bz2 Skyblock-Dungeons-Guide-900c57dd3ebfcd3deae9302029785b6e0ba78947.zip |
no esps!
- Dungeons gang request
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java | 80 |
1 files changed, 41 insertions, 39 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java index d2fa632b..713ce74f 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/FeatureDungeonMap.java @@ -152,35 +152,35 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, render(mapData, false); FontRenderer fr = getFontRenderer(); - for (DungeonRoom dungeonRoom : context.getDungeonRoomList()) { - GL11.glPushMatrix(); - GlStateManager.pushAttrib(); - Point mapPt = mapProcessor.roomPointToMapPoint(dungeonRoom.getUnitPoints().get(0)); - GL11.glTranslated(mapPt.x + mapProcessor.getUnitRoomDimension().width / 2, mapPt.y + mapProcessor.getUnitRoomDimension().height / 2, 0); - - if (this.<Boolean>getParameter("playerCenter").getValue() && this.<Boolean>getParameter("rotate").getValue()) { - GL11.glRotated(yaw - 180, 0, 0, 1); - } - GL11.glScaled(1 / scale, 1 / scale, 0); - GL11.glScaled(1 / postScale, 1 / postScale, 0); - String str= ""; - if (this.<Boolean>getParameter("showtotalsecrets").getValue()) { + if (this.<Boolean>getParameter("showtotalsecrets").getValue()) { + for (DungeonRoom dungeonRoom : context.getDungeonRoomList()) { + GL11.glPushMatrix(); + GlStateManager.pushAttrib(); + Point mapPt = mapProcessor.roomPointToMapPoint(dungeonRoom.getUnitPoints().get(0)); + GL11.glTranslated(mapPt.x + mapProcessor.getUnitRoomDimension().width / 2, mapPt.y + mapProcessor.getUnitRoomDimension().height / 2, 0); + + if (this.<Boolean>getParameter("playerCenter").getValue() && this.<Boolean>getParameter("rotate").getValue()) { + GL11.glRotated(yaw - 180, 0, 0, 1); + } + GL11.glScaled(1 / scale, 1 / scale, 0); + GL11.glScaled(1 / postScale, 1 / postScale, 0); + String str = ""; str += dungeonRoom.getTotalSecrets() == -1 ? "?" : String.valueOf(dungeonRoom.getTotalSecrets()); str += " "; - } - if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.FINISHED) { - str += "✔"; - } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.COMPLETE_WITHOUT_SECRETS) { - str += "☑"; - } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.DISCOVERED) { - str += "☐"; - } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.FAILED) { - str += "❌"; - } + if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.FINISHED) { + str += "✔"; + } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.COMPLETE_WITHOUT_SECRETS) { + str += "☑"; + } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.DISCOVERED) { + str += "☐"; + } else if (dungeonRoom.getCurrentState() == DungeonRoom.RoomState.FAILED) { + str += "❌"; + } - fr.drawString(str, -(fr.getStringWidth(str) / 2) , - (fr.FONT_HEIGHT / 2), dungeonRoom.getColor() == 74 ? 0xff000000 : 0xFFFFFFFF); - GlStateManager.popAttrib(); - GL11.glPopMatrix(); + fr.drawString(str, -(fr.getStringWidth(str) / 2), -(fr.FONT_HEIGHT / 2), dungeonRoom.getColor() == 74 ? 0xff000000 : 0xFFFFFFFF); + GlStateManager.popAttrib(); + GL11.glPopMatrix(); + } } GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(1, 771, 0, 1); @@ -253,19 +253,21 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener, } } - for (DungeonRoom dungeonRoom : dungeonRooms) { - for (Point pt : dungeonRoom.getUnitPoints()) { - for (int y1 = 0; y1 < mapProcessor.getUnitRoomDimension().height; y1++) { - for (int x1 = 0; x1 < mapProcessor.getUnitRoomDimension().width; x1++) { - int x = MathHelper.clamp_int(pt.x * (mapProcessor.getUnitRoomDimension().width + mapProcessor.getDoorDimension().height) + x1 + mapProcessor.getTopLeftMapPoint().x, 0, 128); - int y = MathHelper.clamp_int(pt.y * (mapProcessor.getUnitRoomDimension().height + mapProcessor.getDoorDimension().height)+ y1 + mapProcessor.getTopLeftMapPoint().y, 0, 128); - int i = y * 128 + x; - int j = dungeonRoom.getColor(); - - if (j / 4 == 0) { - this.mapTextureData[i] = 0x00000000; - } else { - this.mapTextureData[i] = MapColor.mapColorArray[j / 4].func_151643_b(j & 3); + if (this.<Boolean>getParameter("showtotalsecrets").getValue()) { + for (DungeonRoom dungeonRoom : dungeonRooms) { + for (Point pt : dungeonRoom.getUnitPoints()) { + for (int y1 = 0; y1 < mapProcessor.getUnitRoomDimension().height; y1++) { + for (int x1 = 0; x1 < mapProcessor.getUnitRoomDimension().width; x1++) { + int x = MathHelper.clamp_int(pt.x * (mapProcessor.getUnitRoomDimension().width + mapProcessor.getDoorDimension().height) + x1 + mapProcessor.getTopLeftMapPoint().x, 0, 128); + int y = MathHelper.clamp_int(pt.y * (mapProcessor.getUnitRoomDimension().height + mapProcessor.getDoorDimension().height) + y1 + mapProcessor.getTopLeftMapPoint().y, 0, 128); + int i = y * 128 + x; + int j = dungeonRoom.getColor(); + + if (j / 4 == 0) { + this.mapTextureData[i] = 0x00000000; + } else { + this.mapTextureData[i] = MapColor.mapColorArray[j / 4].func_151643_b(j & 3); + } } } } |