From f11b7bdf1be79b2cfadbaa9d43f4c0b73b94fdf6 Mon Sep 17 00:00:00 2001 From: Eric Robinson Date: Sun, 19 Jan 2025 01:26:55 -0500 Subject: [PATCH] Update colors --- Source/automap.cpp | 12 +++++------ Source/engine/render/scrollrt.cpp | 33 +++++++++++++++++++++++++++---- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/Source/automap.cpp b/Source/automap.cpp index e4299cb89ca..6e609e21a9f 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -37,14 +37,14 @@ Point Automap; enum MapColors : uint8_t { /** color used to draw the player's arrow */ - MapColorsPlayer = (PAL8_ORANGE + 1), + MapColorsPlayer1 = (PAL8_ORANGE + 1), MapColorsPlayer2 = (PAL8_YELLOW + 1), MapColorsPlayer3 = (PAL8_RED + 1), MapColorsPlayer4 = (PAL8_BLUE + 1), - MapColorsPlayer5 = (PAL16_ORANGE + 1), - MapColorsPlayer6 = (PAL16_BEIGE + 1), - MapColorsPlayer7 = (PAL16_RED + 1), - MapColorsPlayer8 = (PAL16_BLUE + 1), + MapColorsPlayer5 = (PAL16_ORANGE + 2), + MapColorsPlayer6 = (PAL16_BEIGE + 2), + MapColorsPlayer7 = (PAL16_RED + 2), + MapColorsPlayer8 = (PAL16_BLUE + 2), /** color for bright map lines (doors, stairs etc.) */ MapColorsBright = PAL8_YELLOW, /** color for dim map lines/dots */ @@ -160,7 +160,7 @@ struct AutomapTile { } }; -uint8_t playerColors[] { MapColorsPlayer, MapColorsPlayer2, MapColorsPlayer3, MapColorsPlayer4, MapColorsPlayer5, MapColorsPlayer6, MapColorsPlayer7, MapColorsPlayer8 }; +uint8_t playerColors[] { MapColorsPlayer1, MapColorsPlayer2, MapColorsPlayer3, MapColorsPlayer4, MapColorsPlayer5, MapColorsPlayer6, MapColorsPlayer7, MapColorsPlayer8 }; /** * Maps from tile_id to automap type. diff --git a/Source/engine/render/scrollrt.cpp b/Source/engine/render/scrollrt.cpp index e32a9c2529a..ac57bb65df2 100644 --- a/Source/engine/render/scrollrt.cpp +++ b/Source/engine/render/scrollrt.cpp @@ -73,6 +73,20 @@ namespace devilution { +enum OutlineColors : uint8_t { + OutlineColorsPlayer1 = (PAL16_ORANGE + 7), + OutlineColorsPlayer2 = (PAL16_YELLOW + 7), + OutlineColorsPlayer3 = (PAL16_RED + 7), + OutlineColorsPlayer4 = (PAL16_BLUE + 7), + OutlineColorsPlayer5 = (PAL16_ORANGE + 5), + OutlineColorsPlayer6 = (PAL16_BEIGE + 5), + OutlineColorsPlayer7 = (PAL16_RED + 5), + OutlineColorsPlayer8 = (PAL16_BLUE + 5), + OutlineColorsObject = (PAL16_YELLOW + 2), + OutlineColorsTowner = (PAL16_BEIGE + 6), + OutlineColorsMonster = (PAL16_RED + 9), +}; + bool AutoMapShowItems; // DevilutionX extension. @@ -402,8 +416,19 @@ void DrawPlayer(const Surface &out, const Player &player, Point tilePosition, Po const ClxSprite sprite = player.currentSprite(); Point spriteBufferPosition = targetBufferPosition + player.getRenderingOffset(sprite); + uint8_t playerColor[] = { + OutlineColorsPlayer1, + OutlineColorsPlayer2, + OutlineColorsPlayer3, + OutlineColorsPlayer4, + OutlineColorsPlayer5, + OutlineColorsPlayer6, + OutlineColorsPlayer7, + OutlineColorsPlayer8 + }; + if (&player == PlayerUnderCursor) - ClxDrawOutlineSkipColorZero(out, 165, spriteBufferPosition, sprite); + ClxDrawOutlineSkipColorZero(out, playerColor[player.getId()], spriteBufferPosition, sprite); if (&player == MyPlayer && IsNoneOf(leveltype, DTYPE_NEST, DTYPE_CRYPT)) { ClxDraw(out, spriteBufferPosition, sprite); @@ -456,7 +481,7 @@ void DrawObject(const Surface &out, const Object &objectToDraw, Point tilePositi const Point screenPosition = targetBufferPosition + objectToDraw.getRenderingOffset(sprite, tilePosition); if (&objectToDraw == ObjectUnderCursor) { - ClxDrawOutlineSkipColorZero(out, 194, screenPosition, sprite); + ClxDrawOutlineSkipColorZero(out, OutlineColorsObject, screenPosition, sprite); } if (objectToDraw.applyLighting) { ClxDrawLight(out, screenPosition, sprite, lightTableIndex); @@ -659,7 +684,7 @@ void DrawMonsterHelper(const Surface &out, Point tilePosition, Point targetBuffe const Point position = targetBufferPosition + towner.getRenderingOffset(); const ClxSprite sprite = towner.currentSprite(); if (mi == pcursmonst) { - ClxDrawOutlineSkipColorZero(out, 166, position, sprite); + ClxDrawOutlineSkipColorZero(out, OutlineColorsTowner, position, sprite); } ClxDraw(out, position, sprite); return; @@ -684,7 +709,7 @@ void DrawMonsterHelper(const Surface &out, Point tilePosition, Point targetBuffe const Point monsterRenderPosition = targetBufferPosition + offset; if (mi == pcursmonst) { - ClxDrawOutlineSkipColorZero(out, 233, monsterRenderPosition, sprite); + ClxDrawOutlineSkipColorZero(out, OutlineColorsMonster, monsterRenderPosition, sprite); } DrawMonster(out, tilePosition, monsterRenderPosition, monster, lightTableIndex); }