Mercurial > mm7
comparison Engine/Engine.cpp @ 2553:48708da03b7f
Party Creation UI logic separated from MainMenu
author | a.parshin |
---|---|
date | Wed, 13 May 2015 02:20:05 +0200 |
parents | ac16f4a3a91e |
children | f2a8ed07e921 |
comparison
equal
deleted
inserted
replaced
2552:ac16f4a3a91e | 2553:48708da03b7f |
---|---|
1 | |
2 | |
3 #define _CRTDBG_MAP_ALLOC | 1 #define _CRTDBG_MAP_ALLOC |
2 #define _CRT_SECURE_NO_WARNINGS | |
4 #include <stdlib.h> | 3 #include <stdlib.h> |
5 #include <crtdbg.h> | 4 #include <crtdbg.h> |
6 | 5 #include <direct.h> |
7 #define _CRT_SECURE_NO_WARNINGS | |
8 | 6 |
9 #include "Engine/Engine.h" | 7 #include "Engine/Engine.h" |
10 | 8 #include "Engine/Party.h" |
11 #include "Arcomage\Arcomage.h" | 9 #include "Engine/Timer.h" |
12 | 10 #include "Engine/LOD.h" |
11 #include "Engine/Events.h" | |
12 #include "Engine/OurMath.h" | |
13 #include "Engine/texts.h" | |
14 #include "Engine/stru123.h" | |
15 #include "Engine/LuaVM.h" | |
16 #include "Engine/MMT.h" | |
17 #include "Engine/SaveLoad.h" | |
18 #include "Engine/Registry.h" | |
13 #include "Engine/Graphics/Vis.h" | 19 #include "Engine/Graphics/Vis.h" |
14 #include "Engine/Graphics/Weather.h" | 20 #include "Engine/Graphics/Weather.h" |
15 #include "Engine/Graphics/LightmapBuilder.h" | 21 #include "Engine/Graphics/LightmapBuilder.h" |
16 #include "Engine/Graphics/DecalBuilder.h" | 22 #include "Engine/Graphics/DecalBuilder.h" |
17 #include "Engine/Graphics/ParticleEngine.h" | 23 #include "Engine/Graphics/ParticleEngine.h" |
18 #include "IO/Mouse.h" | |
19 #include "IO/Keyboard.h" | |
20 #include "Engine/Graphics/GammaControl.h" | 24 #include "Engine/Graphics/GammaControl.h" |
21 #include "stru6.h" | |
22 #include "Engine/Graphics/stru9.h" | 25 #include "Engine/Graphics/stru9.h" |
23 #include "Engine/Graphics/stru10.h" | 26 #include "Engine/Graphics/stru10.h" |
24 | |
25 #include "Engine/Party.h" | |
26 #include "Engine/Graphics/Viewport.h" | 27 #include "Engine/Graphics/Viewport.h" |
27 #include "Engine/Timer.h" | |
28 #include "Engine/Graphics/Outdoor.h" | 28 #include "Engine/Graphics/Outdoor.h" |
29 #include "Engine/Graphics/Overlays.h" | 29 #include "Engine/Graphics/Overlays.h" |
30 #include "Media/Audio/AudioPlayer.h" | 30 #include "Engine/Graphics/Lights.h" |
31 #include "Engine/LOD.h" | 31 #include "Engine/Graphics/Level/Decoration.h" |
32 #include "GUI/GUIWindow.h" | 32 #include "Engine/Graphics/PaletteManager.h" |
33 #include "Engine/Graphics/DecorationList.h" | |
34 #include "Engine/Graphics/RenderD3D11.h" | |
35 #include "Engine/Graphics/Sprites.h" | |
33 #include "Engine/TurnEngine/TurnEngine.h" | 36 #include "Engine/TurnEngine/TurnEngine.h" |
34 #include "Media/Video/Bink_Smacker.h" | |
35 #include "Engine/Events.h" | |
36 #include "Engine/OurMath.h" | |
37 #include "Engine/texts.h" | |
38 #include "GUI/GUIFont.h" | |
39 #include "Engine/Graphics/Lights.h" | |
40 #include "Engine/Spells/CastSpellInfo.h" | 37 #include "Engine/Spells/CastSpellInfo.h" |
41 #include "Engine/Tables/FrameTableInc.h" | 38 #include "Engine/Tables/FrameTableInc.h" |
42 #include "Engine/Objects/Actor.h" | 39 #include "Engine/Objects/Actor.h" |
40 #include "Engine/Objects/ObjectList.h" | |
41 #include "Engine/Objects/SpriteObject.h" | |
42 #include "Engine/Objects/Chest.h" | |
43 | |
44 #include "Arcomage\Arcomage.h" | |
45 | |
46 #include "IO/Mouse.h" | |
47 #include "IO/Keyboard.h" | |
48 | |
49 #include "GUI/GUIWindow.h" | |
43 #include "GUI/GUIProgressBar.h" | 50 #include "GUI/GUIProgressBar.h" |
44 #include "Engine/Objects/ObjectList.h" | 51 #include "GUI/GUIFont.h" |
45 #include "Engine/Graphics/Level/Decoration.h" | 52 #include "GUI/UI/UIGame.h" |
46 #include "Engine/Graphics/PaletteManager.h" | |
47 #include "GUI/UI/UIHouses.h" | 53 #include "GUI/UI/UIHouses.h" |
48 #include "GUI/UI/UIShops.h" | 54 #include "GUI/UI/UIShops.h" |
49 #include "GUI/UI/UIPartyCreation.h" | 55 #include "GUI/UI/UIPartyCreation.h" |
50 #include "Engine/SaveLoad.h" | 56 |
51 #include "Engine/Objects/SpriteObject.h" | 57 #include "GUI/NewUI/MainMenu.h" |
52 #include "Engine/Graphics/Sprites.h" | 58 |
53 #include "Engine/Registry.h" | 59 #include "Media/Audio/AudioPlayer.h" |
54 #include "Engine/Objects/Chest.h" | 60 #include "Media/Video/Bink_Smacker.h" |
55 | 61 |
56 #include "GUI/UI/UIGame.h" | |
57 | |
58 #include "Engine/Graphics/DecorationList.h" | |
59 #include "Engine/Tables/IconFrameTable.h" | 62 #include "Engine/Tables/IconFrameTable.h" |
60 #include "Engine/Tables/PlayerFrameTable.h" | 63 #include "Engine/Tables/PlayerFrameTable.h" |
61 #include "Engine/MapsLongTimer.h" | |
62 #include "Engine/Tables/StorylineTextTable.h" | 64 #include "Engine/Tables/StorylineTextTable.h" |
63 #include "Engine/Tables/FactionTable.h" | 65 #include "Engine/Tables/FactionTable.h" |
64 #include "Engine/stru123.h" | 66 #include "Engine/MapsLongTimer.h" |
65 #include "Engine/LuaVM.h" | |
66 #include "Engine/Graphics/RenderD3D11.h" | |
67 #include "Engine/MMT.h" | |
68 #include "GUI/NewUI\MainMenu.h" | |
69 | 67 |
70 #include "Game/Game.h" | 68 #include "Game/Game.h" |
71 #include "Game/MainMenu.h" | 69 #include "Game/MainMenu.h" |
72 | 70 #include "Game/MainMenuLoad.h" |
73 #include <direct.h> | 71 #include "Game/CreateParty.h" |
72 | |
73 #include "stru6.h" | |
74 | 74 |
75 | 75 |
76 | 76 |
77 | 77 |
78 Engine *pEngine = nullptr; | 78 Engine *pEngine = nullptr; |
1820 if (uGameState == GAME_FINISHED || GetCurrentMenuID() == MENU_EXIT_GAME) | 1820 if (uGameState == GAME_FINISHED || GetCurrentMenuID() == MENU_EXIT_GAME) |
1821 { | 1821 { |
1822 pEngine->Deinitialize(); | 1822 pEngine->Deinitialize(); |
1823 return true; | 1823 return true; |
1824 } | 1824 } |
1825 | 1825 else if (GetCurrentMenuID() == MENU_SAVELOAD) |
1826 if (GetCurrentMenuID() == MENU_NEWGAME) | 1826 { |
1827 { | 1827 MainMenuLoad_Loop(); |
1828 if (use_music_folder) | 1828 break; |
1829 alSourceStop(mSourceID); | 1829 } |
1830 else | 1830 else if (GetCurrentMenuID() == MENU_NEWGAME) |
1831 { | 1831 { |
1832 if (pAudioPlayer->hAILRedbook) | 1832 if (!CreateParty_Loop()) |
1833 AIL_redbook_stop(pAudioPlayer->hAILRedbook); | |
1834 } | |
1835 pParty->Reset(); | |
1836 pOtherOverlayList->Reset(); | |
1837 strcpy(pCurrentMapName, pStartingMapName); | |
1838 pParty->CreateDefaultParty(0); | |
1839 PlayerCreationUI_Initialize(); | |
1840 if (PlayerCreationUI_Loop()) | |
1841 { | |
1842 DeleteCCharFont(); | |
1843 break; | 1833 break; |
1844 } | 1834 |
1845 DeleteCCharFont(); | |
1846 bFlashQuestBook = true; | 1835 bFlashQuestBook = true; |
1847 pMediaPlayer->PlayFullscreenMovie(MOVIE_Emerald, true); | 1836 pMediaPlayer->PlayFullscreenMovie(MOVIE_Emerald, true); |
1848 SaveNewGame(); | 1837 SaveNewGame(); |
1849 if (bNoMargareth) | 1838 if (bNoMargareth) |
1850 _449B7E_toggle_bit(pParty->_quest_bits, PARTY_QUEST_EMERALD_MARGARETH_OFF, 1); | 1839 _449B7E_toggle_bit(pParty->_quest_bits, PARTY_QUEST_EMERALD_MARGARETH_OFF, 1); |