55#include " splash.h"
66#include " UI_ActorMain.h"
77#include " UI_ActorTools.h"
8- #include " .. /ECore/Editor/LogForm.h"
8+ #include " editors /ECore/Editor/LogForm.h"
99// ---------------------------------------------------------------------------
1010USEFORM (" BonePart.cpp" , frmBonePart);
1111USEFORM (" KeyBar.cpp" , frmKeyBar);
@@ -15,74 +15,57 @@ USEFORM("main.cpp", frmMain);
1515USEFORM (" TopBar.cpp" , fraTopBar); /* TFrame: File Type */
1616USEFORM (" BottomBar.cpp" , fraBottomBar); /* TFrame: File Type */
1717// ---------------------------------------------------------------------------
18- WINAPI WinMain (HINSTANCE hInst, HINSTANCE, LPSTR, int )
18+ WINAPI WinMain (HINSTANCE hInst, HINSTANCE, LPSTR, int )
1919{
20+ // try{
21+ if (!Application->Handle )
22+ {
23+ Application->CreateHandle ();
24+ Application->Icon ->Handle = LoadIcon (MainInstance, " MAINICON" );
25+ Application->Title = " Loading..." ;
26+ }
27+ frmSplash = xr_new<TfrmSplash>((TComponent*)0 );
28+ frmSplash->Show ();
29+ frmSplash->Repaint ();
30+ frmSplash->SetStatus (" Core initializing..." );
2031
32+ Core._initialize (" actor" , ELogCallback);
2133
34+ Application->Initialize ();
2235
36+ frmSplash->SetStatus (" Loading..." );
2337
24- // try{
25- if (!Application->Handle ){
26- Application->CreateHandle ();
27- Application->Icon ->Handle = LoadIcon (MainInstance, " MAINICON" );
28- Application->Title = " Loading..." ;
29- }
30- frmSplash = xr_new<TfrmSplash>((TComponent*)0 );
31- frmSplash->Show ();
32- frmSplash->Repaint ();
33- frmSplash->SetStatus (" Core initializing..." );
38+ // startup create
39+ Tools = xr_new<CActorTools>();
40+ UI = xr_new<CActorMain>();
41+ UI->RegisterCommands ();
3442
35- Core._initialize (" actor" ,ELogCallback);
43+ Application->Title = UI->EditorDesc ();
44+ TfrmLog::CreateLog ();
3645
37- Application->Initialize ( );
38-
39- frmSplash-> SetStatus ( " Loading... " );
46+ Application->CreateForm ( __classid (TfrmMain), &frmMain );
47+ Application-> CreateForm ( __classid (TfrmBonePart), &frmBonePart);
48+ frmMain-> SetHInst (hInst );
4049
41- // startup create
42- Tools = xr_new<CActorTools>();
43- UI = xr_new<CActorMain>();
44- UI->RegisterCommands ();
50+ xr_delete (frmSplash);
4551
46- Application->Title = UI->EditorDesc ();
47- TfrmLog::CreateLog ();
52+ Application->Run ();
4853
49- Application->CreateForm (__classid (TfrmMain), &frmMain);
50- Application->CreateForm (__classid (TfrmBonePart), &frmBonePart);
51- frmMain->SetHInst (hInst);
54+ TfrmLog::DestroyLog ();
5255
53- xr_delete (frmSplash);
56+ UI->ClearCommands ();
57+ xr_delete (Tools);
58+ xr_delete (UI);
5459
55- Application->Run ();
56-
57- TfrmLog::DestroyLog ();
58-
59- UI->ClearCommands ();
60- xr_delete (Tools);
61- xr_delete (UI);
62-
63- Core._destroy ();
64- // }
65- // catch (Exception &exception)
66- // {
67- // Application->ShowException(&exception);
68- // }
60+ Core._destroy ();
61+ // }
62+ // catch (Exception &exception)
63+ // {
64+ // Application->ShowException(&exception);
65+ // }
6966 return 0 ;
7067}
71- // ---------------------------------------------------------------------------
72-
73-
74-
75-
76-
77-
78-
79-
80-
81-
82-
83-
84-
85-
8668
69+ // ---------------------------------------------------------------------------
8770
8871
0 commit comments