v1.4.0: cleaned up some TODOs and FIXMEs

This commit is contained in:
Evan Debenham
2022-08-06 13:03:11 -04:00
parent ec310353a8
commit 64d1b93862
22 changed files with 11 additions and 107 deletions

View File

@@ -4,8 +4,6 @@ apply plugin: 'java-library'
sourceCompatibility = targetCompatibility = appJavaCompatibility
dependencies {
//TODO migrate this to implementation from api
//in order to do this I have to remove 100% of libGDX API access from core
api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.badlogicgames.gdx-controllers:gdx-controllers-core:$gdxControllersVersion"
implementation "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"

View File

@@ -21,8 +21,6 @@
package com.watabou.glwrap;
//TODO libGDX offer matrix classes as well, which might give better performance.
//should investigate using them
public class Matrix {
public static final float G2RAD = 0.01745329251994329576923690768489f;

View File

@@ -110,7 +110,6 @@ public class ControllerHandler implements ControllerListener {
private float L2Trigger = 0f;
private float R2Trigger = 0f;
//FIXME these axis mappings seem to be wrong on Android (and iOS?) in some cases
@Override
public boolean axisMoved(Controller controller, int axisCode, float value) {
setControllerType(controller);

View File

@@ -146,9 +146,9 @@ public class Game implements ApplicationListener {
}
}
//FIXME this is a temporary workaround to improve start times on android (first frame is 'cheated' and skips rendering)
//this is partly to improve stats on google play, and partly to try and diagnose what the cause of slow loading times is
//ultimately once the cause is found it should be fixed and this should no longer be needed
//FIXME this is a hack to improve start times on android (first frame is 'cheated' and skips rendering)
//This is mainly to improve stats on google play, as lots of texture refreshing leads to slow warm starts
//Would be nice to accomplish this goal in a less hacky way
private boolean justResumed = true;
@Override

View File

@@ -130,7 +130,6 @@ public enum Music {
@Override
public void onCompletion(com.badlogic.gdx.audio.Music music) {
//we do this in a separate thread to avoid graphics hitching while the music is prepared
//FIXME this fixes graphics stutter but there's still some audio stutter, perhaps keep more than 1 player alive?
if (!DeviceCompat.isDesktop()) {
new Thread() {
@Override
@@ -139,7 +138,7 @@ public enum Music {
}
}.start();
} else {
//don't use a separate thread on desktop, causes errors and makes no performance difference(?)
//don't use a separate thread on desktop, causes errors and makes no performance difference
playNextTrack(music);
}
}
@@ -202,7 +201,6 @@ public enum Music {
}
}
//TODO do we need to dispose every player? Maybe just stop them and keep an LRU cache of 2 or 3?
public synchronized void stop() {
if (player != null) {
player.dispose();

View File

@@ -5,6 +5,5 @@ sourceCompatibility = targetCompatibility = appJavaCompatibility
dependencies {
api project(':SPD-classes')
//TODO might be nice to remove this, should decide
implementation project(':services')
}

View File

@@ -1725,6 +1725,7 @@ items.ankh.desc=This ancient symbol of immortality grants the ability to return
items.ankh.desc_blessed=This ancient symbol of immortality grants the ability to return to life after death. The ankh has been blessed and is now much stronger. The Ankh will sacrifice itself to save you in a moment of deadly peril.
items.arcaneresin.name=arcane resin
items.arcaneresin.prompt=Select a wand
items.arcaneresin.ac_apply=APPLY
items.arcaneresin.level_too_high=That wand is too powerful for resin to improve.
items.arcaneresin.not_enough=You don't have enough resin for that!

View File

@@ -706,7 +706,6 @@ public enum Talent {
}
public static void restoreTalentsFromBundle( Bundle bundle, Hero hero ){
//TODO restore replacements
if (bundle.contains("replacements")){
Bundle replacements = bundle.getBundle("replacements");
for (String key : replacements.getKeys()){

View File

@@ -92,8 +92,7 @@ public class ArcaneResin extends Item {
@Override
public String textPrompt() {
//FIXME give this its own prompt string
return Messages.get(MagesStaff.class, "prompt");
return Messages.get(this, "prompt");
}
@Override

View File

@@ -57,8 +57,7 @@ public class EnergyCrystal extends Item {
public boolean doPickUp(Hero hero, int pos) {
Dungeon.energy += quantity;
//TODO Statistics.goldCollected += quantity;
//Badges.validateGoldCollected();
//TODO track energy collected maybe? We do already track recipes crafted though..
GameScene.pickUp( this, pos );
hero.sprite.showStatus( 0x44CCFF, TXT_VALUE, quantity );

View File

@@ -490,16 +490,6 @@ public abstract class RegularLevel extends Level {
return new ArrayList<>(rooms);
}
//FIXME pit rooms shouldn't be problematic enough to warrant this
public boolean hasPitRoom(){
for (Room r : rooms) {
if (r instanceof PitRoom) {
return true;
}
}
return false;
}
protected Room randomRoom( Class<?extends Room> type ) {
Random.shuffle( rooms );
for (Room r : rooms) {

View File

@@ -1,66 +0,0 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2022 Evan Debenham
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
import com.watabou.utils.Point;
//import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.SacrificialFire;
public class AltarRoom extends SpecialRoom {
public void paint( Level level ) {
Painter.fill( level, this, Terrain.WALL );
Painter.fill( level, this, 1, Dungeon.bossLevel( Dungeon.depth + 1 ) ? Terrain.HIGH_GRASS : Terrain.CHASM );
Point c = center();
Door door = entrance();
if (door.x == left || door.x == right) {
Point p = Painter.drawInside( level, this, door, Math.abs( door.x - c.x ) - 2, Terrain.EMPTY_SP );
for (; p.y != c.y; p.y += p.y < c.y ? +1 : -1) {
Painter.set( level, p, Terrain.EMPTY_SP );
}
} else {
Point p = Painter.drawInside( level, this, door, Math.abs( door.y - c.y ) - 2, Terrain.EMPTY_SP );
for (; p.x != c.x; p.x += p.x < c.x ? +1 : -1) {
Painter.set( level, p, Terrain.EMPTY_SP );
}
}
Painter.fill( level, c.x - 1, c.y - 1, 3, 3, Terrain.EMBERS );
Painter.set( level, c, Terrain.PEDESTAL );
//TODO: find some use for sacrificial fire... but not the vanilla one. scroll of wipe out is too strong.
/*SacrificialFire fire = (SacrificialFire)level.blobs.get( SacrificialFire.class );
if (fire == null) {
fire = new SacrificialFire();
}
fire.seed( c.x + c.y * Level.WIDTH, 5 + Dungeon.depth * 5 );
level.blobs.put( SacrificialFire.class, fire );*/
door.set( Door.Type.EMPTY );
}
}

View File

@@ -57,7 +57,7 @@ public class StudyRoom extends StandardRoom {
door.set( Door.Type.REGULAR );
}
//TODO add support for giant size as well
//TODO add support for giant size as well?
if (sizeCat == SizeCategory.LARGE){
int pillarW = (width()-7)/2;
int pillarH = (height()-7)/2;

View File

@@ -445,10 +445,10 @@ public class GameScene extends PixelScene {
}
Dungeon.droppedItems.remove( Dungeon.depth );
}
//pre-1.1.0 saves, including all logic surrounding Dungeon.portedItems
ArrayList<Item> ported = Dungeon.portedItems.get( Dungeon.depth );
if (ported != null){
//TODO currently items are only ported to boss rooms, so this works well
//might want to have a 'near entrance' function if items can be ported elsewhere
int pos;
//try to find a tile with no heap, otherwise just stick items onto a heap.
@@ -1080,7 +1080,6 @@ public class GameScene extends PixelScene {
}
}
//todo this doesn't account for walls right now
public static void discoverTile( int pos, int oldValue ) {
if (scene != null) {
scene.tiles.discover( pos, oldValue );

View File

@@ -36,7 +36,6 @@ public class SpectralNecromancerSprite extends MobSprite {
private Animation charging;
private Emitter summoningBones;
//TODO sprite is still a bit of a WIP
public SpectralNecromancerSprite(){
super();

View File

@@ -72,8 +72,6 @@ public class WallBlockingTilemap extends Tilemap {
super.updateMapCell(cell);
return;
}
//TODO should doors be considered? currently the blocking is a bit permissive around doors
//non-wall tiles
if (!wall(cell)) {

View File

@@ -36,7 +36,6 @@ public class BuffIcon extends Image {
private final boolean large;
//TODO maybe roll fading behaviour into this too?
public BuffIcon(Buff buff, boolean large){
super( large ? Assets.Interfaces.BUFFS_LARGE : Assets.Interfaces.BUFFS_SMALL );
this.large = large;

View File

@@ -220,7 +220,6 @@ public class BuffIndicator extends Component {
public Image grey; //only for small
public BitmapText text; //only for large
//TODO for large buffs there is room to have text instead of fading
public BuffButton( Buff buff, boolean large ){
super( new BuffIcon(buff, large));
this.buff = buff;

View File

@@ -271,7 +271,6 @@ public class QuickSlotButton extends Button {
}
private void enableSlot() {
//TODO check if item persists!
slot.enable(Dungeon.quickslot.isNonePlaceholder( slotNum )
&& (Dungeon.hero.buff(LostInventory.class) == null || Dungeon.quickslot.getItem(slotNum).keptThoughLostInvent));
}

View File

@@ -239,7 +239,7 @@ public class RenderedTextBlock extends Component {
if ((x - this.x) > width) width = (x - this.x);
//TODO spacing currently doesn't factor in halfwidth and fullwidth characters
//Note that spacing currently doesn't factor in halfwidth and fullwidth characters
//(e.g. Ideographic full stop)
x -= 0.5f;

View File

@@ -201,8 +201,6 @@ public class Window extends Group implements Signal.Listener<KeyEvent> {
}
}
//TODO currently always eats the key event as windows always take full focus
// if they are ever made more flexible, might not want to do this in all cases
return true;
}

View File

@@ -562,7 +562,6 @@ public class v1_X_Changes {
"_-_ Updated translations and translator credits"));
//TODO condense to two bugfix entries
changes.addButton(new ChangeButton(new Image(Assets.Sprites.SPINNER, 144, 0, 16, 16), Messages.get(ChangesScene.class, "bugfixes") + " 1",
"Fixed:\n" +
"_-_ Various minor/rare visual and textual errors\n" +