From 1c9300c1bac1fc2ee8f950422f4375137c3bb18c Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Wed, 6 Feb 2013 20:58:07 +0000 Subject: [PATCH] optimization --- .../windows/SalmonTemplate/Template/main.cpp | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/Templates/SalmonUniversalTemplate/windows/SalmonTemplate/Template/main.cpp b/Templates/SalmonUniversalTemplate/windows/SalmonTemplate/Template/main.cpp index 1eb1c2b..f6af5d8 100644 --- a/Templates/SalmonUniversalTemplate/windows/SalmonTemplate/Template/main.cpp +++ b/Templates/SalmonUniversalTemplate/windows/SalmonTemplate/Template/main.cpp @@ -5,12 +5,26 @@ int APIENTRY WinMain(HINSTANCE hCurrentInst, HINSTANCE hPreviousInst, LPSTR lpszCmdLine, int nCmdShow) { - //Create application - TMyApplication Application; - Application.Width = 480; - Application.Height = 320; + int width = 480; + int height = 320; - //Start application - return MainLoop(Application); + if (CreateEngine(width, height)) + { + + //MyApplication scope + { + TMyApplication Application; + + Application.OuterInit(width, height, width, height); + + MainLoop(&Application); + + Application.OuterDeinit(); + } + + DestroyEngine(); + } + + return 0; } \ No newline at end of file