Skip to content
This repository was archived by the owner on Jul 23, 2020. It is now read-only.

Commit d6a242a

Browse files
committed
Implements EventClass::Execute cases.
1 parent 2effcff commit d6a242a

16 files changed

+607
-190
lines changed

src/game/engine/foot.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,3 +1569,36 @@ BOOL FootClass::Is_On_Priority_Mission()
15691569
{
15701570
return m_Mission == MISSION_ENTER;
15711571
}
1572+
1573+
void FootClass::Queue_Navigation_List(target_t target)
1574+
{
1575+
#ifndef CHRONOSHIFT_STANDALONE
1576+
void (*func)(FootClass *, target_t) = reinterpret_cast<void (*)(FootClass *, target_t)>(0x004C35D0);
1577+
func(this, target);
1578+
#else
1579+
int i;
1580+
if (target != 0) {
1581+
for (i = 0; i < NAV_LENGTH && m_NavList[i] != 0; ++i);
1582+
if (target != As_Target() || i <= 0) {
1583+
if (i == 0) {
1584+
m_Bit2_4 = false;
1585+
}
1586+
if (i < NAV_LENGTH) {
1587+
m_NavList[i] = target;
1588+
}
1589+
} else {
1590+
m_Bit2_4 = true;
1591+
}
1592+
if (m_NavCom == 0 && Mission == MISSION_GUARD) {
1593+
Enter_Idle_Mode();
1594+
}
1595+
}
1596+
#endif
1597+
}
1598+
1599+
void FootClass::Clear_Navigation_List()
1600+
{
1601+
for (int i = 0; i < NAV_LENGTH; ++i) {
1602+
m_NavList[i] = 0;
1603+
}
1604+
}

src/game/engine/foot.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ class FootClass : public TechnoClass
123123
FacingType Get_Path_Facing(int index) const { return m_Paths[index]; }
124124
target_t Nav_Com() const { return m_NavCom; }
125125

126+
void Set_To_Scatter(BOOL state) { m_ToScatter = state; }
127+
void Set_In_Formation(BOOL state) { m_InFormation = state; }
128+
void Set_Team_Speed(SpeedType speed) { m_TeamSpeed = speed; }
129+
void Set_Team_Max_Speed(MPHType mph) { m_TeamMaxSpeed = mph; }
130+
void Set_Suspended_NavCom(target_t target) { m_SuspendedNavCom = target; }
131+
126132
static int Point_Relative_To_Line(int px, int py, int sx, int sy, int ex, int ey);
127133
PathType *Find_Path_Wrapper(cell_t dest, FacingType *buffer, int length, MoveType move);
128134

@@ -132,6 +138,8 @@ class FootClass : public TechnoClass
132138
#endif
133139

134140
const fixed_t &Get_Speed_Multiplier() const { return m_SpeedMult; }
141+
void Queue_Navigation_List(target_t target);
142+
void Clear_Navigation_List();
135143
const GamePtr<TeamClass> &Get_Team() const { return m_Team; }
136144

137145
protected:

0 commit comments

Comments
 (0)