mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- Blood: do color highlighting for trigger messages, like NBlood does.
This commit is contained in:
parent
7b560a3d79
commit
c11000e4cd
5 changed files with 6 additions and 6 deletions
|
@ -401,7 +401,7 @@ void evSend(EventObject& eob, int rxId, COMMAND_ID command)
|
||||||
gSecretMgr.Found(command - kCmdNumberic);
|
gSecretMgr.Found(command - kCmdNumberic);
|
||||||
if (gGameOptions.nGameType == 0)
|
if (gGameOptions.nGameType == 0)
|
||||||
{
|
{
|
||||||
viewSetMessage(GStrings(FStringf("TXTB_SECRET%d", Random(2))), 0, MESSAGE_PRIORITY_SECRET);
|
viewSetMessage(GStrings(FStringf("TXTB_SECRET%d", Random(2))), nullptr, MESSAGE_PRIORITY_SECRET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else viewSetSystemMessage("Invalid Trigger-Secret command by %s", eob.description().GetChars());
|
else viewSetSystemMessage("Invalid Trigger-Secret command by %s", eob.description().GetChars());
|
||||||
|
|
|
@ -1355,7 +1355,7 @@ void PickUp(PLAYER* pPlayer, DBloodActor* actor)
|
||||||
pPlayer->pickupEffect = 30;
|
pPlayer->pickupEffect = 30;
|
||||||
if (pPlayer == gMe) {
|
if (pPlayer == gMe) {
|
||||||
if (customMsg > 0) trTextOver(customMsg - 1);
|
if (customMsg > 0) trTextOver(customMsg - 1);
|
||||||
else if (msg) viewSetMessage(msg, 0, MESSAGE_PRIORITY_PICKUP);
|
else if (msg) viewSetMessage(msg, nullptr, MESSAGE_PRIORITY_PICKUP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2343,7 +2343,7 @@ void trTextOver(int nId)
|
||||||
{
|
{
|
||||||
const char* pzMessage = currentLevel->GetMessage(nId);
|
const char* pzMessage = currentLevel->GetMessage(nId);
|
||||||
if (pzMessage)
|
if (pzMessage)
|
||||||
viewSetMessage(pzMessage, VanillaMode() ? 0 : 8, MESSAGE_PRIORITY_INI); // 8: gold
|
viewSetMessage(pzMessage, VanillaMode() ? nullptr : TEXTCOLOR_GOLD, MESSAGE_PRIORITY_INI);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
|
@ -265,10 +265,10 @@ void viewSetSystemMessage(const char* pMessage, ...) {
|
||||||
Printf(PRINT_HIGH | PRINT_NOTIFY, "%s\n", buffer); // print it also in console
|
Printf(PRINT_HIGH | PRINT_NOTIFY, "%s\n", buffer); // print it also in console
|
||||||
}
|
}
|
||||||
|
|
||||||
void viewSetMessage(const char* pMessage, const int pal, const MESSAGE_PRIORITY priority)
|
void viewSetMessage(const char* pMessage, const char* color, const MESSAGE_PRIORITY priority)
|
||||||
{
|
{
|
||||||
int printlevel = priority <= MESSAGE_PRIORITY_NORMAL ? PRINT_LOW : priority < MESSAGE_PRIORITY_SYSTEM ? PRINT_MEDIUM : PRINT_HIGH;
|
int printlevel = priority <= MESSAGE_PRIORITY_NORMAL ? PRINT_LOW : priority < MESSAGE_PRIORITY_SYSTEM ? PRINT_MEDIUM : PRINT_HIGH;
|
||||||
Printf(printlevel | PRINT_NOTIFY, "%s\n", pMessage);
|
Printf(printlevel | PRINT_NOTIFY, "%s%s\n", color? color : TEXTCOLOR_TAN, pMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void viewSetErrorMessage(const char* pMessage)
|
void viewSetErrorMessage(const char* pMessage)
|
||||||
|
|
|
@ -148,7 +148,7 @@ void InitStatusBar(void);
|
||||||
void UpdateStatusBar();
|
void UpdateStatusBar();
|
||||||
void viewInit(void);
|
void viewInit(void);
|
||||||
void viewprocessSprites(tspritetype* tsprite, int& spritesortcnt, int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t smooth);
|
void viewprocessSprites(tspritetype* tsprite, int& spritesortcnt, int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t smooth);
|
||||||
void viewSetMessage(const char* pMessage, const int pal = 0, const MESSAGE_PRIORITY priority = MESSAGE_PRIORITY_NORMAL);
|
void viewSetMessage(const char* pMessage, const char* color = nullptr, const MESSAGE_PRIORITY priority = MESSAGE_PRIORITY_NORMAL);
|
||||||
|
|
||||||
|
|
||||||
void viewSetErrorMessage(const char* pMessage);
|
void viewSetErrorMessage(const char* pMessage);
|
||||||
|
|
Loading…
Reference in a new issue