clean dependencies
This commit is contained in:
parent
e3af81f870
commit
9c8b6f0a01
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"java.configuration.updateBuildConfiguration": "disabled"
|
||||
}
|
16
pom.xml
16
pom.xml
@ -18,23 +18,11 @@
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>5.9.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.FMudanyali</groupId>
|
||||
<groupId>io.github.libjsdl</groupId>
|
||||
<artifactId>libjsdl</artifactId>
|
||||
<version>bc8bf9cadff56fb55aa50e86f96f6548007c0a3e</version>
|
||||
<version>2.0.14-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
34
src/main/java/com/fmudanyali/Renderer.java
Normal file
34
src/main/java/com/fmudanyali/Renderer.java
Normal file
@ -0,0 +1,34 @@
|
||||
package com.fmudanyali;
|
||||
|
||||
|
||||
import java.util.Stack;
|
||||
import org.libsdl.api.render.SDL_Renderer;
|
||||
|
||||
import static org.libsdl.api.Sdl.*;
|
||||
import static org.libsdl.api.render.SdlRender.*;
|
||||
|
||||
public class Renderer {
|
||||
public static Stack<SDL_Renderer> renderStack = new Stack<>();
|
||||
|
||||
public static enum GameState{
|
||||
MAIN_MENU,
|
||||
SETTINGS,
|
||||
GAME
|
||||
}
|
||||
|
||||
public static void back(){
|
||||
SDL_DestroyRenderer(renderStack.peek());
|
||||
renderStack.pop();
|
||||
|
||||
if(renderStack.empty()){
|
||||
SDL_Quit();
|
||||
}
|
||||
}
|
||||
|
||||
public static void initialize(){
|
||||
renderStack.push(
|
||||
SDL_CreateRenderer(Game.window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC)
|
||||
);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user