mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Interpolate spikeleveltop and spikelevelbottom
This doesn't have much effect, except for when the spikes quickly move, because the spikes only usually move at 1 pixel per frame anyway.
This commit is contained in:
parent
5ff4a09acc
commit
2e17e872e4
4 changed files with 11 additions and 2 deletions
|
@ -2332,10 +2332,12 @@ void Graphics::drawtowermap_nobackground()
|
|||
|
||||
void Graphics::drawtowerspikes()
|
||||
{
|
||||
int spikeleveltop = lerp(map.oldspikeleveltop, map.spikeleveltop);
|
||||
int spikelevelbottom = lerp(map.oldspikelevelbottom, map.spikelevelbottom);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
drawtile3(i * 8, -8+map.spikeleveltop, 9, map.colstate);
|
||||
drawtile3(i * 8, 230-map.spikelevelbottom, 8, map.colstate);
|
||||
drawtile3(i * 8, -8+spikeleveltop, 9, map.colstate);
|
||||
drawtile3(i * 8, 230-spikelevelbottom, 8, map.colstate);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -261,6 +261,8 @@ void gamelogic()
|
|||
if (map.towermode)
|
||||
{
|
||||
map.oldypos = map.ypos;
|
||||
map.oldspikeleveltop = map.spikeleveltop;
|
||||
map.oldspikelevelbottom = map.spikelevelbottom;
|
||||
if(!game.completestop)
|
||||
{
|
||||
if (map.cameramode == 0)
|
||||
|
|
|
@ -13,6 +13,8 @@ mapclass::mapclass()
|
|||
colsuperstate = 0;
|
||||
spikeleveltop = 0;
|
||||
spikelevelbottom = 0;
|
||||
oldspikeleveltop = 0;
|
||||
oldspikelevelbottom = 0;
|
||||
warpx = false;
|
||||
warpy = false;
|
||||
extrarow = 0;
|
||||
|
@ -1152,6 +1154,8 @@ void mapclass::loadlevel(int rx, int ry)
|
|||
extrarow = 0;
|
||||
spikeleveltop = 0;
|
||||
spikelevelbottom = 0;
|
||||
oldspikeleveltop = 0;
|
||||
oldspikelevelbottom = 0;
|
||||
|
||||
//Custom stuff for warplines
|
||||
obj.customwarpmode=false;
|
||||
|
|
|
@ -113,6 +113,7 @@ public:
|
|||
int colstate, colstatedelay;
|
||||
int colsuperstate;
|
||||
int spikeleveltop, spikelevelbottom;
|
||||
int oldspikeleveltop, oldspikelevelbottom;
|
||||
bool tdrawback;
|
||||
int bscroll;
|
||||
//final level navigation
|
||||
|
|
Loading…
Reference in a new issue