mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-01 05:20:43 +00:00
- refactor animatesprites API
This commit is contained in:
parent
9a4c699f53
commit
5f44dcc262
5 changed files with 6 additions and 10 deletions
|
@ -44,11 +44,9 @@ EXTERN_CVAR(Bool, wt_commentary)
|
||||||
|
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, double interpfrac)
|
void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle viewang, double interpfrac)
|
||||||
{
|
{
|
||||||
DAngle viewang = DAngle::fromBuild(a);
|
|
||||||
DAngle kang;
|
DAngle kang;
|
||||||
DVector2 viewVec(x * inttoworld, y * inttoworld);
|
|
||||||
int k, p;
|
int k, p;
|
||||||
int l, t1, t3, t4;
|
int l, t1, t3, t4;
|
||||||
tspritetype* t;
|
tspritetype* t;
|
||||||
|
|
|
@ -37,11 +37,9 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
|
||||||
BEGIN_DUKE_NS
|
BEGIN_DUKE_NS
|
||||||
|
|
||||||
|
|
||||||
void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, double interpfrac)
|
void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle viewang, double interpfrac)
|
||||||
{
|
{
|
||||||
DAngle kang;
|
DAngle kang;
|
||||||
DAngle viewang = DAngle::fromBuild(a);
|
|
||||||
DVector2 viewVec(x * inttoworld, y * inttoworld);
|
|
||||||
int k, p;
|
int k, p;
|
||||||
int l, t1, t3, t4;
|
int l, t1, t3, t4;
|
||||||
tspritetype* t;
|
tspritetype* t;
|
||||||
|
|
|
@ -98,8 +98,8 @@ void displaymasks_d(int snum, int p, double interpfrac);
|
||||||
void displaymasks_r(int snum, int p, double interpfrac);
|
void displaymasks_r(int snum, int p, double interpfrac);
|
||||||
void think_d();
|
void think_d();
|
||||||
void think_r();
|
void think_r();
|
||||||
void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, double interpfrac);
|
void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle viewang, double interpfrac);
|
||||||
void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, double interpfrac);
|
void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle viewang, double interpfrac);
|
||||||
|
|
||||||
Dispatcher fi;
|
Dispatcher fi;
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ struct Dispatcher
|
||||||
void (*displayweapon)(int snum, double interpfrac);
|
void (*displayweapon)(int snum, double interpfrac);
|
||||||
void (*displaymasks)(int snum, int p, double interpfrac);
|
void (*displaymasks)(int snum, int p, double interpfrac);
|
||||||
|
|
||||||
void (*animatesprites)(tspriteArray& tsprites, int x, int y, int a, double interpfrac);
|
void (*animatesprites)(tspriteArray& tsprites, const DVector2& viewVec, DAngle viewang, double interpfrac);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -389,7 +389,7 @@ bool GameInterface::GenerateSavePic()
|
||||||
|
|
||||||
void GameInterface::processSprites(tspriteArray& tsprites, int viewx, int viewy, int viewz, DAngle viewang, double interpfrac)
|
void GameInterface::processSprites(tspriteArray& tsprites, int viewx, int viewy, int viewz, DAngle viewang, double interpfrac)
|
||||||
{
|
{
|
||||||
fi.animatesprites(tsprites, viewx, viewy, viewang.Buildang(), interpfrac);
|
fi.animatesprites(tsprites, DVector2(viewx * inttoworld, viewy * inttoworld), viewang, interpfrac);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue