Refactoring IV

This commit is contained in:
Robert Vokac 2024-08-16 16:27:02 +02:00
parent 081873a202
commit f6981ed649
No known key found for this signature in database
GPG Key ID: C459E1E4B4A986BB
63 changed files with 119 additions and 255 deletions

View File

@ -17,8 +17,9 @@
// <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.entity.common;
package com.openeggbert.core.configuration;
import com.openeggbert.core.main.OpenEggbertException;
import com.openeggbert.core.utils.OpenEggbertUtils;
import java.util.HashMap;
import java.util.Map;

View File

@ -17,9 +17,9 @@
// <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.entity.common;
package com.openeggbert.core.configuration;
import com.openeggbert.core.compatibility.Release;
import com.openeggbert.core.release.Release;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

View File

@ -17,7 +17,7 @@
// <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.compatibility;
package com.openeggbert.core.configuration;
/**
*

View File

@ -17,13 +17,12 @@
// <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.utils;
package com.openeggbert.core.configuration;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Graphics;
import com.badlogic.gdx.Graphics.DisplayMode;
import com.openeggbert.core.entity.common.ConfigDef;
import com.openeggbert.core.entity.common.OpenEggbertException;
import com.openeggbert.core.main.OpenEggbertException;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

View File

@ -19,7 +19,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.compatibility;
package com.openeggbert.core.configuration;
import lombok.Getter;

View File

@ -19,7 +19,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.compatibility;
package com.openeggbert.core.configuration;
/**
*

View File

@ -1,35 +0,0 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// 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.entity.common;
import com.openeggbert.core.compatibility.Release;
/**
*
* @author robertvokac
*/
public class Utils {
private Utils() {
//Instantiate not needed.
}
public static final Release[] ALL_FEATURE_LEVELS = Release.values();
}

View File

@ -1,30 +0,0 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// 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.entity.elements;
/**
*
* @author robertvokac
*/
public class Buldozer {
}

View File

@ -1,30 +0,0 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// 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.entity.elements;
/**
*
* @author robertvokac
*/
public class Eggbert {
}

View File

