mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Disable Mac Plus graphic/sound
This commit is contained in:
@@ -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)
|
||||
|
@@ -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)
|
||||
{
|
||||
|
11
PortabilityLayer/PLHacks.cpp
Normal file
11
PortabilityLayer/PLHacks.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "PLHacks.h"
|
||||
|
||||
bool IsMacPlusGraphicBanned()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IsMacPlusSoundBanned()
|
||||
{
|
||||
return true;
|
||||
}
|
4
PortabilityLayer/PLHacks.h
Normal file
4
PortabilityLayer/PLHacks.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
bool IsMacPlusGraphicBanned();
|
||||
bool IsMacPlusSoundBanned();
|
@@ -192,6 +192,7 @@
|
||||
<ClInclude Include="PLErrorCodes.h" />
|
||||
<ClInclude Include="PLEventQueue.h" />
|
||||
<ClInclude Include="PLFolders.h" />
|
||||
<ClInclude Include="PLHacks.h" />
|
||||
<ClInclude Include="PLKeyEncoding.h" />
|
||||
<ClInclude Include="PLLowMem.h" />
|
||||
<ClInclude Include="PLMacTypes.h" />
|
||||
@@ -287,6 +288,7 @@
|
||||
<ClCompile Include="PLCore.cpp" />
|
||||
<ClCompile Include="PLDialogs.cpp" />
|
||||
<ClCompile Include="PLEventQueue.cpp" />
|
||||
<ClCompile Include="PLHacks.cpp" />
|
||||
<ClCompile Include="PLMenus.cpp" />
|
||||
<ClCompile Include="PLMovies.cpp" />
|
||||
<ClCompile Include="PLNavigation.cpp" />
|
||||
|
@@ -384,6 +384,9 @@
|
||||
<ClInclude Include="ScanlineMaskBuilder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="PLHacks.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CFileStream.cpp">
|
||||
@@ -581,5 +584,8 @@
|
||||
<ClCompile Include="ScanlineMask.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PLHacks.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
Reference in New Issue
Block a user