Merge branch 'master' into rules-dsl
This commit is contained in:
commit
d4b91c4d4f
2
Flow
2
Flow
@ -1 +1 @@
|
||||
Subproject commit 59b89e9d165c3fc615ca44aa742b531caf13fcb6
|
||||
Subproject commit 92db616ef508f16fe30e8e37d17d7d7a18f56f4a
|
@ -1 +1 @@
|
||||
Subproject commit b08a4a6aca41fbc6bf0c4bd252f716d518d368a5
|
||||
Subproject commit 40d89e539223aaa9202326833a2c813bed3c6eef
|
@ -18,7 +18,7 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>it.cavallium</groupId>
|
||||
<artifactId>warppi-flow</artifactId>
|
||||
<version>0.9.0a3</version>
|
||||
<version>1.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>it.cavallium</groupId>
|
||||
|
@ -92,32 +92,23 @@ public final class DisplayManager implements RenderingLoop {
|
||||
}
|
||||
|
||||
/*
|
||||
* private void load_skin() {
|
||||
* try {
|
||||
* skin_tex = glGenTextures();
|
||||
* glBindTexture(GL_TEXTURE_2D, skin_tex);
|
||||
* glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
* private void load_skin() { try { skin_tex = glGenTextures();
|
||||
* glBindTexture(GL_TEXTURE_2D, skin_tex); glPixelStorei(GL_UNPACK_ALIGNMENT,
|
||||
* 1);
|
||||
*
|
||||
* InputStream in = new FileInputStream("skin.png");
|
||||
* PNGDecoder decoder = new PNGDecoder(in);
|
||||
* InputStream in = new FileInputStream("skin.png"); PNGDecoder decoder = new
|
||||
* PNGDecoder(in);
|
||||
*
|
||||
* System.out.println("width="+decoder.getWidth());
|
||||
* System.out.println("height="+decoder.getHeight());
|
||||
*
|
||||
* ByteBuffer buf =
|
||||
* ByteBuffer.allocateDirect(4*decoder.getWidth()*decoder.getHeight());
|
||||
* decoder.decode(buf, decoder.getWidth()*4, Format.RGBA);
|
||||
* buf.flip();
|
||||
* decoder.decode(buf, decoder.getWidth()*4, Format.RGBA); buf.flip();
|
||||
*
|
||||
* skin = buf;
|
||||
* skin_w = decoder.getWidth();
|
||||
* skin_h = decoder.getHeight();
|
||||
* glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, skin_w,
|
||||
* skin_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, skin);
|
||||
* } catch (IOException ex) {
|
||||
* ex.printStackTrace();
|
||||
* }
|
||||
* }
|
||||
* skin = buf; skin_w = decoder.getWidth(); skin_h = decoder.getHeight();
|
||||
* glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, skin_w, skin_h, 0, GL_RGBA,
|
||||
* GL_UNSIGNED_BYTE, skin); } catch (IOException ex) { ex.printStackTrace(); } }
|
||||
*/
|
||||
|
||||
private GraphicEngine chooseGraphicEngine() {
|
||||
@ -139,7 +130,8 @@ public final class DisplayManager implements RenderingLoop {
|
||||
}
|
||||
d = Utils.getOrDefault(Engine.getPlatform().getEnginesList(), "headless 24 bit engine", null);
|
||||
if (d != null && d.isSupported()) {
|
||||
System.err.println("Using Headless 24 bit Engine! This is a problem! No other graphic engines are available.");
|
||||
System.err.println(
|
||||
"Using Headless 24 bit Engine! This is a problem! No other graphic engines are available.");
|
||||
return d;
|
||||
}
|
||||
d = Utils.getOrDefault(Engine.getPlatform().getEnginesList(), "headless 256 colors engine", null);
|
||||
@ -149,12 +141,14 @@ public final class DisplayManager implements RenderingLoop {
|
||||
}
|
||||
d = Utils.getOrDefault(Engine.getPlatform().getEnginesList(), "headless 8 colors engine", null);
|
||||
if (d != null && d.isSupported()) {
|
||||
System.err.println("Using Headless basic Engine! This is a problem! No other graphic engines are available.");
|
||||
System.err
|
||||
.println("Using Headless basic Engine! This is a problem! No other graphic engines are available.");
|
||||
return d;
|
||||
}
|
||||
d = Utils.getOrDefault(Engine.getPlatform().getEnginesList(), "HTML5 engine", null);
|
||||
if (d != null && d.isSupported()) {
|
||||
Engine.getPlatform().getConsoleUtils().out().println(ConsoleUtils.OUTPUTLEVEL_NODEBUG, "Using Html Graphic Engine");
|
||||
Engine.getPlatform().getConsoleUtils().out().println(ConsoleUtils.OUTPUTLEVEL_NODEBUG,
|
||||
"Using Html Graphic Engine");
|
||||
return d;
|
||||
}
|
||||
d = new NoGuiEngine();
|
||||
@ -165,8 +159,6 @@ public final class DisplayManager implements RenderingLoop {
|
||||
throw new UnsupportedOperationException("No graphic engines available.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void closeScreen() {
|
||||
boolean isLastSession = sessions[1] == null;
|
||||
if (!isLastSession) {
|
||||
@ -200,34 +192,44 @@ public final class DisplayManager implements RenderingLoop {
|
||||
mustBeAddedToHistory |= !found;
|
||||
}
|
||||
if (mustBeAddedToHistory) {
|
||||
if (screen.historyBehavior == HistoryBehavior.NORMAL || screen.historyBehavior == HistoryBehavior.ALWAYS_KEEP_IN_HISTORY) {
|
||||
if (screen.historyBehavior == HistoryBehavior.NORMAL
|
||||
|| screen.historyBehavior == HistoryBehavior.ALWAYS_KEEP_IN_HISTORY) {
|
||||
if (currentSession > 0) {
|
||||
final int sl = sessions.length; //TODO: I don't know why if i don't add +5 or more some items disappear
|
||||
final int sl = sessions.length; // TODO: I don't know why if i don't add +5 or more some items
|
||||
// disappear
|
||||
List<Screen> newSessions = new LinkedList<>();
|
||||
int i = 0;
|
||||
for (Screen s : sessions) {
|
||||
if (i == currentSession) {
|
||||
currentSession = newSessions.size();
|
||||
newSessions.add(screen);
|
||||
}
|
||||
if (s != null) {
|
||||
if (i < currentSession) {
|
||||
if (s.historyBehavior != HistoryBehavior.DONT_KEEP_IN_HISTORY)
|
||||
newSessions.add(s);
|
||||
} else {
|
||||
if (s.historyBehavior == HistoryBehavior.ALWAYS_KEEP_IN_HISTORY) {
|
||||
newSessions.add(s);
|
||||
}
|
||||
} else {
|
||||
if (s.historyBehavior != HistoryBehavior.DONT_KEEP_IN_HISTORY)
|
||||
newSessions.add(s);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
sessions = newSessions.toArray(new Screen[5]);
|
||||
currentSession = newSessions.indexOf(screen);
|
||||
// sessions = Arrays.copyOfRange(sessions, currentSession, sl);
|
||||
for (int j = 0; j < sl; j++) {
|
||||
if (j < newSessions.size()) {
|
||||
sessions[j] = newSessions.get(j);
|
||||
} else {
|
||||
sessions[j] = null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
currentSession = 0;
|
||||
}
|
||||
for (int i = sessions.length - 1; i >= 1; i--) {
|
||||
sessions[i] = sessions[i - 1];
|
||||
}
|
||||
sessions[0] = screen;
|
||||
}
|
||||
} else {
|
||||
currentSession = -1;
|
||||
}
|
||||
@ -254,7 +256,8 @@ public final class DisplayManager implements RenderingLoop {
|
||||
|
||||
public void replaceScreen(final Screen screen) {
|
||||
if (screen.initialized == false) {
|
||||
if (screen.historyBehavior == HistoryBehavior.NORMAL || screen.historyBehavior == HistoryBehavior.ALWAYS_KEEP_IN_HISTORY) {
|
||||
if (screen.historyBehavior == HistoryBehavior.NORMAL
|
||||
|| screen.historyBehavior == HistoryBehavior.ALWAYS_KEEP_IN_HISTORY) {
|
||||
sessions[currentSession] = screen;
|
||||
} else {
|
||||
currentSession = -1;
|
||||
@ -300,7 +303,8 @@ public final class DisplayManager implements RenderingLoop {
|
||||
|
||||
public void goBack() {
|
||||
if (canGoBack()) {
|
||||
if (currentSession >= 0 && screen != sessions[currentSession]) {} else {
|
||||
if (currentSession >= 0 && screen != sessions[currentSession]) {
|
||||
} else {
|
||||
currentSession += 1;
|
||||
}
|
||||
screen = sessions[currentSession];
|
||||
@ -391,7 +395,9 @@ public final class DisplayManager implements RenderingLoop {
|
||||
fnt.use(engine);
|
||||
}
|
||||
renderer.glColor3i(129, 28, 22);
|
||||
renderer.glDrawStringRight(StaticVars.screenSize[0] - 2, StaticVars.screenSize[1] - (fnt.getCharacterHeight() + 2), Engine.getPlatform().getSettings().getCalculatorNameUppercase() + " CALCULATOR");
|
||||
renderer.glDrawStringRight(StaticVars.screenSize[0] - 2,
|
||||
StaticVars.screenSize[1] - (fnt.getCharacterHeight() + 2),
|
||||
Engine.getPlatform().getSettings().getCalculatorNameUppercase() + " CALCULATOR");
|
||||
renderer.glColor3i(149, 32, 26);
|
||||
renderer.glDrawStringCenter(StaticVars.screenSize[0] / 2, 22, error);
|
||||
renderer.glColor3i(164, 34, 28);
|
||||
@ -409,14 +415,16 @@ public final class DisplayManager implements RenderingLoop {
|
||||
if (fonts[0] != null && fonts[0] != engine.getRenderer().getCurrentFont()) {
|
||||
fonts[0].use(engine);
|
||||
}
|
||||
if (hud.visible) hud.renderBackground();
|
||||
if (hud.visible)
|
||||
hud.renderBackground();
|
||||
screen.render();
|
||||
if (hud.visible) {
|
||||
hud.render();
|
||||
hud.renderTopmostBackground();
|
||||
}
|
||||
screen.renderTopmost();
|
||||
if (hud.visible) hud.renderTopmost();
|
||||
if (hud.visible)
|
||||
hud.renderTopmost();
|
||||
}
|
||||
}
|
||||
|
||||
@ -483,7 +491,8 @@ public final class DisplayManager implements RenderingLoop {
|
||||
engine.start(getDrawable());
|
||||
} catch (final Exception ex) {
|
||||
ex.printStackTrace();
|
||||
} finally {}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
public void changeBrightness(final float change) {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 30 KiB |
@ -23,7 +23,7 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -1,6 +1,6 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
||||
|
@ -18,7 +18,7 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -1,6 +1,6 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
||||
|
17
pom.xml
17
pom.xml
@ -28,9 +28,10 @@
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<java.version>1.8</java.version>
|
||||
<java.version>11</java.version>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<maven.compiler.release>11</maven.compiler.release>
|
||||
<src.dir>src/main/java</src.dir>
|
||||
<src.dir2>src/main/java</src.dir2>
|
||||
<src.resdir>src/main/resources</src.resdir>
|
||||
@ -138,10 +139,6 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@ -161,6 +158,12 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.0</version>
|
||||
<configuration>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
<argLine>
|
||||
--illegal-access=permit
|
||||
</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -1,6 +1,6 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
|
||||
org.eclipse.jdt.core.compiler.compliance=11
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=11
|
||||
|
@ -27,7 +27,7 @@
|
||||
<dependency>
|
||||
<groupId>org.teavm</groupId>
|
||||
<artifactId>teavm-classlib</artifactId>
|
||||
<version>0.6.0-dev-567</version>
|
||||
<version>0.6.0-dev-682</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@ -86,7 +86,7 @@
|
||||
<plugin>
|
||||
<groupId>org.teavm</groupId>
|
||||
<artifactId>teavm-maven-plugin</artifactId>
|
||||
<version>0.6.0-dev-567</version>
|
||||
<version>0.6.0-dev-682</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
Loading…
Reference in New Issue
Block a user