label some sprite templates

This commit is contained in:
garak 2018-12-14 19:39:01 -05:00
parent 10237e8d13
commit 7e170a06cc
2 changed files with 38 additions and 15 deletions

View File

@ -366,11 +366,15 @@ void sub_80F9C44(void (*taskfunc) (u8), u16 a1, u16 a2, u8 a3)
gTasks[taskId].func(taskId);
}
#ifdef NONMATCHING
//#define CHECKIT(a) if(a != 0) return; break;
//#ifdef NONMATCHING
void sub_80F9C90(u8 taskId)
{
//
struct Task *task = &gTasks[taskId];
//s16 temp;
//int temp = task->data[0];
switch(task->data[0])
{
@ -381,11 +385,12 @@ void sub_80F9C90(u8 taskId)
task->data[6] = 0x51;
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
SetGpuReg(REG_OFFSET_WIN0H, task->data[3] << 8 | task->data[4]);
SetGpuReg(REG_OFFSET_WIN0H, task->data[5] << 8 | task->data[6]);
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->data[3], task->data[4]));
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->data[5], task->data[6]));
SetGpuReg(REG_OFFSET_WININ, 0x3F);
SetGpuReg(REG_OFFSET_WINOUT, 0);
//task->data[0]++;
break;
case 1:// correct
@ -395,32 +400,33 @@ void sub_80F9C90(u8 taskId)
SetGpuReg(REG_OFFSET_BLDCNT, 0xBF);
SetGpuReg(REG_OFFSET_BLDY, 0x10);
//task->data[0]++;
break;
case 2:
//r5 = 0 somewhere in here
task->data[3] -= task->data[1];
task->data[4] += task->data[1];
if (task->data[3] <= 0 || task->data[4] > 0xEF)
{
//
task->data[3] = 0;// r5
task->data[3] = 0;
task->data[4] = 0xF0;
SetGpuReg(REG_OFFSET_BLDY, 0);
SetGpuReg(REG_OFFSET_BLDCNT, task->data[7]);
//BlendPalettes(0xFFFF, 0, 0);
BlendPalettes(-1, 0, 0);// 0xFFFFFFFF ?
*gPlttBufferFaded = 0;// r5
BlendPalettes(0xFFFFFFFF, 0, 0);// 0xFFFFFFFF ?
gPlttBufferFaded[0] = 0;
}
//SetGpuReg(REG_OFFSET_WIN0H, task->data[3] << 8 | task->data[4]);
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->data[3], task->data[4]));
//break;
// can I ternary this? NO stupid
if (task->data[3] != 0) return;
break;
//if (task->data[3] == 0)
// task->data[0]++;
//break;
case 3:
task->data[5] -= task->data[2];
task->data[6] += task->data[2];
@ -432,12 +438,14 @@ void sub_80F9C90(u8 taskId)
task->data[6] = 0xA0;
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
}
//SetGpuReg(REG_OFFSET_WIN0V, task->data[5] << 8 | task->data[6]);
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->data[5], task->data[6]));
if (task->data[5] != 0) return;
break;
//if (task->data[5] == 0)
// task->data[0]++;
//break;
default:
@ -446,8 +454,10 @@ void sub_80F9C90(u8 taskId)
return;
}
//
task->data[0] += 1;
//task->data[0] += 1;
task->data[0]++;
}
/*
#else
NAKED
void sub_80F9C90(u8 taskId)
@ -627,6 +637,7 @@ void sub_80F9C90(u8 taskId)
"\tbx r0");
}
#endif
*/
void sub_80F9DFC(u8 taskId)
{

View File

@ -63,7 +63,13 @@ static const struct OamData gUnknown_08617E2C =
};
static const struct SpriteTemplate gUnknown_08617E34 = {
0x0FA0, 0xFFFF, &gUnknown_08617E2C, gSpriteAnimTable_8617E28, NULL, gDummySpriteAffineAnimTable, sub_81BEAD8
.tileTag = 0x0FA0,
.paletteTag = 0xFFFF,
.oam = &gUnknown_08617E2C,
.anims = gSpriteAnimTable_8617E28,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_81BEAD8
};
static const union AnimCmd gSpriteAnim_8617E4C[] =
@ -95,7 +101,13 @@ static const struct OamData gSpriteAnim_8617E58 =
};
static const struct SpriteTemplate gUnknown_08617E60 = {
0x0FA0, 0xFFFF, &gSpriteAnim_8617E58, gSpriteAnim_8617E54, NULL, gDummySpriteAffineAnimTable, sub_81BEAD8
.tileTag = 0x0FA0,
.paletteTag = 0xFFFF,
.oam = &gSpriteAnim_8617E58,
.anims = gSpriteAnim_8617E54,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_81BEAD8
};
// ewram