mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 04:30:38 +00:00
- clearcamera and ssp.
This commit is contained in:
parent
be21cb0602
commit
46d90f5d49
8 changed files with 21 additions and 19 deletions
|
@ -210,12 +210,11 @@ void clearcamera(player_struct* ps)
|
|||
updatesector(ps->posx, ps->posy, &ps->cursectnum);
|
||||
setpal(ps);
|
||||
|
||||
StatIterator it(STAT_ACTOR);
|
||||
int k;
|
||||
while ((k = it.NextIndex()) >= 0)
|
||||
DukeStatIterator it(STAT_ACTOR);
|
||||
while (auto k = it.Next())
|
||||
{
|
||||
if (sprite[k].picnum == TILE_CAMERA1)
|
||||
sprite[k].yvel = 0;
|
||||
if (k->s.picnum == TILE_CAMERA1)
|
||||
k->s.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -225,16 +224,13 @@ void clearcamera(player_struct* ps)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int ssp(int i, unsigned int cliptype) //The set sprite function
|
||||
int ssp(DDukeActor* const actor, unsigned int cliptype) //The set sprite function
|
||||
{
|
||||
spritetype* s;
|
||||
int movetype;
|
||||
|
||||
s = &sprite[i];
|
||||
|
||||
movetype = fi.movesprite(i,
|
||||
(s->xvel * (sintable[(s->ang + 512) & 2047])) >> 14,
|
||||
(s->xvel * (sintable[s->ang & 2047])) >> 14, s->zvel,
|
||||
movetype = fi.movesprite(actor->GetIndex(),
|
||||
(actor->s.xvel * (sintable[(actor->s.ang + 512) & 2047])) >> 14,
|
||||
(actor->s.xvel * (sintable[actor->s.ang & 2047])) >> 14, actor->s.zvel,
|
||||
cliptype);
|
||||
|
||||
return (movetype == 0);
|
||||
|
|
|
@ -142,11 +142,6 @@ inline DDukeActor* EGS(short whatsect, int s_x, int s_y, int s_z, short s_pn, si
|
|||
return &hittype[EGS(whatsect, s_x, s_y, s_z, s_pn, s_s, s_xr, s_yr, s_a, s_ve, s_zv, Owner ? Owner->GetIndex() : -1, s_ss)];
|
||||
}
|
||||
|
||||
inline int ssp(DDukeActor* i, unsigned int cliptype) //The set sprite function
|
||||
{
|
||||
return ssp(i->GetIndex(), cliptype);
|
||||
}
|
||||
|
||||
inline int ActorToScriptIndex(DDukeActor* a)
|
||||
{
|
||||
if (!a) return -1;
|
||||
|
@ -213,4 +208,10 @@ inline void deletesprite(int num)
|
|||
deletesprite(&hittype[num]);
|
||||
}
|
||||
|
||||
inline int ssp(int i, unsigned int cliptype) //The set sprite function
|
||||
{
|
||||
return ssp(&hittype[i], cliptype);
|
||||
}
|
||||
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
|
@ -100,7 +100,7 @@ void checkavailweapon(struct player_struct* p);
|
|||
void deletesprite(DDukeActor* num);
|
||||
void addammo(int weapon, struct player_struct* p, int amount);
|
||||
|
||||
int ssp(int i, unsigned int cliptype); //The set sprite function
|
||||
int ssp(DDukeActor* i, unsigned int cliptype); //The set sprite function
|
||||
void insertspriteq(int i);
|
||||
int wakeup(int sn, int pn);
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ source as it is released.
|
|||
#include "global.h"
|
||||
#include "gamevar.h"
|
||||
#include "names_d.h"
|
||||
#include "dukeactor.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
|
|
@ -36,7 +36,8 @@ source as it is released.
|
|||
#include "ns.h"
|
||||
#include "global.h"
|
||||
#include "gamevar.h"
|
||||
#include "names_d.h"
|
||||
#include "names_d.h"
|
||||
#include "dukeactor.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ source as it is released.
|
|||
#include "global.h"
|
||||
#include "sounds.h"
|
||||
#include "automap.h"
|
||||
#include "dukeactor.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ source as it is released.
|
|||
#include "global.h"
|
||||
#include "sounds.h"
|
||||
#include "names_d.h"
|
||||
#include "dukeactor.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
|||
#include "global.h"
|
||||
#include "sounds.h"
|
||||
#include "names_r.h"
|
||||
#include "dukeactor.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
|
Loading…
Reference in a new issue