Changes reflecting refactoring of related projects

master
Ondřej Hruška 11 years ago
parent 137dbc21da
commit f0401d0184
  1. 2
      src/mightypork/rogue/RogueApp.java
  2. 10
      src/mightypork/rogue/RogueResources.java
  3. 2
      src/mightypork/rogue/screens/FpsOverlay.java
  4. 2
      src/mightypork/rogue/screens/LoadingOverlay.java
  5. 2
      src/mightypork/rogue/screens/game/IngameNav.java
  6. 8
      src/mightypork/rogue/screens/game/InvSlot.java
  7. 2
      src/mightypork/rogue/screens/game/LayerAskSave.java
  8. 4
      src/mightypork/rogue/screens/game/LayerDeath.java
  9. 24
      src/mightypork/rogue/screens/game/LayerGameUi.java
  10. 4
      src/mightypork/rogue/screens/game/LayerInv.java
  11. 8
      src/mightypork/rogue/screens/game/LayerWin.java
  12. 6
      src/mightypork/rogue/screens/game/NavButton.java
  13. 6
      src/mightypork/rogue/screens/game/ScreenGame.java
  14. 8
      src/mightypork/rogue/screens/menu/ScreenMainMenu.java
  15. 2
      src/mightypork/rogue/screens/select_world/ScreenSelectWorld.java
  16. 2
      src/mightypork/rogue/screens/select_world/WorldSlot.java
  17. 10
      src/mightypork/rogue/screens/story/ScreenStory.java
  18. 2
      src/mightypork/rogue/world/entity/render/EntityRendererMobLR.java
  19. 2
      src/mightypork/rogue/world/gui/WorldConsoleRenderer.java
  20. 2
      src/mightypork/rogue/world/item/impl/active/ItemHeartPiece.java
  21. 2
      src/mightypork/rogue/world/item/impl/food/ItemCheese.java
  22. 2
      src/mightypork/rogue/world/item/impl/food/ItemMeat.java
  23. 2
      src/mightypork/rogue/world/item/impl/food/ItemSandwich.java
  24. 2
      src/mightypork/rogue/world/item/impl/weapons/ItemAxe.java
  25. 2
      src/mightypork/rogue/world/item/impl/weapons/ItemBone.java
  26. 2
      src/mightypork/rogue/world/item/impl/weapons/ItemClub.java
  27. 2
      src/mightypork/rogue/world/item/impl/weapons/ItemKnife.java
  28. 2
      src/mightypork/rogue/world/item/impl/weapons/ItemRock.java
  29. 2
      src/mightypork/rogue/world/item/impl/weapons/ItemSword.java
  30. 2
      src/mightypork/rogue/world/item/impl/weapons/ItemTwig.java
  31. 36
      src/mightypork/rogue/world/tile/TileRenderer.java
  32. 2
      src/mightypork/rogue/world/tile/impl/brick/TileBrickChest.java
  33. 6
      src/mightypork/rogue/world/tile/impl/brick/TileBrickDoor.java
  34. 2
      src/mightypork/rogue/world/tile/impl/brick/TileBrickEntrance.java
  35. 2
      src/mightypork/rogue/world/tile/impl/brick/TileBrickExit.java
  36. 2
      src/mightypork/rogue/world/tile/impl/brick/TileBrickFloor.java
  37. 2
      src/mightypork/rogue/world/tile/impl/brick/TileBrickPassage.java
  38. 6
      src/mightypork/rogue/world/tile/impl/brick/TileBrickSecretDoor.java
  39. 2
      src/mightypork/rogue/world/tile/impl/brick/TileBrickWall.java

