0
|
1 #pragma once
|
|
2
|
|
3
|
1332
|
4 enum TURN_ENGINE_FLAGS
|
2242
|
5 {
|
|
6 TE_FLAG_1 = 1,
|
|
7 TE_HAVE_PENDING_ACTIONS = 2,
|
|
8 TE_PLAYER_TURN = 4,
|
|
9 TE_FLAG_8 = 8
|
|
10 };
|
1332
|
11
|
1450
|
12 enum TURN_ENGINE_AI_ACTION
|
2242
|
13 {
|
|
14 TE_AI_STAND = 0,
|
|
15 TE_AI_RANGED_ATTACK = 1,
|
|
16 TE_AI_PURSUE = 2,
|
|
17 TE_AI_MELEE_ATTACK = 3,
|
|
18 TE_AI_FLEE = 4
|
|
19 };
|
1450
|
20
|
2242
|
21 enum TURN_ENGINE_TURN_STAGE
|
|
22 {
|
|
23 TE_NONE = 0,
|
|
24 TE_WAIT = 1,
|
|
25 TE_ATTACK = 2,
|
|
26 TE_MOVEMENT = 3,
|
|
27 };
|
0
|
28
|
|
29 /* 299 */
|
|
30 #pragma pack(push, 1)
|
|
31 struct TurnBased_QueueElem
|
|
32 {
|
372
|
33 inline TurnBased_QueueElem()
|
|
34 {
|
|
35 uPackedID = 0;
|
1448
|
36 actor_initiative = 0;
|
372
|
37 uActionLength = 0;
|
1450
|
38 AI_action_type = 0;
|
372
|
39 }
|
0
|
40 int uPackedID;
|
1450
|
41 int actor_initiative; //act first who have less
|
0
|
42 int uActionLength;
|
1450
|
43 int AI_action_type;
|
0
|
44 };
|
|
45 #pragma pack(pop)
|
|
46
|
|
47 /* 254 */
|
|
48 #pragma pack(push, 1)
|
|
49 struct stru262_TurnBased
|
|
50 {
|
370
|
51 inline stru262_TurnBased()
|
|
52 {
|
1448
|
53 turns_count = 0;
|
1340
|
54 turn_stage = 0;
|
1448
|
55 ai_turn_timer = 0;
|
370
|
56 uActorQueueSize = 0;
|
1448
|
57 turn_initiative = 0;
|
370
|
58 uActionPointsLeft = 0;
|
|
59 field_18 = 0;
|
1450
|
60 pending_actions = 0;
|
370
|
61 }
|
|
62
|
1679
|
63 void SortTurnQueue();
|
1448
|
64 void ApplyPlayerAction();
|
1679
|
65 void Start();
|
0
|
66 void End(bool bPlaySound);
|
1448
|
67 void AITurnBasedAction();
|
1341
|
68 void StartTurn();
|
0
|
69 void NextTurn();
|
1679
|
70 bool StepTurnQueue();
|
1340
|
71 void _406457(int a2);
|
1448
|
72 void SetAIRecoveryTimes();
|
322
|
73 void _4065B0();
|
1448
|
74 void AIAttacks(unsigned int queue_index);
|
1450
|
75 void AI_Action_(int queue_index);
|
|
76 void ActorAISetMovementDecision();
|
|
77 void ActorAIStopMovement();
|
|
78 void ActorAIDoAdditionalMove();
|
|
79 bool ActorMove(signed int a2);
|
|
80 void ActorAIChooseNewTargets();
|
0
|
81
|
|
82
|
1448
|
83 int turns_count;
|
2114
|
84 int turn_stage; //if = 2 - action
|
1448
|
85 int ai_turn_timer;
|
1330
|
86 int uActorQueueSize; //c
|
1448
|
87 int turn_initiative;
|
1330
|
88 int uActionPointsLeft; //14
|
0
|
89 int field_18;
|
1450
|
90 int pending_actions;
|
1456
|
91 TurnBased_QueueElem pQueue[530]; //20
|
0
|
92 };
|
|
93 #pragma pack(pop)
|
|
94
|
|
95
|
|
96
|
|
97 extern struct stru262_TurnBased *pTurnEngine; |