Disable Mac Plus graphic/sound

This commit is contained in:
elasota
2019-12-27 18:28:47 -05:00
parent 59590d2d9d
commit 32fa8928d4
6 changed files with 57 additions and 5 deletions

View File

@@ -10,6 +10,7 @@
#include "Environ.h"
#include "MainWindow.h"
#include "Objects.h"
#include "PLHacks.h"
#include "RectUtils.h"
#include "Room.h"
@@ -396,11 +397,27 @@ void HandleMacPlus (short who)
AddRectToWorkRects(&dinahs[who].dest);
else if (dinahs[who].timer == 1)
{
PlayPrioritySound(kMacBeepSound, kMacBeepPriority);
CopyBits((BitMap *)*GetGWorldPixMap(applianceSrcMap),
(BitMap *)*GetGWorldPixMap(backSrcMap),
&plusScreen2, &dinahs[who].dest,
if (!IsMacPlusSoundBanned())
PlayPrioritySound(kMacBeepSound, kMacBeepPriority);
if (IsMacPlusGraphicBanned())
{
CGraf *oldPort = GetGraphicsPort();
SetGraphicsPort(backSrcMap);
ForeColor(whiteColor);
PaintRect(&dinahs[who].dest);
SetGraphicsPort(oldPort);
}
else
{
CopyBits((BitMap *)*GetGWorldPixMap(applianceSrcMap),
(BitMap *)*GetGWorldPixMap(backSrcMap),
&plusScreen2, &dinahs[who].dest,
srcCopy, nil);
}
AddRectToBackRects(&dinahs[who].dest);
}
else if (dinahs[who].timer == 30)

View File

@@ -15,7 +15,7 @@
#include "RectUtils.h"
#include "Room.h"
#include "Utilities.h"
#include "PLHacks.h"
#define k8WhiteColor 0
#define kIntenseYellowColor 5
@@ -601,6 +601,18 @@ void DrawSimpleAppliance (short what, Rect *theRect)
void DrawMacPlus (Rect *theRect, Boolean isOn, Boolean isLit)
{
Rect screen;
if (IsMacPlusGraphicBanned())
{
CGraf *wasGraph = GetGraphicsPort();
SetGraphicsPort(backSrcMap);
ForeColor(blackColor);
PaintRect(theRect);
SetGraphicsPort(wasGraph);
return;
}
if (isLit)
{