From 32b5f08765a885b8b99b22d0fc1fda3a70af8aef Mon Sep 17 00:00:00 2001 From: ghaushe Date: Wed, 29 Jan 2003 17:49:05 +0000 Subject: [PATCH] Adds crude SplioceMultiTrack support for SDL_Mixer so that the number-speech patch will compile and run cleanly with all audio libs git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@593 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/sound/sdl/trackplayer.c | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sc2/src/sc2code/libs/sound/sdl/trackplayer.c b/sc2/src/sc2code/libs/sound/sdl/trackplayer.c index 74922aa5a..23bf85c9e 100644 --- a/sc2/src/sc2code/libs/sound/sdl/trackplayer.c +++ b/sc2/src/sc2code/libs/sound/sdl/trackplayer.c @@ -131,6 +131,32 @@ StopTrack () do_subtitles (0, 0, 0); } +void +SpliceMultiTrack (UNICODE *TrackNames[], UNICODE *TrackText) +{ + if (TrackText) + { + if (tct) + { + int slen1, slen2; + UNICODE *oTT; + + oTT = track_clip[tct - 1].text; + slen1 = wstrlen (oTT); + slen2 = wstrlen (TrackText); + if (track_clip[tct - 1].text_spliced) + track_clip[tct - 1].text = HRealloc (oTT, slen1 + slen2 + 1); + else + { + track_clip[tct - 1].text = HMalloc (slen1 + slen2 + 1); + wstrcpy (track_clip[tct - 1].text, oTT); + track_clip[tct - 1].text_spliced = 1; + } + wstrcpy (&track_clip[tct - 1].text[slen1], TrackText); + } + } +} + void SpliceTrack (UNICODE *TrackName, UNICODE *TrackText, UNICODE *TimeStamp) {