From 9ec104f51812f9a152a11f749ad10d6ede882925 Mon Sep 17 00:00:00 2001 From: Robert Vokac Date: Fri, 16 Aug 2024 19:22:16 +0200 Subject: [PATCH] Refactoring X --- .../core/fbox/api/FBoxAssetInterface.java | 28 ++++ .../core/fbox/api/FBoxAudioInterface.java | 28 ++++ .../core/fbox/api/FBoxInputInterface.java | 28 ++++ .../core/fbox/api/FBoxInterface.java | 6 + .../core/fbox/api/FBoxNetInterface.java | 28 ++++ .../core/fbox/api/FBoxStorageInterface.java | 28 ++++ .../core/fbox/api/FBoxUtilsInterface.java | 28 ++++ .../com/openeggbert/core/fbox/core/FBox.java | 4 +- .../openeggbert/core/fbox/core/FBoxGame.java | 29 ++++ .../core/fbox/core/FBoxScreen.java | 28 ++++ .../fbox/impl/libgdx/FBoxAssetLibGDXImpl.java | 32 +++++ .../fbox/impl/libgdx/FBoxAudioLibGDXImpl.java | 32 +++++ ...xImpl.java => FBoxGraphicsLibGDXImpl.java} | 2 +- .../fbox/impl/libgdx/FBoxInputLibGDXImpl.java | 32 +++++ .../core/fbox/impl/libgdx/FBoxLibGDXImpl.java | 131 ++++++++++++++++++ .../core/fbox/impl/libgdx/FBoxLibGdxImpl.java | 60 -------- .../fbox/impl/libgdx/FBoxNetLibGDXImpl.java | 32 +++++ .../impl/libgdx/FBoxStorageLibGDXImpl.java | 32 +++++ .../fbox/impl/libgdx/FBoxUtilsLibGDXImpl.java | 32 +++++ .../core/main/OpenEggbertGame.java | 4 +- .../openeggbert/core/music/MusicManager.java | 2 - .../com/openeggbert/core/music/MusicType.java | 1 - .../screen/AbstractOpenEggbertScreen.java | 7 +- .../openeggbert/core/screen/InitScreen.java | 13 +- .../openeggbert/core/sprite/SpriteSheet.java | 2 - .../core/sprite/SpriteSheetRow.java | 1 - .../com/openeggbert/gdx/storage/Storage.java | 4 +- .../storage/StorageImplementationLoader.java | 14 +- .../storage/filesystem/AndroidStorage.java | 7 +- .../filesystem/DesktopAndroidStorage.java | 3 +- .../storage/filesystem/DesktopStorage.java | 7 +- .../gdx/storage/map/MapStorage.java | 3 +- .../gdx/storage/map/MemoryStorage.java | 4 +- .../gdx/storage/map/WebGLStorage.java | 4 + 34 files changed, 600 insertions(+), 96 deletions(-) create mode 100644 core/src/main/java/com/openeggbert/core/fbox/api/FBoxAssetInterface.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/api/FBoxAudioInterface.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/api/FBoxInputInterface.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/api/FBoxNetInterface.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/api/FBoxStorageInterface.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/api/FBoxUtilsInterface.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/core/FBoxGame.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/core/FBoxScreen.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxAssetLibGDXImpl.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxAudioLibGDXImpl.java rename core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/{FBoxGraphicsLibGdxImpl.java => FBoxGraphicsLibGDXImpl.java} (98%) create mode 100644 core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxInputLibGDXImpl.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxLibGDXImpl.java delete mode 100644 core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxLibGdxImpl.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxNetLibGDXImpl.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxStorageLibGDXImpl.java create mode 100644 core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxUtilsLibGDXImpl.java diff --git a/core/src/main/java/com/openeggbert/core/fbox/api/FBoxAssetInterface.java b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxAssetInterface.java new file mode 100644 index 0000000..ffa02da --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxAssetInterface.java @@ -0,0 +1,28 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.api; + +/** + * + * @author robertvokac + */ +public interface FBoxAssetInterface { + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/api/FBoxAudioInterface.java b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxAudioInterface.java new file mode 100644 index 0000000..26dcdc1 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxAudioInterface.java @@ -0,0 +1,28 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.api; + +/** + * + * @author robertvokac + */ +public interface FBoxAudioInterface { + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/api/FBoxInputInterface.java b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxInputInterface.java new file mode 100644 index 0000000..d35d56e --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxInputInterface.java @@ -0,0 +1,28 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.api; + +/** + * + * @author robertvokac + */ +public interface FBoxInputInterface { + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/api/FBoxInterface.java b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxInterface.java index 15a5f1d..cdfa00c 100644 --- a/core/src/main/java/com/openeggbert/core/fbox/api/FBoxInterface.java +++ b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxInterface.java @@ -30,5 +30,11 @@ public interface FBoxInterface { void exit(); Platform getPlatform(); FBoxGraphicsInterface graphics(); + FBoxAudioInterface audio(); + FBoxInputInterface input(); + FBoxNetInterface net(); + FBoxAssetInterface asset(); + FBoxStorageInterface storage(); + FBoxUtilsInterface utils(); } diff --git a/core/src/main/java/com/openeggbert/core/fbox/api/FBoxNetInterface.java b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxNetInterface.java new file mode 100644 index 0000000..6547b91 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxNetInterface.java @@ -0,0 +1,28 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.api; + +/** + * + * @author robertvokac + */ +public interface FBoxNetInterface { + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/api/FBoxStorageInterface.java b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxStorageInterface.java new file mode 100644 index 0000000..26dec18 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxStorageInterface.java @@ -0,0 +1,28 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.api; + +/** + * + * @author robertvokac + */ +public interface FBoxStorageInterface { + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/api/FBoxUtilsInterface.java b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxUtilsInterface.java new file mode 100644 index 0000000..be17bd9 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/api/FBoxUtilsInterface.java @@ -0,0 +1,28 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.api; + +/** + * + * @author robertvokac + */ +public interface FBoxUtilsInterface { + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/core/FBox.java b/core/src/main/java/com/openeggbert/core/fbox/core/FBox.java index 30e851e..3f3940f 100644 --- a/core/src/main/java/com/openeggbert/core/fbox/core/FBox.java +++ b/core/src/main/java/com/openeggbert/core/fbox/core/FBox.java @@ -19,7 +19,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////// package com.openeggbert.core.fbox.core; -import com.openeggbert.core.fbox.impl.libgdx.FBoxLibGdxImpl; +import com.openeggbert.core.fbox.impl.libgdx.FBoxLibGDXImpl; import com.openeggbert.core.fbox.api.FBoxInterface; /** @@ -34,7 +34,7 @@ public class FBox { } public static FBoxInterface get() { if(INSTANCE == null) { - INSTANCE = new FBoxLibGdxImpl(); + INSTANCE = new FBoxLibGDXImpl(); } return INSTANCE; } diff --git a/core/src/main/java/com/openeggbert/core/fbox/core/FBoxGame.java b/core/src/main/java/com/openeggbert/core/fbox/core/FBoxGame.java new file mode 100644 index 0000000..5e2116e --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/core/FBoxGame.java @@ -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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.core; + +/** + * + * @author robertvokac + */ +public abstract class FBoxGame extends com.badlogic.gdx.Game { + + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/core/FBoxScreen.java b/core/src/main/java/com/openeggbert/core/fbox/core/FBoxScreen.java new file mode 100644 index 0000000..5a33437 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/core/FBoxScreen.java @@ -0,0 +1,28 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.core; + +/** + * + * @author robertvokac + */ +public abstract class FBoxScreen extends com.badlogic.gdx.ScreenAdapter { + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxAssetLibGDXImpl.java b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxAssetLibGDXImpl.java new file mode 100644 index 0000000..c08fcfd --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxAssetLibGDXImpl.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.impl.libgdx; + +import com.openeggbert.core.fbox.api.FBoxAssetInterface; + +/** + * + * @author robertvokac + */ +public class FBoxAssetLibGDXImpl implements FBoxAssetInterface { + + + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxAudioLibGDXImpl.java b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxAudioLibGDXImpl.java new file mode 100644 index 0000000..fa974b8 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxAudioLibGDXImpl.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.impl.libgdx; + +import com.openeggbert.core.fbox.api.FBoxAudioInterface; + +/** + * + * @author robertvokac + */ +public class FBoxAudioLibGDXImpl implements FBoxAudioInterface { + + + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxGraphicsLibGdxImpl.java b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxGraphicsLibGDXImpl.java similarity index 98% rename from core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxGraphicsLibGdxImpl.java rename to core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxGraphicsLibGDXImpl.java index bc66b8a..ea0d6da 100644 --- a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxGraphicsLibGdxImpl.java +++ b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxGraphicsLibGDXImpl.java @@ -32,7 +32,7 @@ import com.openeggbert.core.fbox.api.FBoxGraphicsInterface; * * @author robertvokac */ -public class FBoxGraphicsLibGdxImpl implements FBoxGraphicsInterface { +public class FBoxGraphicsLibGDXImpl implements FBoxGraphicsInterface { @Override diff --git a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxInputLibGDXImpl.java b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxInputLibGDXImpl.java new file mode 100644 index 0000000..89e5cb2 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxInputLibGDXImpl.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.impl.libgdx; + +import com.openeggbert.core.fbox.api.FBoxInputInterface; + +/** + * + * @author robertvokac + */ +public class FBoxInputLibGDXImpl implements FBoxInputInterface { + + + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxLibGDXImpl.java b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxLibGDXImpl.java new file mode 100644 index 0000000..67c1460 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxLibGDXImpl.java @@ -0,0 +1,131 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.impl.libgdx; + +import com.badlogic.gdx.Application; +import static com.badlogic.gdx.Application.ApplicationType.Desktop; +import com.badlogic.gdx.Gdx; +import com.openeggbert.core.fbox.api.FBoxAssetInterface; +import com.openeggbert.core.fbox.api.FBoxAudioInterface; +import com.openeggbert.core.fbox.core.DefinitiveFrameworkException; +import com.openeggbert.core.fbox.entity.Platform; +import com.openeggbert.core.fbox.api.FBoxGraphicsInterface; +import com.openeggbert.core.fbox.api.FBoxInputInterface; +import com.openeggbert.core.fbox.api.FBoxInterface; +import com.openeggbert.core.fbox.api.FBoxNetInterface; +import com.openeggbert.core.fbox.api.FBoxStorageInterface; +import com.openeggbert.core.fbox.api.FBoxUtilsInterface; + +/** + * + * @author robertvokac + */ +public class FBoxLibGDXImpl implements FBoxInterface { + + private FBoxGraphicsInterface fBoxGraphicsLibGdxImpl = null; + private FBoxAudioInterface fBoxAudioLibGdxImpl = null; + private FBoxInputInterface fBoxInputLibGdxImpl = null; + private FBoxNetInterface fBoxNetLibGdxImpl = null; + private FBoxAssetInterface fBoxAssetLibGdxImpl = null; + private FBoxStorageInterface fBoxStorageLibGdxImpl = null; + private FBoxUtilsInterface fBoxUtilsLibGdxImpl = null; + + @Override + public void exit() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public Platform getPlatform() { + Application.ApplicationType applicationType = Gdx.app.getType(); + switch (applicationType) { + case Desktop: + return Platform.DESKTOP; + case Android: + return Platform.ANDROID; + case WebGL: + return Platform.WEB; + default: + throw new DefinitiveFrameworkException("Unsupported platform: " + applicationType); + } + } + + @Override + public FBoxGraphicsInterface graphics() { + if (fBoxGraphicsLibGdxImpl == null) { + fBoxGraphicsLibGdxImpl = new FBoxGraphicsLibGDXImpl(); + } + return fBoxGraphicsLibGdxImpl; + } + + @Override + public FBoxAudioInterface audio() { + + if (fBoxAudioLibGdxImpl == null) { + fBoxAudioLibGdxImpl = new FBoxAudioLibGDXImpl(); + } + return fBoxAudioLibGdxImpl; + } + + @Override + public FBoxInputInterface input() { + + if (fBoxInputLibGdxImpl == null) { + fBoxInputLibGdxImpl = new FBoxInputLibGDXImpl(); + } + return fBoxInputLibGdxImpl; + } + + @Override + public FBoxNetInterface net() { + + if (fBoxNetLibGdxImpl == null) { + fBoxNetLibGdxImpl = new FBoxNetLibGDXImpl(); + } + return fBoxNetLibGdxImpl; + } + + @Override + public FBoxAssetInterface asset() { + + if (fBoxAssetLibGdxImpl == null) { + fBoxAssetLibGdxImpl = new FBoxAssetLibGDXImpl(); + } + return fBoxAssetLibGdxImpl; + } + + @Override + public FBoxStorageInterface storage() { + + if (fBoxStorageLibGdxImpl == null) { + fBoxStorageLibGdxImpl = new FBoxStorageLibGDXImpl(); + } + return fBoxStorageLibGdxImpl; + } + + @Override + public FBoxUtilsInterface utils() { + + if (fBoxUtilsLibGdxImpl == null) { + fBoxUtilsLibGdxImpl = new FBoxUtilsLibGDXImpl(); + } + return fBoxUtilsLibGdxImpl; } + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxLibGdxImpl.java b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxLibGdxImpl.java deleted file mode 100644 index 4a358bb..0000000 --- a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxLibGdxImpl.java +++ /dev/null @@ -1,60 +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 -// or write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -/////////////////////////////////////////////////////////////////////////////////////////////// -package com.openeggbert.core.fbox.impl.libgdx; - -import com.badlogic.gdx.Application; -import static com.badlogic.gdx.Application.ApplicationType.Desktop; -import com.badlogic.gdx.Gdx; -import com.openeggbert.core.fbox.core.DefinitiveFrameworkException; -import com.openeggbert.core.fbox.entity.Platform; -import com.openeggbert.core.fbox.api.FBoxGraphicsInterface; -import com.openeggbert.core.fbox.api.FBoxInterface; - -/** - * - * @author robertvokac - */ -public class FBoxLibGdxImpl implements FBoxInterface { - -private FBoxGraphicsLibGdxImpl fBoxGraphicsLibGdxImpl = null; - @Override - public void exit() { - throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody - } - - @Override - public Platform getPlatform() { - Application.ApplicationType applicationType = Gdx.app.getType(); - switch(applicationType) { - case Desktop: return Platform.DESKTOP; - case Android: return Platform.ANDROID; - case WebGL: return Platform.WEB; - default: throw new DefinitiveFrameworkException("Unsupported platform: " + applicationType); - } - } - - @Override - public FBoxGraphicsInterface graphics() { - if(fBoxGraphicsLibGdxImpl == null) { - fBoxGraphicsLibGdxImpl = new FBoxGraphicsLibGdxImpl(); - } - return fBoxGraphicsLibGdxImpl; - } -} diff --git a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxNetLibGDXImpl.java b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxNetLibGDXImpl.java new file mode 100644 index 0000000..b34a547 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxNetLibGDXImpl.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.impl.libgdx; + +import com.openeggbert.core.fbox.api.FBoxNetInterface; + +/** + * + * @author robertvokac + */ +public class FBoxNetLibGDXImpl implements FBoxNetInterface { + + + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxStorageLibGDXImpl.java b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxStorageLibGDXImpl.java new file mode 100644 index 0000000..72f9fcc --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxStorageLibGDXImpl.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.impl.libgdx; + +import com.openeggbert.core.fbox.api.FBoxStorageInterface; + +/** + * + * @author robertvokac + */ +public class FBoxStorageLibGDXImpl implements FBoxStorageInterface { + + + +} diff --git a/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxUtilsLibGDXImpl.java b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxUtilsLibGDXImpl.java new file mode 100644 index 0000000..2643537 --- /dev/null +++ b/core/src/main/java/com/openeggbert/core/fbox/impl/libgdx/FBoxUtilsLibGDXImpl.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// 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 +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.openeggbert.core.fbox.impl.libgdx; + +import com.openeggbert.core.fbox.api.FBoxUtilsInterface; + +/** + * + * @author robertvokac + */ +public class FBoxUtilsLibGDXImpl implements FBoxUtilsInterface { + + + +} diff --git a/core/src/main/java/com/openeggbert/core/main/OpenEggbertGame.java b/core/src/main/java/com/openeggbert/core/main/OpenEggbertGame.java index ccc5a1b..dd255dc 100644 --- a/core/src/main/java/com/openeggbert/core/main/OpenEggbertGame.java +++ b/core/src/main/java/com/openeggbert/core/main/OpenEggbertGame.java @@ -20,7 +20,6 @@ package com.openeggbert.core.main; import com.openeggbert.core.utils.AssetsTxt; -import com.badlogic.gdx.Game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Camera; @@ -40,6 +39,7 @@ import com.openeggbert.core.screen.InitScreen; import com.openeggbert.gdx.storage.Storage; import com.openeggbert.gdx.storage.StorageImplementationLoader; import com.openeggbert.core.configuration.OpenEggbertDisplayMode; +import com.openeggbert.core.fbox.core.FBoxGame; import com.openeggbert.core.utils.OpenEggbertUtils; import java.util.ArrayList; import java.util.List; @@ -51,7 +51,7 @@ import lombok.Data; * platforms. */ @Data -public class OpenEggbertGame extends Game { +public class OpenEggbertGame extends FBoxGame { private Texture image; private GameSpace gameSpace = null; diff --git a/core/src/main/java/com/openeggbert/core/music/MusicManager.java b/core/src/main/java/com/openeggbert/core/music/MusicManager.java index c6cda02..b45fa11 100644 --- a/core/src/main/java/com/openeggbert/core/music/MusicManager.java +++ b/core/src/main/java/com/openeggbert/core/music/MusicManager.java @@ -19,8 +19,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// package com.openeggbert.core.music; -import com.openeggbert.core.image.*; - /** * * @author robertvokac diff --git a/core/src/main/java/com/openeggbert/core/music/MusicType.java b/core/src/main/java/com/openeggbert/core/music/MusicType.java index ca147e0..9f04f4e 100644 --- a/core/src/main/java/com/openeggbert/core/music/MusicType.java +++ b/core/src/main/java/com/openeggbert/core/music/MusicType.java @@ -18,7 +18,6 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. /////////////////////////////////////////////////////////////////////////////////////////////// - package com.openeggbert.core.music; import com.openeggbert.core.release.Release; diff --git a/core/src/main/java/com/openeggbert/core/screen/AbstractOpenEggbertScreen.java b/core/src/main/java/com/openeggbert/core/screen/AbstractOpenEggbertScreen.java index 90333a7..21ec9b5 100644 --- a/core/src/main/java/com/openeggbert/core/screen/AbstractOpenEggbertScreen.java +++ b/core/src/main/java/com/openeggbert/core/screen/AbstractOpenEggbertScreen.java @@ -22,12 +22,11 @@ package com.openeggbert.core.screen; import com.badlogic.gdx.Application; import static com.badlogic.gdx.Application.LOG_INFO; import com.badlogic.gdx.Gdx; -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.fbox.core.FBoxScreen; 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; @@ -37,7 +36,7 @@ import java.util.Optional; * * @author robertvokac */ -public abstract class AbstractOpenEggbertScreen extends ScreenAdapter { +public abstract class AbstractOpenEggbertScreen extends FBoxScreen { protected OpenEggbertGame game; protected SpriteBatch batch; @@ -48,7 +47,7 @@ public abstract class AbstractOpenEggbertScreen extends ScreenAdapter { loadBackgroundTextureIfNeeded(); } - private final String getBackgroundFileName() { + private String getBackgroundFileName() { //return "INIT.BLP.BMP"; return getScreenType().isPresent() ? getScreenType().get().getFileNameWithoutExtension(): ""; } diff --git a/core/src/main/java/com/openeggbert/core/screen/InitScreen.java b/core/src/main/java/com/openeggbert/core/screen/InitScreen.java index 09ef05f..1e9e191 100644 --- a/core/src/main/java/com/openeggbert/core/screen/InitScreen.java +++ b/core/src/main/java/com/openeggbert/core/screen/InitScreen.java @@ -95,29 +95,29 @@ public class InitScreen extends AbstractOpenEggbertScreen { Gdx.input.setInputProcessor(new InputAdapter() { public boolean touchUp(int screenX, int screenY, int pointer, int button) { - timeSeconds = 0f; +// timeSeconds = 0f; return false; } public boolean touchCancelled(int screenX, int screenY, int pointer, int button) { - timeSeconds = 0f; +// timeSeconds = 0f; return false; } public boolean touchDragged(int screenX, int screenY, int pointer) { - timeSeconds = 0f; +// timeSeconds = 0f; return false; } @Override public boolean mouseMoved(int screenX, int screenY) { - timeSeconds = 0f; + //timeSeconds = 0f; return false; } @Override public boolean keyDown(int keyCode) { - timeSeconds = 0f; +// timeSeconds = 0f; if (keyCode == Input.Keys.ESCAPE) { Gdx.app.exit(); @@ -145,7 +145,8 @@ public class InitScreen extends AbstractOpenEggbertScreen { public void renderOpenEggbertScreen(float delta) { timeSeconds += Gdx.graphics.getRawDeltaTime(); - if (timeSeconds >= 60) { + if (timeSeconds >= 50) { + timeSeconds = 0; game.setScreen(new DemoScreen(game)); } ScreenUtils.clear(0f, 0f, 0f, 1f); diff --git a/core/src/main/java/com/openeggbert/core/sprite/SpriteSheet.java b/core/src/main/java/com/openeggbert/core/sprite/SpriteSheet.java index 558e893..77ae2b5 100644 --- a/core/src/main/java/com/openeggbert/core/sprite/SpriteSheet.java +++ b/core/src/main/java/com/openeggbert/core/sprite/SpriteSheet.java @@ -20,8 +20,6 @@ package com.openeggbert.core.sprite; import com.openeggbert.core.main.OpenEggbertException; -import com.openeggbert.core.utils.OpenEggbertUtils; -import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; diff --git a/core/src/main/java/com/openeggbert/core/sprite/SpriteSheetRow.java b/core/src/main/java/com/openeggbert/core/sprite/SpriteSheetRow.java index 5372d03..ca5dc26 100644 --- a/core/src/main/java/com/openeggbert/core/sprite/SpriteSheetRow.java +++ b/core/src/main/java/com/openeggbert/core/sprite/SpriteSheetRow.java @@ -20,7 +20,6 @@ package com.openeggbert.core.sprite; import com.openeggbert.core.main.OpenEggbertException; -import com.openeggbert.core.utils.OpenEggbertUtils; import java.util.Map; import java.util.function.Function; import lombok.Getter; diff --git a/core/src/main/java/com/openeggbert/gdx/storage/Storage.java b/core/src/main/java/com/openeggbert/gdx/storage/Storage.java index 3c4cb66..eac60cd 100644 --- a/core/src/main/java/com/openeggbert/gdx/storage/Storage.java +++ b/core/src/main/java/com/openeggbert/gdx/storage/Storage.java @@ -19,7 +19,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////// package com.openeggbert.gdx.storage; -import com.badlogic.gdx.Application; +import com.openeggbert.core.fbox.entity.Platform; import java.util.List; /** @@ -28,7 +28,7 @@ import java.util.List; */ public interface Storage { - Application.ApplicationType getApplicationType(); + Platform getPlatform(); public String cd(String path); diff --git a/core/src/main/java/com/openeggbert/gdx/storage/StorageImplementationLoader.java b/core/src/main/java/com/openeggbert/gdx/storage/StorageImplementationLoader.java index 80351d0..ca4bfca 100644 --- a/core/src/main/java/com/openeggbert/gdx/storage/StorageImplementationLoader.java +++ b/core/src/main/java/com/openeggbert/gdx/storage/StorageImplementationLoader.java @@ -23,8 +23,8 @@ import com.openeggbert.gdx.storage.map.WebGLStorage; import com.openeggbert.gdx.storage.map.MemoryStorage; import com.openeggbert.gdx.storage.filesystem.AndroidStorage; import com.openeggbert.gdx.storage.filesystem.DesktopStorage; -import com.badlogic.gdx.Application; -import com.badlogic.gdx.Gdx; +import com.openeggbert.core.fbox.core.FBox; +import com.openeggbert.core.fbox.entity.Platform; /** * @@ -38,24 +38,24 @@ public class StorageImplementationLoader { private static Storage storage = null; public static Storage getStorage() { - final Application.ApplicationType type = Gdx.app.getType(); + final Platform platform = FBox.get().getPlatform(); if (storage == null) { storage = new MemoryStorage(); } if (storage == null) { - if (type == Application.ApplicationType.Desktop) { + if (platform.isDesktop()) { storage = new DesktopStorage(); } - if (type == Application.ApplicationType.Android) { + if (platform.isAndroid()) { storage = new AndroidStorage(); } - if (type == Application.ApplicationType.WebGL) { + if (platform.isWeb()) { storage = new WebGLStorage(); } } if (storage == null) { - throw new GdxStorageException("Platform is not supported: " + type); + throw new GdxStorageException("Platform is not supported: " + platform); } return storage; } diff --git a/core/src/main/java/com/openeggbert/gdx/storage/filesystem/AndroidStorage.java b/core/src/main/java/com/openeggbert/gdx/storage/filesystem/AndroidStorage.java index 9af90b3..947231d 100644 --- a/core/src/main/java/com/openeggbert/gdx/storage/filesystem/AndroidStorage.java +++ b/core/src/main/java/com/openeggbert/gdx/storage/filesystem/AndroidStorage.java @@ -19,6 +19,8 @@ /////////////////////////////////////////////////////////////////////////////////////////////// package com.openeggbert.gdx.storage.filesystem; +import com.openeggbert.core.fbox.entity.Platform; + /** * * @author robertvokac @@ -27,5 +29,8 @@ public class AndroidStorage extends DesktopAndroidStorage { public AndroidStorage() { } - + + public Platform getPlatform() { + return Platform.ANDROID; + } } diff --git a/core/src/main/java/com/openeggbert/gdx/storage/filesystem/DesktopAndroidStorage.java b/core/src/main/java/com/openeggbert/gdx/storage/filesystem/DesktopAndroidStorage.java index 16e3dfd..5e8299f 100644 --- a/core/src/main/java/com/openeggbert/gdx/storage/filesystem/DesktopAndroidStorage.java +++ b/core/src/main/java/com/openeggbert/gdx/storage/filesystem/DesktopAndroidStorage.java @@ -20,6 +20,7 @@ package com.openeggbert.gdx.storage.filesystem; import com.badlogic.gdx.Application; +import com.openeggbert.core.fbox.entity.Platform; import com.openeggbert.gdx.storage.Storage; import java.util.List; @@ -33,7 +34,7 @@ public abstract class DesktopAndroidStorage implements Storage { } @Override - public Application.ApplicationType getApplicationType() { + public Platform getPlatform() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } diff --git a/core/src/main/java/com/openeggbert/gdx/storage/filesystem/DesktopStorage.java b/core/src/main/java/com/openeggbert/gdx/storage/filesystem/DesktopStorage.java index e14f123..d6067e4 100644 --- a/core/src/main/java/com/openeggbert/gdx/storage/filesystem/DesktopStorage.java +++ b/core/src/main/java/com/openeggbert/gdx/storage/filesystem/DesktopStorage.java @@ -19,6 +19,8 @@ /////////////////////////////////////////////////////////////////////////////////////////////// package com.openeggbert.gdx.storage.filesystem; +import com.openeggbert.core.fbox.entity.Platform; + /** * * @author robertvokac @@ -27,5 +29,8 @@ public class DesktopStorage extends DesktopAndroidStorage { public DesktopStorage() { } - + + public Platform getPlatform() { + return Platform.DESKTOP; + } } diff --git a/core/src/main/java/com/openeggbert/gdx/storage/map/MapStorage.java b/core/src/main/java/com/openeggbert/gdx/storage/map/MapStorage.java index 238b6c9..fdcb6c4 100644 --- a/core/src/main/java/com/openeggbert/gdx/storage/map/MapStorage.java +++ b/core/src/main/java/com/openeggbert/gdx/storage/map/MapStorage.java @@ -21,6 +21,7 @@ package com.openeggbert.gdx.storage.map; import com.badlogic.gdx.Application; import com.badlogic.gdx.Gdx; +import com.openeggbert.core.fbox.entity.Platform; import com.openeggbert.gdx.storage.GdxStorageException; import com.openeggbert.gdx.storage.GdxStorageUtils; import com.openeggbert.gdx.storage.Storage; @@ -49,7 +50,7 @@ public class MapStorage implements Storage { private String workingDirectory = "/"; @Override - public Application.ApplicationType getApplicationType() { + public Platform getPlatform() { return null; } diff --git a/core/src/main/java/com/openeggbert/gdx/storage/map/MemoryStorage.java b/core/src/main/java/com/openeggbert/gdx/storage/map/MemoryStorage.java index 9015532..112d1c8 100644 --- a/core/src/main/java/com/openeggbert/gdx/storage/map/MemoryStorage.java +++ b/core/src/main/java/com/openeggbert/gdx/storage/map/MemoryStorage.java @@ -19,7 +19,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////// package com.openeggbert.gdx.storage.map; -import com.badlogic.gdx.Application; +import com.openeggbert.core.fbox.entity.Platform; /** * @@ -28,7 +28,7 @@ import com.badlogic.gdx.Application; public class MemoryStorage extends MapStorage { @Override - public Application.ApplicationType getApplicationType() { + public Platform getPlatform() { return null; } diff --git a/core/src/main/java/com/openeggbert/gdx/storage/map/WebGLStorage.java b/core/src/main/java/com/openeggbert/gdx/storage/map/WebGLStorage.java index 459f9f6..f847fd9 100644 --- a/core/src/main/java/com/openeggbert/gdx/storage/map/WebGLStorage.java +++ b/core/src/main/java/com/openeggbert/gdx/storage/map/WebGLStorage.java @@ -21,12 +21,16 @@ package com.openeggbert.gdx.storage.map; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Preferences; +import com.openeggbert.core.fbox.entity.Platform; /** * * @author robertvokac */ public class WebGLStorage extends MapStorage { + public Platform getPlatform() { + return Platform.WEB; + } public WebGLStorage() { this("open-eggbert.webGL.Local-Storage"); }