diff --git a/source/blood/src/messages.cpp b/source/blood/src/messages.cpp index fdee4b434..7e727e615 100644 --- a/source/blood/src/messages.cpp +++ b/source/blood/src/messages.cpp @@ -330,14 +330,15 @@ void CGameMessageMgr::SetState(char state) at0 = 1; } -void CGameMessageMgr::Add(const char *a1, char a2) +void CGameMessageMgr::Add(const char *pText, char a2, const int pal) { if (a2 && at21) { messageStruct *pMessage = &at2e[at2a]; - strncpy(pMessage->at4, a1, 80); + strncpy(pMessage->at4, pText, 80); pMessage->at4[80] = 0; pMessage->at0 = gFrameClock + at1d*120; + pMessage->pal = pal; at2a = (at2a+1)%16; at22++; if (at22 > at19) @@ -368,7 +369,7 @@ void CGameMessageMgr::Display(void) at22--; continue; } - viewDrawText(at11, pMessage->at4, v14, v8, vc, 0, 0, false, 256); + viewDrawText(at11, pMessage->at4, v14, v8, vc, pMessage->pal, 0, false, 256); if (gViewMode == 3) { int height; diff --git a/source/blood/src/messages.h b/source/blood/src/messages.h index 2d8f193f5..53ff33914 100644 --- a/source/blood/src/messages.h +++ b/source/blood/src/messages.h @@ -33,6 +33,7 @@ public: { ClockTicks at0; char at4[81]; + int pal; }; char at0; int at1; @@ -50,7 +51,7 @@ public: messageStruct at2e[16]; CGameMessageMgr(); void SetState(char state); - void Add(const char *, char); + void Add(const char *pText, char a2, const int pal = 0); void Display(void); void Clear(); void SetMaxMessages(int nMessages); diff --git a/source/blood/src/network.cpp b/source/blood/src/network.cpp index 7c9c71535..ba0e95c38 100644 --- a/source/blood/src/network.cpp +++ b/source/blood/src/network.cpp @@ -502,7 +502,7 @@ void netGetPackets(void) if (*pPacket != '/' || (*pPacket == 0 && *(pPacket+1) == 0) || (*(pPacket+1) >= '1' && *(pPacket+1) <= '8' && *(pPacket+1)-'1' == myconnectindex)) { sprintf(buffer, "%s: %s", gProfile[nPlayer].name, pPacket); - viewSetMessage(buffer); + viewSetMessage(buffer, VanillaMode() ? 0 : 10); // 10: dark blue sndStartSample("DMRADIO", 128, -1); } break; diff --git a/source/blood/src/triggers.cpp b/source/blood/src/triggers.cpp index eef4c964e..6bd90764c 100644 --- a/source/blood/src/triggers.cpp +++ b/source/blood/src/triggers.cpp @@ -3835,7 +3835,7 @@ void trTextOver(int nId) { char *pzMessage = levelGetMessage(nId); if (pzMessage) - viewSetMessage(pzMessage); + viewSetMessage(pzMessage, VanillaMode() ? 0 : 8); // 8: gold } void InitGenerator(int nSprite) diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index 87596da00..b5c40bfb1 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -2783,10 +2783,10 @@ void viewBurnTime(int gScale) } } -void viewSetMessage(const char *pMessage) +void viewSetMessage(const char *pMessage, const int pal) { OSD_Printf("%s\n", pMessage); - gGameMessageMgr.Add(pMessage, 15); + gGameMessageMgr.Add(pMessage, 15, pal); } void viewDisplayMessage(void) diff --git a/source/blood/src/view.h b/source/blood/src/view.h index bb1d87fd8..6163535f5 100644 --- a/source/blood/src/view.h +++ b/source/blood/src/view.h @@ -143,7 +143,7 @@ uspritetype *viewAddEffect(int nTSprite, VIEW_EFFECT nViewEffect); void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t smooth); void CalcOtherPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsectnum, int nAng, int zm); void CalcPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsectnum, int nAng, int zm); -void viewSetMessage(const char *pMessage); +void viewSetMessage(const char *pMessage, const int pal = 0); void viewDisplayMessage(void); void viewSetErrorMessage(const char *pMessage); void DoLensEffect(void);