Skip to content

Commit

Permalink
v1.4.0: cleaned up some TODOs and FIXMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
00-Evan committed Sep 7, 2022
1 parent ec31035 commit 64d1b93
Show file tree
Hide file tree
Showing 22 changed files with 11 additions and 107 deletions.
2 changes: 0 additions & 2 deletions SPD-classes/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions SPD-classes/src/main/java/com/watabou/glwrap/Matrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public boolean buttonUp(Controller controller, int buttonCode) {
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);
Expand Down
6 changes: 3 additions & 3 deletions SPD-classes/src/main/java/com/watabou/noosa/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ public void resize(int width, int height) {
}
}

//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
Expand Down
4 changes: 1 addition & 3 deletions SPD-classes/src/main/java/com/watabou/noosa/audio/Music.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ public synchronized void playTracks( String[] tracks, float[] chances, boolean s
@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
Expand All @@ -139,7 +138,7 @@ public void run() {
}
}.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);
}
}
Expand Down Expand Up @@ -202,7 +201,6 @@ public synchronized void resume() {
}
}

//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();
Expand Down
1 change: 0 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ sourceCompatibility = targetCompatibility = appJavaCompatibility

dependencies {
api project(':SPD-classes')
//TODO might be nice to remove this, should decide
implementation project(':services')
}
1 change: 1 addition & 0 deletions core/src/main/assets/messages/items/items.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,6 @@ public static void storeTalentsInBundle( Bundle bundle, Hero hero ){
}

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()){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ public int value() {

@Override
public String textPrompt() {
//FIXME give this its own prompt string
return Messages.get(MagesStaff.class, "prompt");
return Messages.get(this, "prompt");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ public ArrayList<String> actions(Hero hero ) {
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 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,16 +490,6 @@ public ArrayList<Room> rooms() {
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) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void paint(Level level) {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,10 @@ public void draw() {
}
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.
Expand Down Expand Up @@ -1080,7 +1080,6 @@ public static void plantSeed( int cell ) {
}
}

//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 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ public synchronized void updateMapCell(int cell) {
super.updateMapCell(cell);
return;
}

//TODO should doors be considered? currently the blocking is a bit permissive around doors

//non-wall tiles
if (!wall(cell)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ private static class BuffButton extends IconButton {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ public void enable( boolean value ) {
}

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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ protected synchronized void layout() {

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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ public boolean onSignal( KeyEvent event ) {
}
}

//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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,6 @@ public static void add_v1_1_Changes( ArrayList<ChangeInfo> changeInfos ) {

"_-_ 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" +
Expand Down

0 comments on commit 64d1b93

Please sign in to comment.