mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 20:20:54 +00:00
- do proper interpolation of the snorkel in RR.
This commit is contained in:
parent
03aad6559b
commit
45a22eb3cd
5 changed files with 10 additions and 8 deletions
|
@ -107,8 +107,8 @@ void processinput_d(int snum);
|
||||||
void processinput_r(int snum);
|
void processinput_r(int snum);
|
||||||
void displayweapon_d(int snum, double smoothratio);
|
void displayweapon_d(int snum, double smoothratio);
|
||||||
void displayweapon_r(int snum, double smoothratio);
|
void displayweapon_r(int snum, double smoothratio);
|
||||||
void displaymasks_d(int snum);
|
void displaymasks_d(int snum, double smoothratio);
|
||||||
void displaymasks_r(int snum);
|
void displaymasks_r(int snum, double smoothratio);
|
||||||
void think_d();
|
void think_d();
|
||||||
void think_r();
|
void think_r();
|
||||||
void animatesprites_d(int x, int y, int a, int smoothratio);
|
void animatesprites_d(int x, int y, int a, int smoothratio);
|
||||||
|
|
|
@ -111,7 +111,7 @@ struct Dispatcher
|
||||||
void (*checkweapons)(struct player_struct* p);
|
void (*checkweapons)(struct player_struct* p);
|
||||||
void (*processinput)(int snum);
|
void (*processinput)(int snum);
|
||||||
void (*displayweapon)(int snum, double smoothratio);
|
void (*displayweapon)(int snum, double smoothratio);
|
||||||
void (*displaymasks)(int snum);
|
void (*displaymasks)(int snum, double smoothratio);
|
||||||
|
|
||||||
void (*animatesprites)(int x, int y, int a, int smoothratio);
|
void (*animatesprites)(int x, int y, int a, int smoothratio);
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,7 @@ void drawoverlays(double smoothratio)
|
||||||
{
|
{
|
||||||
fi.displayweapon(screenpeek, smoothratio);
|
fi.displayweapon(screenpeek, smoothratio);
|
||||||
if (pp->over_shoulder_on == 0)
|
if (pp->over_shoulder_on == 0)
|
||||||
fi.displaymasks(screenpeek);
|
fi.displaymasks(screenpeek, smoothratio);
|
||||||
}
|
}
|
||||||
if (!isRR())
|
if (!isRR())
|
||||||
moveclouds();
|
moveclouds();
|
||||||
|
|
|
@ -188,7 +188,7 @@ int animateknuckles(int gs, int snum, double hard_landing, double look_anghalf,
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void displaymasks_d(int snum)
|
void displaymasks_d(int snum, double)
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ inline static void rd3myospal(double x, double y, int tilenum, int shade, int or
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void displaymasks_r(int snum)
|
void displaymasks_r(int snum, double smoothratio)
|
||||||
{
|
{
|
||||||
short p;
|
short p;
|
||||||
|
|
||||||
|
@ -76,8 +76,10 @@ void displaymasks_r(int snum)
|
||||||
if (ps[snum].scuba_on)
|
if (ps[snum].scuba_on)
|
||||||
{
|
{
|
||||||
int pin = 0;
|
int pin = 0;
|
||||||
|
// to get the proper clock value with regards to interpolation we have add a smoothratio based offset to the value.
|
||||||
|
double interpclock = ud.levelclock + (TICSPERFRAME/65536.) * smoothratio;
|
||||||
if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_STRETCH;
|
if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_STRETCH;
|
||||||
hud_drawsprite((320 - (tilesiz[SCUBAMASK].x >> 1) - 15), (200 - (tilesiz[SCUBAMASK].y >> 1) + (calcSinTableValue(gameclock) / 1024.)), 49152, 0, SCUBAMASK, 0, p, 2 + 16 + pin);
|
hud_drawsprite((320 - (tilesiz[SCUBAMASK].x >> 1) - 15), (200 - (tilesiz[SCUBAMASK].y >> 1) + (calcSinTableValue(interpclock) / 1024.)), 49152, 0, SCUBAMASK, 0, p, 2 + 16 + pin);
|
||||||
hud_drawsprite((320 - tilesiz[SCUBAMASK + 4].x), (200 - tilesiz[SCUBAMASK + 4].y), 65536, 0, SCUBAMASK + 4, 0, p, 2 + 16 + pin);
|
hud_drawsprite((320 - tilesiz[SCUBAMASK + 4].x), (200 - tilesiz[SCUBAMASK + 4].y), 65536, 0, SCUBAMASK + 4, 0, p, 2 + 16 + pin);
|
||||||
hud_drawsprite(tilesiz[SCUBAMASK + 4].x, (200 - tilesiz[SCUBAMASK + 4].y), 65536, 0, SCUBAMASK + 4, 0, p, 2 + 4 + 16 + pin);
|
hud_drawsprite(tilesiz[SCUBAMASK + 4].x, (200 - tilesiz[SCUBAMASK + 4].y), 65536, 0, SCUBAMASK + 4, 0, p, 2 + 4 + 16 + pin);
|
||||||
hud_drawsprite(35, (-1), 65536, 0, SCUBAMASK + 3, 0, p, 2 + 16 + pin);
|
hud_drawsprite(35, (-1), 65536, 0, SCUBAMASK + 3, 0, p, 2 + 16 + pin);
|
||||||
|
@ -928,4 +930,4 @@ void displayweapon_r(int snum, double smoothratio)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
END_DUKE_NS
|
END_DUKE_NS
|
||||||
|
|
Loading…
Reference in a new issue