Refactor out forecolor

This commit is contained in:
elasota
2020-05-21 03:30:11 -04:00
parent a1c45d4fc8
commit 438e7b2138
44 changed files with 924 additions and 967 deletions

View File

@@ -11,6 +11,7 @@
#include "Environ.h"
#include "MainWindow.h"
#include "RectUtils.h"
#include "ResolveCachingColor.h"
#include "Room.h"
#include "BitmapImage.h"
@@ -82,8 +83,8 @@ void ResetLocale (Boolean soft)
DrawSurface *wasCPort = GetGraphicsPort();
const short roomV = (*thisHouse)->rooms[thisRoomNumber].floor;
backSrcMap->SetForeColor(StdColors::Black());
backSrcMap->FillRect(backSrcRect);
PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black();
backSrcMap->FillRect(backSrcRect, blackColor);
if (numNeighbors > 3)
{
@@ -185,8 +186,8 @@ void DrawRoomBackground (short who, short where, short elevation)
if ((numLights == 0) && (who != kRoomIsEmpty))
{
backSrcMap->SetForeColor(StdColors::Black());
backSrcMap->FillRect(localRoomsDest[where]);
PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black();
backSrcMap->FillRect(localRoomsDest[where], blackColor);
return;
}
@@ -195,8 +196,8 @@ void DrawRoomBackground (short who, short where, short elevation)
{
if (wardBitSet)
{
backSrcMap->SetForeColor(StdColors::Black());
backSrcMap->FillRect(localRoomsDest[where]);
PortabilityLayer::ResolveCachingColor blackColor = StdColors::Black();
backSrcMap->FillRect(localRoomsDest[where], blackColor);
return;
}