Working on the Pixel Game Library

This commit is contained in:
Robert Vokac 2024-09-03 17:42:13 +02:00
parent fde7655e0b
commit 2c841d5c1b
No known key found for this signature in database
GPG Key ID: C459E1E4B4A986BB
66 changed files with 555 additions and 572 deletions

View File

@ -19,7 +19,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.configuration; package com.openeggbert.core.configuration;
import com.openeggbert.core.fbox.core.FBox; import com.pixelgamelibrary.Pixel;
import com.openeggbert.core.main.OpenEggbertException; import com.openeggbert.core.main.OpenEggbertException;
/** /**
@ -63,7 +63,7 @@ public enum OpenEggbertDisplayMode {
} }
public static OpenEggbertDisplayMode setDisplayMode(OpenEggbertDisplayMode displayMode) { public static OpenEggbertDisplayMode setDisplayMode(OpenEggbertDisplayMode displayMode) {
String result = FBox.get().graphics().setDisplayMode(displayMode == FULLSCREEN, displayMode == WINDOW); String result = Pixel.get().graphics().setDisplayMode(displayMode == FULLSCREEN, displayMode == WINDOW);
return result == null ? null : OpenEggbertDisplayMode.valueOf(result); return result == null ? null : OpenEggbertDisplayMode.valueOf(result);
} }

View File

@ -1,40 +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.fbox.api;
import com.openeggbert.core.fbox.entity.Platform;
/**
*
* @author robertvokac
*/
public interface FBoxInterface {
void exit();
Platform getPlatform();
FBoxGraphicsInterface graphics();
FBoxAudioInterface audio();
FBoxInputInterface input();
FBoxNetInterface net();
FBoxAssetInterface asset();
FBoxStorageInterface storage();
FBoxUtilsInterface utils();
}

View File

@ -1,28 +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.fbox.api;
/**
*
* @author robertvokac
*/
public interface FBoxStorageInterface {
}

View File

@ -1,33 +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.fbox.core;
/**
*
* @author robertvokac
*/
public class DefinitiveFrameworkException extends RuntimeException{
public DefinitiveFrameworkException(String string) {
super(string);
}
}

View File

@ -1,28 +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.fbox.core;
/**
*
* @author robertvokac
*/
public abstract class FBoxScreen extends com.badlogic.gdx.ScreenAdapter {
}

View File

@ -1,32 +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.fbox.impl.libgdx;
import com.openeggbert.core.fbox.api.FBoxAssetInterface;
/**
*
* @author robertvokac
*/
public class FBoxAssetLibGDXImpl implements FBoxAssetInterface {
}

View File

@ -1,32 +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.fbox.impl.libgdx;
import com.openeggbert.core.fbox.api.FBoxAudioInterface;
/**
*
* @author robertvokac
*/
public class FBoxAudioLibGDXImpl implements FBoxAudioInterface {
}

View File

@ -1,32 +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.fbox.impl.libgdx;
import com.openeggbert.core.fbox.api.FBoxInputInterface;
/**
*
* @author robertvokac
*/
public class FBoxInputLibGDXImpl implements FBoxInputInterface {
}

View File

@ -1,131 +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.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; }
}

View File

@ -1,32 +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.fbox.impl.libgdx;
import com.openeggbert.core.fbox.api.FBoxStorageInterface;
/**
*
* @author robertvokac
*/
public class FBoxStorageLibGDXImpl implements FBoxStorageInterface {
}

View File

