diff --git a/specs/udmf_zdoom.txt b/specs/udmf_zdoom.txt index 9f91c748..7e4ab86a 100644 --- a/specs/udmf_zdoom.txt +++ b/specs/udmf_zdoom.txt @@ -268,7 +268,7 @@ Changed node specifications to deprecate compression of node lump. Added 'playeruseback' line trigger flag. 1.11 07.08.2010 -Added 'soundsequnce' sector property. +Added 'soundsequence' sector property. 1.12 22.08.2010 Added 'conversation' thing property. diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 96b00b1a..ffc9e314 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -207,7 +207,10 @@ void P_LoadStrifeConversations (MapData *map, const char *mapname) if (!LoadScriptFile(scriptname_t, false, 2)) { - LoadScriptFile (scriptname_b, false, 1); + if (!LoadScriptFile (scriptname_b, false, 1)) + { + LoadScriptFile ("SCRIPT00", false, 1); + } } } } @@ -810,9 +813,21 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang toSay = GStrings[dlgtext]; if (toSay == NULL) { - toSay = "Go away!"; // Ok, it's lame - but it doesn't look like an error to the player. ;) + toSay = GStrings("TXT_GOAWAY"); // Ok, it's lame - but it doesn't look like an error to the player. ;) } } + else + { + // handle string table replacement + if (toSay[0] == '$') + { + toSay = GStrings(toSay + 1); + } + } + if (toSay == NULL) + { + toSay = "."; + } DialogueLines = V_BreakLines (SmallFont, screen->GetWidth()/CleanXfac - 24*2, toSay); // Fill out the possible choices @@ -830,6 +845,12 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang for (j = 0; reply->ReplyLines[j].Width >= 0; ++j) { item.label = reply->ReplyLines[j].Text.LockBuffer(); + // handle string table replacement + if (item.label[0] == '$') + { + item.label = GStrings(item.label + 1); + } + item.b.position = j == 0 ? i : 0; item.c.extra = reply; ConversationItems.Push (item); @@ -1207,13 +1228,19 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply } else { - replyText = "You seem to have enough!"; + replyText = "$txt_haveenough"; } // Update the quest log, if needed. if (reply->LogString != NULL) { - player->SetLogText(reply->LogString); + const char *log = reply->LogString; + if (log[0] == '$') + { + log = GStrings(log + 1); + } + + player->SetLogText(log); } else if (reply->LogNumber != 0) { @@ -1366,6 +1393,12 @@ static void TerminalResponse (const char *str) { if (str != NULL) { + // handle string table replacement + if (str[0] == '$') + { + str = GStrings(str + 1); + } + if (StatusBar != NULL) { AddToConsole(-1, str); diff --git a/src/sound/music_fluidsynth_mididevice.cpp b/src/sound/music_fluidsynth_mididevice.cpp index 1e88af05..d50e236b 100644 --- a/src/sound/music_fluidsynth_mididevice.cpp +++ b/src/sound/music_fluidsynth_mididevice.cpp @@ -667,7 +667,7 @@ bool FluidSynthMIDIDevice::LoadFluidSynth() } #endif - for (int i = 0; i < countof(imports); ++i) + for (size_t i = 0; i < countof(imports); ++i) { #ifdef _WIN32 FARPROC proc = GetProcAddress(FluidSynthDLL, imports[i].FuncName); @@ -679,7 +679,7 @@ bool FluidSynthMIDIDevice::LoadFluidSynth() Printf(TEXTCOLOR_RED"Failed to find %s in %s\n", imports[i].FuncName, FLUIDSYNTHLIB); fail++; } - *imports[i].FuncPointer = proc; + *imports[i].FuncPointer = (void *)proc; } if (fail == 0) { diff --git a/src/svnrevision.h b/src/svnrevision.h index 1b2d981e..67ff9f4f 100644 --- a/src/svnrevision.h +++ b/src/svnrevision.h @@ -3,5 +3,5 @@ // This file was automatically generated by the // updaterevision tool. Do not edit by hand. -#define ZD_SVN_REVISION_STRING "2569" -#define ZD_SVN_REVISION_NUMBER 2569 +#define ZD_SVN_REVISION_STRING "2577" +#define ZD_SVN_REVISION_NUMBER 2577 diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index 5f05ba44..6bbfc885 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -1476,6 +1476,8 @@ TXT_RANDOM_PGUARD_10 = "If there is any honor inside that pathetic shell of a bo TXT_RANDOMGOODBYE_1 = "Bye!"; TXT_RANDOMGOODBYE_2 = "Thanks, bye!"; TXT_RANDOMGOODBYE_3 = "See you later!"; +TXT_HAVEENOUGH = "You seem to have enough!"; +TXT_GOAWAY = "Go away!"; // Skills: