|
|
|
|
@ -87,6 +87,16 @@
|
|
|
|
|
|
|
|
|
|
namespace devilution { |
|
|
|
|
|
|
|
|
|
enum OutlineColors : uint8_t { |
|
|
|
|
OutlineColorsPlayer1 = (PAL16_ORANGE + 7), |
|
|
|
|
OutlineColorsPlayer2 = (PAL16_YELLOW + 7), |
|
|
|
|
OutlineColorsPlayer3 = (PAL16_RED + 7), |
|
|
|
|
OutlineColorsPlayer4 = (PAL16_BLUE + 7), |
|
|
|
|
OutlineColorsObject = (PAL16_YELLOW + 2), |
|
|
|
|
OutlineColorsTowner = (PAL16_BEIGE + 6), |
|
|
|
|
OutlineColorsMonster = (PAL16_RED + 9), |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
bool AutoMapShowItems; |
|
|
|
|
|
|
|
|
|
// DevilutionX extension.
|
|
|
|
|
@ -430,6 +440,21 @@ void DrawPlayerIcons(const Surface &out, const Player &player, Point position, b
|
|
|
|
|
DrawPlayerIconHelper(out, MissileGraphicID::Reflect, position + Displacement { 0, 16 }, player, infraVision, lightTableIndex); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
uint8_t GetPlayerOutlineColor(int id) |
|
|
|
|
{ |
|
|
|
|
static constexpr uint8_t PlayerOutlineColors[] = { |
|
|
|
|
OutlineColorsPlayer1, |
|
|
|
|
OutlineColorsPlayer2, |
|
|
|
|
OutlineColorsPlayer3, |
|
|
|
|
OutlineColorsPlayer4, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
if (id < 0 || id >= static_cast<int>(SDL_arraysize(PlayerOutlineColors))) |
|
|
|
|
return OutlineColorsPlayer1; |
|
|
|
|
|
|
|
|
|
return PlayerOutlineColors[id]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Render a player sprite |
|
|
|
|
* @param out Output buffer |
|
|
|
|
@ -447,7 +472,7 @@ void DrawPlayer(const Surface &out, const Player &player, Point tilePosition, Po
|
|
|
|
|
const Point spriteBufferPosition = targetBufferPosition + player.getRenderingOffset(sprite); |
|
|
|
|
|
|
|
|
|
if (&player == PlayerUnderCursor) |
|
|
|
|
ClxDrawOutlineSkipColorZero(out, 165, spriteBufferPosition, sprite); |
|
|
|
|
ClxDrawOutlineSkipColorZero(out, GetPlayerOutlineColor(player.getId()), spriteBufferPosition, sprite); |
|
|
|
|
|
|
|
|
|
if (&player == MyPlayer && IsNoneOf(leveltype, DTYPE_NEST, DTYPE_CRYPT)) { |
|
|
|
|
ClxDraw(out, spriteBufferPosition, sprite); |
|
|
|
|
@ -500,7 +525,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); |
|
|
|
|
@ -713,7 +738,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; |
|
|
|
|
@ -738,7 +763,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); |
|
|
|
|
} |
|
|
|
|
|