Mercurial > mm7
comparison Engine/TurnEngine/TurnEngine.h @ 2499:68cdef6879a0
engine folder
author | Ritor1 |
---|---|
date | Fri, 19 Sep 2014 02:57:42 +0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2498:92eeeb5200f2 | 2499:68cdef6879a0 |
---|---|
1 #pragma once | |
2 | |
3 | |
4 enum TURN_ENGINE_FLAGS | |
5 { | |
6 TE_FLAG_1 = 1, | |
7 TE_HAVE_PENDING_ACTIONS = 2, | |
8 TE_PLAYER_TURN = 4, | |
9 TE_FLAG_8 = 8 | |
10 }; | |
11 | |
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 enum TURN_ENGINE_TURN_STAGE | |
22 { | |
23 TE_NONE = 0, | |
24 TE_WAIT = 1, | |
25 TE_ATTACK = 2, | |
26 TE_MOVEMENT = 3, | |
27 }; | |
28 | |
29 /* 299 */ | |
30 #pragma pack(push, 1) | |
31 struct TurnBased_QueueElem | |
32 { | |
33 inline TurnBased_QueueElem() | |
34 { | |
35 uPackedID = 0; | |
36 actor_initiative = 0; | |
37 uActionLength = 0; | |
38 AI_action_type = 0; | |
39 } | |
40 int uPackedID; | |
41 int actor_initiative; //act first who have less | |
42 int uActionLength; | |
43 int AI_action_type; | |
44 }; | |
45 #pragma pack(pop) | |
46 | |
47 /* 254 */ | |
48 #pragma pack(push, 1) | |
49 struct stru262_TurnBased | |
50 { | |
51 inline stru262_TurnBased() | |
52 { | |
53 turns_count = 0; | |
54 turn_stage = 0; | |
55 ai_turn_timer = 0; | |
56 uActorQueueSize = 0; | |
57 turn_initiative = 0; | |
58 uActionPointsLeft = 0; | |
59 field_18 = 0; | |
60 pending_actions = 0; | |
61 } | |
62 | |
63 void SortTurnQueue(); | |
64 void ApplyPlayerAction(); | |
65 void Start(); | |
66 void End(bool bPlaySound); | |
67 void AITurnBasedAction(); | |
68 void StartTurn(); | |
69 void NextTurn(); | |
70 bool StepTurnQueue(); | |
71 void _406457(int a2); | |
72 void SetAIRecoveryTimes(); | |
73 void _4065B0(); | |
74 void AIAttacks(unsigned int queue_index); | |
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(); | |
81 | |
82 | |
83 int turns_count; | |
84 int turn_stage; //if = 2 - action | |
85 int ai_turn_timer; | |
86 int uActorQueueSize; //c | |
87 int turn_initiative; | |
88 int uActionPointsLeft; //14 | |
89 int field_18; | |
90 int pending_actions; | |
91 TurnBased_QueueElem pQueue[530]; //20 | |
92 }; | |
93 #pragma pack(pop) | |
94 | |
95 | |
96 | |
97 extern struct stru262_TurnBased *pTurnEngine; |