PlutoEngine restructure part 2 - Migrated plutoio2 to plutolib
This commit is contained in:
parent
5ee3ecbd65
commit
6897977d26
|
@ -6,14 +6,14 @@ import org.lwjgl.glfw.GLFW;
|
|||
import org.lwjgl.opengl.GL;
|
||||
import org.lwjgl.opengl.GL33;
|
||||
|
||||
import cz.tefek.io.modloader.ModLoaderCore;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.l10n.PlutoL10n;
|
||||
import cz.tefek.pluto.engine.buffer.GLFWImageUtil;
|
||||
import cz.tefek.pluto.engine.display.Display;
|
||||
import cz.tefek.pluto.engine.display.DisplayBuilder;
|
||||
import cz.tefek.pluto.engine.input.InputBus;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
import cz.tefek.pluto.l10n.PlutoL10n;
|
||||
import cz.tefek.pluto.modloader.ModLoaderCore;
|
||||
|
||||
public abstract class PlutoApplication
|
||||
{
|
||||
|
|
|
@ -5,8 +5,8 @@ import java.util.List;
|
|||
|
||||
import org.lwjgl.opengl.GL33;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
public class Framebuffer
|
||||
{
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
package cz.tefek.pluto.engine.graphics;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.io.asl.resource.ResourceSubscriber;
|
||||
import cz.tefek.io.modloader.Mod;
|
||||
import cz.tefek.io.modloader.ModEntry;
|
||||
import cz.tefek.io.modloader.ModLoaderCore;
|
||||
import cz.tefek.io.modloader.event.ModPreLoad;
|
||||
import cz.tefek.io.modloader.event.ModPreLoadEvent;
|
||||
import cz.tefek.io.modloader.event.ModUnload;
|
||||
import cz.tefek.io.modloader.event.ModUnloadEvent;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.pluto.engine.graphics.font.FontManager;
|
||||
import cz.tefek.pluto.engine.graphics.font.FontShader;
|
||||
import cz.tefek.pluto.engine.graphics.texture.MagFilter;
|
||||
|
@ -18,6 +8,16 @@ import cz.tefek.pluto.engine.graphics.texture.WrapMode;
|
|||
import cz.tefek.pluto.engine.graphics.texture.texture2d.RectangleTexture;
|
||||
import cz.tefek.pluto.engine.gui.font.FontRenderer;
|
||||
import cz.tefek.pluto.engine.shader.RenderShaderBuilder;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceSubscriber;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.modloader.Mod;
|
||||
import cz.tefek.pluto.modloader.ModEntry;
|
||||
import cz.tefek.pluto.modloader.ModLoaderCore;
|
||||
import cz.tefek.pluto.modloader.event.ModPreLoad;
|
||||
import cz.tefek.pluto.modloader.event.ModPreLoadEvent;
|
||||
import cz.tefek.pluto.modloader.event.ModUnload;
|
||||
import cz.tefek.pluto.modloader.event.ModUnloadEvent;
|
||||
|
||||
/**
|
||||
* @author 493msi
|
||||
|
|
|
@ -6,9 +6,6 @@ import java.util.Map;
|
|||
import java.io.BufferedReader;
|
||||
import java.nio.file.Files;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.engine.graphics.texture.MagFilter;
|
||||
import cz.tefek.pluto.engine.graphics.texture.MinFilter;
|
||||
import cz.tefek.pluto.engine.graphics.texture.Texture;
|
||||
|
@ -16,6 +13,9 @@ import cz.tefek.pluto.engine.graphics.texture.WrapMode;
|
|||
import cz.tefek.pluto.engine.graphics.texture.texture2d.RectangleTexture;
|
||||
import cz.tefek.pluto.engine.gui.font.CharacterInfo;
|
||||
import cz.tefek.pluto.engine.gui.font.Font;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
public class FontManager
|
||||
{
|
||||
|
|
111
plutoio2/pom.xml
111
plutoio2/pom.xml
|
@ -1,111 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>cz.tefek</groupId>
|
||||
<artifactId>plutoio2</artifactId>
|
||||
<version>0.2</version>
|
||||
<name>plutoio2</name>
|
||||
<properties>
|
||||
<maven.compiler.release>11</maven.compiler.release>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<lwjgl.version>3.2.3</lwjgl.version>
|
||||
</properties>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>lwjgl-natives-linux-amd64</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>unix</family>
|
||||
<arch>amd64</arch>
|
||||
</os>
|
||||
</activation>
|
||||
<properties>
|
||||
<lwjgl.natives>natives-linux</lwjgl.natives>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>lwjgl-natives-macos-amd64</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>mac</family>
|
||||
<arch>amd64</arch>
|
||||
</os>
|
||||
</activation>
|
||||
<properties>
|
||||
<lwjgl.natives>natives-macos</lwjgl.natives>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>lwjgl-natives-windows-amd64</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>windows</family>
|
||||
<arch>amd64</arch>
|
||||
</os>
|
||||
</activation>
|
||||
<properties>
|
||||
<lwjgl.natives>natives-windows</lwjgl.natives>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>lwjgl-natives-windows-x86</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>windows</family>
|
||||
<arch>x86</arch>
|
||||
</os>
|
||||
</activation>
|
||||
<properties>
|
||||
<lwjgl.natives>natives-windows-x86</lwjgl.natives>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.lwjgl</groupId>
|
||||
<artifactId>lwjgl-bom</artifactId>
|
||||
<version>${lwjgl.version}</version>
|
||||
<scope>import</scope>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.5</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>28.0-jre</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.9</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<release>11</release>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,49 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>cz.tefek</groupId>
|
||||
<artifactId>plutolib</artifactId>
|
||||
<version>0.3</version>
|
||||
<name>plutolib</name>
|
||||
<properties>
|
||||
<maven.compiler.release>11</maven.compiler.release>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.5</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>28.0-jre</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.9</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<release>11</release>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.pluto.engine.chrono;
|
||||
package cz.tefek.pluto.chrono;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
|
@ -4,4 +4,4 @@
|
|||
* @author 493msi
|
||||
*
|
||||
*/
|
||||
package cz.tefek.pluto.engine.chrono;
|
||||
package cz.tefek.pluto.chrono;
|
|
@ -10,9 +10,9 @@ import java.lang.annotation.Annotation;
|
|||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.eventsystem.EventData;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
/**
|
||||
* A universal event manager. Register an event {@link Annotation} of your
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.asl.resource;
|
||||
package cz.tefek.pluto.io.asl.resource;
|
||||
|
||||
/**
|
||||
* Allows loading a resource from the file system location defined by the
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.asl.resource;
|
||||
package cz.tefek.pluto.io.asl.resource;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -8,9 +8,9 @@ import java.util.stream.Collectors;
|
|||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import cz.tefek.io.modloader.ModLoaderCore;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.Severity;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.Severity;
|
||||
import cz.tefek.pluto.modloader.ModLoaderCore;
|
||||
|
||||
/**
|
||||
* Resource address is a universal key for all resource and file loading. You
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.asl.resource;
|
||||
package cz.tefek.pluto.io.asl.resource;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.asl.resource;
|
||||
package cz.tefek.pluto.io.asl.resource;
|
||||
|
||||
/**
|
||||
* Doesn't do much right now. Just holds the default resource location.
|
|
@ -1,6 +1,6 @@
|
|||
package cz.tefek.io.asl.resource;
|
||||
package cz.tefek.pluto.io.asl.resource;
|
||||
|
||||
import cz.tefek.io.modloader.Mod;
|
||||
import cz.tefek.pluto.modloader.Mod;
|
||||
|
||||
/**
|
||||
* Allows access to resources using {@link ResourceAddress}</tt>. Requires a
|
|
@ -1,6 +1,6 @@
|
|||
package cz.tefek.io.asl.resource.raid;
|
||||
package cz.tefek.pluto.io.asl.resource.raid;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
|
||||
public interface IIdentifiable
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.asl.resource.raid;
|
||||
package cz.tefek.pluto.io.asl.resource.raid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.asl.resource.type;
|
||||
package cz.tefek.pluto.io.asl.resource.type;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
|
@ -6,11 +6,11 @@ import java.io.IOException;
|
|||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import cz.tefek.io.asl.resource.Resource;
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.io.asl.resource.ResourceHelper;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.Severity;
|
||||
import cz.tefek.pluto.io.asl.resource.Resource;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceHelper;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.Severity;
|
||||
|
||||
/**
|
||||
* {@link ResourceAddress} in, {@link BufferedImage} out.
|
|
@ -1,13 +1,13 @@
|
|||
package cz.tefek.io.asl.resource.type;
|
||||
package cz.tefek.pluto.io.asl.resource.type;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import cz.tefek.io.asl.resource.Resource;
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.Severity;
|
||||
import cz.tefek.pluto.io.asl.resource.Resource;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.Severity;
|
||||
|
||||
/**
|
||||
* {@link ResourceAddress} in, {@link InputStream} out.
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.asl.textio;
|
||||
package cz.tefek.pluto.io.asl.textio;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
|
@ -8,8 +8,8 @@ import java.nio.file.Files;
|
|||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
|
||||
/**
|
||||
* A simple text file reader. Apart from generic methods of loading, you can use
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.asl.textio;
|
||||
package cz.tefek.pluto.io.asl.textio;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.pluto.debug;
|
||||
package cz.tefek.pluto.io.logger;
|
||||
|
||||
public interface ISeverity
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.pluto.debug;
|
||||
package cz.tefek.pluto.io.logger;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
|
@ -6,8 +6,8 @@ import java.io.IOException;
|
|||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceHelper;
|
||||
import cz.tefek.io.asl.textio.TextOut;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceHelper;
|
||||
import cz.tefek.pluto.io.asl.textio.TextOut;
|
||||
|
||||
/**
|
||||
* Logger. 'nuff said.
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.pluto.debug;
|
||||
package cz.tefek.pluto.io.logger;
|
||||
|
||||
/**
|
||||
* Message severity.
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.pluto.debug;
|
||||
package cz.tefek.pluto.io.logger;
|
||||
|
||||
/**
|
||||
* A more visual way to denote what's actually happening.
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.pluto.debug;
|
||||
package cz.tefek.pluto.io.logger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.pluto.debug;
|
||||
package cz.tefek.pluto.io.logger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.pluto.pp;
|
||||
package cz.tefek.pluto.io.pluto.pp;
|
||||
|
||||
/**
|
||||
* Thrown when a provided package definition is for some reason not valid.
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.pluto.pp;
|
||||
package cz.tefek.pluto.io.pluto.pp;
|
||||
|
||||
public class PlutoPackage
|
||||
{
|
|
@ -1,11 +1,11 @@
|
|||
package cz.tefek.l10n;
|
||||
package cz.tefek.pluto.l10n;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
public class PlutoL10n
|
||||
{
|
|
@ -1,8 +1,8 @@
|
|||
package cz.tefek.io.modloader;
|
||||
package cz.tefek.pluto.modloader;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceSubscriber;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.pp.PlutoPackage;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceSubscriber;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.pluto.pp.PlutoPackage;
|
||||
|
||||
/**
|
||||
* Mod object. Can be used to create a {@link ResourceSubscriber}.
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.modloader;
|
||||
package cz.tefek.pluto.modloader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -10,9 +10,9 @@ import java.io.File;
|
|||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceHelper;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceHelper;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
/**
|
||||
* Class-loads all valid mods. The only requirement for the mod is to have a
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.modloader;
|
||||
package cz.tefek.pluto.modloader;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.modloader;
|
||||
package cz.tefek.pluto.modloader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -11,9 +11,9 @@ import java.io.FileOutputStream;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceHelper;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceHelper;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
/**
|
||||
* Unzips mod packages from the packages folder into the mods folder. WIP
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.modloader;
|
||||
package cz.tefek.pluto.modloader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -6,18 +6,18 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceHelper;
|
||||
import cz.tefek.io.modloader.event.ModLoad;
|
||||
import cz.tefek.io.modloader.event.ModLoadEvent;
|
||||
import cz.tefek.io.modloader.event.ModPostLoad;
|
||||
import cz.tefek.io.modloader.event.ModPostLoadEvent;
|
||||
import cz.tefek.io.modloader.event.ModPreLoad;
|
||||
import cz.tefek.io.modloader.event.ModPreLoadEvent;
|
||||
import cz.tefek.io.modloader.event.ModUnload;
|
||||
import cz.tefek.io.modloader.event.ModUnloadEvent;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.eventsystem.staticmode.StaticPlutoEventManager;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceHelper;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
import cz.tefek.pluto.modloader.event.ModLoad;
|
||||
import cz.tefek.pluto.modloader.event.ModLoadEvent;
|
||||
import cz.tefek.pluto.modloader.event.ModPostLoad;
|
||||
import cz.tefek.pluto.modloader.event.ModPostLoadEvent;
|
||||
import cz.tefek.pluto.modloader.event.ModPreLoad;
|
||||
import cz.tefek.pluto.modloader.event.ModPreLoadEvent;
|
||||
import cz.tefek.pluto.modloader.event.ModUnload;
|
||||
import cz.tefek.pluto.modloader.event.ModUnloadEvent;
|
||||
|
||||
public class ModLoaderCore
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.modloader;
|
||||
package cz.tefek.pluto.modloader;
|
||||
|
||||
public enum ModLoadingPhase
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.modloader.event;
|
||||
package cz.tefek.pluto.modloader.event;
|
||||
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
@ -1,7 +1,7 @@
|
|||
package cz.tefek.io.modloader.event;
|
||||
package cz.tefek.pluto.modloader.event;
|
||||
|
||||
import cz.tefek.io.modloader.ModEntry;
|
||||
import cz.tefek.pluto.eventsystem.EventData;
|
||||
import cz.tefek.pluto.modloader.ModEntry;
|
||||
|
||||
/**
|
||||
* Instances are passed to {@link ModEntry ModEntries} on load. Currently does
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.modloader.event;
|
||||
package cz.tefek.pluto.modloader.event;
|
||||
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
@ -1,10 +1,10 @@
|
|||
package cz.tefek.io.modloader.event;
|
||||
package cz.tefek.pluto.modloader.event;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cz.tefek.io.modloader.ModEntry;
|
||||
import cz.tefek.pluto.eventsystem.EventData;
|
||||
import cz.tefek.pluto.modloader.ModEntry;
|
||||
|
||||
/**
|
||||
* Instances are passed to {@link ModEntry ModEntries} on post-load.
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.modloader.event;
|
||||
package cz.tefek.pluto.modloader.event;
|
||||
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
@ -1,10 +1,10 @@
|
|||
package cz.tefek.io.modloader.event;
|
||||
package cz.tefek.pluto.modloader.event;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cz.tefek.io.modloader.Mod;
|
||||
import cz.tefek.io.modloader.ModEntry;
|
||||
import cz.tefek.pluto.eventsystem.EventData;
|
||||
import cz.tefek.pluto.modloader.Mod;
|
||||
import cz.tefek.pluto.modloader.ModEntry;
|
||||
|
||||
/**
|
||||
* Instances are passed to {@link ModEntry ModEntries} on load. Carries a list
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.io.modloader.event;
|
||||
package cz.tefek.pluto.modloader.event;
|
||||
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
@ -1,7 +1,7 @@
|
|||
package cz.tefek.io.modloader.event;
|
||||
package cz.tefek.pluto.modloader.event;
|
||||
|
||||
import cz.tefek.io.modloader.ModEntry;
|
||||
import cz.tefek.pluto.eventsystem.EventData;
|
||||
import cz.tefek.pluto.modloader.ModEntry;
|
||||
|
||||
/**
|
||||
* Instances are passed to {@link ModEntry ModEntries} on mod unload.
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.tpl;
|
||||
package cz.tefek.pluto.tpl;
|
||||
|
||||
public class TPJImage
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.tpl;
|
||||
package cz.tefek.pluto.tpl;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
@ -11,9 +11,9 @@ import java.nio.ByteOrder;
|
|||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
/**
|
||||
* Quick ABGR (8-bit per channel, 32 bits per pixel) texture loader for OpenGL
|
|
@ -1,4 +1,4 @@
|
|||
package cz.tefek.tpl;
|
||||
package cz.tefek.pluto.tpl;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
|
@ -8,11 +8,11 @@ import java.util.Vector;
|
|||
import org.lwjgl.opengl.GL33;
|
||||
import org.lwjgl.system.MemoryUtil;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.engine.graphics.gl.DrawMode;
|
||||
import cz.tefek.pluto.engine.graphics.gl.vbo.ArrayBuffer;
|
||||
import cz.tefek.pluto.engine.graphics.gl.vbo.IndexArrayBuffer;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
public class VertexArray
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package cz.tefek.pluto.engine.shader;
|
||||
|
||||
import cz.tefek.io.modloader.ModEntry;
|
||||
import cz.tefek.pluto.engine.ModLWJGL;
|
||||
import cz.tefek.pluto.modloader.ModEntry;
|
||||
|
||||
@ModEntry(modid = PlutoShaderMod.MOD_ID, displayName = "PlutoShader", dependencies = { ModLWJGL.class }, version = "0.3", description = "Automated shader loader and manager.")
|
||||
public class PlutoShaderMod
|
||||
|
|
|
@ -5,10 +5,6 @@ import org.lwjgl.opengl.GL33;
|
|||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.io.asl.resource.ResourceSubscriber;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.engine.shader.type.FragmentShader;
|
||||
import cz.tefek.pluto.engine.shader.type.VertexShader;
|
||||
import cz.tefek.pluto.engine.shader.uniform.Uniform;
|
||||
|
@ -16,6 +12,10 @@ import cz.tefek.pluto.engine.shader.uniform.UniformBase;
|
|||
import cz.tefek.pluto.engine.shader.uniform.UniformMat4;
|
||||
import cz.tefek.pluto.engine.shader.uniform.auto.AutoViewportProjection;
|
||||
import cz.tefek.pluto.engine.shader.uniform.auto.AutomaticUniforms;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceSubscriber;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
public class RenderShaderBuilder
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@ package cz.tefek.pluto.engine.shader;
|
|||
|
||||
import org.lwjgl.opengl.GL33;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
public abstract class ShaderBase implements IShaderProgram
|
||||
{
|
||||
|
|
|
@ -2,11 +2,11 @@ package cz.tefek.pluto.engine.shader;
|
|||
|
||||
import org.lwjgl.opengl.GL33;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.io.asl.textio.TextIn;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.engine.shader.type.EnumShaderType;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.io.asl.textio.TextIn;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
public class ShaderCompiler
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package cz.tefek.pluto.engine.shader.type;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.engine.shader.ShaderCompiler;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
|
||||
public final class FragmentShader implements IShader
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package cz.tefek.pluto.engine.shader.type;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.engine.shader.ShaderCompiler;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
|
||||
public final class GeometryShader implements IShader
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package cz.tefek.pluto.engine.shader.type;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.engine.shader.ShaderCompiler;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
|
||||
public final class VertexShader implements IShader
|
||||
{
|
||||
|
|
|
@ -2,9 +2,9 @@ package cz.tefek.pluto.engine.shader.ubo;
|
|||
|
||||
import org.lwjgl.opengl.GL33;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.engine.shader.ShaderBase;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
public final class UniformBufferObject
|
||||
{
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
package cz.tefek.pluto.engine.graphics;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceSubscriber;
|
||||
import cz.tefek.io.modloader.Mod;
|
||||
import cz.tefek.io.modloader.ModEntry;
|
||||
import cz.tefek.io.modloader.ModLoaderCore;
|
||||
import cz.tefek.io.modloader.event.ModPreLoad;
|
||||
import cz.tefek.io.modloader.event.ModPreLoadEvent;
|
||||
import cz.tefek.io.modloader.event.ModUnload;
|
||||
import cz.tefek.io.modloader.event.ModUnloadEvent;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.pluto.engine.ModLWJGL;
|
||||
import cz.tefek.pluto.engine.graphics.spritesheet.FramebufferTiledSpriteSheet;
|
||||
import cz.tefek.pluto.engine.shader.PlutoShaderMod;
|
||||
import cz.tefek.pluto.engine.shader.RenderShaderBuilder;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceSubscriber;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.modloader.Mod;
|
||||
import cz.tefek.pluto.modloader.ModEntry;
|
||||
import cz.tefek.pluto.modloader.ModLoaderCore;
|
||||
import cz.tefek.pluto.modloader.event.ModPreLoad;
|
||||
import cz.tefek.pluto.modloader.event.ModPreLoadEvent;
|
||||
import cz.tefek.pluto.modloader.event.ModUnload;
|
||||
import cz.tefek.pluto.modloader.event.ModUnloadEvent;
|
||||
|
||||
@ModEntry(modid = PlutoSpriteSheetMod.MOD_ID, version = "0.2", dependencies = { ModLWJGL.class, PlutoShaderMod.class }, author = "493msi", build = 1, displayName = "Pluto SpriteSheet", description = "A library to manage, store and draw sprites.")
|
||||
public class PlutoSpriteSheetMod
|
||||
|
|
|
@ -2,11 +2,11 @@ package cz.tefek.pluto.engine.graphics.spritesheet;
|
|||
|
||||
import java.util.Vector;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.Severity;
|
||||
import cz.tefek.pluto.engine.graphics.sprite.Sprite;
|
||||
import cz.tefek.pluto.engine.graphics.sprite.SpriteDisposable;
|
||||
import cz.tefek.pluto.engine.graphics.sprite.TileSprite;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.Severity;
|
||||
|
||||
public abstract class TiledSpriteSheet<T> extends SpriteSheet<T>
|
||||
{
|
||||
|
|
|
@ -191,8 +191,8 @@
|
|||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cz.tefek</groupId>
|
||||
<artifactId>plutoio2</artifactId>
|
||||
<version>0.2</version>
|
||||
<artifactId>plutolib</artifactId>
|
||||
<version>0.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -2,7 +2,7 @@ package cz.tefek.pluto.engine;
|
|||
|
||||
import org.lwjgl.Version;
|
||||
|
||||
import cz.tefek.io.modloader.ModEntry;
|
||||
import cz.tefek.pluto.modloader.ModEntry;
|
||||
|
||||
@ModEntry(modid = "modlwjgl", version = ModLWJGL.version, author = "The LWJGL team", displayName = "LWJGL", description = "The LWJGL library, without which the Pluto Engine wouldn't exist.")
|
||||
public class ModLWJGL
|
||||
|
|
|
@ -3,7 +3,7 @@ package cz.tefek.pluto.engine.buffer;
|
|||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.glfw.GLFWImage;
|
||||
|
||||
import cz.tefek.tpl.TPL;
|
||||
import cz.tefek.pluto.tpl.TPL;
|
||||
|
||||
/**
|
||||
* A utility class to load image files for use in GLFW.
|
||||
|
|
|
@ -11,9 +11,10 @@ import org.lwjgl.opengl.GL33;
|
|||
import org.lwjgl.opengl.GLDebugMessageARBCallback;
|
||||
import org.lwjgl.system.MemoryUtil;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.Severity;
|
||||
import cz.tefek.pluto.engine.gl.GLDebugInfo;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.Severity;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
/**
|
||||
* A wrapper class to provide abstraction over GLFW windows.
|
||||
|
@ -200,7 +201,7 @@ public class Display
|
|||
public void invoke(int source, int type, int id, int severity, int length, long message, long userParam)
|
||||
{
|
||||
var mes = GLDebugMessageARBCallback.getMessage(length, message);
|
||||
System.err.println(mes);
|
||||
Logger.log(SmartSeverity.WARNING, mes);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ package cz.tefek.pluto.engine.display;
|
|||
|
||||
import org.lwjgl.glfw.GLFWErrorCallback;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
public class DisplayErrorCallback extends GLFWErrorCallback
|
||||
{
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.lwjgl.opengl.ARBUniformBufferObject;
|
|||
import org.lwjgl.opengl.GL33;
|
||||
import org.lwjgl.opengl.GLCapabilities;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
|
||||
public class GLDebugInfo
|
||||
{
|
||||
|
|
|
@ -8,12 +8,12 @@ import org.lwjgl.system.MemoryUtil;
|
|||
import java.awt.image.BufferedImage;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import cz.tefek.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.Severity;
|
||||
import cz.tefek.io.pluto.debug.SmartSeverity;
|
||||
import cz.tefek.tpl.TPL;
|
||||
import cz.tefek.tpl.TPNImage;
|
||||
import cz.tefek.pluto.io.asl.resource.ResourceAddress;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.Severity;
|
||||
import cz.tefek.pluto.io.logger.SmartSeverity;
|
||||
import cz.tefek.pluto.tpl.TPL;
|
||||
import cz.tefek.pluto.tpl.TPNImage;
|
||||
|
||||
public abstract class Texture
|
||||
{
|
||||
|
|
|
@ -4,10 +4,10 @@ import java.util.Arrays;
|
|||
|
||||
import org.lwjgl.opengl.GL33;
|
||||
|
||||
import cz.tefek.io.pluto.debug.Logger;
|
||||
import cz.tefek.io.pluto.debug.Severity;
|
||||
import cz.tefek.pluto.engine.graphics.texture.Texture;
|
||||
import cz.tefek.pluto.engine.graphics.texture.WrapMode;
|
||||
import cz.tefek.pluto.io.logger.Logger;
|
||||
import cz.tefek.pluto.io.logger.Severity;
|
||||
|
||||
public class RectangleTexture extends Texture
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue