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