mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Fix grease on res change
This commit is contained in:
@@ -83,7 +83,7 @@ void FlagGameOver (void);
|
|||||||
void DoDiedGameOver (void);
|
void DoDiedGameOver (void);
|
||||||
|
|
||||||
void HandleGrease (void); // --- Grease.c
|
void HandleGrease (void); // --- Grease.c
|
||||||
SInt16 ReBackUpGrease (SInt16, SInt16);
|
SInt16 ReBackUpGrease (SInt16 where, SInt16 who, SInt16 h, SInt16 v);
|
||||||
SInt16 AddGrease (SInt16, SInt16, SInt16, SInt16, SInt16, Boolean);
|
SInt16 AddGrease (SInt16, SInt16, SInt16, SInt16, SInt16, Boolean);
|
||||||
void SpillGrease (SInt16, SInt16);
|
void SpillGrease (SInt16, SInt16);
|
||||||
void RedrawAllGrease (void);
|
void RedrawAllGrease (void);
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ void BackupGrease (Rect *src, short index, Boolean isRight)
|
|||||||
// off or on the lights). It assumes certain data strucutures are<72>
|
// off or on the lights). It assumes certain data strucutures are<72>
|
||||||
// already declared from an earlier call to the above funciton.
|
// already declared from an earlier call to the above funciton.
|
||||||
|
|
||||||
short ReBackUpGrease (short where, short who)
|
short ReBackUpGrease (short where, short who, short h, short v)
|
||||||
{
|
{
|
||||||
Rect src;
|
Rect src;
|
||||||
short i;
|
short i;
|
||||||
@@ -178,6 +178,7 @@ short ReBackUpGrease (short where, short who)
|
|||||||
{
|
{
|
||||||
if ((grease[i].mode == kGreaseIdle) || (grease[i].mode == kGreaseFalling))
|
if ((grease[i].mode == kGreaseIdle) || (grease[i].mode == kGreaseFalling))
|
||||||
{
|
{
|
||||||
|
QOffsetRect(&grease[i].dest, h - grease[i].dest.left, v - grease[i].dest.top);
|
||||||
src = grease[i].dest;
|
src = grease[i].dest;
|
||||||
BackupGrease(&src, grease[i].mapNum, grease[i].isRight);
|
BackupGrease(&src, grease[i].mapNum, grease[i].isRight);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ void DrawARoomsObjects (short neighbor, Boolean redraw)
|
|||||||
if (SectRect(&itsRect, &testRect, &whoCares))
|
if (SectRect(&itsRect, &testRect, &whoCares))
|
||||||
{
|
{
|
||||||
if (redraw)
|
if (redraw)
|
||||||
dynamicNum = ReBackUpGrease(localNumbers[neighbor], i);
|
dynamicNum = ReBackUpGrease(localNumbers[neighbor], i, itsRect.left, itsRect.top);
|
||||||
else
|
else
|
||||||
dynamicNum = AddGrease(localNumbers[neighbor], i,
|
dynamicNum = AddGrease(localNumbers[neighbor], i,
|
||||||
itsRect.left, itsRect.top,
|
itsRect.left, itsRect.top,
|
||||||
@@ -390,7 +390,7 @@ void DrawARoomsObjects (short neighbor, Boolean redraw)
|
|||||||
if (SectRect(&itsRect, &testRect, &whoCares))
|
if (SectRect(&itsRect, &testRect, &whoCares))
|
||||||
{
|
{
|
||||||
if (redraw)
|
if (redraw)
|
||||||
dynamicNum = ReBackUpGrease(localNumbers[neighbor], i);
|
dynamicNum = ReBackUpGrease(localNumbers[neighbor], i, itsRect.left, itsRect.top);
|
||||||
else
|
else
|
||||||
dynamicNum = AddGrease(localNumbers[neighbor], i,
|
dynamicNum = AddGrease(localNumbers[neighbor], i,
|
||||||
itsRect.left, itsRect.top,
|
itsRect.left, itsRect.top,
|
||||||
|
|||||||
Reference in New Issue
Block a user