This commit is contained in:
Robert Vokac 2024-09-18 18:19:55 +02:00
parent 98217661b8
commit 39585834a8
No known key found for this signature in database
GPG Key ID: C459E1E4B4A986BB
4 changed files with 7 additions and 8 deletions

View File

@ -20,9 +20,9 @@
package com.openeggbert.core.main;
import com.openeggbert.core.gamespace.GameSpace;
import com.pixelgamelibrary.api.GameI;
import com.pixelgamelibrary.api.PixelApplication;
import java.util.Map;
import com.pixelgamelibrary.api.Game;
/**
* {@link com.badlogic.gdx.ApplicationListener} implementation shared by all
@ -34,7 +34,7 @@ public class OpenEggbertApplication extends PixelApplication {
private static final String ABSOLUTE_PATH_OF_ROOT_DIRECTORY_IN = "absolutePathOfRootDirectoryIn";
@Override
public GameI createGameViaMap(Map<String, Object> objects) {
public Game createGameViaMap(Map<String, Object> objects) {
String absolutePathOfRootDirectoryIn = null;
GameSpace gameSpace = null;

View File

@ -73,12 +73,12 @@ public class OpenEggbertGame extends GameAdapter {
// for(FileHandle f:Gdx.files.internal(".").list()) {
// System.out.println("assets contains also: " + f.name());
// }
com.pixelgamelibrary.api.storage.FileHandle embeddedModsDirectory = Pixel.asset().getAssets().file("/embedded_mods");
com.pixelgamelibrary.api.storage.FileHandle embeddedModsDirectory = Pixel.files().assets().file("/embedded_mods");
System.out.println("embeddedModsDirectory.exists=" + embeddedModsDirectory.exists());
System.out.println("embeddedModsDirectory.list().size()=" + embeddedModsDirectory.list().size());
embeddedModsDirectory.list().forEach(e -> System.out.println(e.path()));
Pixel.asset().getAssets().list().forEach(e -> System.out.println(e));
Pixel.files().assets().list().forEach(e -> System.out.println(e));
for (FileHandle embeddedModGroup : embeddedModsDirectory.list()) {
if (embeddedModGroup.name().equals("README.md")) {

View File

@ -29,7 +29,6 @@ import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.utils.ScreenUtils;
import com.openeggbert.core.gamespace.GameSpace;
import com.openeggbert.core.main.OpenEggbertApplication;
import com.openeggbert.core.main.OpenEggbertGame;
import com.openeggbert.core.mod.Mod;
import com.openeggbert.core.mod.ModType;
@ -75,7 +74,7 @@ public class GameSpaceListScreen extends OpenEggbertScreen {
Preferences prefs = Gdx.app.getPreferences("My Preferences");
prefs.putString("test", "abc");
prefs.flush();
final Storage storage = Pixel.storage().getStorage();
final Storage storage = Pixel.files().local();
storage.createDirectory("modes");
storage.createDirectory("gameSpaces");
System.out.println(storage.debug());

View File

@ -28,7 +28,7 @@ import com.openeggbert.core.gamespace.GameSpace;
import com.pixelgamelibrary.api.Pixel;
import com.pixelgamelibrary.backend.libgdx.PixelBackendLibGDX;
import java.util.Optional;
import com.pixelgamelibrary.api.GameI;
import com.pixelgamelibrary.api.Game;
import com.pixelgamelibrary.backend.libgdx.game.LibGdxGame;
/** Launches the desktop (LWJGL3) application. */
@ -44,7 +44,7 @@ public class Lwjgl3Launcher {
String currentDirectory = DesktopUtils.getPathOfDirectoryWhereJarIsRunning();
OpenEggbertApplication openEggbertApplication = new OpenEggbertApplication();
GameI game;
Game game;
if (gameSpace.isPresent()) {
game = openEggbertApplication.createGame("gameSpace", gameSpace.get(), "currentDirectory", currentDirectory);
} else {