World of Might and Magic
0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
TurnEngine.h
См. документацию.
1
#pragma once
2
3
enum
TURN_ENGINE_FLAGS
{
4
TE_FLAG_1
= 1,
5
TE_HAVE_PENDING_ACTIONS
= 2,
6
TE_PLAYER_TURN
= 4,
7
TE_FLAG_8
= 8
8
};
9
10
enum
TURN_ENGINE_AI_ACTION
{
11
TE_AI_STAND
= 0,
12
TE_AI_RANGED_ATTACK
= 1,
13
TE_AI_PURSUE
= 2,
14
TE_AI_MELEE_ATTACK
= 3,
15
TE_AI_FLEE
= 4
16
};
17
18
enum
TURN_ENGINE_TURN_STAGE
{
19
TE_NONE
= 0,
20
TE_WAIT
= 1,
21
TE_ATTACK
= 2,
22
TE_MOVEMENT
= 3,
23
};
24
25
/* 299 */
26
#pragma pack(push, 1)
27
struct
TurnBased_QueueElem
{
28
inline
TurnBased_QueueElem
() {
29
uPackedID
= 0;
30
actor_initiative
= 0;
31
uActionLength
= 0;
32
AI_action_type
= 0;
33
}
34
int
uPackedID
;
35
int
actor_initiative
;
// act first who have less
36
int
uActionLength
;
37
int
AI_action_type
;
38
};
39
#pragma pack(pop)
40
41
/* 254 */
42
#pragma pack(push, 1)
43
struct
stru262_TurnBased
{
44
inline
stru262_TurnBased
() {
45
turns_count
= 0;
46
turn_stage
= 0;
47
ai_turn_timer
= 0;
48
uActorQueueSize
= 0;
49
turn_initiative
= 0;
50
uActionPointsLeft
= 0;
51
field_18
= 0;
52
pending_actions
= 0;
53
}
54
55
void
SortTurnQueue
();
56
void
ApplyPlayerAction
();
57
void
Start
();
58
void
End
(
bool
bPlaySound);
59
void
AITurnBasedAction
();
60
void
StartTurn
();
61
void
NextTurn
();
62
bool
StepTurnQueue
();
63
void
_406457
(
int
a2);
64
void
SetAIRecoveryTimes
();
65
void
_4065B0
();
66
void
AIAttacks
(
unsigned
int
queue_index);
67
void
AI_Action_
(
int
queue_index);
68
void
ActorAISetMovementDecision
();
69
void
ActorAIStopMovement
();
70
void
ActorAIDoAdditionalMove
();
71
bool
ActorMove
(
signed
int
a2);
72
void
ActorAIChooseNewTargets
();
73
74
int
turns_count
;
75
int
turn_stage
;
// if = 2 - action
76
int
ai_turn_timer
;
77
int
uActorQueueSize
;
// c
78
int
turn_initiative
;
79
int
uActionPointsLeft
;
// 14
80
int
field_18
;
81
int
pending_actions
;
82
TurnBased_QueueElem
pQueue
[530];
// 20
83
};
84
#pragma pack(pop)
85
86
extern
struct
stru262_TurnBased
*
pTurnEngine
;
TE_MOVEMENT
@ TE_MOVEMENT
Definition:
TurnEngine.h:22
TE_ATTACK
@ TE_ATTACK
Definition:
TurnEngine.h:21
TurnBased_QueueElem::AI_action_type
int AI_action_type
Definition:
TurnEngine.h:37
TurnBased_QueueElem
Definition:
TurnEngine.h:27
stru262_TurnBased::AIAttacks
void AIAttacks(unsigned int queue_index)
Definition:
TurnEngine.cpp:599
stru262_TurnBased::ApplyPlayerAction
void ApplyPlayerAction()
Definition:
TurnEngine.cpp:101
TE_AI_STAND
@ TE_AI_STAND
Definition:
TurnEngine.h:11
stru262_TurnBased::AI_Action_
void AI_Action_(int queue_index)
Definition:
TurnEngine.cpp:709
stru262_TurnBased::turn_initiative
int turn_initiative
Definition:
TurnEngine.h:78
TurnBased_QueueElem::uActionLength
int uActionLength
Definition:
TurnEngine.h:36
stru262_TurnBased::ActorAISetMovementDecision
void ActorAISetMovementDecision()
Definition:
TurnEngine.cpp:830
stru262_TurnBased::_4065B0
void _4065B0()
Definition:
TurnEngine.cpp:574
stru262_TurnBased::StartTurn
void StartTurn()
Definition:
TurnEngine.cpp:342
stru262_TurnBased::NextTurn
void NextTurn()
Definition:
TurnEngine.cpp:395
TE_FLAG_8
@ TE_FLAG_8
Definition:
TurnEngine.h:7
TurnBased_QueueElem::uPackedID
int uPackedID
Definition:
TurnEngine.h:34
stru262_TurnBased::SortTurnQueue
void SortTurnQueue()
Definition:
TurnEngine.cpp:24
TE_AI_RANGED_ATTACK
@ TE_AI_RANGED_ATTACK
Definition:
TurnEngine.h:12
TE_PLAYER_TURN
@ TE_PLAYER_TURN
Definition:
TurnEngine.h:6
stru262_TurnBased::pQueue
TurnBased_QueueElem pQueue[530]
Definition:
TurnEngine.h:82
stru262_TurnBased::Start
void Start()
Definition:
TurnEngine.cpp:108
TE_AI_PURSUE
@ TE_AI_PURSUE
Definition:
TurnEngine.h:13
stru262_TurnBased::End
void End(bool bPlaySound)
Definition:
TurnEngine.cpp:220
TE_AI_MELEE_ATTACK
@ TE_AI_MELEE_ATTACK
Definition:
TurnEngine.h:14
stru262_TurnBased::ai_turn_timer
int ai_turn_timer
Definition:
TurnEngine.h:76
TE_WAIT
@ TE_WAIT
Definition:
TurnEngine.h:20
stru262_TurnBased::AITurnBasedAction
void AITurnBasedAction()
Definition:
TurnEngine.cpp:260
stru262_TurnBased::uActorQueueSize
int uActorQueueSize
Definition:
TurnEngine.h:77
stru262_TurnBased::ActorMove
bool ActorMove(signed int a2)
Definition:
TurnEngine.cpp:919
TE_NONE
@ TE_NONE
Definition:
TurnEngine.h:19
TURN_ENGINE_FLAGS
TURN_ENGINE_FLAGS
Definition:
TurnEngine.h:3
TE_AI_FLEE
@ TE_AI_FLEE
Definition:
TurnEngine.h:15
pTurnEngine
struct stru262_TurnBased * pTurnEngine
Definition:
TurnEngine.cpp:21
TurnBased_QueueElem::TurnBased_QueueElem
TurnBased_QueueElem()
Definition:
TurnEngine.h:28
TE_FLAG_1
@ TE_FLAG_1
Definition:
TurnEngine.h:4
stru262_TurnBased::StepTurnQueue
bool StepTurnQueue()
Definition:
TurnEngine.cpp:477
stru262_TurnBased::ActorAIChooseNewTargets
void ActorAIChooseNewTargets()
Definition:
TurnEngine.cpp:1084
stru262_TurnBased::SetAIRecoveryTimes
void SetAIRecoveryTimes()
Definition:
TurnEngine.cpp:551
stru262_TurnBased
Definition:
TurnEngine.h:43
stru262_TurnBased::ActorAIDoAdditionalMove
void ActorAIDoAdditionalMove()
Definition:
TurnEngine.cpp:874
TURN_ENGINE_TURN_STAGE
TURN_ENGINE_TURN_STAGE
Definition:
TurnEngine.h:18
TURN_ENGINE_AI_ACTION
TURN_ENGINE_AI_ACTION
Definition:
TurnEngine.h:10
TurnBased_QueueElem::actor_initiative
int actor_initiative
Definition:
TurnEngine.h:35
stru262_TurnBased::ActorAIStopMovement
void ActorAIStopMovement()
Definition:
TurnEngine.cpp:853
stru262_TurnBased::pending_actions
int pending_actions
Definition:
TurnEngine.h:81
stru262_TurnBased::field_18
int field_18
Definition:
TurnEngine.h:80
stru262_TurnBased::turn_stage
int turn_stage
Definition:
TurnEngine.h:75
stru262_TurnBased::turns_count
int turns_count
Definition:
TurnEngine.h:74
stru262_TurnBased::_406457
void _406457(int a2)
Definition:
TurnEngine.cpp:513
TE_HAVE_PENDING_ACTIONS
@ TE_HAVE_PENDING_ACTIONS
Definition:
TurnEngine.h:5
stru262_TurnBased::uActionPointsLeft
int uActionPointsLeft
Definition:
TurnEngine.h:79
stru262_TurnBased::stru262_TurnBased
stru262_TurnBased()
Definition:
TurnEngine.h:44
Engine
TurnEngine
TurnEngine.h
Документация по World of Might and Magic. Последние изменения: Вт 7 Апр 2020 22:03:34. Создано системой
1.8.17