Use shadowing and fast port optimizations for QuickDraw.

This should cause a bit of a speedup, although it wasn't really noticeable in my tests.
This commit is contained in:
Stephen Heumann 2016-05-21 12:35:51 -05:00
parent d1b2e10489
commit bb65891a4a
3 changed files with 5 additions and 11 deletions

View File

@ -121,7 +121,7 @@ static void ChangeResolution(int rez) {
if (dpSpace == NULL)
dpSpace = NewHandle(0x0300, userid(),
attrLocked|attrFixed|attrNoCross|attrBank, 0x00000000);
QDStartUp((Word) *dpSpace, (rez == 640) ? 0x87 : 0x00, 0, userid());
QDStartUp((Word) *dpSpace, (rez == 640) ? 0xC087 : 0xC000, 0, userid());
/* SCB 0x87 gives 640 mode with our custom gray palette */
GrafOff();
QDAuxStartUp();
@ -359,5 +359,3 @@ void ConnectedEventLoop (void) {
}
}
}

View File

@ -122,9 +122,6 @@ static void DoAbout (void) {
***************************************************************/
static void DoNewConnection (void) {
unsigned int masterSCB;
masterSCB = GetMasterSCB();
MakeThisCtlTarget(GetCtlHandleFromID(newConnWindow, linServer));
ShowWindow(newConnWindow);
SelectWindow(newConnWindow);
@ -345,10 +342,9 @@ static void InitScreen (void) {
0x0000, 0x0555, 0x0AAA, 0x0FFF, 0x0000, 0x0555, 0x0AAA, 0x0FFF
};
/* Apple menu uses color tables 1 through 6 */
/* Apple menu uses color tables 1 through 6.
* We set SCBs for color table 7 in StartUpTools or QDStartUp. */
SetColorTable(7, &gray640Colors);
SetAllSCBs(0x87); /* 640 mode with gray640Colors */
InitPalette(); /* Restore Apple Menu colors */
}
static void Quit (void) {

View File

@ -73,7 +73,7 @@
/*- Tools ------------------------------------------------------*/
resource rToolStartup(1) {
mode640,
$C087, /* mode640 + fFastPortAware + fUseShadowing + color table 7 */
{
3, $0302, /* Misc Tool */
4, $0307, /* QuickDraw II */