5
5
#include " splash.h"
6
6
#include " UI_ActorMain.h"
7
7
#include " UI_ActorTools.h"
8
- #include " .. /ECore/Editor/LogForm.h"
8
+ #include " editors /ECore/Editor/LogForm.h"
9
9
// ---------------------------------------------------------------------------
10
10
USEFORM (" BonePart.cpp" , frmBonePart);
11
11
USEFORM (" KeyBar.cpp" , frmKeyBar);
@@ -15,74 +15,57 @@ USEFORM("main.cpp", frmMain);
15
15
USEFORM (" TopBar.cpp" , fraTopBar); /* TFrame: File Type */
16
16
USEFORM (" BottomBar.cpp" , fraBottomBar); /* TFrame: File Type */
17
17
// ---------------------------------------------------------------------------
18
- WINAPI WinMain (HINSTANCE hInst, HINSTANCE, LPSTR, int )
18
+ WINAPI WinMain (HINSTANCE hInst, HINSTANCE, LPSTR, int )
19
19
{
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..." );
20
31
32
+ Core._initialize (" actor" , ELogCallback);
21
33
34
+ Application->Initialize ();
22
35
36
+ frmSplash->SetStatus (" Loading..." );
23
37
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 ();
34
42
35
- Core._initialize (" actor" ,ELogCallback);
43
+ Application->Title = UI->EditorDesc ();
44
+ TfrmLog::CreateLog ();
36
45
37
- Application->Initialize ( );
38
-
39
- frmSplash-> SetStatus ( " Loading... " );
46
+ Application->CreateForm ( __classid (TfrmMain), &frmMain );
47
+ Application-> CreateForm ( __classid (TfrmBonePart), &frmBonePart);
48
+ frmMain-> SetHInst (hInst );
40
49
41
- // startup create
42
- Tools = xr_new<CActorTools>();
43
- UI = xr_new<CActorMain>();
44
- UI->RegisterCommands ();
50
+ xr_delete (frmSplash);
45
51
46
- Application->Title = UI->EditorDesc ();
47
- TfrmLog::CreateLog ();
52
+ Application->Run ();
48
53
49
- Application->CreateForm (__classid (TfrmMain), &frmMain);
50
- Application->CreateForm (__classid (TfrmBonePart), &frmBonePart);
51
- frmMain->SetHInst (hInst);
54
+ TfrmLog::DestroyLog ();
52
55
53
- xr_delete (frmSplash);
56
+ UI->ClearCommands ();
57
+ xr_delete (Tools);
58
+ xr_delete (UI);
54
59
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
+ // }
69
66
return 0 ;
70
67
}
71
- // ---------------------------------------------------------------------------
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
68
69
+ // ---------------------------------------------------------------------------
87
70
88
71
0 commit comments