mirror of https://github.com/OpenTTD/OpenTTD.git
Codechange: Take reference to text effect instead of pointer when updating.
This commit is contained in:
parent
7519f7ad79
commit
78b841d14e
|
@ -63,12 +63,12 @@ TextEffectID AddTextEffect(StringID msg, int center, int y, uint8_t duration, Te
|
||||||
void UpdateTextEffect(TextEffectID te_id, StringID msg)
|
void UpdateTextEffect(TextEffectID te_id, StringID msg)
|
||||||
{
|
{
|
||||||
/* Update details */
|
/* Update details */
|
||||||
TextEffect *te = _text_effects.data() + te_id;
|
TextEffect &te = _text_effects[te_id];
|
||||||
if (msg == te->string_id && !HaveDParamChanged(te->params)) return;
|
if (msg == te.string_id && !HaveDParamChanged(te.params)) return;
|
||||||
te->string_id = msg;
|
te.string_id = msg;
|
||||||
CopyOutDParam(te->params, 2);
|
CopyOutDParam(te.params, 2);
|
||||||
|
|
||||||
te->UpdatePosition(te->center, te->top, te->string_id, te->string_id - 1);
|
te.UpdatePosition(te.center, te.top, te.string_id, te.string_id - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAllTextEffectVirtCoords()
|
void UpdateAllTextEffectVirtCoords()
|
||||||
|
|
Loading…
Reference in New Issue