2020-10-17 07:14:31 +00:00
|
|
|
#pragma once
|
|
|
|
#include "dobject.h"
|
|
|
|
#include "build.h"
|
|
|
|
|
|
|
|
BEGIN_DUKE_NS
|
|
|
|
|
|
|
|
|
2021-11-26 20:13:19 +00:00
|
|
|
using DukeStatIterator = TStatIterator<DDukeActor>;
|
|
|
|
using DukeSectIterator = TSectIterator<DDukeActor>;
|
|
|
|
using DukeSpriteIterator = TSpriteIterator<DDukeActor>;
|
2020-10-27 06:15:03 +00:00
|
|
|
|
2020-10-17 07:26:52 +00:00
|
|
|
inline DDukeActor* player_struct::GetActor()
|
|
|
|
{
|
2021-11-28 08:16:50 +00:00
|
|
|
return actor;
|
2020-10-17 07:26:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline int player_struct::GetPlayerNum()
|
|
|
|
{
|
2022-09-01 15:26:46 +00:00
|
|
|
return actor->PlayerIndex();
|
2020-10-17 07:26:52 +00:00
|
|
|
}
|
|
|
|
|
2021-11-19 09:41:50 +00:00
|
|
|
DDukeActor* spawn(DDukeActor* spawner, int type);
|
2022-01-17 23:30:43 +00:00
|
|
|
DDukeActor* spawn(DDukeActor* actj, PClassActor* pname);
|
|
|
|
|
2020-10-17 07:26:52 +00:00
|
|
|
|
|
|
|
inline int badguy(DDukeActor* pSprite)
|
|
|
|
{
|
2021-12-21 17:19:45 +00:00
|
|
|
return badguypic(pSprite->spr.picnum);
|
2020-10-17 07:26:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline int bossguy(DDukeActor* pSprite)
|
|
|
|
{
|
2021-12-21 17:19:45 +00:00
|
|
|
return bossguypic(pSprite->spr.picnum);
|
2020-10-17 07:26:52 +00:00
|
|
|
}
|
|
|
|
|
2020-10-21 17:14:41 +00:00
|
|
|
// old interface versions of already changed functions
|
|
|
|
|
2022-09-13 18:09:29 +00:00
|
|
|
int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int cliptype, Collision& result);
|
|
|
|
int movesprite_ex_r(DDukeActor* actor, const DVector3& change, unsigned int cliptype, Collision& result);
|
2020-10-24 07:31:15 +00:00
|
|
|
|
2022-09-03 16:35:02 +00:00
|
|
|
inline int movesprite_ex(DDukeActor* actor, const DVector3& change, unsigned int cliptype, Collision& result)
|
|
|
|
{
|
|
|
|
auto f = isRR() ? movesprite_ex_r : movesprite_ex_d;
|
2022-09-13 18:09:29 +00:00
|
|
|
return f(actor, change, cliptype, result);
|
2022-09-03 16:35:02 +00:00
|
|
|
}
|
2021-11-21 08:05:58 +00:00
|
|
|
|
2021-08-27 14:38:53 +00:00
|
|
|
|
2020-10-17 07:14:31 +00:00
|
|
|
END_DUKE_NS
|