Cleanup, add scanline mask builder

This commit is contained in:
elasota
2019-12-26 12:58:58 -05:00
parent b10dda4a54
commit c4e93b0ccf
61 changed files with 823 additions and 494 deletions

View File

@@ -165,10 +165,7 @@ void StartGliderMailingIn (gliderPtr thisGlider, Rect *bounds, hotPtr who)
objLinked = masterObjects[whoLinked].objectLink;
linkedToWhat = WhatAreWeLinkedTo(transRoom, objLinked);
wasState = HGetState((Handle)thisHouse);
HLock((Handle)thisHouse);
GetObjectRect(&(*thisHouse)->rooms[transRoom].objects[objLinked], &transRect);
HSetState((Handle)thisHouse, wasState);
thisGlider->frame = 0;
thisGlider->clip = *bounds;
@@ -228,10 +225,7 @@ void StartGliderDuctingDown (gliderPtr thisGlider, Rect *bounds, hotPtr who)
objLinked = masterObjects[whoLinked].objectLink;
linkedToWhat = WhatAreWeLinkedTo(transRoom, objLinked);
wasState = HGetState((Handle)thisHouse);
HLock((Handle)thisHouse);
GetObjectRect(&(*thisHouse)->rooms[transRoom].objects[objLinked], &transRect);
HSetState((Handle)thisHouse, wasState);
thisGlider->frame = 0;
thisGlider->clip = *bounds;
@@ -261,10 +255,7 @@ void StartGliderDuctingUp (gliderPtr thisGlider, Rect *bounds, hotPtr who)
objLinked = masterObjects[whoLinked].objectLink;
linkedToWhat = WhatAreWeLinkedTo(transRoom, objLinked);
wasState = HGetState((Handle)thisHouse);
HLock((Handle)thisHouse);
GetObjectRect(&(*thisHouse)->rooms[transRoom].objects[objLinked], &transRect);
HSetState((Handle)thisHouse, wasState);
thisGlider->frame = 0;
thisGlider->clip = *bounds;
@@ -303,10 +294,7 @@ void StartGliderTransporting (gliderPtr thisGlider, hotPtr who)
objLinked = masterObjects[whoLinked].objectLink;
linkedToWhat = WhatAreWeLinkedTo(transRoom, objLinked);
wasState = HGetState((Handle)thisHouse);
HLock((Handle)thisHouse);
GetObjectRect(&(*thisHouse)->rooms[transRoom].objects[objLinked], &transRect);
HSetState((Handle)thisHouse, wasState);
thisGlider->dest.right = thisGlider->dest.left + kGliderWide;
thisGlider->dest.bottom = thisGlider->dest.top + kGliderHigh;