diff --git a/Source/control.cpp b/Source/control.cpp index e416b46f8..ca3d497fd 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -61,7 +61,7 @@ int pnumlines; bool pinfoflag; bool talkButtonsDown[3]; spell_id pSpell; -text_color infoclr; +uint16_t infoclr; int sgbPlrTalkTbl; char tempstr[256]; bool whisperList[MAX_PLRS]; @@ -918,14 +918,14 @@ void CheckPanelInfo() sprintf(tempstr, _("Hotkey: %s"), _(PanBtnHotKey[i])); AddPanelString(tempstr); } - infoclr = COL_WHITE; + infoclr = UIS_SILVER; panelflag = true; pinfoflag = true; } } if (!spselflag && MouseX >= 565 + PANEL_LEFT && MouseX < 621 + PANEL_LEFT && MouseY >= 64 + PANEL_TOP && MouseY < 120 + PANEL_TOP) { strcpy(infostr, _("Select current spell button")); - infoclr = COL_WHITE; + infoclr = UIS_SILVER; panelflag = true; pinfoflag = true; strcpy(tempstr, _("Hotkey: 's'")); @@ -1095,14 +1095,14 @@ static void PrintInfo(const CelOutputBuffer &out) int yo = 0; int lo = 1; if (infostr[0] != '\0') { - DrawString(out, infostr, line, UIS_SILVER | UIS_CENTER); + DrawString(out, infostr, line, infoclr | UIS_CENTER); yo = 1; lo = 0; } for (int i = 0; i < pnumlines; i++) { line.y = PANEL_Y + LineOffsets[pnumlines - lo][i + yo]; - DrawString(out, panelstr[i], line, UIS_SILVER | UIS_CENTER); + DrawString(out, panelstr[i], line, infoclr | UIS_CENTER); } } @@ -1111,11 +1111,11 @@ void DrawInfoBox(const CelOutputBuffer &out) DrawPanelBox(out, 177, 62, 288, 60, PANEL_X + 177, PANEL_Y + 46); if (!panelflag && !trigflag && pcursinvitem == -1 && !spselflag) { infostr[0] = '\0'; - infoclr = COL_WHITE; + infoclr = UIS_SILVER; ClearPanel(); } if (spselflag || trigflag) { - infoclr = COL_WHITE; + infoclr = UIS_SILVER; } else if (pcurs >= CURSOR_FIRSTITEM) { if (plr[myplr].HoldItem._itype == ITYPE_GOLD) { int nGold = plr[myplr].HoldItem._ivalue; @@ -1130,9 +1130,9 @@ void DrawInfoBox(const CelOutputBuffer &out) else strcpy(infostr, plr[myplr].HoldItem._iName); if (plr[myplr].HoldItem._iMagical == ITEM_QUALITY_MAGIC) - infoclr = COL_BLUE; + infoclr = UIS_BLUE; if (plr[myplr].HoldItem._iMagical == ITEM_QUALITY_UNIQUE) - infoclr = COL_GOLD; + infoclr = UIS_GOLD; } } else { if (pcursitem != -1) @@ -1141,11 +1141,11 @@ void DrawInfoBox(const CelOutputBuffer &out) GetObjectStr(pcursobj); if (pcursmonst != -1) { if (leveltype != DTYPE_TOWN) { - infoclr = COL_WHITE; + infoclr = UIS_SILVER; strcpy(infostr, _(monster[pcursmonst].mName)); ClearPanel(); if (monster[pcursmonst]._uniqtype != 0) { - infoclr = COL_GOLD; + infoclr = UIS_GOLD; PrintUniqueHistory(); } else { PrintMonstHistory(monster[pcursmonst].MType->mtype); @@ -1157,7 +1157,7 @@ void DrawInfoBox(const CelOutputBuffer &out) } } if (pcursplr != -1) { - infoclr = COL_GOLD; + infoclr = UIS_GOLD; strcpy(infostr, plr[pcursplr]._pName); ClearPanel(); sprintf(tempstr, _("%s, Level: %i"), _(ClassStrTbl[static_cast(plr[pcursplr]._pClass)]), plr[pcursplr]._pLevel); diff --git a/Source/control.h b/Source/control.h index 4a88551ca..1d9791270 100644 --- a/Source/control.h +++ b/Source/control.h @@ -45,7 +45,7 @@ extern bool chrbtnactive; extern int pnumlines; extern bool pinfoflag; extern spell_id pSpell; -extern text_color infoclr; +extern uint16_t infoclr; extern char tempstr[256]; extern int sbooktab; extern spell_type pSplType; diff --git a/Source/inv.cpp b/Source/inv.cpp index 21947ffe4..1fe57ca82 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -2014,7 +2014,7 @@ char CheckInvHLight() return -1; int8_t rv = -1; - infoclr = COL_WHITE; + infoclr = UIS_SILVER; pi = nullptr; p = &plr[myplr]; ClearPanel(); @@ -2069,9 +2069,9 @@ char CheckInvHLight() sprintf(infostr, ngettext("%i gold piece", "%i gold pieces", nGold), nGold); } else { if (pi->_iMagical == ITEM_QUALITY_MAGIC) { - infoclr = COL_BLUE; + infoclr = UIS_BLUE; } else if (pi->_iMagical == ITEM_QUALITY_UNIQUE) { - infoclr = COL_GOLD; + infoclr = UIS_GOLD; } if (pi->_iIdentified) { strcpy(infostr, pi->_iIName); diff --git a/Source/items.cpp b/Source/items.cpp index 5cadb220d..c3a542626 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -3056,9 +3056,9 @@ void GetItemStr(int i) strcpy(infostr, items[i]._iName); if (items[i]._iMagical == ITEM_QUALITY_MAGIC) - infoclr = COL_BLUE; + infoclr = UIS_BLUE; if (items[i]._iMagical == ITEM_QUALITY_UNIQUE) - infoclr = COL_GOLD; + infoclr = UIS_GOLD; } else { nGold = items[i]._ivalue; sprintf(infostr, ngettext("%i gold piece", "%i gold pieces", nGold), nGold); diff --git a/Source/objects.cpp b/Source/objects.cpp index 693875a91..4dd7aeed4 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -5576,13 +5576,13 @@ void GetObjectStr(int i) if (object[i]._oTrapFlag) { sprintf(tempstr, _("Trapped %s"), infostr); strcpy(infostr, tempstr); - infoclr = COL_RED; + infoclr = UIS_RED; } } if (objectIsDisabled(i)) { sprintf(tempstr, _("%s (disabled)"), infostr); strcpy(infostr, tempstr); - infoclr = COL_RED; + infoclr = UIS_RED; } } diff --git a/Source/qol/xpbar.cpp b/Source/qol/xpbar.cpp index 5d28af332..b4b47874c 100644 --- a/Source/qol/xpbar.cpp +++ b/Source/qol/xpbar.cpp @@ -126,7 +126,7 @@ bool CheckXPBarInfo() if (charLevel == MAXCHARLEVEL - 1) { // Show a maximum level indicator for max level players. - infoclr = COL_GOLD; + infoclr = UIS_GOLD; strcpy(tempstr, _("Experience: ")); PrintWithSeparator(tempstr + SDL_arraysize("Experience: ") - 1, ExpLvlsTbl[charLevel - 1]); @@ -137,7 +137,7 @@ bool CheckXPBarInfo() return true; } - infoclr = COL_WHITE; + infoclr = UIS_SILVER; strcpy(tempstr, _("Experience: ")); PrintWithSeparator(tempstr + SDL_arraysize("Experience: ") - 1, player._pExperience);