mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
srb2::Dialogue::NewText: free word-wrapped string
This commit is contained in:
parent
bfa6e4f401
commit
cef3b6d841
1 changed files with 5 additions and 3 deletions
|
|
@ -218,18 +218,20 @@ void Dialogue::SetSpeaker(std::string name, patch_t *patch, UINT8 *colormap, sfx
|
||||||
typewriter.voiceSfx = voice;
|
typewriter.voiceSfx = voice;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dialogue::NewText(std::string newText)
|
void Dialogue::NewText(std::string rawText)
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
|
||||||
newText = V_ScaledWordWrap(
|
char* newText = V_ScaledWordWrap(
|
||||||
290 << FRACBITS,
|
290 << FRACBITS,
|
||||||
FRACUNIT, FRACUNIT, FRACUNIT,
|
FRACUNIT, FRACUNIT, FRACUNIT,
|
||||||
0, HU_FONT,
|
0, HU_FONT,
|
||||||
newText.c_str()
|
rawText.c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
typewriter.NewText(newText);
|
typewriter.NewText(newText);
|
||||||
|
|
||||||
|
Z_Free(newText);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Dialogue::Active(void)
|
bool Dialogue::Active(void)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue