use of com.badlogic.gdx.backends.lwjgl.LwjglApplication in project shattered-pixel-dungeon-gdx by 00-Evan.
the class DesktopLauncher method main.
public static void main(String[] arg) {
String version = DesktopLauncher.class.getPackage().getSpecificationVersion();
if (version == null) {
version = "0.6.4";
}
int versionCode;
try {
versionCode = Integer.parseInt(DesktopLauncher.class.getPackage().getImplementationVersion());
} catch (NumberFormatException e) {
versionCode = 251;
}
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
if (SharedLibraryLoader.isMac) {
config.preferencesDirectory = "Library/Application Support/Shattered Pixel Dungeon/";
} else if (SharedLibraryLoader.isLinux) {
config.preferencesDirectory = ".shatteredpixel/shattered-pixel-dungeon/";
} else if (SharedLibraryLoader.isWindows) {
String winVer = System.getProperties().getProperty("os.name");
if (winVer.contains("XP")) {
config.preferencesDirectory = "Application Data/.shatteredpixel/Shattered Pixel Dungeon/";
} else {
config.preferencesDirectory = "AppData/Roaming/.shatteredpixel/Shattered Pixel Dungeon/";
}
}
// FIXME: This is a hack to get access to the preferences before we have an application setup
com.badlogic.gdx.Preferences prefs = new LwjglPreferences(SPDSettings.FILE_NAME, config.preferencesDirectory);
boolean isFullscreen = prefs.getBoolean(SPDSettings.KEY_WINDOW_FULLSCREEN, false);
// config.fullscreen = isFullscreen;
if (!isFullscreen) {
config.width = prefs.getInteger(SPDSettings.KEY_WINDOW_WIDTH, SPDSettings.DEFAULT_WINDOW_WIDTH);
config.height = prefs.getInteger(SPDSettings.KEY_WINDOW_HEIGHT, SPDSettings.DEFAULT_WINDOW_HEIGHT);
}
config.addIcon("ic_launcher_128.png", Files.FileType.Internal);
config.addIcon("ic_launcher_32.png", Files.FileType.Internal);
config.addIcon("ic_launcher_16.png", Files.FileType.Internal);
// TODO: It have to be pulled from build.gradle, but I don't know how it can be done
config.title = "Shattered Pixel Dungeon";
new LwjglApplication(new ShatteredPixelDungeon(new DesktopSupport(version, versionCode, config.preferencesDirectory, new DesktopInputProcessor())), config);
}
use of com.badlogic.gdx.backends.lwjgl.LwjglApplication in project high-flyer by sangngh.
the class DesktopLauncher method main.
public static void main(String[] arg) {
GameSettings settings = new GameSettings(AspectRatio.STANDARD.calculateWidth(600), 600);
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.title = "High Flyer - Soars to the sky!";
config.useGL30 = false;
config.height = settings.getWindowHeight();
config.width = settings.getWindowWidth();
new LwjglApplication(new GameEngine(settings, new GameState(), ScreenManager.INSTANCE), config);
}
use of com.badlogic.gdx.backends.lwjgl.LwjglApplication in project ultimate-java by pantinor.
the class SpriteAtlasTool method main.
public static void main(String[] args) {
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.title = "Sprite Atlas Tool";
cfg.width = screenWidth;
cfg.height = screenHeight;
new LwjglApplication(new SpriteAtlasTool(), cfg);
}
use of com.badlogic.gdx.backends.lwjgl.LwjglApplication in project ultimate-java by pantinor.
the class WaterTest method main.
public static void main(String[] args) {
LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
cfg.title = "test";
cfg.width = 800;
cfg.height = 600;
new LwjglApplication(new WaterTest(), cfg);
}
use of com.badlogic.gdx.backends.lwjgl.LwjglApplication in project AnotherMonekyParadox by SantiagoMille.
the class DesktopLauncher method main.
public static void main(String[] arg) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.width = 1280;
config.height = 720;
new LwjglApplication(new Main(), config);
}
Aggregations