Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ and set **___Shared VM options___** to `--enable-preview`.
</details>

<details>
<summary>Cannot resolve symbol 'HorizonForbiddenWest'</summary>
<summary>Cannot resolve symbol 'HFW'</summary>
IntelliJ IDEA refuses to provide code analysis for generated RTTI classes due to the enormous size of the generated
code, and all references will be highlighted in _red_. The project will still compile and launch just fine.

Expand Down
2 changes: 1 addition & 1 deletion odradek-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!-- Internal dependencies -->
<dependency>
<groupId>sh.adelessfox</groupId>
<artifactId>odradek-game</artifactId>
<artifactId>odradek-game-decima</artifactId>
</dependency>
<dependency>
<groupId>sh.adelessfox</groupId>
Expand Down
4 changes: 2 additions & 2 deletions odradek-app/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
requires jakarta.inject;
requires java.desktop;
requires odradek.core;
requires odradek.game;
requires odradek.game.hfw;
requires odradek.game.decima;
requires odradek.game.hfw.ui;
requires odradek.game.hfw;
requires odradek.rtti;
requires odradek.ui;
requires org.slf4j;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sh.adelessfox.odradek.app.cli.ExportAssetCommand;
import sh.adelessfox.odradek.app.ui.Application;
import sh.adelessfox.odradek.app.ui.ApplicationParameters;
import sh.adelessfox.odradek.game.ObjectId;
import sh.adelessfox.odradek.game.decima.ObjectId;
import sh.adelessfox.odradek.util.system.OperatingSystem;

import javax.swing.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import picocli.CommandLine.Option;
import sh.adelessfox.odradek.game.Game;
import sh.adelessfox.odradek.game.decima.DecimaGame;

import java.io.IOException;
import java.nio.file.Path;
Expand All @@ -13,15 +14,15 @@ abstract class AbstractCommand implements Callable<Void> {

@Override
public Void call() throws Exception {
try (Game game = createGame(source)) {
try (var game = createGame(source)) {
execute(game);
return null;
}
}

abstract void execute(Game game) throws IOException;
abstract void execute(DecimaGame game) throws IOException;

private Game createGame(Path path) throws IOException {
return Game.load(path);
private DecimaGame createGame(Path path) throws IOException {
return (DecimaGame) Game.load(path);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import picocli.CommandLine.Parameters;
import sh.adelessfox.odradek.game.Converter;
import sh.adelessfox.odradek.game.Exporter;
import sh.adelessfox.odradek.game.Game;
import sh.adelessfox.odradek.game.ObjectId;
import sh.adelessfox.odradek.game.decima.DecimaGame;
import sh.adelessfox.odradek.game.decima.ObjectId;
import sh.adelessfox.odradek.rtti.data.TypedObject;

import java.io.IOException;
Expand All @@ -32,7 +32,7 @@ public class ExportAssetCommand extends AbstractCommand {
private Path output;

@Override
void execute(Game game) {
void execute(DecimaGame game) {
if (format == null) {
log.info("No format specified for export; supported formats are: {}", supportedFormats());
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import sh.adelessfox.odradek.app.ui.settings.SettingsEvent;
import sh.adelessfox.odradek.event.EventBus;
import sh.adelessfox.odradek.game.Game;
import sh.adelessfox.odradek.game.hfw.game.ForbiddenWestGame;
import sh.adelessfox.odradek.game.decima.DecimaGame;
import sh.adelessfox.odradek.ui.actions.Actions;
import sh.adelessfox.odradek.ui.data.DataContext;
import sh.adelessfox.odradek.ui.editors.EditorManager;
Expand Down Expand Up @@ -46,7 +46,7 @@ public static synchronized void start(ApplicationParameters params) throws IOExc
throw new IllegalStateException("Application is already running");
}

var game = (ForbiddenWestGame) Game.load(params.sourcePath());
var game = (DecimaGame) Game.load(params.sourcePath());
var component = DaggerApplicationComponent.builder()
.game(game)
.config(params.configPath())
Expand All @@ -59,8 +59,10 @@ public static synchronized void start(ApplicationParameters params) throws IOExc
}

private static void run(ApplicationComponent component, ApplicationParameters params) {
Thread.setDefaultUncaughtExceptionHandler(
(_, e) -> Dialogs.showExceptionDialog(JOptionPane.getRootFrame(), e.toString(), e));
Thread.setDefaultUncaughtExceptionHandler((_, e) -> {
log.error("Uncaught exception in thread '{}'", Thread.currentThread().getName(), e);
Dialogs.showExceptionDialog(JOptionPane.getRootFrame(), e.toString(), e);
});

if (OperatingSystem.name() == OperatingSystem.Name.LINUX) {
// enable custom window decorations
Expand Down Expand Up @@ -127,7 +129,7 @@ private static void saveFrameSettings(Settings settings, JFrame frame) {
));
}

public ForbiddenWestGame game() {
public DecimaGame game() {
return component.game();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import sh.adelessfox.odradek.app.ui.settings.Settings;
import sh.adelessfox.odradek.app.ui.settings.SettingsModule;
import sh.adelessfox.odradek.event.EventBus;
import sh.adelessfox.odradek.game.hfw.game.ForbiddenWestGame;
import sh.adelessfox.odradek.game.decima.DecimaGame;
import sh.adelessfox.odradek.ui.editors.EditorManager;

import java.nio.file.Path;
Expand All @@ -27,12 +27,12 @@ interface ApplicationComponent {

EventBus events();

ForbiddenWestGame game();
DecimaGame game();

@Component.Builder
interface Builder {
@BindsInstance
Builder game(ForbiddenWestGame game);
Builder game(DecimaGame game);

@BindsInstance
Builder config(@Named("config") Path config);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package sh.adelessfox.odradek.app.ui.bookmarks;

import sh.adelessfox.odradek.game.ObjectId;
import sh.adelessfox.odradek.game.decima.ObjectId;

public record Bookmark(ObjectId objectId, String name) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
import sh.adelessfox.odradek.event.EventBus;
import sh.adelessfox.odradek.game.ObjectId;
import sh.adelessfox.odradek.game.decima.ObjectId;

import java.util.LinkedHashMap;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package sh.adelessfox.odradek.app.ui.component.bookmarks;

import sh.adelessfox.odradek.app.ui.bookmarks.Bookmarks;
import sh.adelessfox.odradek.game.ObjectId;
import sh.adelessfox.odradek.game.ObjectIdHolder;
import sh.adelessfox.odradek.game.decima.ObjectId;
import sh.adelessfox.odradek.game.decima.ObjectIdHolder;
import sh.adelessfox.odradek.ui.components.tree.TreeStructure;

import java.util.Comparator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package sh.adelessfox.odradek.app.ui.component.bookmarks.menu;

import sh.adelessfox.odradek.game.ObjectId;
import sh.adelessfox.odradek.game.ObjectIdHolder;
import sh.adelessfox.odradek.game.decima.ObjectId;
import sh.adelessfox.odradek.game.decima.ObjectIdHolder;
import sh.adelessfox.odradek.ui.actions.Action;
import sh.adelessfox.odradek.ui.actions.ActionContext;
import sh.adelessfox.odradek.ui.data.DataKeys;
Expand Down
Loading
Loading