mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-12 14:51:51 +09:00
added sources for Slick
Former-commit-id: 1647fa32ef6894bd7db44f741f07c2f4dcdf9054 Former-commit-id: 0e5810dcfbe1fd59b13e7cabe9f1e93c5542da2d
This commit is contained in:
29
lib/slick-source/org/newdawn/slick/util/Bootstrap.java
Normal file
29
lib/slick-source/org/newdawn/slick/util/Bootstrap.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package org.newdawn.slick.util;
|
||||
|
||||
import org.newdawn.slick.AppGameContainer;
|
||||
import org.newdawn.slick.Game;
|
||||
|
||||
/**
|
||||
* Utility class to wrap up starting a game in a single line
|
||||
*
|
||||
* @author kevin
|
||||
*/
|
||||
public class Bootstrap {
|
||||
|
||||
/**
|
||||
* Start the game as an application
|
||||
*
|
||||
* @param game The game to be started
|
||||
* @param width The width of the window
|
||||
* @param height The height of the window
|
||||
* @param fullscreen True if the window should be fullscreen
|
||||
*/
|
||||
public static void runAsApplication(Game game, int width, int height, boolean fullscreen) {
|
||||
try {
|
||||
AppGameContainer container = new AppGameContainer(game, width, height, fullscreen);
|
||||
container.start();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user