mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-10 19:09:45 +01:00
Fix off-by-one in interpolation of extending gravity line
Currently it interpolates it based on the current state of game.swngame, but when game.swngame changes the interpolation doesn't know that it has JUST changed or anything. So add a kludge variable to fix this off-by-one.
This commit is contained in:
parent
df2d8e881e
commit
93d8220388
3 changed files with 7 additions and 1 deletions
|
@ -137,6 +137,8 @@ void Graphics::init()
|
||||||
col_tr = 0;
|
col_tr = 0;
|
||||||
col_tg = 0;
|
col_tg = 0;
|
||||||
col_tb = 0;
|
col_tb = 0;
|
||||||
|
|
||||||
|
kludgeswnlinewidth = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Graphics::font_idx(uint32_t ch) {
|
int Graphics::font_idx(uint32_t ch) {
|
||||||
|
@ -1649,7 +1651,7 @@ void Graphics::drawentities()
|
||||||
case 5: //Horizontal Line
|
case 5: //Horizontal Line
|
||||||
{
|
{
|
||||||
int oldw = obj.entities[i].w;
|
int oldw = obj.entities[i].w;
|
||||||
if (game.swngame == 3 && obj.getlineat(84 - 32) == i)
|
if ((game.swngame == 3 || kludgeswnlinewidth) && obj.getlineat(84 - 32) == i)
|
||||||
{
|
{
|
||||||
oldw -= 24;
|
oldw -= 24;
|
||||||
}
|
}
|
||||||
|
|
|
@ -320,6 +320,8 @@ public:
|
||||||
int col_tg;
|
int col_tg;
|
||||||
int col_tb;
|
int col_tb;
|
||||||
void updatetitlecolours();
|
void updatetitlecolours();
|
||||||
|
|
||||||
|
bool kludgeswnlinewidth;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Graphics graphics;
|
extern Graphics graphics;
|
||||||
|
|
|
@ -442,6 +442,7 @@ void gamelogic()
|
||||||
game.lifesequence();
|
game.lifesequence();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
graphics.kludgeswnlinewidth = false;
|
||||||
|
|
||||||
if (game.deathseq != -1)
|
if (game.deathseq != -1)
|
||||||
{
|
{
|
||||||
|
@ -747,6 +748,7 @@ void gamelogic()
|
||||||
{
|
{
|
||||||
obj.entities[obj.getlineat(84 - 32)].w = 332;
|
obj.entities[obj.getlineat(84 - 32)].w = 332;
|
||||||
game.swngame = 2;
|
game.swngame = 2;
|
||||||
|
graphics.kludgeswnlinewidth = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (game.swngame == 4) //create top line
|
else if (game.swngame == 4) //create top line
|
||||||
|
|
Loading…
Reference in a new issue