From f0401d01849443f73a70b3cbbeb6c8f6f107cfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Tue, 29 Jul 2014 01:00:40 +0200 Subject: [PATCH] Changes reflecting refactoring of related projects --- src/mightypork/rogue/RogueApp.java | 2 +- src/mightypork/rogue/RogueResources.java | 10 +++--- src/mightypork/rogue/screens/FpsOverlay.java | 2 +- .../rogue/screens/LoadingOverlay.java | 2 +- .../rogue/screens/game/IngameNav.java | 2 +- .../rogue/screens/game/InvSlot.java | 8 ++--- .../rogue/screens/game/LayerAskSave.java | 2 +- .../rogue/screens/game/LayerDeath.java | 4 +-- .../rogue/screens/game/LayerGameUi.java | 24 ++++++------- .../rogue/screens/game/LayerInv.java | 4 +-- .../rogue/screens/game/LayerWin.java | 8 ++--- .../rogue/screens/game/NavButton.java | 6 ++-- .../rogue/screens/game/ScreenGame.java | 6 ++-- .../rogue/screens/menu/ScreenMainMenu.java | 8 ++--- .../select_world/ScreenSelectWorld.java | 2 +- .../rogue/screens/select_world/WorldSlot.java | 2 +- .../rogue/screens/story/ScreenStory.java | 10 +++--- .../entity/render/EntityRendererMobLR.java | 2 +- .../rogue/world/gui/WorldConsoleRenderer.java | 2 +- .../item/impl/active/ItemHeartPiece.java | 2 +- .../world/item/impl/food/ItemCheese.java | 2 +- .../rogue/world/item/impl/food/ItemMeat.java | 2 +- .../world/item/impl/food/ItemSandwich.java | 2 +- .../world/item/impl/weapons/ItemAxe.java | 2 +- .../world/item/impl/weapons/ItemBone.java | 2 +- .../world/item/impl/weapons/ItemClub.java | 2 +- .../world/item/impl/weapons/ItemKnife.java | 2 +- .../world/item/impl/weapons/ItemRock.java | 2 +- .../world/item/impl/weapons/ItemSword.java | 2 +- .../world/item/impl/weapons/ItemTwig.java | 2 +- .../rogue/world/tile/TileRenderer.java | 36 +++++++++---------- .../world/tile/impl/brick/TileBrickChest.java | 2 +- .../world/tile/impl/brick/TileBrickDoor.java | 6 ++-- .../tile/impl/brick/TileBrickEntrance.java | 2 +- .../world/tile/impl/brick/TileBrickExit.java | 2 +- .../world/tile/impl/brick/TileBrickFloor.java | 2 +- .../tile/impl/brick/TileBrickPassage.java | 2 +- .../tile/impl/brick/TileBrickSecretDoor.java | 6 ++-- .../world/tile/impl/brick/TileBrickWall.java | 2 +- 39 files changed, 94 insertions(+), 94 deletions(-) diff --git a/src/mightypork/rogue/RogueApp.java b/src/mightypork/rogue/RogueApp.java index a31fee5..be18754 100644 --- a/src/mightypork/rogue/RogueApp.java +++ b/src/mightypork/rogue/RogueApp.java @@ -167,7 +167,7 @@ public final class RogueApp extends App implements ViewportChangeListener { public void onScreenshotRequest() { // screenshot sound - Res.getSoundEffect("gui.shutter").play(0.8); + Res.sound("gui.shutter").play(0.8); } diff --git a/src/mightypork/rogue/RogueResources.java b/src/mightypork/rogue/RogueResources.java index ee0c73e..48178ac 100644 --- a/src/mightypork/rogue/RogueResources.java +++ b/src/mightypork/rogue/RogueResources.java @@ -11,11 +11,11 @@ import mightypork.gamecore.graphics.textures.ITexture; import mightypork.gamecore.graphics.textures.QuadGrid; import mightypork.gamecore.graphics.textures.TextureRegistry; import mightypork.gamecore.graphics.textures.WrapMode; -import mightypork.gamecore.resources.ResourceSetup; +import mightypork.gamecore.resources.ResourceInitializer; import mightypork.utils.math.constraints.rect.Rect; -public class RogueResources implements ResourceSetup { +public class RogueResources implements ResourceInitializer { @Override public void addFonts(FontRegistry fonts) @@ -80,7 +80,7 @@ public class RogueResources implements ResourceSetup { QuadGrid grid; // gui - texture = textures.addTexture("/res/img/gui.png", FilterMode.NEAREST, WrapMode.CLAMP); + texture = textures.loadTexture("/res/img/gui.png", FilterMode.NEAREST, WrapMode.CLAMP); // small gui elements grid = texture.grid(32, 32); @@ -112,7 +112,7 @@ public class RogueResources implements ResourceSetup { textures.add("inv.slot.selected", grid.makeQuad(1, 5)); // sprites - texture = textures.addTexture("/res/img/sprites.png", FilterMode.NEAREST, WrapMode.CLAMP); + texture = textures.loadTexture("/res/img/sprites.png", FilterMode.NEAREST, WrapMode.CLAMP); grid = texture.grid(8, 8); textures.add("sprite.player", grid.makeSheet(0, 0, 4, 1)); textures.add("sprite.rat.gray", grid.makeSheet(0, 1, 4, 1)); @@ -121,7 +121,7 @@ public class RogueResources implements ResourceSetup { textures.add("sprite.zzz", grid.makeQuad(0, 7)); // sleep thingy // logo - texture = textures.addTexture("/res/img/logo.png", FilterMode.NEAREST, WrapMode.CLAMP); + texture = textures.loadTexture("/res/img/logo.png", FilterMode.NEAREST, WrapMode.CLAMP); textures.add("logo", texture.makeQuad(Rect.make(0, 0, 0.543, 0.203))); grid = texture.grid(8, 8); textures.add("death", grid.makeQuad(0, 2)); diff --git a/src/mightypork/rogue/screens/FpsOverlay.java b/src/mightypork/rogue/screens/FpsOverlay.java index 12c147c..242a9af 100644 --- a/src/mightypork/rogue/screens/FpsOverlay.java +++ b/src/mightypork/rogue/screens/FpsOverlay.java @@ -41,7 +41,7 @@ public class FpsOverlay extends Overlay { } }); - final IFont font = Res.getFont("thin"); + final IFont font = Res.font("thin"); final Num h = root.height(); final RectBound constraint = root.shrink(h.perc(3)).topRight().startRect().growDown(h.perc(5).max(16)); diff --git a/src/mightypork/rogue/screens/LoadingOverlay.java b/src/mightypork/rogue/screens/LoadingOverlay.java index 9a524db..48ce8f0 100644 --- a/src/mightypork/rogue/screens/LoadingOverlay.java +++ b/src/mightypork/rogue/screens/LoadingOverlay.java @@ -76,7 +76,7 @@ public class LoadingOverlay extends Overlay { Rect textRect = root.shrink(Num.ZERO, root.height().perc(48)); textRect = textRect.moveY(root.height().perc(-10)); - final TextPainter tp = new TextPainter(Res.getFont("thick"), AlignX.CENTER, RGB.WHITE, msgStrProv); + final TextPainter tp = new TextPainter(Res.font("thick"), AlignX.CENTER, RGB.WHITE, msgStrProv); tp.setRect(textRect); tp.setShadow(RGB.BLACK_60, tp.height().mul(1 / 8D).toVectXY()); diff --git a/src/mightypork/rogue/screens/game/IngameNav.java b/src/mightypork/rogue/screens/game/IngameNav.java index 5199457..7288973 100644 --- a/src/mightypork/rogue/screens/game/IngameNav.java +++ b/src/mightypork/rogue/screens/game/IngameNav.java @@ -41,7 +41,7 @@ public class IngameNav extends LayoutComponent { paintHelper = leftEdge().growRight(height().mul(4)); - bg = Res.getTxQuad("nav.bg"); + bg = Res.txQuad("nav.bg"); } diff --git a/src/mightypork/rogue/screens/game/InvSlot.java b/src/mightypork/rogue/screens/game/InvSlot.java index d02307e..3b602a0 100644 --- a/src/mightypork/rogue/screens/game/InvSlot.java +++ b/src/mightypork/rogue/screens/game/InvSlot.java @@ -50,8 +50,8 @@ public class InvSlot extends ClickableComponent { public InvSlot(int index, InvSlot[] allSlots) { super(); - this.txBase = Res.getTxQuad("inv.slot.base"); - this.txSelected = Res.getTxQuad("inv.slot.selected"); + this.txBase = Res.txQuad("inv.slot.base"); + this.txSelected = Res.txQuad("inv.slot.selected"); this.index = index; this.slots = allSlots; @@ -67,7 +67,7 @@ public class InvSlot extends ClickableComponent { .growUp(uiRect.height().perc(30)).cached(); //@formatter:on - rbTxP = new TextPainter(Res.getFont("tiny"), AlignX.RIGHT, RGB.WHITE); + rbTxP = new TextPainter(Res.font("tiny"), AlignX.RIGHT, RGB.WHITE); rbTxP.setRect(rbTxRect); rbTxP.setShadow(RGB.BLACK_70, rbTxP.getRect().height().div(7).toVectXY()); @@ -76,7 +76,7 @@ public class InvSlot extends ClickableComponent { .growDown(uiRect.height().perc(30)).cached(); //@formatter:on - rtTxP = new TextPainter(Res.getFont("tiny"), AlignX.RIGHT, RGB.GREEN); + rtTxP = new TextPainter(Res.font("tiny"), AlignX.RIGHT, RGB.GREEN); rtTxP.setRect(rtTxRect); rtTxP.setShadow(RGB.BLACK_70, rtTxP.getRect().height().div(7).toVectXY()); diff --git a/src/mightypork/rogue/screens/game/LayerAskSave.java b/src/mightypork/rogue/screens/game/LayerAskSave.java index 090caa5..25d3f3d 100644 --- a/src/mightypork/rogue/screens/game/LayerAskSave.java +++ b/src/mightypork/rogue/screens/game/LayerAskSave.java @@ -55,7 +55,7 @@ public class LayerAskSave extends FadingLayer { qp.setRect(root); root.add(qp); - final IFont thick_font = Res.getFont("thick"); + final IFont thick_font = Res.font("thick"); final RowLayout rl = new RowLayout(root, 2); rl.setRect(root.shrink(Num.ZERO, root.height().perc(40)).moveY(root.height().perc(-10))); diff --git a/src/mightypork/rogue/screens/game/LayerDeath.java b/src/mightypork/rogue/screens/game/LayerDeath.java index 197c203..eec8b13 100644 --- a/src/mightypork/rogue/screens/game/LayerDeath.java +++ b/src/mightypork/rogue/screens/game/LayerDeath.java @@ -38,7 +38,7 @@ public class LayerDeath extends FadingLayer { qp.setRect(root); root.add(qp); - final IFont thick_font = Res.getFont("thick"); + final IFont thick_font = Res.font("thick"); final RowLayout rl = new RowLayout(root, 5); rl.setRect(root.shrink(Num.ZERO, root.height().perc(15))); @@ -49,7 +49,7 @@ public class LayerDeath extends FadingLayer { txp.setVPaddingPercent(13); LinearLayout linl = new LinearLayout(root, AlignX.CENTER); - linl.add(new ImagePainter(Res.getTxQuad("death2"))); + linl.add(new ImagePainter(Res.txQuad("death2"))); rl.add(linl, 3); linl = new LinearLayout(root, AlignX.CENTER); diff --git a/src/mightypork/rogue/screens/game/LayerGameUi.java b/src/mightypork/rogue/screens/game/LayerGameUi.java index f066fec..910fd1c 100644 --- a/src/mightypork/rogue/screens/game/LayerGameUi.java +++ b/src/mightypork/rogue/screens/game/LayerGameUi.java @@ -85,9 +85,9 @@ public class LayerGameUi extends ScreenLayer { final HeartBar hearts = new HeartBar( playerHealthTotal, playerHealthActive, - Res.getTxQuad("hud.heart.on"), - Res.getTxQuad("hud.heart.half"), - Res.getTxQuad("hud.heart.off"), + Res.txQuad("hud.heart.on"), + Res.txQuad("hud.heart.half"), + Res.txQuad("hud.heart.off"), AlignX.LEFT); //@formatter:on @@ -95,7 +95,7 @@ public class LayerGameUi extends ScreenLayer { hearts.setRect(hearts_box); root.add(hearts); - final TextPainter levelText = new TextPainter(Res.getFont("tiny"), AlignX.RIGHT, RGB.WHITE, new StringProvider() { + final TextPainter levelText = new TextPainter(Res.font("tiny"), AlignX.RIGHT, RGB.WHITE, new StringProvider() { @Override public String getString() @@ -118,32 +118,32 @@ public class LayerGameUi extends ScreenLayer { NavButton btn; - nav.addRight(btn = new NavButton(Res.getTxQuad("nav.button.fg.inventory"))); + nav.addRight(btn = new NavButton(Res.txQuad("nav.button.fg.inventory"))); btn.setAction(gameScreen.actionToggleInv); - nav.addRight(btn = new NavButton(Res.getTxQuad("nav.button.fg.eat"))); + nav.addRight(btn = new NavButton(Res.txQuad("nav.button.fg.eat"))); btn.setAction(gameScreen.actionEat); - nav.addRight(btn = new NavButton(Res.getTxQuad("nav.button.fg.pause"))); + nav.addRight(btn = new NavButton(Res.txQuad("nav.button.fg.pause"))); btn.setAction(gameScreen.actionTogglePause); // TODO actions //nav.addLeft(new NavButton(Res.txq("nav.button.fg.options"))); //nav.addLeft(new NavButton(Res.txq("nav.button.fg.help"))); - nav.addLeft(btn = new NavButton(Res.getTxQuad("nav.button.fg.menu"))); + nav.addLeft(btn = new NavButton(Res.txQuad("nav.button.fg.menu"))); btn.setAction(gameScreen.actionMenu); - nav.addLeft(btn = new NavButton(Res.getTxQuad("nav.button.fg.save"))); + nav.addLeft(btn = new NavButton(Res.txQuad("nav.button.fg.save"))); btn.setAction(gameScreen.actionSave); - nav.addLeft(btn = new NavButton(Res.getTxQuad("nav.button.fg.load"))); + nav.addLeft(btn = new NavButton(Res.txQuad("nav.button.fg.load"))); btn.setAction(gameScreen.actionLoad); - nav.addLeft(btn = new NavButton(Res.getTxQuad("nav.button.fg.map"))); + nav.addLeft(btn = new NavButton(Res.txQuad("nav.button.fg.map"))); btn.setAction(gameScreen.actionToggleMinimap); - nav.addLeft(btn = new NavButton(Res.getTxQuad("nav.button.fg.magnify"))); + nav.addLeft(btn = new NavButton(Res.txQuad("nav.button.fg.magnify"))); btn.setAction(gameScreen.actionToggleZoom); } diff --git a/src/mightypork/rogue/screens/game/LayerInv.java b/src/mightypork/rogue/screens/game/LayerInv.java index 16809d6..074bd04 100644 --- a/src/mightypork/rogue/screens/game/LayerInv.java +++ b/src/mightypork/rogue/screens/game/LayerInv.java @@ -121,7 +121,7 @@ public class LayerInv extends FadingLayer { final GridLayout gl = new GridLayout(fg, 10, 1); root.add(gl); - final TextPainter txp = new TextPainter(Res.getFont("thick"), AlignX.CENTER, RGB.YELLOW, "Inventory"); + final TextPainter txp = new TextPainter(Res.font("thick"), AlignX.CENTER, RGB.YELLOW, "Inventory"); gl.put(txp, pos, 0, 1, 1); txp.setVPaddingPercent(5); pos += 1; @@ -153,7 +153,7 @@ public class LayerInv extends FadingLayer { row2.add(slots[6] = new InvSlot(6, slots)); row2.add(slots[7] = new InvSlot(7, slots)); - final TextPainter txp2 = new TextPainter(Res.getFont("thick"), AlignX.CENTER, RGB.WHITE, contextStrProv); + final TextPainter txp2 = new TextPainter(Res.font("thick"), AlignX.CENTER, RGB.WHITE, contextStrProv); gl.put(txp2, pos, 0, 1, 1); txp2.setVPaddingPercent(25); diff --git a/src/mightypork/rogue/screens/game/LayerWin.java b/src/mightypork/rogue/screens/game/LayerWin.java index dee85ba..0e5a6fb 100644 --- a/src/mightypork/rogue/screens/game/LayerWin.java +++ b/src/mightypork/rogue/screens/game/LayerWin.java @@ -34,7 +34,7 @@ public class LayerWin extends FadingLayer { qp.setRect(root); root.add(qp); - final IFont thick_font = Res.getFont("thick"); + final IFont thick_font = Res.font("thick"); final RowLayout rl = new RowLayout(root, 5); rl.setRect(root.shrink(Num.ZERO, root.height().perc(15))); @@ -45,7 +45,7 @@ public class LayerWin extends FadingLayer { txp.setVPaddingPercent(13); LinearLayout linl = new LinearLayout(root, AlignX.CENTER); - linl.add(new ImagePainter(Res.getTxQuad("win"))); + linl.add(new ImagePainter(Res.txQuad("win"))); rl.add(linl, 3); linl = new LinearLayout(root, AlignX.CENTER); @@ -85,8 +85,8 @@ public class LayerWin extends FadingLayer { @Override protected void onShowFinished() { - App.audio().fadeOutAllLoops(); - Res.getSoundEffect("game.win").play(1); + App.sound().fadeOutAllLoops(); + Res.sound("game.win").play(1); } } diff --git a/src/mightypork/rogue/screens/game/NavButton.java b/src/mightypork/rogue/screens/game/NavButton.java index bd28c0b..01d9d2b 100644 --- a/src/mightypork/rogue/screens/game/NavButton.java +++ b/src/mightypork/rogue/screens/game/NavButton.java @@ -20,9 +20,9 @@ public class NavButton extends ClickableComponent { public NavButton(TxQuad fg) { super(); - this.base = Res.getTxQuad("nav.button.bg.base"); - this.hover = Res.getTxQuad("nav.button.bg.hover"); - this.down = Res.getTxQuad("nav.button.bg.down"); + this.base = Res.txQuad("nav.button.bg.base"); + this.hover = Res.txQuad("nav.button.bg.hover"); + this.down = Res.txQuad("nav.button.bg.down"); this.fg = fg; } diff --git a/src/mightypork/rogue/screens/game/ScreenGame.java b/src/mightypork/rogue/screens/game/ScreenGame.java index 4d185d2..ed5c6a0 100644 --- a/src/mightypork/rogue/screens/game/ScreenGame.java +++ b/src/mightypork/rogue/screens/game/ScreenGame.java @@ -307,8 +307,8 @@ public class ScreenGame extends RogueScreen implements PlayerDeathHandler, GameW setState(GScrState.WORLD); hideAllPopups(); - App.audio().fadeOutAllLoops(); - Res.getSoundLoop("music.dungeon").fadeIn(); + App.sound().fadeOutAllLoops(); + Res.loop("music.dungeon").fadeIn(); } @@ -318,7 +318,7 @@ public class ScreenGame extends RogueScreen implements PlayerDeathHandler, GameW super.onScreenLeave(); WorldProvider.get().setListening(false); - Res.getSoundLoop("music.dungeon").fadeOut(); + Res.loop("music.dungeon").fadeOut(); } diff --git a/src/mightypork/rogue/screens/menu/ScreenMainMenu.java b/src/mightypork/rogue/screens/menu/ScreenMainMenu.java index 8fc1058..ff8104f 100644 --- a/src/mightypork/rogue/screens/menu/ScreenMainMenu.java +++ b/src/mightypork/rogue/screens/menu/ScreenMainMenu.java @@ -58,13 +58,13 @@ public class ScreenMainMenu extends RogueScreen { root.add(rows); final LinearLayout linlayout = new LinearLayout(root, AlignX.CENTER); - linlayout.add(new ImagePainter(Res.getTxQuad("logo"))); + linlayout.add(new ImagePainter(Res.txQuad("logo"))); rows.add(linlayout, 4); rows.skip(1); TextButton btn; - final IFont btnFont = Res.getFont("thick"); + final IFont btnFont = Res.font("thick"); // world button btn = new TextButton(btnFont, "Play", PAL16.SLIMEGREEN); @@ -134,7 +134,7 @@ public class ScreenMainMenu extends RogueScreen { { super.onScreenEnter(); - App.audio().fadeOutAllLoops(); - Res.getSoundLoop("music.menu").fadeIn(); + App.sound().fadeOutAllLoops(); + Res.loop("music.menu").fadeIn(); } } diff --git a/src/mightypork/rogue/screens/select_world/ScreenSelectWorld.java b/src/mightypork/rogue/screens/select_world/ScreenSelectWorld.java index 66cdf78..ef780f0 100644 --- a/src/mightypork/rogue/screens/select_world/ScreenSelectWorld.java +++ b/src/mightypork/rogue/screens/select_world/ScreenSelectWorld.java @@ -62,7 +62,7 @@ public class ScreenSelectWorld extends RogueScreen { TextPainter tp; - rows.add(tp = new TextPainter(Res.getFont("thick"), AlignX.CENTER, RGB.YELLOW, "Save slot:")); + rows.add(tp = new TextPainter(Res.font("thick"), AlignX.CENTER, RGB.YELLOW, "Save slot:")); tp.setVPaddingPercent(20); tp.setShadow(RGB.BLACK_50, tp.height().mul(0.6 / 8D).toVectXY()); diff --git a/src/mightypork/rogue/screens/select_world/WorldSlot.java b/src/mightypork/rogue/screens/select_world/WorldSlot.java index 3196786..d09c3f1 100644 --- a/src/mightypork/rogue/screens/select_world/WorldSlot.java +++ b/src/mightypork/rogue/screens/select_world/WorldSlot.java @@ -71,7 +71,7 @@ public class WorldSlot extends ConstraintLayout { gridl.setRect(innerRect.shrink(shrinkH, shrinkH, shrinkV, shrinkV.half())); add(gridl); - final IFont font = Res.getFont("thick"); + final IFont font = Res.font("thick"); gridl.put(loadBtn = new TextButton(font, "", RGB.WHITE), 0, 0, 1, 7); loadBtn.textPainter.setVPaddingPercent(20); diff --git a/src/mightypork/rogue/screens/story/ScreenStory.java b/src/mightypork/rogue/screens/story/ScreenStory.java index 04ae1e0..f7ba27e 100644 --- a/src/mightypork/rogue/screens/story/ScreenStory.java +++ b/src/mightypork/rogue/screens/story/ScreenStory.java @@ -48,7 +48,7 @@ public class ScreenStory extends RogueScreen implements MouseButtonHandler { @Override public void run() { - img.setTxQuad(Res.getTxQuad(nextImg)); + img.setTxQuad(Res.txQuad(nextImg)); if (nextT1 != null) tp1.setText(nextT1); if (nextT2 != null) tp2.setText(nextT2); @@ -106,7 +106,7 @@ public class ScreenStory extends RogueScreen implements MouseButtonHandler { { super(screen); - final TextPainter help = new TextPainter(Res.getFont("tiny"), AlignX.CENTER, RGB.WHITE.withAlpha(txProceedAlpha.mul(0.3)), + final TextPainter help = new TextPainter(Res.font("tiny"), AlignX.CENTER, RGB.WHITE.withAlpha(txProceedAlpha.mul(0.3)), "Space / click to proceed."); help.setRect(root.bottomEdge().growUp(root.height().perc(4))); help.setVPaddingPercent(5); @@ -119,14 +119,14 @@ public class ScreenStory extends RogueScreen implements MouseButtonHandler { final LinearLayout ll = new LinearLayout(root, AlignX.CENTER); rl.add(ll, 7); - img = new ImagePainter(Res.getTxQuad("story_1")); + img = new ImagePainter(Res.txQuad("story_1")); ll.add(img); - tp1 = new TextPainter(Res.getFont("tiny"), AlignX.CENTER, textColor.withAlpha(tx1alpha), ""); + tp1 = new TextPainter(Res.font("tiny"), AlignX.CENTER, textColor.withAlpha(tx1alpha), ""); rl.add(tp1); tp1.setVPaddingPercent(19); - tp2 = new TextPainter(Res.getFont("tiny"), AlignX.CENTER, textColor.withAlpha(tx2alpha), ""); + tp2 = new TextPainter(Res.font("tiny"), AlignX.CENTER, textColor.withAlpha(tx2alpha), ""); rl.add(tp2); tp2.setVPaddingPercent(19); diff --git a/src/mightypork/rogue/world/entity/render/EntityRendererMobLR.java b/src/mightypork/rogue/world/entity/render/EntityRendererMobLR.java index e654ca5..1922230 100644 --- a/src/mightypork/rogue/world/entity/render/EntityRendererMobLR.java +++ b/src/mightypork/rogue/world/entity/render/EntityRendererMobLR.java @@ -37,7 +37,7 @@ public class EntityRendererMobLR extends EntityRenderer { public EntityRendererMobLR(Entity entity, String sheetKey) { this.entity = entity; - this.sheet = Res.getTxSheet(sheetKey); + this.sheet = Res.txSheet(sheetKey); } diff --git a/src/mightypork/rogue/world/gui/WorldConsoleRenderer.java b/src/mightypork/rogue/world/gui/WorldConsoleRenderer.java index 528d4d2..b9ba6a9 100644 --- a/src/mightypork/rogue/world/gui/WorldConsoleRenderer.java +++ b/src/mightypork/rogue/world/gui/WorldConsoleRenderer.java @@ -30,7 +30,7 @@ public class WorldConsoleRenderer extends BaseComponent { public WorldConsoleRenderer(Num rowHeight) { this.rowHeight = rowHeight; - this.fr = new FontRenderer(Res.getFont("tiny")); + this.fr = new FontRenderer(Res.font("tiny")); final Num itmsize = height().perc(25).min(256).max(16); diff --git a/src/mightypork/rogue/world/item/impl/active/ItemHeartPiece.java b/src/mightypork/rogue/world/item/impl/active/ItemHeartPiece.java index 343b181..4bf24d1 100644 --- a/src/mightypork/rogue/world/item/impl/active/ItemHeartPiece.java +++ b/src/mightypork/rogue/world/item/impl/active/ItemHeartPiece.java @@ -21,7 +21,7 @@ public class ItemHeartPiece extends Item { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.heart")); + return new QuadItemRenderer(this, Res.txQuad("item.heart")); } diff --git a/src/mightypork/rogue/world/item/impl/food/ItemCheese.java b/src/mightypork/rogue/world/item/impl/food/ItemCheese.java index d71116c..47e1184 100644 --- a/src/mightypork/rogue/world/item/impl/food/ItemCheese.java +++ b/src/mightypork/rogue/world/item/impl/food/ItemCheese.java @@ -19,7 +19,7 @@ public class ItemCheese extends ItemBaseFood { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.cheese")); + return new QuadItemRenderer(this, Res.txQuad("item.cheese")); } diff --git a/src/mightypork/rogue/world/item/impl/food/ItemMeat.java b/src/mightypork/rogue/world/item/impl/food/ItemMeat.java index 09e265f..5e4eaca 100644 --- a/src/mightypork/rogue/world/item/impl/food/ItemMeat.java +++ b/src/mightypork/rogue/world/item/impl/food/ItemMeat.java @@ -19,7 +19,7 @@ public class ItemMeat extends ItemBaseFood { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.meat")); + return new QuadItemRenderer(this, Res.txQuad("item.meat")); } diff --git a/src/mightypork/rogue/world/item/impl/food/ItemSandwich.java b/src/mightypork/rogue/world/item/impl/food/ItemSandwich.java index e1b2dae..7a4f4a3 100644 --- a/src/mightypork/rogue/world/item/impl/food/ItemSandwich.java +++ b/src/mightypork/rogue/world/item/impl/food/ItemSandwich.java @@ -19,7 +19,7 @@ public class ItemSandwich extends ItemBaseFood { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.sandwich")); + return new QuadItemRenderer(this, Res.txQuad("item.sandwich")); } diff --git a/src/mightypork/rogue/world/item/impl/weapons/ItemAxe.java b/src/mightypork/rogue/world/item/impl/weapons/ItemAxe.java index b57c826..3e93d29 100644 --- a/src/mightypork/rogue/world/item/impl/weapons/ItemAxe.java +++ b/src/mightypork/rogue/world/item/impl/weapons/ItemAxe.java @@ -19,7 +19,7 @@ public class ItemAxe extends ItemBaseWeapon { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.axe")); + return new QuadItemRenderer(this, Res.txQuad("item.axe")); } diff --git a/src/mightypork/rogue/world/item/impl/weapons/ItemBone.java b/src/mightypork/rogue/world/item/impl/weapons/ItemBone.java index ff95eeb..94d1889 100644 --- a/src/mightypork/rogue/world/item/impl/weapons/ItemBone.java +++ b/src/mightypork/rogue/world/item/impl/weapons/ItemBone.java @@ -19,7 +19,7 @@ public class ItemBone extends ItemBaseWeapon { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.bone")); + return new QuadItemRenderer(this, Res.txQuad("item.bone")); } diff --git a/src/mightypork/rogue/world/item/impl/weapons/ItemClub.java b/src/mightypork/rogue/world/item/impl/weapons/ItemClub.java index 44dcd7e..df90037 100644 --- a/src/mightypork/rogue/world/item/impl/weapons/ItemClub.java +++ b/src/mightypork/rogue/world/item/impl/weapons/ItemClub.java @@ -19,7 +19,7 @@ public class ItemClub extends ItemBaseWeapon { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.club")); + return new QuadItemRenderer(this, Res.txQuad("item.club")); } diff --git a/src/mightypork/rogue/world/item/impl/weapons/ItemKnife.java b/src/mightypork/rogue/world/item/impl/weapons/ItemKnife.java index a45a4fc..5208764 100644 --- a/src/mightypork/rogue/world/item/impl/weapons/ItemKnife.java +++ b/src/mightypork/rogue/world/item/impl/weapons/ItemKnife.java @@ -19,7 +19,7 @@ public class ItemKnife extends ItemBaseWeapon { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.knife")); + return new QuadItemRenderer(this, Res.txQuad("item.knife")); } diff --git a/src/mightypork/rogue/world/item/impl/weapons/ItemRock.java b/src/mightypork/rogue/world/item/impl/weapons/ItemRock.java index c3ad0c5..7c576e6 100644 --- a/src/mightypork/rogue/world/item/impl/weapons/ItemRock.java +++ b/src/mightypork/rogue/world/item/impl/weapons/ItemRock.java @@ -19,7 +19,7 @@ public class ItemRock extends ItemBaseWeapon { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.stone")); + return new QuadItemRenderer(this, Res.txQuad("item.stone")); } diff --git a/src/mightypork/rogue/world/item/impl/weapons/ItemSword.java b/src/mightypork/rogue/world/item/impl/weapons/ItemSword.java index 817edfb..ad40fe3 100644 --- a/src/mightypork/rogue/world/item/impl/weapons/ItemSword.java +++ b/src/mightypork/rogue/world/item/impl/weapons/ItemSword.java @@ -19,7 +19,7 @@ public class ItemSword extends ItemBaseWeapon { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.sword")); + return new QuadItemRenderer(this, Res.txQuad("item.sword")); } diff --git a/src/mightypork/rogue/world/item/impl/weapons/ItemTwig.java b/src/mightypork/rogue/world/item/impl/weapons/ItemTwig.java index 85256d7..62f015e 100644 --- a/src/mightypork/rogue/world/item/impl/weapons/ItemTwig.java +++ b/src/mightypork/rogue/world/item/impl/weapons/ItemTwig.java @@ -19,7 +19,7 @@ public class ItemTwig extends ItemBaseWeapon { @Override protected ItemRenderer makeRenderer() { - return new QuadItemRenderer(this, Res.getTxQuad("item.twig")); + return new QuadItemRenderer(this, Res.txQuad("item.twig")); } diff --git a/src/mightypork/rogue/world/tile/TileRenderer.java b/src/mightypork/rogue/world/tile/TileRenderer.java index 6f5ed85..ecf2d4c 100644 --- a/src/mightypork/rogue/world/tile/TileRenderer.java +++ b/src/mightypork/rogue/world/tile/TileRenderer.java @@ -46,24 +46,24 @@ public abstract class TileRenderer implements Updateable { this.tile = tile; if (!inited) { - SH_N = Res.getTxQuad("tile.shadow.n"); - SH_S = Res.getTxQuad("tile.shadow.s"); - SH_E = Res.getTxQuad("tile.shadow.e"); - SH_W = Res.getTxQuad("tile.shadow.w"); - SH_NW = Res.getTxQuad("tile.shadow.nw"); - SH_NE = Res.getTxQuad("tile.shadow.ne"); - SH_SW = Res.getTxQuad("tile.shadow.sw"); - SH_SE = Res.getTxQuad("tile.shadow.se"); - - UFOG_N = Res.getTxQuad("tile.ufog.n"); - UFOG_S = Res.getTxQuad("tile.ufog.s"); - UFOG_E = Res.getTxQuad("tile.ufog.e"); - UFOG_W = Res.getTxQuad("tile.ufog.w"); - UFOG_NW = Res.getTxQuad("tile.ufog.nw"); - UFOG_NE = Res.getTxQuad("tile.ufog.ne"); - UFOG_SW = Res.getTxQuad("tile.ufog.sw"); - UFOG_SE = Res.getTxQuad("tile.ufog.se"); - UFOG_FULL = Res.getTxQuad("tile.ufog.full"); + SH_N = Res.txQuad("tile.shadow.n"); + SH_S = Res.txQuad("tile.shadow.s"); + SH_E = Res.txQuad("tile.shadow.e"); + SH_W = Res.txQuad("tile.shadow.w"); + SH_NW = Res.txQuad("tile.shadow.nw"); + SH_NE = Res.txQuad("tile.shadow.ne"); + SH_SW = Res.txQuad("tile.shadow.sw"); + SH_SE = Res.txQuad("tile.shadow.se"); + + UFOG_N = Res.txQuad("tile.ufog.n"); + UFOG_S = Res.txQuad("tile.ufog.s"); + UFOG_E = Res.txQuad("tile.ufog.e"); + UFOG_W = Res.txQuad("tile.ufog.w"); + UFOG_NW = Res.txQuad("tile.ufog.nw"); + UFOG_NE = Res.txQuad("tile.ufog.ne"); + UFOG_SW = Res.txQuad("tile.ufog.sw"); + UFOG_SE = Res.txQuad("tile.ufog.se"); + UFOG_FULL = Res.txQuad("tile.ufog.full"); inited = true; } } diff --git a/src/mightypork/rogue/world/tile/impl/brick/TileBrickChest.java b/src/mightypork/rogue/world/tile/impl/brick/TileBrickChest.java index 4286ef7..c3614c4 100644 --- a/src/mightypork/rogue/world/tile/impl/brick/TileBrickChest.java +++ b/src/mightypork/rogue/world/tile/impl/brick/TileBrickChest.java @@ -19,7 +19,7 @@ public class TileBrickChest extends TileBaseChest { @Override protected TileRenderer makeRenderer() { - return new ChestRenderer(this, Res.getTxQuad("tile.brick.floor"), Res.getTxQuad("tile.extra.chest.closed"), Res.getTxQuad("tile.extra.chest.open")); + return new ChestRenderer(this, Res.txQuad("tile.brick.floor"), Res.txQuad("tile.extra.chest.closed"), Res.txQuad("tile.extra.chest.open")); } } diff --git a/src/mightypork/rogue/world/tile/impl/brick/TileBrickDoor.java b/src/mightypork/rogue/world/tile/impl/brick/TileBrickDoor.java index 1592e16..6cdc356 100644 --- a/src/mightypork/rogue/world/tile/impl/brick/TileBrickDoor.java +++ b/src/mightypork/rogue/world/tile/impl/brick/TileBrickDoor.java @@ -13,9 +13,9 @@ public class TileBrickDoor extends TileBaseDoor { //@formatter:off super( model, - Res.getTxSheet("tile.brick.door.closed"), // LOCKED - Res.getTxSheet("tile.brick.door.closed"), - Res.getTxSheet("tile.brick.door.open") + Res.txSheet("tile.brick.door.closed"), // LOCKED + Res.txSheet("tile.brick.door.closed"), + Res.txSheet("tile.brick.door.open") ); //@formatter:on } diff --git a/src/mightypork/rogue/world/tile/impl/brick/TileBrickEntrance.java b/src/mightypork/rogue/world/tile/impl/brick/TileBrickEntrance.java index 279e8ba..9b28775 100644 --- a/src/mightypork/rogue/world/tile/impl/brick/TileBrickEntrance.java +++ b/src/mightypork/rogue/world/tile/impl/brick/TileBrickEntrance.java @@ -19,7 +19,7 @@ public class TileBrickEntrance extends TileBaseEntrance { @Override protected TileRenderer makeRenderer() { - return new OneFrameTileRenderer(this, Res.getTxQuad("tile.brick.stairs.up")); + return new OneFrameTileRenderer(this, Res.txQuad("tile.brick.stairs.up")); } } diff --git a/src/mightypork/rogue/world/tile/impl/brick/TileBrickExit.java b/src/mightypork/rogue/world/tile/impl/brick/TileBrickExit.java index 4c3a72a..3809e74 100644 --- a/src/mightypork/rogue/world/tile/impl/brick/TileBrickExit.java +++ b/src/mightypork/rogue/world/tile/impl/brick/TileBrickExit.java @@ -19,7 +19,7 @@ public class TileBrickExit extends TileBaseExit { @Override protected TileRenderer makeRenderer() { - return new OneFrameTileRenderer(this, Res.getTxQuad("tile.brick.stairs.down")); + return new OneFrameTileRenderer(this, Res.txQuad("tile.brick.stairs.down")); } } diff --git a/src/mightypork/rogue/world/tile/impl/brick/TileBrickFloor.java b/src/mightypork/rogue/world/tile/impl/brick/TileBrickFloor.java index 0cb6d6d..4ba0eb0 100644 --- a/src/mightypork/rogue/world/tile/impl/brick/TileBrickFloor.java +++ b/src/mightypork/rogue/world/tile/impl/brick/TileBrickFloor.java @@ -10,7 +10,7 @@ public class TileBrickFloor extends TileBaseFloor { public TileBrickFloor(TileModel model) { - super(model, Res.getTxSheet("tile.brick.floor")); + super(model, Res.txSheet("tile.brick.floor")); } } diff --git a/src/mightypork/rogue/world/tile/impl/brick/TileBrickPassage.java b/src/mightypork/rogue/world/tile/impl/brick/TileBrickPassage.java index 1287898..d9c0ab9 100644 --- a/src/mightypork/rogue/world/tile/impl/brick/TileBrickPassage.java +++ b/src/mightypork/rogue/world/tile/impl/brick/TileBrickPassage.java @@ -10,7 +10,7 @@ public class TileBrickPassage extends TileBasePassage { public TileBrickPassage(TileModel model) { - super(model, Res.getTxSheet("tile.brick.passage")); + super(model, Res.txSheet("tile.brick.passage")); } } diff --git a/src/mightypork/rogue/world/tile/impl/brick/TileBrickSecretDoor.java b/src/mightypork/rogue/world/tile/impl/brick/TileBrickSecretDoor.java index dc591aa..f082b16 100644 --- a/src/mightypork/rogue/world/tile/impl/brick/TileBrickSecretDoor.java +++ b/src/mightypork/rogue/world/tile/impl/brick/TileBrickSecretDoor.java @@ -13,9 +13,9 @@ public class TileBrickSecretDoor extends TileBaseSecretDoor { //@formatter:off super( model, - Res.getTxSheet("tile.brick.door.secret"), - Res.getTxSheet("tile.brick.door.closed"), - Res.getTxSheet("tile.brick.door.open") + Res.txSheet("tile.brick.door.secret"), + Res.txSheet("tile.brick.door.closed"), + Res.txSheet("tile.brick.door.open") ); //@formatter:on diff --git a/src/mightypork/rogue/world/tile/impl/brick/TileBrickWall.java b/src/mightypork/rogue/world/tile/impl/brick/TileBrickWall.java index de33a55..802baf8 100644 --- a/src/mightypork/rogue/world/tile/impl/brick/TileBrickWall.java +++ b/src/mightypork/rogue/world/tile/impl/brick/TileBrickWall.java @@ -10,7 +10,7 @@ public class TileBrickWall extends TileBaseWall { public TileBrickWall(TileModel model) { - super(model, Res.getTxSheet("tile.brick.wall")); + super(model, Res.txSheet("tile.brick.wall")); } }