Refactoring VI
This commit is contained in:
parent
2569256f2c
commit
d2f0f967c3
@ -84,5 +84,8 @@ public class ConfigDef {
|
||||
}
|
||||
throw new OpenEggbertException("Could not convert String to boolean: " + string);
|
||||
}
|
||||
public String toPropertiesText() {
|
||||
throw new OpenEggbertException("Not yet implemented.");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public enum GameDirectoryType implements IsThisFeatureEnabledForStrictMode{
|
||||
MOD(false),
|
||||
;
|
||||
@Getter
|
||||
private boolean enabledInCaseOfStrictMode;
|
||||
private final boolean enabledInCaseOfStrictMode;
|
||||
|
||||
GameDirectoryType(boolean enabledInCaseOfStrictMode) {
|
||||
this.enabledInCaseOfStrictMode = enabledInCaseOfStrictMode;
|
||||
|
@ -0,0 +1,38 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Open Eggbert: Free recreation of the computer game Speedy Eggbert.
|
||||
// Copyright (C) 2024 the original author or authors.
|
||||
//
|
||||
// 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
|
||||
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
package com.openeggbert.core.gamespace;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public class ImageDirectories {
|
||||
public static final ImageDirectories DEFAULT = new ImageDirectories(GameDirectoryType.IMAGE08, GameDirectoryType.IMAGE16, null, null);
|
||||
private final GameDirectoryType image08;
|
||||
private final GameDirectoryType image16;
|
||||
private final GameDirectoryType image24;
|
||||
private final GameDirectoryType image24x2;
|
||||
|
||||
}
|
@ -33,9 +33,9 @@ public enum ImageFormat implements IsThisFeatureEnabledForStrictMode{
|
||||
JPEG("jpeg", false)
|
||||
;
|
||||
@Getter
|
||||
private String fileExtension;
|
||||
private final String fileExtension;
|
||||
@Getter
|
||||
private boolean enabledInCaseOfStrictMode;
|
||||
private final boolean enabledInCaseOfStrictMode;
|
||||
|
||||
ImageFormat(String fileExtensionIn, boolean enabledInCaseOfStrictMode) {
|
||||
this.fileExtension = fileExtensionIn;
|
||||
|
@ -29,7 +29,7 @@ import com.openeggbert.core.configuration.IsThisFeatureEnabledForStrictMode;
|
||||
public enum ImageResolution implements IsThisFeatureEnabledForStrictMode{
|
||||
NORMAL(true), DOUBLE(false);
|
||||
@Getter
|
||||
private boolean enabledInCaseOfStrictMode;
|
||||
private final boolean enabledInCaseOfStrictMode;
|
||||
ImageResolution(boolean enabledInCaseOfStrictMode) {
|
||||
this.enabledInCaseOfStrictMode = enabledInCaseOfStrictMode;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
package com.openeggbert.core.mod;
|
||||
package com.openeggbert.core.music;
|
||||
|
||||
/**
|
||||
*
|
@ -19,6 +19,8 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
package com.openeggbert.core.release;
|
||||
|
||||
import com.openeggbert.core.gamespace.GameDirectoryType;
|
||||
import com.openeggbert.core.gamespace.ImageDirectories;
|
||||
import com.openeggbert.core.utils.FileNameCaseType;
|
||||
import lombok.Getter;
|
||||
|
||||
@ -27,7 +29,7 @@ import lombok.Getter;
|
||||
* @author robertvokac
|
||||
*/
|
||||
public enum Release {
|
||||
SPEEDY_BLUPI_DEMO(ReleaseType.BLUPI, ReleaseVersion.DEMO, Publisher.EPSITEC_SA, "SBD"),
|
||||
SPEEDY_BLUPI_DEMO(ReleaseType.BLUPI, ReleaseVersion.DEMO, Publisher.EPSITEC_SA, "SBD", FileNameCaseType.CAPITALIZATION, new ImageDirectories(GameDirectoryType.IMAGE, null, null, null)),
|
||||
SPEEDY_BLUPI_I(ReleaseType.BLUPI, ReleaseVersion.ONE, Publisher.EPSITEC_SA, "SBI"),
|
||||
SPEEDY_BLUPI_II(ReleaseType.BLUPI, ReleaseVersion.TWO, Publisher.EPSITEC_SA, "SBII"),
|
||||
SPEEDY_EGGBERT_DEMO(ReleaseType.EGGBERT, ReleaseVersion.DEMO, Publisher.E_GAMES, "SED"),
|
||||
@ -35,7 +37,7 @@ public enum Release {
|
||||
SPEEDY_EGGBERT_2(ReleaseType.EGGBERT, ReleaseVersion.TWO, Publisher.E_GAMES, "SE2"),
|
||||
SPEEDY_EGGBERT_VALUEWARE(ReleaseType.EGGBERT, ReleaseVersion.VALUEWARE, Publisher.E_GAMES, "SEW"),
|
||||
SPEEDY_BLUPI_FOR_WINDOWS_PHONE(ReleaseType.BLUPI, ReleaseVersion.WINDOWS_PHONE, Publisher.DADA_GAMES, "SBP"),
|
||||
OPEN_EGGBERT_3(ReleaseType.OPEN, ReleaseVersion.THREE, Publisher.OPEN_EGGBERT, "OE3");
|
||||
OPEN_EGGBERT_3(ReleaseType.OPEN, ReleaseVersion.THREE, Publisher.OPEN_EGGBERT, "OE3", FileNameCaseType.UPPERCASE, new ImageDirectories(GameDirectoryType.IMAGE08, GameDirectoryType.IMAGE16, GameDirectoryType.IMAGE24, GameDirectoryType.IMAGE24X2));
|
||||
@Getter
|
||||
private final ReleaseType releaseType;
|
||||
@Getter
|
||||
@ -44,14 +46,24 @@ public enum Release {
|
||||
private final Publisher publisher;
|
||||
@Getter
|
||||
private final String abbreviation;
|
||||
@Getter
|
||||
private final ImageDirectories imageDirectories;
|
||||
|
||||
@Getter
|
||||
public static final Release[] ALL_RELEASES = Release.values();
|
||||
|
||||
@Getter
|
||||
private FileNameCaseType caseModeForDirectories;
|
||||
private Release(ReleaseType releaseType, ReleaseVersion releaseVersion, Publisher publisher, String abbreviation) {
|
||||
this(releaseType, releaseVersion, publisher, abbreviation, FileNameCaseType.UPPERCASE, ImageDirectories.DEFAULT);
|
||||
}
|
||||
|
||||
private Release(ReleaseType releaseType, ReleaseVersion releaseVersion, Publisher publisher, String abbreviation, FileNameCaseType caseModeForDirectories, ImageDirectories imageDirectories) {
|
||||
this.releaseType = releaseType;
|
||||
this.releaseVersion = releaseVersion;
|
||||
this.publisher = publisher;
|
||||
this.abbreviation = abbreviation;
|
||||
this.caseModeForDirectories = caseModeForDirectories;
|
||||
this.imageDirectories = imageDirectories;
|
||||
}
|
||||
|
||||
public String createLabel() {
|
||||
|
@ -0,0 +1,29 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Open Eggbert: Free recreation of the computer game Speedy Eggbert.
|
||||
// Copyright (C) 2024 the original author or authors.
|
||||
//
|
||||
// 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
|
||||
// <https://www.gnu.org/licenses/> or write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
package com.openeggbert.core.screen;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robertvokac
|
||||
*/
|
||||
public class ScreenSheet {
|
||||
|
||||
}
|
@ -18,7 +18,7 @@
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
package com.openeggbert.core.mod;
|
||||
package com.openeggbert.core.sound;
|
||||
|
||||
/**
|
||||
*
|
@ -23,7 +23,6 @@ import com.badlogic.gdx.Application;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.openeggbert.core.main.OpenEggbertException;
|
||||
import com.openeggbert.core.utils.OpenEggbertUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
Reference in New Issue
Block a user