@ -167,7 +167,7 @@ public final class RogueApp extends App implements ViewportChangeListener {
public void onScreenshotRequest() public void onScreenshotRequest()
{ {
// screenshot sound // screenshot sound
Res.getSoundEffect("gui.shutter").play(0.8); Res.sound("gui.shutter").play(0.8);
} }

@ -11,11 +11,11 @@ import mightypork.gamecore.graphics.textures.ITexture;
import mightypork.gamecore.graphics.textures.QuadGrid; import mightypork.gamecore.graphics.textures.QuadGrid;
import mightypork.gamecore.graphics.textures.TextureRegistry; import mightypork.gamecore.graphics.textures.TextureRegistry;
import mightypork.gamecore.graphics.textures.WrapMode; import mightypork.gamecore.graphics.textures.WrapMode;
import mightypork.gamecore.resources.ResourceSetup; import mightypork.gamecore.resources.ResourceInitializer;
import mightypork.utils.math.constraints.rect.Rect; import mightypork.utils.math.constraints.rect.Rect;
public class RogueResources implements ResourceSetup { public class RogueResources implements ResourceInitializer {
@Override @Override
public void addFonts(FontRegistry fonts) public void addFonts(FontRegistry fonts)
@ -80,7 +80,7 @@ public class RogueResources implements ResourceSetup {
QuadGrid grid; QuadGrid grid;
// gui // 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 // small gui elements
grid = texture.grid(32, 32); grid = texture.grid(32, 32);
@ -112,7 +112,7 @@ public class RogueResources implements ResourceSetup {
textures.add("inv.slot.selected", grid.makeQuad(1, 5)); textures.add("inv.slot.selected", grid.makeQuad(1, 5));
// sprites // 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); grid = texture.grid(8, 8);
textures.add("sprite.player", grid.makeSheet(0, 0, 4, 1)); textures.add("sprite.player", grid.makeSheet(0, 0, 4, 1));
textures.add("sprite.rat.gray", grid.makeSheet(0, 1, 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 textures.add("sprite.zzz", grid.makeQuad(0, 7)); // sleep thingy
// logo // 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))); textures.add("logo", texture.makeQuad(Rect.make(0, 0, 0.543, 0.203)));
grid = texture.grid(8, 8); grid = texture.grid(8, 8);
textures.add("death", grid.makeQuad(0, 2)); textures.add("death", grid.makeQuad(0, 2));

@ -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 Num h = root.height();
final RectBound constraint = root.shrink(h.perc(3)).topRight().startRect().growDown(h.perc(5).max(16)); final RectBound constraint = root.shrink(h.perc(3)).topRight().startRect().growDown(h.perc(5).max(16));

@ -76,7 +76,7 @@ public class LoadingOverlay extends Overlay {
Rect textRect = root.shrink(Num.ZERO, root.height().perc(48)); Rect textRect = root.shrink(Num.ZERO, root.height().perc(48));
textRect = textRect.moveY(root.height().perc(-10)); 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.setRect(textRect);
tp.setShadow(RGB.BLACK_60, tp.height().mul(1 / 8D).toVectXY()); tp.setShadow(RGB.BLACK_60, tp.height().mul(1 / 8D).toVectXY());

@ -41,7 +41,7 @@ public class IngameNav extends LayoutComponent {
paintHelper = leftEdge().growRight(height().mul(4)); paintHelper = leftEdge().growRight(height().mul(4));
bg = Res.getTxQuad("nav.bg"); bg = Res.txQuad("nav.bg");
} }

@ -50,8 +50,8 @@ public class InvSlot extends ClickableComponent {
public InvSlot(int index, InvSlot[] allSlots) public InvSlot(int index, InvSlot[] allSlots)
{ {
super(); super();
this.txBase = Res.getTxQuad("inv.slot.base"); this.txBase = Res.txQuad("inv.slot.base");
this.txSelected = Res.getTxQuad("inv.slot.selected"); this.txSelected = Res.txQuad("inv.slot.selected");
this.index = index; this.index = index;
this.slots = allSlots; this.slots = allSlots;
@ -67,7 +67,7 @@ public class InvSlot extends ClickableComponent {
.growUp(uiRect.height().perc(30)).cached(); .growUp(uiRect.height().perc(30)).cached();
//@formatter:on //@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.setRect(rbTxRect);
rbTxP.setShadow(RGB.BLACK_70, rbTxP.getRect().height().div(7).toVectXY()); 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(); .growDown(uiRect.height().perc(30)).cached();
//@formatter:on //@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.setRect(rtTxRect);
rtTxP.setShadow(RGB.BLACK_70, rtTxP.getRect().height().div(7).toVectXY()); rtTxP.setShadow(RGB.BLACK_70, rtTxP.getRect().height().div(7).toVectXY());

@ -55,7 +55,7 @@ public class LayerAskSave extends FadingLayer {
qp.setRect(root); qp.setRect(root);
root.add(qp); root.add(qp);
final IFont thick_font = Res.getFont("thick"); final IFont thick_font = Res.font("thick");
final RowLayout rl = new RowLayout(root, 2); final RowLayout rl = new RowLayout(root, 2);
rl.setRect(root.shrink(Num.ZERO, root.height().perc(40)).moveY(root.height().perc(-10))); rl.setRect(root.shrink(Num.ZERO, root.height().perc(40)).moveY(root.height().perc(-10)));

@ -38,7 +38,7 @@ public class LayerDeath extends FadingLayer {
qp.setRect(root); qp.setRect(root);
root.add(qp); root.add(qp);
final IFont thick_font = Res.getFont("thick"); final IFont thick_font = Res.font("thick");
final RowLayout rl = new RowLayout(root, 5); final RowLayout rl = new RowLayout(root, 5);
rl.setRect(root.shrink(Num.ZERO, root.height().perc(15))); rl.setRect(root.shrink(Num.ZERO, root.height().perc(15)));
@ -49,7 +49,7 @@ public class LayerDeath extends FadingLayer {
txp.setVPaddingPercent(13); txp.setVPaddingPercent(13);
LinearLayout linl = new LinearLayout(root, AlignX.CENTER); 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); rl.add(linl, 3);
linl = new LinearLayout(root, AlignX.CENTER); linl = new LinearLayout(root, AlignX.CENTER);

@ -85,9 +85,9 @@ public class LayerGameUi extends ScreenLayer {
final HeartBar hearts = new HeartBar( final HeartBar hearts = new HeartBar(
playerHealthTotal, playerHealthTotal,
playerHealthActive, playerHealthActive,
Res.getTxQuad("hud.heart.on"), Res.txQuad("hud.heart.on"),
Res.getTxQuad("hud.heart.half"), Res.txQuad("hud.heart.half"),
Res.getTxQuad("hud.heart.off"), Res.txQuad("hud.heart.off"),
AlignX.LEFT); AlignX.LEFT);
//@formatter:on //@formatter:on
@ -95,7 +95,7 @@ public class LayerGameUi extends ScreenLayer {
hearts.setRect(hearts_box); hearts.setRect(hearts_box);
root.add(hearts); 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 @Override
public String getString() public String getString()
@ -118,32 +118,32 @@ public class LayerGameUi extends ScreenLayer {
NavButton btn; 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); 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); 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); btn.setAction(gameScreen.actionTogglePause);
// TODO actions // TODO actions
//nav.addLeft(new NavButton(Res.txq("nav.button.fg.options"))); //nav.addLeft(new NavButton(Res.txq("nav.button.fg.options")));
//nav.addLeft(new NavButton(Res.txq("nav.button.fg.help"))); //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); 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); 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); 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); 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); btn.setAction(gameScreen.actionToggleZoom);
} }

@ -121,7 +121,7 @@ public class LayerInv extends FadingLayer {
final GridLayout gl = new GridLayout(fg, 10, 1); final GridLayout gl = new GridLayout(fg, 10, 1);
root.add(gl); 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); gl.put(txp, pos, 0, 1, 1);
txp.setVPaddingPercent(5); txp.setVPaddingPercent(5);
pos += 1; pos += 1;
@ -153,7 +153,7 @@ public class LayerInv extends FadingLayer {
row2.add(slots[6] = new InvSlot(6, slots)); row2.add(slots[6] = new InvSlot(6, slots));
row2.add(slots[7] = new InvSlot(7, 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); gl.put(txp2, pos, 0, 1, 1);
txp2.setVPaddingPercent(25); txp2.setVPaddingPercent(25);

@ -34,7 +34,7 @@ public class LayerWin extends FadingLayer {
qp.setRect(root); qp.setRect(root);
root.add(qp); root.add(qp);
final IFont thick_font = Res.getFont("thick"); final IFont thick_font = Res.font("thick");
final RowLayout rl = new RowLayout(root, 5); final RowLayout rl = new RowLayout(root, 5);
rl.setRect(root.shrink(Num.ZERO, root.height().perc(15))); rl.setRect(root.shrink(Num.ZERO, root.height().perc(15)));
@ -45,7 +45,7 @@ public class LayerWin extends FadingLayer {
txp.setVPaddingPercent(13); txp.setVPaddingPercent(13);
LinearLayout linl = new LinearLayout(root, AlignX.CENTER); 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); rl.add(linl, 3);
linl = new LinearLayout(root, AlignX.CENTER); linl = new LinearLayout(root, AlignX.CENTER);
@ -85,8 +85,8 @@ public class LayerWin extends FadingLayer {
@Override @Override
protected void onShowFinished() protected void onShowFinished()
{ {
App.audio().fadeOutAllLoops(); App.sound().fadeOutAllLoops();
Res.getSoundEffect("game.win").play(1); Res.sound("game.win").play(1);
} }
} }

@ -20,9 +20,9 @@ public class NavButton extends ClickableComponent {
public NavButton(TxQuad fg) public NavButton(TxQuad fg)
{ {
super(); super();
this.base = Res.getTxQuad("nav.button.bg.base"); this.base = Res.txQuad("nav.button.bg.base");
this.hover = Res.getTxQuad("nav.button.bg.hover"); this.hover = Res.txQuad("nav.button.bg.hover");
this.down = Res.getTxQuad("nav.button.bg.down"); this.down = Res.txQuad("nav.button.bg.down");
this.fg = fg; this.fg = fg;
} }

@ -307,8 +307,8 @@ public class ScreenGame extends RogueScreen implements PlayerDeathHandler, GameW
setState(GScrState.WORLD); setState(GScrState.WORLD);
hideAllPopups(); hideAllPopups();
App.audio().fadeOutAllLoops(); App.sound().fadeOutAllLoops();
Res.getSoundLoop("music.dungeon").fadeIn(); Res.loop("music.dungeon").fadeIn();
} }
@ -318,7 +318,7 @@ public class ScreenGame extends RogueScreen implements PlayerDeathHandler, GameW
super.onScreenLeave(); super.onScreenLeave();
WorldProvider.get().setListening(false); WorldProvider.get().setListening(false);
Res.getSoundLoop("music.dungeon").fadeOut(); Res.loop("music.dungeon").fadeOut();
} }

@ -58,13 +58,13 @@ public class ScreenMainMenu extends RogueScreen {
root.add(rows); root.add(rows);
final LinearLayout linlayout = new LinearLayout(root, AlignX.CENTER); 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.add(linlayout, 4);
rows.skip(1); rows.skip(1);
TextButton btn; TextButton btn;
final IFont btnFont = Res.getFont("thick"); final IFont btnFont = Res.font("thick");
// world button // world button
btn = new TextButton(btnFont, "Play", PAL16.SLIMEGREEN); btn = new TextButton(btnFont, "Play", PAL16.SLIMEGREEN);
@ -134,7 +134,7 @@ public class ScreenMainMenu extends RogueScreen {
{ {
super.onScreenEnter(); super.onScreenEnter();
App.audio().fadeOutAllLoops(); App.sound().fadeOutAllLoops();
Res.getSoundLoop("music.menu").fadeIn(); Res.loop("music.menu").fadeIn();
} }
} }

@ -62,7 +62,7 @@ public class ScreenSelectWorld extends RogueScreen {
TextPainter tp; 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.setVPaddingPercent(20);
tp.setShadow(RGB.BLACK_50, tp.height().mul(0.6 / 8D).toVectXY()); tp.setShadow(RGB.BLACK_50, tp.height().mul(0.6 / 8D).toVectXY());

@ -71,7 +71,7 @@ public class WorldSlot extends ConstraintLayout {
gridl.setRect(innerRect.shrink(shrinkH, shrinkH, shrinkV, shrinkV.half())); gridl.setRect(innerRect.shrink(shrinkH, shrinkH, shrinkV, shrinkV.half()));
add(gridl); 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); gridl.put(loadBtn = new TextButton(font, "", RGB.WHITE), 0, 0, 1, 7);
loadBtn.textPainter.setVPaddingPercent(20); loadBtn.textPainter.setVPaddingPercent(20);

@ -48,7 +48,7 @@ public class ScreenStory extends RogueScreen implements MouseButtonHandler {
@Override @Override
public void run() public void run()
{ {
img.setTxQuad(Res.getTxQuad(nextImg)); img.setTxQuad(Res.txQuad(nextImg));
if (nextT1 != null) tp1.setText(nextT1); if (nextT1 != null) tp1.setText(nextT1);
if (nextT2 != null) tp2.setText(nextT2); if (nextT2 != null) tp2.setText(nextT2);
@ -106,7 +106,7 @@ public class ScreenStory extends RogueScreen implements MouseButtonHandler {
{ {
super(screen); 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."); "Space / click to proceed.");
help.setRect(root.bottomEdge().growUp(root.height().perc(4))); help.setRect(root.bottomEdge().growUp(root.height().perc(4)));
help.setVPaddingPercent(5); help.setVPaddingPercent(5);
@ -119,14 +119,14 @@ public class ScreenStory extends RogueScreen implements MouseButtonHandler {
final LinearLayout ll = new LinearLayout(root, AlignX.CENTER); final LinearLayout ll = new LinearLayout(root, AlignX.CENTER);
rl.add(ll, 7); rl.add(ll, 7);
img = new ImagePainter(Res.getTxQuad("story_1")); img = new ImagePainter(Res.txQuad("story_1"));
ll.add(img); 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); rl.add(tp1);
tp1.setVPaddingPercent(19); 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); rl.add(tp2);
tp2.setVPaddingPercent(19); tp2.setVPaddingPercent(19);

@ -37,7 +37,7 @@ public class EntityRendererMobLR extends EntityRenderer {
public EntityRendererMobLR(Entity entity, String sheetKey) public EntityRendererMobLR(Entity entity, String sheetKey)
{ {
this.entity = entity; this.entity = entity;
this.sheet = Res.getTxSheet(sheetKey); this.sheet = Res.txSheet(sheetKey);
} }

@ -30,7 +30,7 @@ public class WorldConsoleRenderer extends BaseComponent {
public WorldConsoleRenderer(Num rowHeight) public WorldConsoleRenderer(Num rowHeight)
{ {
this.rowHeight = 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); final Num itmsize = height().perc(25).min(256).max(16);

@ -21,7 +21,7 @@ public class ItemHeartPiece extends Item {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.heart")); return new QuadItemRenderer(this, Res.txQuad("item.heart"));
} }

@ -19,7 +19,7 @@ public class ItemCheese extends ItemBaseFood {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.cheese")); return new QuadItemRenderer(this, Res.txQuad("item.cheese"));
} }

@ -19,7 +19,7 @@ public class ItemMeat extends ItemBaseFood {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.meat")); return new QuadItemRenderer(this, Res.txQuad("item.meat"));
} }

@ -19,7 +19,7 @@ public class ItemSandwich extends ItemBaseFood {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.sandwich")); return new QuadItemRenderer(this, Res.txQuad("item.sandwich"));
} }

@ -19,7 +19,7 @@ public class ItemAxe extends ItemBaseWeapon {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.axe")); return new QuadItemRenderer(this, Res.txQuad("item.axe"));
} }

@ -19,7 +19,7 @@ public class ItemBone extends ItemBaseWeapon {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.bone")); return new QuadItemRenderer(this, Res.txQuad("item.bone"));
} }

@ -19,7 +19,7 @@ public class ItemClub extends ItemBaseWeapon {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.club")); return new QuadItemRenderer(this, Res.txQuad("item.club"));
} }

@ -19,7 +19,7 @@ public class ItemKnife extends ItemBaseWeapon {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.knife")); return new QuadItemRenderer(this, Res.txQuad("item.knife"));
} }

@ -19,7 +19,7 @@ public class ItemRock extends ItemBaseWeapon {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.stone")); return new QuadItemRenderer(this, Res.txQuad("item.stone"));
} }

@ -19,7 +19,7 @@ public class ItemSword extends ItemBaseWeapon {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.sword")); return new QuadItemRenderer(this, Res.txQuad("item.sword"));
} }

@ -19,7 +19,7 @@ public class ItemTwig extends ItemBaseWeapon {
@Override @Override
protected ItemRenderer makeRenderer() protected ItemRenderer makeRenderer()
{ {
return new QuadItemRenderer(this, Res.getTxQuad("item.twig")); return new QuadItemRenderer(this, Res.txQuad("item.twig"));
} }

@ -46,24 +46,24 @@ public abstract class TileRenderer implements Updateable {
this.tile = tile; this.tile = tile;
if (!inited) { if (!inited) {
SH_N = Res.getTxQuad("tile.shadow.n"); SH_N = Res.txQuad("tile.shadow.n");
SH_S = Res.getTxQuad("tile.shadow.s"); SH_S = Res.txQuad("tile.shadow.s");
SH_E = Res.getTxQuad("tile.shadow.e"); SH_E = Res.txQuad("tile.shadow.e");
SH_W = Res.getTxQuad("tile.shadow.w"); SH_W = Res.txQuad("tile.shadow.w");
SH_NW = Res.getTxQuad("tile.shadow.nw"); SH_NW = Res.txQuad("tile.shadow.nw");
SH_NE = Res.getTxQuad("tile.shadow.ne"); SH_NE = Res.txQuad("tile.shadow.ne");
SH_SW = Res.getTxQuad("tile.shadow.sw"); SH_SW = Res.txQuad("tile.shadow.sw");
SH_SE = Res.getTxQuad("tile.shadow.se"); SH_SE = Res.txQuad("tile.shadow.se");
UFOG_N = Res.getTxQuad("tile.ufog.n"); UFOG_N = Res.txQuad("tile.ufog.n");
UFOG_S = Res.getTxQuad("tile.ufog.s"); UFOG_S = Res.txQuad("tile.ufog.s");
UFOG_E = Res.getTxQuad("tile.ufog.e"); UFOG_E = Res.txQuad("tile.ufog.e");
UFOG_W = Res.getTxQuad("tile.ufog.w"); UFOG_W = Res.txQuad("tile.ufog.w");
UFOG_NW = Res.getTxQuad("tile.ufog.nw"); UFOG_NW = Res.txQuad("tile.ufog.nw");
UFOG_NE = Res.getTxQuad("tile.ufog.ne"); UFOG_NE = Res.txQuad("tile.ufog.ne");
UFOG_SW = Res.getTxQuad("tile.ufog.sw"); UFOG_SW = Res.txQuad("tile.ufog.sw");
UFOG_SE = Res.getTxQuad("tile.ufog.se"); UFOG_SE = Res.txQuad("tile.ufog.se");
UFOG_FULL = Res.getTxQuad("tile.ufog.full"); UFOG_FULL = Res.txQuad("tile.ufog.full");
inited = true; inited = true;
} }
} }

@ -19,7 +19,7 @@ public class TileBrickChest extends TileBaseChest {
@Override @Override
protected TileRenderer makeRenderer() 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"));
} }
} }

@ -13,9 +13,9 @@ public class TileBrickDoor extends TileBaseDoor {
//@formatter:off //@formatter:off
super( super(
model, model,
Res.getTxSheet("tile.brick.door.closed"), // LOCKED Res.txSheet("tile.brick.door.closed"), // LOCKED
Res.getTxSheet("tile.brick.door.closed"), Res.txSheet("tile.brick.door.closed"),
Res.getTxSheet("tile.brick.door.open") Res.txSheet("tile.brick.door.open")
); );
//@formatter:on //@formatter:on
} }

@ -19,7 +19,7 @@ public class TileBrickEntrance extends TileBaseEntrance {
@Override @Override
protected TileRenderer makeRenderer() protected TileRenderer makeRenderer()
{ {
return new OneFrameTileRenderer(this, Res.getTxQuad("tile.brick.stairs.up")); return new OneFrameTileRenderer(this, Res.txQuad("tile.brick.stairs.up"));
} }
} }

@ -19,7 +19,7 @@ public class TileBrickExit extends TileBaseExit {
@Override @Override
protected TileRenderer makeRenderer() protected TileRenderer makeRenderer()
{ {
return new OneFrameTileRenderer(this, Res.getTxQuad("tile.brick.stairs.down")); return new OneFrameTileRenderer(this, Res.txQuad("tile.brick.stairs.down"));
} }
} }

@ -10,7 +10,7 @@ public class TileBrickFloor extends TileBaseFloor {
public TileBrickFloor(TileModel model) public TileBrickFloor(TileModel model)
{ {
super(model, Res.getTxSheet("tile.brick.floor")); super(model, Res.txSheet("tile.brick.floor"));
} }
} }

@ -10,7 +10,7 @@ public class TileBrickPassage extends TileBasePassage {
public TileBrickPassage(TileModel model) public TileBrickPassage(TileModel model)
{ {
super(model, Res.getTxSheet("tile.brick.passage")); super(model, Res.txSheet("tile.brick.passage"));
} }
} }

@ -13,9 +13,9 @@ public class TileBrickSecretDoor extends TileBaseSecretDoor {
//@formatter:off //@formatter:off
super( super(
model, model,
Res.getTxSheet("tile.brick.door.secret"), Res.txSheet("tile.brick.door.secret"),
Res.getTxSheet("tile.brick.door.closed"), Res.txSheet("tile.brick.door.closed"),
Res.getTxSheet("tile.brick.door.open") Res.txSheet("tile.brick.door.open")
); );
//@formatter:on //@formatter:on

@ -10,7 +10,7 @@ public class TileBrickWall extends TileBaseWall {
public TileBrickWall(TileModel model) public TileBrickWall(TileModel model)
{ {
super(model, Res.getTxSheet("tile.brick.wall")); super(model, Res.txSheet("tile.brick.wall"));
} }
} }

Loading…
Cancel
Save