annotate TurnEngine.h @ 1535:a18076b22fb7

Player::GetSkillBonus continuing cleanup
author Grumpy7
date Sat, 07 Sep 2013 04:13:22 +0200
parents 5c95f2246c2a
children 4da5644df18f
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2
Ritor1
parents:
diff changeset
3
1332
1e35cfed7928 turn engine file added
Gloval
parents: 1331
diff changeset
4 enum TURN_ENGINE_FLAGS
1e35cfed7928 turn engine file added
Gloval
parents: 1331
diff changeset
5 {
1e35cfed7928 turn engine file added
Gloval
parents: 1331
diff changeset
6 TE_FLAG_1 =1,
1450
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
7 TE_HAVE_PENDING_ACTIONS =2,
1332
1e35cfed7928 turn engine file added
Gloval
parents: 1331
diff changeset
8 TE_PLAYER_TURN =4,
1e35cfed7928 turn engine file added
Gloval
parents: 1331
diff changeset
9 TE_FLAG_8 =8
1e35cfed7928 turn engine file added
Gloval
parents: 1331
diff changeset
10 };
1e35cfed7928 turn engine file added
Gloval
parents: 1331
diff changeset
11
1450
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
12 enum TURN_ENGINE_AI_ACTION
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
13 {
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
14 TE_AI_STAND =0,
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
15 TE_AI_RANGED_ATTACK =1,
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
16 TE_AI_PURSUE =2,
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
17 TE_AI_MELEE_ATTACK =3,
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
18 TE_AI_FLEE =4
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
19 };
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
20
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
21
0
Ritor1
parents:
diff changeset
22
Ritor1
parents:
diff changeset
23 /* 299 */
Ritor1
parents:
diff changeset
24 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
25 struct TurnBased_QueueElem
Ritor1
parents:
diff changeset
26 {
372
Nomad
parents: 370
diff changeset
27 inline TurnBased_QueueElem()
Nomad
parents: 370
diff changeset
28 {
Nomad
parents: 370
diff changeset
29 uPackedID = 0;
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
30 actor_initiative = 0;
372
Nomad
parents: 370
diff changeset
31 uActionLength = 0;
1450
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
32 AI_action_type = 0;
372
Nomad
parents: 370
diff changeset
33 }
0
Ritor1
parents:
diff changeset
34 int uPackedID;
1450
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
35 int actor_initiative; //act first who have less
0
Ritor1
parents:
diff changeset
36 int uActionLength;
1450
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
37 int AI_action_type;
0
Ritor1
parents:
diff changeset
38 };
Ritor1
parents:
diff changeset
39 #pragma pack(pop)
Ritor1
parents:
diff changeset
40
Ritor1
parents:
diff changeset
41 /* 254 */
Ritor1
parents:
diff changeset
42 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
43 struct stru262_TurnBased
Ritor1
parents:
diff changeset
44 {
370
7f817679b60e _42777D_CastSpell_UseWand_ShootArrow
Nomad
parents: 322
diff changeset
45 inline stru262_TurnBased()
7f817679b60e _42777D_CastSpell_UseWand_ShootArrow
Nomad
parents: 322
diff changeset
46 {
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
47 turns_count = 0;
1340
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1332
diff changeset
48 turn_stage = 0;
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
49 ai_turn_timer = 0;
370
7f817679b60e _42777D_CastSpell_UseWand_ShootArrow
Nomad
parents: 322
diff changeset
50 uActorQueueSize = 0;
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
51 turn_initiative = 0;
370
7f817679b60e _42777D_CastSpell_UseWand_ShootArrow
Nomad
parents: 322
diff changeset
52 uActionPointsLeft = 0;
7f817679b60e _42777D_CastSpell_UseWand_ShootArrow
Nomad
parents: 322
diff changeset
53 field_18 = 0;
1450
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
54 pending_actions = 0;
370
7f817679b60e _42777D_CastSpell_UseWand_ShootArrow
Nomad
parents: 322
diff changeset
55 }
7f817679b60e _42777D_CastSpell_UseWand_ShootArrow
Nomad
parents: 322
diff changeset
56
1332
1e35cfed7928 turn engine file added
Gloval
parents: 1331
diff changeset
57 void SortTurnQueue();
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
58 void ApplyPlayerAction();
1331
f0be1fecd642 turn_based start fixed
Gloval
parents: 1330
diff changeset
59 void Start();
0
Ritor1
parents:
diff changeset
60 void End(bool bPlaySound);
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
61 void AITurnBasedAction();
1341
67e47fc3133d TE refactiring continue
Gloval
parents: 1340
diff changeset
62 void StartTurn();
0
Ritor1
parents:
diff changeset
63 void NextTurn();
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
64 int StepTurnQueue();
1340
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1332
diff changeset
65 void _406457(int a2);
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
66 void SetAIRecoveryTimes();
322
ce39b96acf5c Killing friendly peasants subs
Nomad
parents: 0
diff changeset
67 void _4065B0();
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
68 void AIAttacks(unsigned int queue_index);
1450
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
69 void AI_Action_(int queue_index);
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
70 void ActorAISetMovementDecision();
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
71 void ActorAIStopMovement();
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
72 void ActorAIDoAdditionalMove();
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
73 bool ActorMove(signed int a2);
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
74 void ActorAIChooseNewTargets();
0
Ritor1
parents:
diff changeset
75
Ritor1
parents:
diff changeset
76
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
77 int turns_count;
1340
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1332
diff changeset
78 int turn_stage;
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
79 int ai_turn_timer;
1330
82431a85b28e turnbased start part cleaning
Gloval
parents: 372
diff changeset
80 int uActorQueueSize; //c
1448
5a5d0c713d47 some turn engine renaming
Gloval
parents: 1367
diff changeset
81 int turn_initiative;
1330
82431a85b28e turnbased start part cleaning
Gloval
parents: 372
diff changeset
82 int uActionPointsLeft; //14
0
Ritor1
parents:
diff changeset
83 int field_18;
1450
8ff3c675a726 more renaming TE
Gloval
parents: 1448
diff changeset
84 int pending_actions;
1456
5c95f2246c2a TE mostly working
Gloval
parents: 1450
diff changeset
85 TurnBased_QueueElem pQueue[530]; //20
0
Ritor1
parents:
diff changeset
86 };
Ritor1
parents:
diff changeset
87 #pragma pack(pop)
Ritor1
parents:
diff changeset
88
Ritor1
parents:
diff changeset
89
Ritor1
parents:
diff changeset
90
Ritor1
parents:
diff changeset
91 extern struct stru262_TurnBased *pTurnEngine;