mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 04:30:38 +00:00
- another iterator.
This one's for init code that needs to iterate sprites in spawn order.
This commit is contained in:
parent
12ef8c4543
commit
32fc9329de
1 changed files with 16 additions and 0 deletions
|
@ -68,6 +68,22 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class DukeLinearSpriteIterator
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
public:
|
||||||
|
|
||||||
|
DDukeActor* Next()
|
||||||
|
{
|
||||||
|
while (index < MAXSPRITES)
|
||||||
|
{
|
||||||
|
auto p = &hittype[index++];
|
||||||
|
if (p->s.statnum != MAXSTATUS) return p;
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
inline DDukeActor* player_struct::GetActor()
|
inline DDukeActor* player_struct::GetActor()
|
||||||
{
|
{
|
||||||
return &hittype[i];
|
return &hittype[i];
|
||||||
|
|
Loading…
Reference in a new issue