@ -36,11 +36,13 @@ import com.openeggbert.core.mod.Mod;
import com.openeggbert.core.mod.ModIdentification; import com.openeggbert.core.mod.ModIdentification;
import com.openeggbert.core.screen.GameSpaceListScreen; import com.openeggbert.core.screen.GameSpaceListScreen;
import com.openeggbert.core.screen.InitScreen; import com.openeggbert.core.screen.InitScreen;
import com.openeggbert.gdx.storage.Storage; import com.pixelgamelibrary.storage.Storage;
import com.openeggbert.gdx.storage.StorageImplementationLoader; import com.pixelgamelibrary.storage.StorageImplementationLoader;
import com.openeggbert.core.configuration.OpenEggbertDisplayMode; import com.openeggbert.core.configuration.OpenEggbertDisplayMode;
import com.openeggbert.core.fbox.core.FBoxGame; import com.pixelgamelibrary.Game;
import com.openeggbert.core.utils.OpenEggbertUtils; import com.openeggbert.core.utils.OpenEggbertUtils;
import com.pixelgamelibrary.Pixel;
import com.pixelgamelibrary.backends.libgdx.PixelLibGDXBackend;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
@ -51,7 +53,7 @@ import lombok.Data;
* platforms. * platforms.
*/ */
@Data @Data
public class OpenEggbertGame extends FBoxGame { public class OpenEggbertGame extends Game {
private Texture image; private Texture image;
private GameSpace gameSpace = null; private GameSpace gameSpace = null;
@ -82,6 +84,7 @@ public class OpenEggbertGame extends FBoxGame {
public OpenEggbertGame(GameSpace gameSpace, String absolutePathOfRootDirectoryIn) { public OpenEggbertGame(GameSpace gameSpace, String absolutePathOfRootDirectoryIn) {
this.gameSpace = gameSpace; this.gameSpace = gameSpace;
this.absolutePathOfRootDirectory = absolutePathOfRootDirectoryIn; this.absolutePathOfRootDirectory = absolutePathOfRootDirectoryIn;
Pixel.setBackend(new PixelLibGDXBackend());
} }

View File

@ -19,8 +19,8 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.mod; package com.openeggbert.core.mod;
import com.openeggbert.core.fbox.api.XmlElement; import com.pixelgamelibrary.api.XmlElement;
import com.openeggbert.core.fbox.core.FBox; import com.pixelgamelibrary.Pixel;
import com.openeggbert.core.release.Release; import com.openeggbert.core.release.Release;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -34,7 +34,7 @@ import lombok.Data;
public class Mod { public class Mod {
public Mod(String xml) { public Mod(String xml) {
XmlElement root = FBox.get().utils().parseXml(xml); XmlElement root = Pixel.get().utils().parseXml(xml);
XmlElement parentElement = root.getChildByName("parent"); XmlElement parentElement = root.getChildByName("parent");
if (parentElement != null) { if (parentElement != null) {
parent = new ModIdentification(parentElement); parent = new ModIdentification(parentElement);

View File

@ -19,7 +19,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.mod; package com.openeggbert.core.mod;
import com.openeggbert.core.fbox.api.XmlElement; import com.pixelgamelibrary.api.XmlElement;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;

View File

@ -19,7 +19,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.mod; package com.openeggbert.core.mod;
import com.openeggbert.core.fbox.api.XmlElement; import com.pixelgamelibrary.api.XmlElement;
/** /**
* *

View File

@ -25,7 +25,7 @@ import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.openeggbert.core.fbox.core.FBoxScreen; import com.pixelgamelibrary.Screen;
import com.openeggbert.core.gamespace.GameFileType; import com.openeggbert.core.gamespace.GameFileType;
import com.openeggbert.core.main.OpenEggbertGame; import com.openeggbert.core.main.OpenEggbertGame;
import com.openeggbert.core.utils.OpenEggbertUtils; import com.openeggbert.core.utils.OpenEggbertUtils;
@ -36,7 +36,7 @@ import java.util.Optional;
* *
* @author robertvokac * @author robertvokac
*/ */
public abstract class AbstractOpenEggbertScreen extends FBoxScreen { public abstract class AbstractOpenEggbertScreen extends Screen {
protected OpenEggbertGame game; protected OpenEggbertGame game;
protected SpriteBatch batch; protected SpriteBatch batch;

View File

@ -21,7 +21,7 @@ package com.openeggbert.core.utils;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.files.FileHandle;
import com.openeggbert.core.fbox.core.FBox; import com.pixelgamelibrary.Pixel;
/** /**
* *
@ -35,7 +35,7 @@ public class EmbeddedFileHandleFactory {
public static FileHandle create(String name) { public static FileHandle create(String name) {
if (FBox.get().getPlatform().isAndroid() || FBox.get().getPlatform().isWeb()) { if (Pixel.get().getPlatform().isAndroid() || Pixel.get().getPlatform().isWeb()) {
return Gdx.files.internal(name); return Gdx.files.internal(name);
} else { } else {
return Gdx.files.classpath(name); return Gdx.files.classpath(name);

View File

@ -1,34 +0,0 @@
package com.openeggbert.gdx.storage;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.ScreenUtils;
/** {@link com.badlogic.gdx.ApplicationListener} implementation shared by all platforms. */
public class GdxStorageMainClass extends ApplicationAdapter {
private SpriteBatch batch;
private Texture image;
@Override
public void create() {
batch = new SpriteBatch();
image = new Texture("libgdx.png");
}
@Override
public void render() {
ScreenUtils.clear(0.15f, 0.15f, 0.2f, 1f);
batch.begin();
batch.draw(image, 140, 210);
batch.end();
}
@Override
public void dispose() {
batch.dispose();
image.dispose();
}
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,12 +17,13 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.api; package com.pixelgamelibrary;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public interface FBoxNetInterface { public abstract class Game extends com.badlogic.gdx.Game {
} }

View File

@ -6,4 +6,4 @@
<!-- Reflection includes may be needed for your code or library code. Each value is separated by periods ('.'). --> <!-- Reflection includes may be needed for your code or library code. Each value is separated by periods ('.'). -->
<!-- You can include a full package by not including the name of a type at the end. --> <!-- You can include a full package by not including the name of a type at the end. -->
</module> </module>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,25 +17,41 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.core; package com.pixelgamelibrary;
import com.openeggbert.core.fbox.impl.libgdx.FBoxLibGDXImpl; import com.pixelgamelibrary.api.PixelBackend;
import com.openeggbert.core.fbox.api.FBoxInterface;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public class FBox { public class Pixel {
private static FBoxInterface INSTANCE = null;
private static PixelBackend INSTANCE = null;
private FBox() {
private Pixel() {
//Not meant to be instantiated. //Not meant to be instantiated.
} }
public static FBoxInterface get() {
if(INSTANCE == null) { public static PixelBackend get() {
INSTANCE = new FBoxLibGDXImpl(); return getBackend();
}
public static void setBackend(PixelBackend pixelBackend) {
if (isBackendSet()) {
throw new PixelException("Pixel Backend was already set");
}
INSTANCE = pixelBackend;
}
public static PixelBackend getBackend() {
if (!isBackendSet()) {
throw new PixelException("Pixel Backend was not set");
} }
return INSTANCE; return INSTANCE;
} }
public static boolean isBackendSet() {
return INSTANCE != null;
}
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,13 +17,17 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.core;
package com.pixelgamelibrary;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public abstract class FBoxGame extends com.badlogic.gdx.Game { public class PixelException extends RuntimeException{
public PixelException(String string) {
super(string);
}
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.entity; package com.pixelgamelibrary;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,12 +17,12 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.api; package com.pixelgamelibrary;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public interface FBoxAssetInterface { public abstract class Screen extends com.badlogic.gdx.ScreenAdapter {
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,15 +17,15 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.utils; package com.pixelgamelibrary;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public class Constants { public class WindowMode {
private Constants() { private WindowMode() {
//Not meant to be instantiated. //Not meant to be instantiated.
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,12 +17,12 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.api; package com.pixelgamelibrary.api;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public interface FBoxAudioInterface { public interface AssetI {
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,12 +17,12 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.api; package com.pixelgamelibrary.api;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public interface FBoxInputInterface { public interface AudioI {
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,13 +17,13 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.api; package com.pixelgamelibrary.api;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public interface FBoxGraphicsInterface { public interface GraphicsI {
boolean setToOriginalDisplayMode(); boolean setToOriginalDisplayMode();
String setDisplayMode(boolean fullscreen, boolean window); String setDisplayMode(boolean fullscreen, boolean window);

View File

@ -0,0 +1,28 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// Pixel: Game library.
// 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.pixelgamelibrary.api;
/**
*
* @author robertvokac
*/
public interface InputI {
}

View File

@ -0,0 +1,28 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// Pixel: Game library.
// 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.pixelgamelibrary.api;
/**
*
* @author robertvokac
*/
public interface NetI {
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,16 +17,24 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.impl.libgdx; package com.pixelgamelibrary.api;
import com.openeggbert.core.fbox.api.FBoxNetInterface; import com.pixelgamelibrary.Platform;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public class FBoxNetLibGDXImpl implements FBoxNetInterface { public interface PixelBackend {
void exit();
Platform getPlatform();
GraphicsI graphics();
AudioI audio();
InputI input();
NetI net();
AssetI asset();
StorageI storage();
UtilsI utils();
} }

View File

@ -0,0 +1,28 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// Pixel: Game library.
// 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.pixelgamelibrary.api;
/**
*
* @author robertvokac
*/
public interface StorageI {
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,12 +17,12 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.api; package com.pixelgamelibrary.api;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public interface FBoxUtilsInterface { public interface UtilsI {
XmlElement parseXml(String xmlString); XmlElement parseXml(String xmlString);
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.api; package com.pixelgamelibrary.api;
/** /**
* *

View File

@ -0,0 +1,32 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// Pixel: Game library.
// 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.pixelgamelibrary.backends.libgdx;
import com.pixelgamelibrary.api.AssetI;
/**
*
* @author robertvokac
*/
public class AssetLibGDXImpl implements AssetI {
}

View File

@ -0,0 +1,32 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// Pixel: Game library.
// 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.pixelgamelibrary.backends.libgdx;
import com.pixelgamelibrary.api.AudioI;
/**
*
* @author robertvokac
*/
public class AudioLibGDXImpl implements AudioI {
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,10 +17,10 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.impl.libgdx; package com.pixelgamelibrary.backends.libgdx;
import com.badlogic.gdx.utils.XmlReader; import com.badlogic.gdx.utils.XmlReader;
import com.openeggbert.core.fbox.api.XmlElement; import com.pixelgamelibrary.api.XmlElement;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,22 +17,22 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.impl.libgdx; package com.pixelgamelibrary.backends.libgdx;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Graphics; import com.badlogic.gdx.Graphics;
import com.openeggbert.core.fbox.utils.Constants; import com.pixelgamelibrary.WindowMode;
import com.openeggbert.core.fbox.core.DefinitiveFrameworkException; import com.pixelgamelibrary.PixelException;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.openeggbert.core.fbox.api.FBoxGraphicsInterface; import com.pixelgamelibrary.api.GraphicsI;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public class FBoxGraphicsLibGDXImpl implements FBoxGraphicsInterface { public class GraphicsLibGDXImpl implements GraphicsI {
@Override @Override
@ -66,15 +66,15 @@ public class FBoxGraphicsLibGDXImpl implements FBoxGraphicsInterface {
Gdx.app.error("InitScreen", "Switching to fullscreen mode failed."); Gdx.app.error("InitScreen", "Switching to fullscreen mode failed.");
return null; return null;
} }
return Constants.FULLSCREEN; return WindowMode.FULLSCREEN;
} }
if (window) { if (window) {
setToOriginalDisplayMode(); setToOriginalDisplayMode();
Gdx.graphics.setWindowedMode(640, 480); Gdx.graphics.setWindowedMode(640, 480);
return Constants.WINDOW; return WindowMode.WINDOW;
} }
throw new DefinitiveFrameworkException("Unsupported DisplayMode: fullscreen=" + fullscreen + " window=" + window); throw new PixelException("Unsupported DisplayMode: fullscreen=" + fullscreen + " window=" + window);
} }
@Override @Override

View File

@ -0,0 +1,32 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// Pixel: Game library.
// 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.pixelgamelibrary.backends.libgdx;
import com.pixelgamelibrary.api.InputI;
/**
*
* @author robertvokac
*/
public class InputLibGDXImpl implements InputI {
}

View File

@ -0,0 +1,32 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// Pixel: Game library.
// 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.pixelgamelibrary.backends.libgdx;
import com.pixelgamelibrary.api.NetI;
/**
*
* @author robertvokac
*/
public class NetLibGDXImpl implements NetI {
}

View File

@ -0,0 +1,131 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// Pixel: Game library.
// 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.pixelgamelibrary.backends.libgdx;
import com.badlogic.gdx.Application;
import static com.badlogic.gdx.Application.ApplicationType.Desktop;
import com.badlogic.gdx.Gdx;
import com.pixelgamelibrary.PixelException;
import com.pixelgamelibrary.Platform;
import com.pixelgamelibrary.api.AssetI;
import com.pixelgamelibrary.api.AudioI;
import com.pixelgamelibrary.api.GraphicsI;
import com.pixelgamelibrary.api.InputI;
import com.pixelgamelibrary.api.UtilsI;
import com.pixelgamelibrary.api.StorageI;
import com.pixelgamelibrary.api.NetI;
import com.pixelgamelibrary.api.PixelBackend;
/**
*
* @author robertvokac
*/
public class PixelLibGDXBackend implements PixelBackend {
private GraphicsI pixelGraphicsLibGdxImpl = null;
private AudioI pixelAudioLibGdxImpl = null;
private InputI pixelInputLibGdxImpl = null;
private NetI pixelNetLibGdxImpl = null;
private AssetI pixelAssetLibGdxImpl = null;
private StorageI pixelStorageLibGdxImpl = null;
private UtilsI pixelUtilsLibGdxImpl = 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 PixelException("Unsupported platform: " + applicationType);
}
}
@Override
public GraphicsI graphics() {
if (pixelGraphicsLibGdxImpl == null) {
pixelGraphicsLibGdxImpl = new GraphicsLibGDXImpl();
}
return pixelGraphicsLibGdxImpl;
}
@Override
public AudioI audio() {
if (pixelAudioLibGdxImpl == null) {
pixelAudioLibGdxImpl = new AudioLibGDXImpl();
}
return pixelAudioLibGdxImpl;
}
@Override
public InputI input() {
if (pixelInputLibGdxImpl == null) {
pixelInputLibGdxImpl = new InputLibGDXImpl();
}
return pixelInputLibGdxImpl;
}
@Override
public NetI net() {
if (pixelNetLibGdxImpl == null) {
pixelNetLibGdxImpl = new NetLibGDXImpl();
}
return pixelNetLibGdxImpl;
}
@Override
public AssetI asset() {
if (pixelAssetLibGdxImpl == null) {
pixelAssetLibGdxImpl = new AssetLibGDXImpl();
}
return pixelAssetLibGdxImpl;
}
@Override
public StorageI storage() {
if (pixelStorageLibGdxImpl == null) {
pixelStorageLibGdxImpl = new StorageLibGDXImpl();
}
return pixelStorageLibGdxImpl;
}
@Override
public UtilsI utils() {
if (pixelUtilsLibGdxImpl == null) {
pixelUtilsLibGdxImpl = new UtilsLibGDXImpl();
}
return pixelUtilsLibGdxImpl; }
}

View File

@ -0,0 +1,32 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// Pixel: Game library.
// 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.pixelgamelibrary.backends.libgdx;
import com.pixelgamelibrary.api.StorageI;
/**
*
* @author robertvokac
*/
public class StorageLibGDXImpl implements StorageI {
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Open Eggbert: Free recreation of the computer game Speedy Eggbert. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,17 +17,17 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.core.fbox.impl.libgdx; package com.pixelgamelibrary.backends.libgdx;
import com.badlogic.gdx.utils.XmlReader; import com.badlogic.gdx.utils.XmlReader;
import com.openeggbert.core.fbox.api.FBoxUtilsInterface; import com.pixelgamelibrary.api.XmlElement;
import com.openeggbert.core.fbox.api.XmlElement; import com.pixelgamelibrary.api.UtilsI;
/** /**
* *
* @author robertvokac * @author robertvokac
*/ */
public class FBoxUtilsLibGDXImpl implements FBoxUtilsInterface { public class UtilsLibGDXImpl implements UtilsI {
@Override @Override
public XmlElement parseXml(String xmlString) { public XmlElement parseXml(String xmlString) {

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage; package com.pixelgamelibrary.storage;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage; package com.pixelgamelibrary.storage;
import com.badlogic.gdx.utils.Base64Coder; import com.badlogic.gdx.utils.Base64Coder;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,9 +17,9 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage; package com.pixelgamelibrary.storage;
import com.openeggbert.core.fbox.entity.Platform; import com.pixelgamelibrary.Platform;
import java.util.List; import java.util.List;
/** /**

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,14 +17,14 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage; package com.pixelgamelibrary.storage;
import com.openeggbert.gdx.storage.map.WebGLStorage; import com.pixelgamelibrary.storage.map.WebGLStorage;
import com.openeggbert.gdx.storage.map.MemoryStorage; import com.pixelgamelibrary.storage.map.MemoryStorage;
import com.openeggbert.gdx.storage.filesystem.AndroidStorage; import com.pixelgamelibrary.storage.filesystem.AndroidStorage;
import com.openeggbert.gdx.storage.filesystem.DesktopStorage; import com.pixelgamelibrary.storage.filesystem.DesktopStorage;
import com.openeggbert.core.fbox.core.FBox; import com.pixelgamelibrary.Pixel;
import com.openeggbert.core.fbox.entity.Platform; import com.pixelgamelibrary.Platform;
/** /**
* *
@ -38,7 +38,7 @@ public class StorageImplementationLoader {
private static Storage storage = null; private static Storage storage = null;
public static Storage getStorage() { public static Storage getStorage() {
final Platform platform = FBox.get().getPlatform(); final Platform platform = Pixel.get().getPlatform();
if (storage == null) { if (storage == null) {
storage = new MemoryStorage(); storage = new MemoryStorage();
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.command; package com.pixelgamelibrary.storage.command;
import java.util.function.Function; import java.util.function.Function;
@ -25,13 +25,13 @@ import java.util.function.Function;
* *
* @author robertvokac * @author robertvokac
*/ */
public class BaseCommandLine implements StorageCommand { public class BaseCommand implements StorageCommand {
private StorageCommandLine storageCommandLine = null; private StorageCommandLine storageCommandLine = null;
private String name; private String name;
private final Function<String, StorageCommandResult> function; private final Function<String, StorageCommandResult> function;
public BaseCommandLine( public BaseCommand(
StorageCommandLine storageCommandLineIn, String nameIn, Function<String, StorageCommandResult> functionIn StorageCommandLine storageCommandLineIn, String nameIn, Function<String, StorageCommandResult> functionIn
) { ) {
setStorageCommandLine(storageCommandLineIn); setStorageCommandLine(storageCommandLineIn);

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.command; package com.pixelgamelibrary.storage.command;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.command; package com.pixelgamelibrary.storage.command;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,9 +17,9 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.command; package com.pixelgamelibrary.storage.command;
import com.openeggbert.gdx.storage.Storage; import com.pixelgamelibrary.storage.Storage;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
@ -126,7 +126,7 @@ public class StorageCommandLine {
} }
private void addCommand(String nameIn, Function<String, StorageCommandResult> functionIn) { private void addCommand(String nameIn, Function<String, StorageCommandResult> functionIn) {
StorageCommand storageCommand = new BaseCommandLine(this, nameIn, functionIn); StorageCommand storageCommand = new BaseCommand(this, nameIn, functionIn);
commands.put(storageCommand.getName(), storageCommand); commands.put(storageCommand.getName(), storageCommand);
} }

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,10 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.command; package com.pixelgamelibrary.storage.command;
import com.openeggbert.gdx.storage.map.MemoryStorage;
import java.util.Scanner;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.command; package com.pixelgamelibrary.storage.command;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,9 +17,9 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.filesystem; package com.pixelgamelibrary.storage.filesystem;
import com.openeggbert.core.fbox.entity.Platform; import com.pixelgamelibrary.Platform;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,10 +17,10 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.filesystem; package com.pixelgamelibrary.storage.filesystem;
import com.openeggbert.core.fbox.entity.Platform; import com.pixelgamelibrary.Platform;
import com.openeggbert.gdx.storage.Storage; import com.pixelgamelibrary.storage.Storage;
import java.util.List; import java.util.List;
/** /**

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,9 +17,9 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.filesystem; package com.pixelgamelibrary.storage.filesystem;
import com.openeggbert.core.fbox.entity.Platform; import com.pixelgamelibrary.Platform;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,9 +17,9 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.map; package com.pixelgamelibrary.storage.map;
import com.openeggbert.gdx.storage.GdxStorageException; import com.pixelgamelibrary.storage.GdxStorageException;
/** /**

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,14 +17,14 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.map; package com.pixelgamelibrary.storage.map;
import com.badlogic.gdx.Application; import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.openeggbert.core.fbox.entity.Platform; import com.pixelgamelibrary.Platform;
import com.openeggbert.gdx.storage.GdxStorageException; import com.pixelgamelibrary.storage.GdxStorageException;
import com.openeggbert.gdx.storage.GdxStorageUtils; import com.pixelgamelibrary.storage.GdxStorageUtils;
import com.openeggbert.gdx.storage.Storage; import com.pixelgamelibrary.storage.Storage;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.map; package com.pixelgamelibrary.storage.map;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,9 +17,9 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.map; package com.pixelgamelibrary.storage.map;
import com.openeggbert.core.fbox.entity.Platform; import com.pixelgamelibrary.Platform;
/** /**
* *

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.map; package com.pixelgamelibrary.storage.map;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.map; package com.pixelgamelibrary.storage.map;
import com.badlogic.gdx.Preferences; import com.badlogic.gdx.Preferences;
import java.util.Collections; import java.util.Collections;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.map; package com.pixelgamelibrary.storage.map;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
// Gdx Storage: Multiplatform persistent storage. // Pixel: Game library.
// Copyright (C) 2024 the original author or authors. // Copyright (C) 2024 the original author or authors.
// //
// This program is free software: you can redistribute it and/or // This program is free software: you can redistribute it and/or
@ -17,11 +17,11 @@
// <https://www.gnu.org/licenses/> or write to the Free Software // <https://www.gnu.org/licenses/> or write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.gdx.storage.map; package com.pixelgamelibrary.storage.map;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences; import com.badlogic.gdx.Preferences;
import com.openeggbert.core.fbox.entity.Platform; import com.pixelgamelibrary.Platform;
/** /**
* *

View File

@ -23,6 +23,7 @@
<inherits name="com.github.czyzby.websocket.GdxWebSocketGwt" /> <inherits name="com.github.czyzby.websocket.GdxWebSocketGwt" />
<inherits name="com.github.czyzby.websocket.GdxWebSocketSerialization" /> <inherits name="com.github.czyzby.websocket.GdxWebSocketSerialization" />
<inherits name="com.openeggbert.core.main.OpenEggbertGame" /> <inherits name="com.openeggbert.core.main.OpenEggbertGame" />
<inherits name="com.pixelgamelibrary.Pixel" />
<!--<inherits name="com.openeggbert.gdx.storage.GdxStorageMainClass" />--> <!--<inherits name="com.openeggbert.gdx.storage.GdxStorageMainClass" />-->
<inherits name="formic" /> <inherits name="formic" />
<inherits name="guacamole_gdx_gwt" /> <inherits name="guacamole_gdx_gwt" />

View File

@ -19,7 +19,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.lwjgl3.debugging; package com.openeggbert.lwjgl3.debugging;
import com.openeggbert.gdx.storage.command.CommandLineScanner; import com.pixelgamelibrary.storage.command.CommandLineScanner;
import java.util.Scanner; import java.util.Scanner;
/** /**

View File

@ -19,9 +19,9 @@
/////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////
package com.openeggbert.lwjgl3.debugging; package com.openeggbert.lwjgl3.debugging;
import com.openeggbert.gdx.storage.command.StorageCommandLine; import com.pixelgamelibrary.storage.command.StorageCommandLine;
import com.openeggbert.gdx.storage.command.StorageCommandLineScanner; import com.pixelgamelibrary.storage.command.StorageCommandLineScanner;
import com.openeggbert.gdx.storage.map.MemoryStorage; import com.pixelgamelibrary.storage.map.MemoryStorage;
/** /**
* *