raze/source/games/duke/src/dukeactor.h

55 lines
1.4 KiB
C
Raw Normal View History

2020-10-17 07:14:31 +00:00
#pragma once
#include "dobject.h"
#include "build.h"
BEGIN_DUKE_NS
using DukeStatIterator = TStatIterator<DDukeActor>;
using DukeSectIterator = TSectIterator<DDukeActor>;
using DukeSpriteIterator = TSpriteIterator<DDukeActor>;
2020-10-17 07:26:52 +00:00
inline DDukeActor* player_struct::GetActor()
{
return actor;
2020-10-17 07:26:52 +00:00
}
inline int player_struct::GetPlayerNum()
{
return actor->PlayerIndex();
2020-10-17 07:26:52 +00:00
}
DDukeActor* spawn(DDukeActor* spawner, int type);
2020-10-17 07:26:52 +00:00
inline int badguy(DDukeActor* pSprite)
{
return badguypic(pSprite->spr.picnum);
2020-10-17 07:26:52 +00:00
}
inline int bossguy(DDukeActor* pSprite)
{
return bossguypic(pSprite->spr.picnum);
2020-10-17 07:26:52 +00:00
}
// old interface versions of already changed functions
int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, unsigned int cliptype, Collision& result);
int movesprite_ex_r(DDukeActor* actor, int xchange, int ychange, int zchange, unsigned int cliptype, Collision& result);
/*
inline int movesprite_ex(DDukeActor* actor, int xchange, int ychange, int zchange, unsigned int cliptype, Collision& result)
{
auto f = isRR() ? movesprite_ex_r : movesprite_ex_d;
return f(actor, xchange, ychange, zchange, cliptype, result);
}
*/
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;
return f(actor, change.X * worldtoint, change.Y * worldtoint, change.Z * zworldtoint, cliptype, result);
}
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