@ -19,9 +19,9 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.common;
package com.openeggbert.core.game;
import com.openeggbert.core.compatibility.Release;
import com.openeggbert.core.release.Release;
import lombok.Getter;
/**
@ -30,7 +30,7 @@ import lombok.Getter;
*/
public enum Cheat {
MEGABLUPI(Utils.ALL_FEATURE_LEVELS);
MEGABLUPI(Release.ALL_RELEASES);
//todo//todo//todo//todo
@Getter

View File

@ -19,7 +19,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.common;
package com.openeggbert.core.game;
/**
*

View File

@ -19,7 +19,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.common;
package com.openeggbert.core.game;
/**
*

View File

@ -19,7 +19,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.common;
package com.openeggbert.core.game;
/**
*

View File

@ -17,8 +17,9 @@
// <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.compatibility;
package com.openeggbert.core.gamespace;
import com.openeggbert.core.configuration.StrictMode;
import lombok.Getter;
/**

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.common;
package com.openeggbert.core.gamespace;
/**
*

View File

@ -17,9 +17,9 @@
// <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.entity.common;
package com.openeggbert.core.gamespace;
import com.openeggbert.core.compatibility.Release;
import com.openeggbert.core.release.Release;
import lombok.AllArgsConstructor;
import lombok.Data;

View File

@ -17,8 +17,9 @@
// <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.compatibility;
package com.openeggbert.core.image;
import com.openeggbert.core.configuration.StrictMode;
import lombok.Getter;
/**

View File

@ -17,8 +17,9 @@
// <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.compatibility;
package com.openeggbert.core.image;
import com.openeggbert.core.configuration.StrictMode;
import lombok.Getter;
/**
@ -35,7 +36,7 @@ public enum ImageResolution implements StrictMode{
@Override
public boolean isEnabledInCaseOfStrictMode() {
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
return enabledInCaseOfStrictMode;
}
}

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.common;
package com.openeggbert.core.image;
/**

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.common;
package com.openeggbert.core.main;
/**
*

View File

@ -31,15 +31,15 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.utils.ObjectMap;
import com.badlogic.gdx.utils.viewport.Viewport;
import com.openeggbert.core.entity.common.ConfigDef;
import com.openeggbert.core.entity.common.GameSpace;
import com.openeggbert.core.mods.Mod;
import com.openeggbert.core.mods.ModIdentification;
import com.openeggbert.core.screens.GameSpaceListScreen;
import com.openeggbert.core.screens.InitScreen;
import com.openeggbert.core.configuration.ConfigDef;
import com.openeggbert.core.gamespace.GameSpace;
import com.openeggbert.core.mod.Mod;
import com.openeggbert.core.mod.ModIdentification;
import com.openeggbert.core.screen.GameSpaceListScreen;
import com.openeggbert.core.screen.InitScreen;
import com.openeggbert.gdx.storage.Storage;
import com.openeggbert.gdx.storage.StorageImplementationLoader;
import com.openeggbert.core.utils.OpenEggbertDisplayMode;
import com.openeggbert.core.configuration.OpenEggbertDisplayMode;
import com.openeggbert.core.utils.OpenEggbertUtils;
import java.util.ArrayList;
import java.util.List;

View File

@ -17,11 +17,11 @@
// <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.mods;
package com.openeggbert.core.mod;
import com.badlogic.gdx.utils.XmlReader;
import com.badlogic.gdx.utils.XmlReader.Element;
import com.openeggbert.core.compatibility.Release;
import com.openeggbert.core.release.Release;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;

View File

@ -17,7 +17,7 @@
// <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.mods;
package com.openeggbert.core.mod;
import com.badlogic.gdx.utils.XmlReader.Element;
import lombok.AllArgsConstructor;

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.mods;
package com.openeggbert.core.mod;
/**
*

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.mods;
package com.openeggbert.core.mod;
/**
*

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.mods;
package com.openeggbert.core.mod;
/**
*

View File

@ -18,7 +18,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.mods;
package com.openeggbert.core.mod;
/**
*

View File

@ -17,7 +17,7 @@
// <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.mods;
package com.openeggbert.core.mod;
import com.badlogic.gdx.utils.XmlReader;

View File

@ -1,13 +0,0 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package com.openeggbert.core.mods;
/**
*
* @author robertvokac
*/
public class SpriteSheet {
}

View File

@ -1,29 +0,0 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// 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.mods;
/**
*
* @author robertvokac
*/
public class SpriteSheetRow {
}

View File

@ -17,8 +17,9 @@
// <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.compatibility;
package com.openeggbert.core.music;
import com.openeggbert.core.configuration.StrictMode;
import lombok.Getter;
/**

View File

@ -19,9 +19,9 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.common;
package com.openeggbert.core.music;
import com.openeggbert.core.compatibility.Release;
import com.openeggbert.core.release.Release;
import lombok.Getter;
/**

View File

@ -17,7 +17,7 @@
// <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.compatibility;
package com.openeggbert.core.release;
/**
*

View File

@ -17,8 +17,9 @@
// <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.compatibility;
package com.openeggbert.core.release;
import com.openeggbert.core.utils.FileNameCaseType;
import lombok.Getter;
/**
@ -44,6 +45,8 @@ public enum Release {
@Getter
private final String abbreviation;
public static final Release[] ALL_RELEASES = Release.values();
private Release(ReleaseType releaseType, ReleaseVersion releaseVersion, Publisher publisher, String abbreviation) {
this.releaseType = releaseType;
this.releaseVersion = releaseVersion;
@ -52,7 +55,7 @@ public enum Release {
}
public String createLabel() {
String[] array = this.name().split("_");
String[] array = this.name().split(UNDERSCORE);
StringBuilder sb = new StringBuilder();
for(int i = 0;i < array.length; i++) {
sb.append(FileNameCaseType.convertToString(array[i], FileNameCaseType.CAPITALIZATION));
@ -62,5 +65,6 @@ public enum Release {
}
return sb.toString();
}
private static final String UNDERSCORE = "_";
}

View File

@ -19,7 +19,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.compatibility;
package com.openeggbert.core.release;
/**
*

View File

@ -19,7 +19,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.compatibility;
package com.openeggbert.core.release;
/**
*

View File

@ -17,7 +17,7 @@
// <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.screens;
package com.openeggbert.core.screen;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputAdapter;

View File

@ -17,7 +17,7 @@
// <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.screens;
package com.openeggbert.core.screen;
import com.badlogic.gdx.Application;
import static com.badlogic.gdx.Application.LOG_INFO;
@ -26,9 +26,8 @@ import com.badlogic.gdx.ScreenAdapter;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.openeggbert.core.entity.common.GameFileType;
import com.openeggbert.core.entity.common.OpenEggbertException;
import com.openeggbert.core.entity.common.OpenEggbertScreenType;
import com.openeggbert.core.gamespace.GameFileType;
import com.openeggbert.core.main.OpenEggbertException;
import com.openeggbert.core.main.OpenEggbertGame;
import com.openeggbert.core.utils.OpenEggbertUtils;
import java.util.List;
@ -54,7 +53,7 @@ public abstract class AbstractOpenEggbertScreen extends ScreenAdapter {
return getScreenType().isPresent() ? getScreenType().get().getFileNameWithoutExtension(): "";
}
protected Optional<OpenEggbertScreenType> getScreenType() {
protected Optional<ScreenType> getScreenType() {
return Optional.empty();
}

View File

@ -17,14 +17,13 @@
// <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.screens;
package com.openeggbert.core.screen;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.utils.ScreenUtils;
import com.openeggbert.core.entity.common.OpenEggbertScreenType;
import com.openeggbert.core.main.OpenEggbertGame;
import java.util.Optional;
@ -39,8 +38,8 @@ public class DemoScreen extends AbstractOpenEggbertScreen {
}
protected final Optional<OpenEggbertScreenType> getScreenType() {
return Optional.of(OpenEggbertScreenType.DEMO);
protected final Optional<ScreenType> getScreenType() {
return Optional.of(ScreenType.DEMO);
}
@Override

View File

@ -17,14 +17,13 @@
// <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.screens;
package com.openeggbert.core.screen;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.utils.ScreenUtils;
import com.openeggbert.core.entity.common.OpenEggbertScreenType;
import com.openeggbert.core.main.OpenEggbertGame;
import java.util.Optional;
@ -39,8 +38,8 @@ public class GameScreen extends AbstractGameScreen {
}
protected final Optional<OpenEggbertScreenType> getScreenType() {
return Optional.of(OpenEggbertScreenType.GAME);
protected final Optional<ScreenType> getScreenType() {
return Optional.of(ScreenType.GAME);
}
@Override

View File

@ -17,7 +17,7 @@
// <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.screens;
package com.openeggbert.core.screen;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
@ -28,10 +28,10 @@ import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.utils.ScreenUtils;
import com.openeggbert.core.entity.common.GameSpace;
import com.openeggbert.core.gamespace.GameSpace;
import com.openeggbert.core.main.OpenEggbertGame;
import com.openeggbert.core.mods.Mod;
import com.openeggbert.core.mods.ModType;
import com.openeggbert.core.mod.Mod;
import com.openeggbert.core.mod.ModType;
import java.util.List;
import java.util.stream.Collectors;
import lombok.AllArgsConstructor;

View File

@ -17,7 +17,7 @@
// <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.screens;
package com.openeggbert.core.screen;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
@ -25,11 +25,10 @@ import com.badlogic.gdx.Input;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.utils.ScreenUtils;
import com.openeggbert.core.entity.common.ConfigDef;
import com.openeggbert.core.entity.common.OpenEggbertScreenType;
import com.openeggbert.core.configuration.ConfigDef;
import com.openeggbert.core.main.OpenEggbertGame;
import com.openeggbert.core.utils.EmbeddedFileHandleFactory;
import com.openeggbert.core.utils.OpenEggbertDisplayMode;
import com.openeggbert.core.configuration.OpenEggbertDisplayMode;
import java.util.Optional;
/**
@ -87,8 +86,8 @@ public class InitScreen extends AbstractOpenEggbertScreen {
}
protected final Optional<OpenEggbertScreenType> getScreenType() {
return Optional.of(OpenEggbertScreenType.INIT);
protected final Optional<ScreenType> getScreenType() {
return Optional.of(ScreenType.INIT);
}
@Override

View File

@ -17,14 +17,13 @@
// <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.screens;
package com.openeggbert.core.screen;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.utils.ScreenUtils;
import com.openeggbert.core.entity.common.OpenEggbertScreenType;
import com.openeggbert.core.main.OpenEggbertGame;
import java.util.Optional;
@ -39,8 +38,8 @@ public class MainHubScreen extends AbstractGameScreen {
}
protected final Optional<OpenEggbertScreenType> getScreenType() {
return Optional.of(OpenEggbertScreenType.MAIN_HUB);
protected final Optional<ScreenType> getScreenType() {
return Optional.of(ScreenType.MAIN_HUB);
}
@Override

View File

@ -19,7 +19,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.common;
package com.openeggbert.core.screen;
import lombok.Getter;
@ -27,7 +27,7 @@ import lombok.Getter;
*
* @author robertvokac
*/
public enum OpenEggbertScreenType {
public enum ScreenType {
MAIN,
GAME_SPACE_SELECTION,
INIT("INIT"),
@ -41,10 +41,10 @@ public enum OpenEggbertScreenType {
@Getter
private String fileNameWithoutExtension;
OpenEggbertScreenType() {
ScreenType() {
this.fileNameWithoutExtension = "";
}
OpenEggbertScreenType(String fileName) {
ScreenType(String fileName) {
this.fileNameWithoutExtension = fileName;
}

View File

@ -17,14 +17,13 @@
// <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.screens;
package com.openeggbert.core.screen;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.utils.ScreenUtils;
import com.openeggbert.core.entity.common.OpenEggbertScreenType;
import com.openeggbert.core.main.OpenEggbertGame;
import java.util.Optional;
@ -39,8 +38,8 @@ public class SubHubScreen extends AbstractGameScreen {
}
protected final Optional<OpenEggbertScreenType> getScreenType() {
return Optional.of(OpenEggbertScreenType.SUB_HUB);
protected final Optional<ScreenType> getScreenType() {
return Optional.of(ScreenType.SUB_HUB);
}
@Override

View File

@ -17,7 +17,7 @@
// <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.screens;
package com.openeggbert.core.screen;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;

View File

@ -17,8 +17,9 @@
// <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.compatibility;
package com.openeggbert.core.sound;
import com.openeggbert.core.configuration.StrictMode;
import lombok.Getter;
/**

View File

@ -19,9 +19,9 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.common;
package com.openeggbert.core.sound;
import com.openeggbert.core.compatibility.Release;
import com.openeggbert.core.release.Release;
import lombok.Getter;
/**

View File

@ -19,7 +19,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.sprites;
package com.openeggbert.core.sprite;
/**
*

View File

@ -19,9 +19,9 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.entity.sprites;
package com.openeggbert.core.sprite;
import com.openeggbert.core.compatibility.ReleaseVersion;
import com.openeggbert.core.release.ReleaseVersion;
import lombok.Getter;
/**

View File

@ -17,9 +17,9 @@
// <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.entity.sprites;
package com.openeggbert.core.sprite;
import com.openeggbert.core.entity.common.OpenEggbertException;
import com.openeggbert.core.main.OpenEggbertException;
import com.openeggbert.core.utils.OpenEggbertUtils;
import java.util.ArrayList;
import java.util.Arrays;
@ -49,7 +49,7 @@ public class SpriteSheet {
if (columnIndexesForNames.containsKey(columnName)) {
throw new OpenEggbertException("Invalid sprite sheet. It has invalid the first row (column names). Column is more than once: " + columnName);
}
Optional<SpriteSheetRowColumn> optionalSpriteSheetRowColumn = Arrays.asList(com.openeggbert.core.entity.sprites.SpriteSheetRowColumn.values()).stream().filter(r -> r.getColumnName().equals(columnName)).findFirst();
Optional<SpriteSheetRowColumn> optionalSpriteSheetRowColumn = Arrays.asList(com.openeggbert.core.sprite.SpriteSheetRowColumn.values()).stream().filter(r -> r.getColumnName().equals(columnName)).findFirst();
if (!optionalSpriteSheetRowColumn.isPresent()) {
continue;
}

View File

@ -17,9 +17,9 @@
// <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.entity.sprites;
package com.openeggbert.core.sprite;
import com.openeggbert.core.entity.common.OpenEggbertException;
import com.openeggbert.core.main.OpenEggbertException;
import com.openeggbert.core.utils.OpenEggbertUtils;
import java.util.Map;
import java.util.function.Function;

View File

@ -17,7 +17,7 @@
// <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.entity.sprites;
package com.openeggbert.core.sprite;
import lombok.Getter;

View File

@ -22,7 +22,7 @@ package com.openeggbert.core.utils;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.openeggbert.core.entity.common.OpenEggbertException;
import com.openeggbert.core.main.OpenEggbertException;
import com.openeggbert.core.utils.OpenEggbertUtils;
import java.util.ArrayList;
import java.util.Arrays;

View File

@ -17,7 +17,7 @@
// <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.compatibility;
package com.openeggbert.core.utils;
/**
*
@ -27,7 +27,7 @@ public class FileExtension {
private FileExtension() {
//Not meant to be instantiated.
}
public boolean isOpenEggbertOnly(String fileExtension) {
public static boolean isOpenEggbertOnly(String fileExtension) {
return fileExtension != null && !fileExtension.toLowerCase().equals(BLP);
}
private static final String BLP = "blp";

View File

@ -17,9 +17,9 @@
// <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.compatibility;
package com.openeggbert.core.utils;
import com.openeggbert.core.entity.common.OpenEggbertException;
import com.openeggbert.core.main.OpenEggbertException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

View File

@ -19,12 +19,11 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.utils;
import com.openeggbert.core.compatibility.FileNameCaseType;
import com.openeggbert.core.compatibility.ImageFormat;
import com.openeggbert.core.compatibility.MusicFormat;
import com.openeggbert.core.compatibility.SoundFormat;
import com.openeggbert.core.entity.common.GameFileType;
import com.openeggbert.core.entity.common.OpenEggbertException;
import com.openeggbert.core.image.ImageFormat;
import com.openeggbert.core.music.MusicFormat;
import com.openeggbert.core.sound.SoundFormat;
import com.openeggbert.core.gamespace.GameFileType;
import com.openeggbert.core.main.OpenEggbertException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

View File

@ -19,9 +19,9 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.compatibility;
import com.openeggbert.core.compatibility.FileNameCaseType;
import com.openeggbert.core.entity.common.GameFileType;
import com.openeggbert.core.entity.common.OpenEggbertException;
import com.openeggbert.core.utils.FileNameCaseType;
import com.openeggbert.core.gamespace.GameFileType;
import com.openeggbert.core.main.OpenEggbertException;
import com.openeggbert.core.utils.OpenEggbertUtils;
import java.util.List;
import java.util.stream.Collectors;

View File

@ -20,7 +20,7 @@
package com.openeggbert.utils;
import com.openeggbert.core.utils.OpenEggbertUtils;
import com.openeggbert.core.entity.common.GameFileType;
import com.openeggbert.core.gamespace.GameFileType;
import java.util.stream.Collectors;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.AfterAll;

View File

@ -3,7 +3,7 @@ package com.openeggbert.gwt;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.backends.gwt.GwtApplication;
import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration;
import com.openeggbert.core.compatibility.ScreenResolution;
import com.openeggbert.core.configuration.ScreenResolution;
import com.openeggbert.core.main.OpenEggbertGame;
/** Launches the GWT application. */

View File

@ -19,9 +19,9 @@
///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.lwjgl3;
import com.openeggbert.core.compatibility.Release;
import com.openeggbert.core.entity.common.GameSpace;
import com.openeggbert.core.entity.common.OpenEggbertException;
import com.openeggbert.core.release.Release;
import com.openeggbert.core.gamespace.GameSpace;
import com.openeggbert.core.main.OpenEggbertException;
import java.io.File;
import java.net.URISyntaxException;
import java.util.Optional;

View File

@ -22,9 +22,9 @@ package com.openeggbert.lwjgl3;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import com.openeggbert.core.compatibility.ScreenResolution;
import com.openeggbert.core.configuration.ScreenResolution;
import com.openeggbert.core.main.OpenEggbertGame;
import com.openeggbert.core.entity.common.GameSpace;
import com.openeggbert.core.gamespace.GameSpace;
import java.util.Optional;
/** Launches the desktop (LWJGL3) application. */