Start working on new architecture
This commit is contained in:
@@ -1,36 +1,40 @@
|
||||
import ::APP_MAIN::;
|
||||
|
||||
import lime.Lime;
|
||||
|
||||
class ApplicationMain {
|
||||
|
||||
public static var _main_ : ::APP_MAIN::;
|
||||
public static var _lime : Lime;
|
||||
|
||||
public static function main () {
|
||||
//Create the runtime
|
||||
_lime = new Lime();
|
||||
//Create the app class, give it to the bootstrapper
|
||||
_main_ = new ::APP_MAIN::();
|
||||
|
||||
var config : LimeConfig = {
|
||||
host : _main_,
|
||||
fullscreen : ::WIN_FULLSCREEN::,
|
||||
resizable : ::WIN_RESIZABLE::,
|
||||
borderless : ::WIN_BORDERLESS::,
|
||||
antialiasing : Std.int(::WIN_ANTIALIASING::),
|
||||
stencil_buffer : ::WIN_STENCIL_BUFFER::,
|
||||
depth_buffer : ::WIN_DEPTH_BUFFER::,
|
||||
vsync : ::WIN_VSYNC::,
|
||||
fps : Std.int(::WIN_FPS::),
|
||||
width : Std.int(::WIN_WIDTH::),
|
||||
height : Std.int(::WIN_HEIGHT::),
|
||||
orientation : "::WIN_ORIENTATION::",
|
||||
title : "::APP_TITLE::",
|
||||
};
|
||||
|
||||
//Start up
|
||||
_lime.init( _main_, config );
|
||||
}
|
||||
|
||||
|
||||
|
||||
private var app:lime.app.Application;
|
||||
|
||||
|
||||
public static function main () {
|
||||
|
||||
var app = new ::APP_MAIN:: ();
|
||||
|
||||
var config:lime.app.Config = {
|
||||
|
||||
antialiasing: Std.int (::WIN_ANTIALIASING::),
|
||||
borderless: ::WIN_BORDERLESS::,
|
||||
depthBuffer: ::WIN_DEPTH_BUFFER::,
|
||||
fps: Std.int (::WIN_FPS::),
|
||||
fullscreen: ::WIN_FULLSCREEN::,
|
||||
height: Std.int (::WIN_HEIGHT::),
|
||||
orientation: "::WIN_ORIENTATION::",
|
||||
resizable: ::WIN_RESIZABLE::,
|
||||
stencilBuffer: ::WIN_STENCIL_BUFFER::,
|
||||
title: "::APP_TITLE::",
|
||||
vsync: ::WIN_VSYNC::,
|
||||
width: Std.int (::WIN_WIDTH::),
|
||||
|
||||
}
|
||||
|
||||
app.create (config);
|
||||
|
||||
#if sys
|
||||
Sys.exit (app.exec ());
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user