Clean up field_poison.c
This commit is contained in:
@@ -1200,29 +1200,35 @@ bool8 IsLargeBreakableDecoration(u16 metatileId, bool8 checkBase)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#define tState data[0]
|
||||
#define tMosaic data[1]
|
||||
|
||||
static void Task_FieldPoisonEffect(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
switch (data[0])
|
||||
switch (tState)
|
||||
{
|
||||
case 0:
|
||||
data[1] += 2;
|
||||
if (data[1] > 8)
|
||||
data[0]++;
|
||||
tMosaic += 2;
|
||||
if (tMosaic > 8)
|
||||
tState++;
|
||||
break;
|
||||
case 1:
|
||||
data[1] -= 2;
|
||||
if (data[1] == 0)
|
||||
data[0]++;
|
||||
tMosaic -= 2;
|
||||
if (tMosaic == 0)
|
||||
tState++;
|
||||
break;
|
||||
case 2:
|
||||
DestroyTask(taskId);
|
||||
return;
|
||||
}
|
||||
SetGpuReg(REG_OFFSET_MOSAIC, (data[1] << 4) | data[1]);
|
||||
SetGpuReg(REG_OFFSET_MOSAIC, (tMosaic << 4) | tMosaic);
|
||||
}
|
||||
|
||||
#undef tState
|
||||
#undef tMosaic
|
||||
|
||||
void FldEffPoison_Start(void)
|
||||
{
|
||||
PlaySE(SE_FIELD_POISON);
|
||||
|
||||
Reference in New Issue
Block a user