comparison Engine/Graphics/Overlays.cpp @ 2541:a902abdfc7f2

1. Renamed class Game to class Engine. 2. Separated game logic as state of FSM from game logic as engine. 3. Found out that many UI screen initializers were optimized away, intially they all returned newly created window as separate object like it is done in CharacterUI_Initialize.
author a.parshin
date Sun, 10 May 2015 01:29:11 +0200
parents c7264ab7132f
children 0c67be4ec900
comparison
equal deleted inserted replaced
2540:abc6a9d079b9 2541:a902abdfc7f2
3 #include <crtdbg.h> 3 #include <crtdbg.h>
4 4
5 5
6 #define _CRT_SECURE_NO_WARNINGS 6 #define _CRT_SECURE_NO_WARNINGS
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include "../ErrorHandling.h" 8 #include "Engine/Engine.h"
9 9
10 #include "Overlays.h" 10 #include "Overlays.h"
11 #include "Sprites.h" 11 #include "Sprites.h"
12 #include "../Tables/FrameTableInc.h" 12 #include "../Tables/FrameTableInc.h"
13 #include "../Tables/IconFrameTable.h" 13 #include "../Tables/IconFrameTable.h"
15 #include "../Party.h" 15 #include "../Party.h"
16 #include "../TurnEngine/TurnEngine.h" 16 #include "../TurnEngine/TurnEngine.h"
17 #include "../LOD.h" 17 #include "../LOD.h"
18 #include "Render.h" 18 #include "Render.h"
19 #include "GUI/GUIWindow.h" 19 #include "GUI/GUIWindow.h"
20
21 #include "../mm7_data.h"
22 20
23 21
24 22
25 23
26 24
86 void OtherOverlayList::DrawTurnBasedIcon(int a2) 84 void OtherOverlayList::DrawTurnBasedIcon(int a2)
87 { 85 {
88 IconFrame *frame; // eax@12 86 IconFrame *frame; // eax@12
89 unsigned int v5; // [sp-8h] [bp-Ch]@4 87 unsigned int v5; // [sp-8h] [bp-Ch]@4
90 88
91 if ( pCurrentScreen != SCREEN_GAME || !pParty->bTurnBasedModeOn) 89 if ( current_screen_type != SCREEN_GAME || !pParty->bTurnBasedModeOn)
92 return; 90 return;
93 91
94 if ( pTurnEngine->turn_stage == TE_MOVEMENT )//все персы отстрелялись(сжатый кулак) 92 if ( pTurnEngine->turn_stage == TE_MOVEMENT )//все персы отстрелялись(сжатый кулак)
95 frame = pIconsFrameTable->GetFrame(pIconIDs_Turn[5 - pTurnEngine->uActionPointsLeft / 26], pEventTimer->uStartTime); 93 frame = pIconsFrameTable->GetFrame(pIconIDs_Turn[5 - pTurnEngine->uActionPointsLeft / 26], pEventTimer->uStartTime);
96 else if ( pTurnEngine->turn_stage == TE_WAIT ) 94 else if ( pTurnEngine->turn_stage == TE_WAIT )
112 dword_50C994 += pEventTimer->uTimeElapsed; 110 dword_50C994 += pEventTimer->uTimeElapsed;
113 if ( (signed int)dword_50C994 >= dword_50C998_turnbased_icon_1A ) 111 if ( (signed int)dword_50C994 >= dword_50C998_turnbased_icon_1A )
114 dword_50C998_turnbased_icon_1A = 0; 112 dword_50C998_turnbased_icon_1A = 0;
115 } 113 }
116 } 114 }
117 // 4E28F8: using guessed type int pCurrentScreen; 115 // 4E28F8: using guessed type int current_screen_type;
118 // 50C994: using guessed type int dword_50C994; 116 // 50C994: using guessed type int dword_50C994;
119 // 50C998: using guessed type int dword_50C998_turnbased_icon_1A; 117 // 50C998: using guessed type int dword_50C998_turnbased_icon_1A;
120 118
121 119
122 //----- (00458D97) -------------------------------------------------------- 120 //----- (00458D97) --------------------------------------------------------