Refactoring. Add line drawing.

This commit is contained in:
elasota
2019-12-27 18:05:32 -05:00
parent 7f8c46ecb2
commit 8b82ecabef
34 changed files with 676 additions and 557 deletions

View File

@@ -103,19 +103,16 @@ void HandleGrease (void)
}
{
CGrafPtr wasCPort;
GDHandle wasWorld;
CGrafPtr wasCPort = GetGraphicsPort();
GetGWorld(&wasCPort, &wasWorld);
SetGWorld(backSrcMap, nil);
SetGraphicsPort(backSrcMap);
PaintRect(&src);
SetGWorld(workSrcMap, nil);
SetGraphicsPort(workSrcMap);
PaintRect(&src);
AddRectToWorkRects(&src);
SetGWorld(wasCPort, wasWorld);
SetGraphicsPort(wasCPort);
}
if (grease[i].isRight)
@@ -270,7 +267,6 @@ void SpillGrease (short who, short index)
void RedrawAllGrease (void)
{
CGrafPtr wasCPort;
GDHandle wasWorld;
Rect src;
short i;
@@ -286,16 +282,16 @@ void RedrawAllGrease (void)
{
QOffsetRect(&src, playOriginH, playOriginV);
GetGWorld(&wasCPort, &wasWorld);
wasCPort = GetGraphicsPort();
SetGWorld(backSrcMap, nil);
SetGraphicsPort(backSrcMap);
PaintRect(&src);
SetGWorld(workSrcMap, nil);
SetGraphicsPort(workSrcMap);
PaintRect(&src);
AddRectToWorkRects(&src);
SetGWorld(wasCPort, wasWorld);
SetGraphicsPort(wasCPort);
}
}
}