Fix several lints and warnings

This commit is contained in:
Lonami Exo 2019-09-05 16:44:07 +02:00
parent 5c2aeb6e91
commit 5e5cfc3d5f
42 changed files with 70 additions and 63 deletions

View file

@ -1,16 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.lonami.klooni"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:targetSdkVersion="25" />
xmlns:tools="http://schemas.android.com/tools"
package="dev.lonami.klooni">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/GdxTheme" >
android:theme="@style/GdxTheme"
android:fullBackupContent="@xml/backup_rules"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name="dev.lonami.klooni.AndroidLauncher"
android:label="@string/app_name"

View file

@ -1,6 +1,6 @@
android {
buildToolsVersion "25.0.3"
compileSdkVersion 25
compileSdkVersion 28
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
@ -19,6 +19,7 @@ android {
}
defaultConfig {
applicationId "dev.lonami.klooni"
//noinspection MinSdkTooLow
minSdkVersion 8
targetSdkVersion 28

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
</full-backup-content>

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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
@ -33,7 +33,7 @@ import java.util.Map;
import dev.lonami.klooni.effects.EvaporateEffectFactory;
import dev.lonami.klooni.effects.ExplodeEffectFactory;
import dev.lonami.klooni.effects.SpinEffectFactory;
import dev.lonami.klooni.effects.VanishEffectFatory;
import dev.lonami.klooni.effects.VanishEffectFactory;
import dev.lonami.klooni.effects.WaterdropEffectFactory;
import dev.lonami.klooni.interfaces.IEffectFactory;
import dev.lonami.klooni.screens.MainMenuScreen;
@ -49,7 +49,7 @@ public class Klooni extends Game {
// ordered list of effects. index 0 will get default if VanishEffectFactory is removed from list
public final static IEffectFactory[] EFFECTS = {
new VanishEffectFatory(),
new VanishEffectFactory(),
new WaterdropEffectFactory(),
new EvaporateEffectFactory(),
new SpinEffectFactory(),

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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
@ -149,8 +149,9 @@ public class EffectCard extends ShopCard {
@Override
public void performBuy() {
Klooni.buyEffect(effect);
use();
if (Klooni.buyEffect(effect)) {
use();
}
}
//endregion

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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
@ -33,7 +33,7 @@ public class ThemeCard extends ShopCard {
private final Theme theme;
private final Texture background;
private final static int colorsUsed[][] = {
private final static int[][] colorsUsed = {
{0, 7, 7},
{8, 7, 3},
{8, 8, 3}
@ -106,8 +106,9 @@ public class ThemeCard extends ShopCard {
@Override
public void performBuy() {
Klooni.buyTheme(theme);
use();
if (Klooni.buyTheme(theme)) {
use();
}
}
//endregion

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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
@ -75,7 +75,7 @@ public class ExplodeEffectFactory implements IEffectFactory {
this.pos = pos.cpy().add(this.size * 0.5f, this.size * 0.5f);
}
public void draw(final Batch batch, final float dt) {
void draw(final Batch batch, final float dt) {
vel.add(acc.x * dt, acc.y * dt).scl(0.99f);
pos.add(vel.x * dt, vel.y * dt);
Cell.draw(color, batch, pos.x, pos.y, size);

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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
@ -29,7 +29,7 @@ import dev.lonami.klooni.interfaces.IEffect;
import dev.lonami.klooni.interfaces.IEffectFactory;
public class VanishEffectFatory implements IEffectFactory {
public class VanishEffectFactory implements IEffectFactory {
@Override
public String getName() {
return "vanish";

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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
@ -41,7 +41,7 @@ public class Piece {
private final int rotation;
public final int cellCols, cellRows;
private final boolean shape[][];
private final boolean[][] shape;
// Default arbitrary value
float cellSize = 10f;

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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
@ -22,18 +22,18 @@ import com.badlogic.gdx.math.Vector2;
import dev.lonami.klooni.game.Cell;
/**
* IEffectEfactory interface has to be implemented for each effect.
* IEffectFactory interface has to be implemented for each effect.
* <p>
* It tells the name and the price of the effect and will create it, when needed.
*
* @see IEffect
*/
public interface IEffectFactory {
public String getName();
String getName();
public String getDisplay();
String getDisplay();
public int getPrice();
int getPrice();
public IEffect create(final Cell deadCell, final Vector2 culprit);
IEffect create(final Cell deadCell, final Vector2 culprit);
}

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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
@ -119,7 +119,9 @@ class GameScreen implements Screen, InputProcessor, BinSerializable {
if (gameMode == GAME_MODE_SCORE) {
if (loadSave) {
// The user might have a previous game. If this is the case, load it
tryLoad();
if (!tryLoad()) {
System.err.println("failed to load previous games");
}
} else {
// Ensure that there is no old save, we don't want to load it, thus delete it
deleteSave();

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -4,7 +4,7 @@ sourceCompatibility = 1.6
sourceSets.main.java.srcDirs = [ "src/" ]
project.ext.mainClassName = "dev.lonami.klooni.desktop.DesktopLauncher"
project.ext.assetsDir = new File("../android/assets");
project.ext.assetsDir = new File("../android/assets")
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
@ -18,7 +18,7 @@ task dist(type: Jar) {
from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}}
from files(project.assetsDir);
from files(project.assetsDir)
manifest {
attributes 'Main-Class': project.mainClassName

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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

View file

@ -1,6 +1,6 @@
/*
1010! Klooni, a free customizable puzzle game for Android and Desktop
Copyright (C) 2017 Lonami Exo | LonamiWebs
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
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