mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 09:54:10 +03:00
Transfer adjust call to applyposition
This transfers the responsibility of the adjust() call to applyposition(). This is because cutscene text boxes (TEXTTRANSLATE_CUTSCENE) will have adjust() called, but all other text boxes won't. And I can't place the adjust() call inside applyposition(), because adjust() also calls applyposition(), and that leads to an infinite loop which leads to a stack overflow, so I had to remove the applyposition() call from adjust(), and replace the other existing call to Graphics::textboxadjust() with Graphics::textboxapplyposition(), and then remove Graphics::textboxadjust() function because it's no longer used.
This commit is contained in:
@@ -1506,17 +1506,6 @@ void Graphics::textboxapplyposition(void)
|
||||
textboxes[m].applyposition();
|
||||
}
|
||||
|
||||
void Graphics::textboxadjust(void)
|
||||
{
|
||||
if (!INBOUNDS_VEC(m, textboxes))
|
||||
{
|
||||
vlog_error("textboxadjust() out-of-bounds!");
|
||||
return;
|
||||
}
|
||||
|
||||
textboxes[m].adjust();
|
||||
}
|
||||
|
||||
void Graphics::setlinegap(int customvalue)
|
||||
{
|
||||
if (!INBOUNDS_VEC(m, textboxes))
|
||||
|
||||
Reference in New Issue
Block a user