mirror of
https://github.com/pret/pokepinballrs.git
synced 2026-03-21 17:24:13 -05:00
This commit is contained in:
parent
55016457fd
commit
ea6bfc3bf9
|
|
@ -173,10 +173,10 @@ extern void sub_10170(u8 *, u8 *, u16, u16); // Very much subject to change
|
|||
extern void sub_102A8(u8 *, u8 *, u16, u16);
|
||||
extern void sub_10424(void);
|
||||
extern void sub_10480(void);
|
||||
extern void sub_1050C(void);
|
||||
extern void sub_10528(void);
|
||||
extern void UnblankLCD(void);
|
||||
extern void ForceBlankLDC(void);
|
||||
extern void sub_10544(void);
|
||||
extern void PrintChar(u16 glyph, u16 color, int x, int y, int arg4, int arg5);
|
||||
extern void PrintString(u16 glyph, u16 color, int x, int y, int arg4, int arg5);
|
||||
|
||||
// src/intro.c
|
||||
extern void IntroMain(void);
|
||||
|
|
@ -359,13 +359,11 @@ extern void ResetPokedex(void);
|
|||
|
||||
// asm/rom_1068C.s
|
||||
|
||||
extern void sub_10618(int, int, int, int, int, int);
|
||||
void sub_1068C(int, int, int, int, u16);
|
||||
extern void sub_10708(void *volatile, void *volatile, s16, s16);
|
||||
//extern ? sub_10750();
|
||||
//extern ? sub_10798();
|
||||
extern void CopyString(int, int, int, int, int, int);
|
||||
void SetStringPalette(int, int, int, int, u16);
|
||||
extern void CopyBgTilesRect(void *volatile, void *volatile, s16, s16);
|
||||
//extern ? sub_10860();
|
||||
extern void ClearSomeArray(void);
|
||||
extern void ClearHighScoreNameEntry(void);
|
||||
|
||||
// asm/rom_11B9C.s
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,9 @@
|
|||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define max(a, b) ((a) >= (b) ? (a) : (b))
|
||||
|
||||
// TODO: define RGB(r, g, b) macro
|
||||
#define RGB_WHITE 0x7FFF
|
||||
|
||||
// Macros for checking the joypad
|
||||
#define TEST_BUTTON(field, button) ((field) & (button))
|
||||
#define TEST_BUTTON_EXACT(field, button) (((field) & (button)) == (button))
|
||||
|
|
@ -78,18 +81,17 @@ struct BgOffsets
|
|||
struct BallState
|
||||
{
|
||||
/*0x00*/ s8 unk0;
|
||||
/*0x01*/ s8 unk1; // oam data priority
|
||||
/*0x01*/ s8 oamPriority;
|
||||
/*0x02*/ u8 filler2[0x2];
|
||||
/*0x04*/ u16 unk4;
|
||||
/*0x06*/ s16 unk6;
|
||||
/*0x08*/ s16 unk8;
|
||||
/*0x0A*/ u16 unkA;
|
||||
/*0x0C*/ u16 unkC;
|
||||
/*0x0E*/ u16 unkE;
|
||||
/*0x0E*/ u16 scale;
|
||||
/*0x10*/ struct Vector16 positionQ0;
|
||||
/*0x14*/ struct Vector16 unk14[4];
|
||||
/*0x24*/ u16 unk24;
|
||||
/*0x26*/ u16 unk26;
|
||||
/*0x14*/ struct Vector16 prevPositionsQ0[4];
|
||||
/*0x24*/ struct Vector16 screenPosition;
|
||||
/*0x28*/ struct Vector16 positionQ1;
|
||||
/*0x2C*/ struct Vector16 prevPositionQ1;
|
||||
/*0x30*/ struct Vector16 velocity;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ struct Main
|
|||
/*0x11*/ u8 unk11;
|
||||
/*0x12*/ u16 unk12;
|
||||
/*0x14*/ u16 unk14;
|
||||
/*0x16*/ u16 unk16;
|
||||
/*0x16*/ u16 dispcntBackup;
|
||||
/*0x18*/ u16 newKeys;
|
||||
/*0x1A*/ u16 releasedKeys;
|
||||
/*0x1C*/ u16 heldKeys;
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ extern u16 gOptionsSEList[];
|
|||
extern u8 gUnknown_02031AF0[][10];
|
||||
extern u8 gUnknown_08527ED6[4][10];
|
||||
extern void (*const gOptionsStateFuncs[])(void);
|
||||
extern u32 gUnknown_0201A500[HIGH_SCORE_NAME_LENGTH];
|
||||
extern u16 gUnknown_0201A520[3][0x200];
|
||||
extern u32 gHighScoreNameEntry[HIGH_SCORE_NAME_LENGTH];
|
||||
extern u16 gUnknown_0201A520[3][BG_PLTT_SIZE];
|
||||
extern u16 gUnknown_03000000[];
|
||||
extern u8 gUnknown_03001800[3][0x800];
|
||||
//extern ? gOamBuffer;
|
||||
|
|
|
|||
|
|
@ -1254,8 +1254,8 @@ void sub_37850(void)
|
|||
}
|
||||
|
||||
group = &gMain.spriteGroups[32];
|
||||
group->baseX = gCurrentPinballGame->ball->unk24;
|
||||
group->baseY = gCurrentPinballGame->ball->unk26 + 14;
|
||||
group->baseX = gCurrentPinballGame->ball->screenPosition.x;
|
||||
group->baseY = gCurrentPinballGame->ball->screenPosition.y + 14;
|
||||
oamSimple = &group->oam[0];
|
||||
gOamBuffer[oamSimple->oamId].x = oamSimple->xOffset + group->baseX;
|
||||
if (gCurrentPinballGame->ball->unk0)
|
||||
|
|
|
|||
|
|
@ -977,8 +977,8 @@ void sub_39A40(void)
|
|||
gCurrentPinballGame->unk383 = 0;
|
||||
}
|
||||
|
||||
group->baseX = gCurrentPinballGame->ball->unk24;
|
||||
group->baseY = gCurrentPinballGame->ball->unk26;
|
||||
group->baseX = gCurrentPinballGame->ball->screenPosition.x;
|
||||
group->baseY = gCurrentPinballGame->ball->screenPosition.y;
|
||||
if (group->baseY >= 200)
|
||||
group->baseY = 200;
|
||||
|
||||
|
|
|
|||
|
|
@ -1215,9 +1215,9 @@ void sub_40288(void)
|
|||
}
|
||||
|
||||
if (gCurrentPinballGame->unk38C > 0)
|
||||
gCurrentPinballGame->ball->unk1 = 1;
|
||||
gCurrentPinballGame->ball->oamPriority = 1;
|
||||
else
|
||||
gCurrentPinballGame->ball->unk1 = 2;
|
||||
gCurrentPinballGame->ball->oamPriority = 2;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1023,7 +1023,7 @@ void sub_44F3C(void)
|
|||
gCurrentPinballGame->ball->positionQ8.y = 0xC800;
|
||||
gCurrentPinballGame->ball->velocity.x = -0x60;
|
||||
gCurrentPinballGame->ball->velocity.y = 0x54;
|
||||
gCurrentPinballGame->ball->unk1 = 3;
|
||||
gCurrentPinballGame->ball->oamPriority = 3;
|
||||
sub_11B0(7);
|
||||
}
|
||||
|
||||
|
|
@ -1110,7 +1110,7 @@ void sub_45164(void)
|
|||
gCurrentPinballGame->unk316 = -25;
|
||||
gCurrentPinballGame->unk318 = ((gCurrentPinballGame->unk320 / 10) + 157) * 10;
|
||||
gCurrentPinballGame->unk31A = ((gCurrentPinballGame->unk322 / 10) + 134) * 10;
|
||||
gCurrentPinballGame->ball->unk1 = 1;
|
||||
gCurrentPinballGame->ball->oamPriority = 1;
|
||||
}
|
||||
|
||||
if (gCurrentPinballGame->unk1F)
|
||||
|
|
@ -1139,7 +1139,7 @@ void sub_45164(void)
|
|||
gCurrentPinballGame->ball->velocity.x = -10;
|
||||
gCurrentPinballGame->ball->velocity.y = 0;
|
||||
gCurrentPinballGame->unk5FA = 0;
|
||||
gCurrentPinballGame->ball->unk1 = 3;
|
||||
gCurrentPinballGame->ball->oamPriority = 3;
|
||||
gCurrentPinballGame->unk24 = 0;
|
||||
gCurrentPinballGame->unk7E = 0;
|
||||
m4aSongNumStart(SE_UNKNOWN_0xE5);
|
||||
|
|
|
|||
|
|
@ -32,22 +32,22 @@ void AllBoardProcess_5A_11B9C(void)
|
|||
|
||||
void sub_11C14(s16 arg0)
|
||||
{
|
||||
struct BallState *var0 = &gCurrentPinballGame->unk1334[arg0];
|
||||
var0->positionQ0.x = gUnknown_02031520.unk14.unk26;
|
||||
var0->positionQ0.y = gUnknown_02031520.unk14.unk28;
|
||||
var0->positionQ8.x = Q_24_8(var0->positionQ0.x);
|
||||
var0->positionQ8.y = Q_24_8(var0->positionQ0.y);
|
||||
var0->positionQ1.x = gUnknown_02031520.unk14.unk26 * 2;
|
||||
var0->positionQ1.y = gUnknown_02031520.unk14.unk28 * 2;
|
||||
var0->unkE = 0x100;
|
||||
var0->velocity.x = 0;
|
||||
var0->velocity.y = 0;
|
||||
struct BallState *ball = &gCurrentPinballGame->unk1334[arg0];
|
||||
ball->positionQ0.x = gUnknown_02031520.unk14.unk26;
|
||||
ball->positionQ0.y = gUnknown_02031520.unk14.unk28;
|
||||
ball->positionQ8.x = Q_24_8(ball->positionQ0.x);
|
||||
ball->positionQ8.y = Q_24_8(ball->positionQ0.y);
|
||||
ball->positionQ1.x = gUnknown_02031520.unk14.unk26 * 2;
|
||||
ball->positionQ1.y = gUnknown_02031520.unk14.unk28 * 2;
|
||||
ball->scale = 0x100;
|
||||
ball->velocity.x = 0;
|
||||
ball->velocity.y = 0;
|
||||
if (gMain.selectedField == FIELD_RUBY)
|
||||
var0->unk1 = 3;
|
||||
ball->oamPriority = 3;
|
||||
else
|
||||
var0->unk1 = 1;
|
||||
ball->oamPriority = 1;
|
||||
|
||||
var0->unk6 = 0;
|
||||
ball->unk6 = 0;
|
||||
gCurrentPinballGame->unk5B2 = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,18 +55,18 @@ void MainBoardProcess_7B_12524(void)
|
|||
|
||||
if (spriteGroup->available)
|
||||
{
|
||||
SetMatrixScale(currentBallState->unkE, currentBallState->unkE, 0);
|
||||
SetMatrixScale(currentBallState->scale, currentBallState->scale, 0);
|
||||
|
||||
spriteGroup->baseX = -(gCurrentPinballGame->unk4C + 7) + currentBallState->positionQ0.x - gCurrentPinballGame->unk2AA;
|
||||
spriteGroup->baseY = -(gCurrentPinballGame->unk4E + 7) + currentBallState->positionQ0.y - gCurrentPinballGame->unk5FC - gCurrentPinballGame->unkE6 + gCurrentPinballGame->unk166;
|
||||
|
||||
currentBallState->unk24 = spriteGroup->baseX;
|
||||
currentBallState->unk26 = spriteGroup->baseY;
|
||||
currentBallState->screenPosition.x = spriteGroup->baseX;
|
||||
currentBallState->screenPosition.y = spriteGroup->baseY;
|
||||
|
||||
oam = &spriteGroup->oam[0];
|
||||
oamData = &gOamBuffer[oam->oamId];
|
||||
|
||||
if (currentBallState->unk1 == 3)
|
||||
if (currentBallState->oamPriority == 3)
|
||||
{
|
||||
if (currentBallState->positionQ0.y > 248)
|
||||
oamData->priority = 2;
|
||||
|
|
@ -74,7 +74,7 @@ void MainBoardProcess_7B_12524(void)
|
|||
oamData->priority = 3;
|
||||
}
|
||||
else
|
||||
oamData->priority = currentBallState->unk1;
|
||||
oamData->priority = currentBallState->oamPriority;
|
||||
|
||||
r8 = r8; // this fools the compiler into thinking r8 holds something that could need sign extending/truncation
|
||||
DmaCopy16(3, gUnknown_083BB16C[r8 + gCurrentPinballGame->ballUpgradeType * 17], (void *)0x6010400, 0x80);
|
||||
|
|
@ -97,18 +97,18 @@ void MainBoardProcess_7B_12524(void)
|
|||
|
||||
if (spriteGroup->available)
|
||||
{
|
||||
SetMatrixScale(currentBallState->unkE, currentBallState->unkE, 0);
|
||||
SetMatrixScale(currentBallState->scale, currentBallState->scale, 0);
|
||||
|
||||
spriteGroup->baseX = -(gCurrentPinballGame->unk4C + 7) + currentBallState->positionQ0.x - gCurrentPinballGame->unk2AA;
|
||||
spriteGroup->baseY = -(gCurrentPinballGame->unk4E + 7) + currentBallState->positionQ0.y - gCurrentPinballGame->unk5FC - gCurrentPinballGame->unkE6 + gCurrentPinballGame->unk166;
|
||||
|
||||
currentBallState->unk24 = spriteGroup->baseX;
|
||||
currentBallState->unk26 = spriteGroup->baseY;
|
||||
currentBallState->screenPosition.x = spriteGroup->baseX;
|
||||
currentBallState->screenPosition.y = spriteGroup->baseY;
|
||||
|
||||
oam = &spriteGroup->oam[0];
|
||||
oamData = &gOamBuffer[oam->oamId];
|
||||
|
||||
if (currentBallState->unk1 == 3)
|
||||
if (currentBallState->oamPriority == 3)
|
||||
{
|
||||
if (currentBallState->positionQ0.y > 248)
|
||||
oamData->priority = 2;
|
||||
|
|
@ -116,7 +116,7 @@ void MainBoardProcess_7B_12524(void)
|
|||
oamData->priority = 3;
|
||||
}
|
||||
else
|
||||
oamData->priority = currentBallState->unk1;
|
||||
oamData->priority = currentBallState->oamPriority;
|
||||
|
||||
DmaCopy16(3, gUnknown_083BB16C[r8 + gCurrentPinballGame->ballUpgradeType * 17], (void *)0x6010400, 0x80);
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ void MainBoardProcess_7B_12524(void)
|
|||
oam = &spriteGroup->oam[0];
|
||||
oamData = &gOamBuffer[oam->oamId];
|
||||
|
||||
oamData->priority = currentBallState->unk1;
|
||||
oamData->priority = currentBallState->oamPriority;
|
||||
oamData->x = oam->xOffset + (gCurrentPinballGame->unkD0[(i + 1) * 2].x - gCurrentPinballGame->unk4C);
|
||||
|
||||
if (i == 0)
|
||||
|
|
@ -185,7 +185,7 @@ void MainBoardProcess_7B_12524(void)
|
|||
oam = &spriteGroup->oam[0];
|
||||
oamData = &gOamBuffer[oam->oamId];
|
||||
|
||||
oamData->priority = currentBallState->unk1;
|
||||
oamData->priority = currentBallState->oamPriority;
|
||||
oamData->x = oam->xOffset + (gCurrentPinballGame->unkD0[(i + 1) * 2].x - gCurrentPinballGame->unk4C);
|
||||
oamData->y = 200;
|
||||
}
|
||||
|
|
@ -221,7 +221,7 @@ void MainBoardProcess_7B_12524(void)
|
|||
gOamBuffer[oam->oamId].x = oam->xOffset + spriteGroup->baseX;
|
||||
gOamBuffer[oam->oamId].y = oam->yOffset + spriteGroup->baseY;
|
||||
|
||||
gOamBuffer[oam->oamId].priority = currentBallState->unk1;
|
||||
gOamBuffer[oam->oamId].priority = currentBallState->oamPriority;
|
||||
|
||||
if (gCurrentPinballGame->unk71C < 14)
|
||||
gMain.unk44[43]->available = 0;
|
||||
|
|
@ -245,23 +245,22 @@ void BonusBoardProcess_7B_12BF8()
|
|||
switch (gMain.selectedField)
|
||||
{
|
||||
case FIELD_KECLEON:
|
||||
unk1334_0->unk1 = 2;
|
||||
unk1334_0->oamPriority = 2;
|
||||
spriteGroup = &gMain_spriteGroups[gUnknown_02031590[22]];
|
||||
break;
|
||||
case FIELD_KYOGRE:
|
||||
case FIELD_GROUDON:
|
||||
case FIELD_SPHEAL:
|
||||
unk1334_0->unk1 = 1;
|
||||
unk1334_0->oamPriority = 1;
|
||||
spriteGroup = gMain.unk44[0];
|
||||
break;
|
||||
case FIELD_RAYQUAZA:
|
||||
if (unk1334_0->unk1 > 2) {
|
||||
unk1334_0->unk1 = 2;
|
||||
}
|
||||
if (unk1334_0->oamPriority > 2)
|
||||
unk1334_0->oamPriority = 2;
|
||||
spriteGroup = gMain.unk44[0];
|
||||
break;
|
||||
default:
|
||||
unk1334_0->unk1 = 3;
|
||||
unk1334_0->oamPriority = 3;
|
||||
spriteGroup = gMain.unk44[0];
|
||||
break;
|
||||
}
|
||||
|
|
@ -289,12 +288,12 @@ void BonusBoardProcess_7B_12BF8()
|
|||
if (spriteGroup->baseY > 180)
|
||||
spriteGroup->baseY = 180;
|
||||
|
||||
unk1334_0->unk24 = spriteGroup->baseX;
|
||||
unk1334_0->unk26 = spriteGroup->baseY;
|
||||
unk1334_0->screenPosition.x = spriteGroup->baseX;
|
||||
unk1334_0->screenPosition.y = spriteGroup->baseY;
|
||||
|
||||
oam = &spriteGroup->oam[0];
|
||||
oamData = &gOamBuffer[oam->oamId];
|
||||
oamData->priority = unk1334_0->unk1;
|
||||
oamData->priority = unk1334_0->oamPriority;
|
||||
oamData->x = oam->xOffset + spriteGroup->baseX;
|
||||
|
||||
if (unk1334_0->unk0)
|
||||
|
|
@ -307,8 +306,8 @@ void BonusBoardProcess_7B_12BF8()
|
|||
spriteGroup = gMain.unk44[1];
|
||||
if (spriteGroup->available)
|
||||
{
|
||||
spriteGroup->baseX = unk1334_0->unk24 - 8;
|
||||
spriteGroup->baseY = unk1334_0->unk26 - 8;
|
||||
spriteGroup->baseX = unk1334_0->screenPosition.x - 8;
|
||||
spriteGroup->baseY = unk1334_0->screenPosition.y - 8;
|
||||
oam = &spriteGroup->oam[0];
|
||||
gOamBuffer[oam->oamId].x = oam->xOffset + spriteGroup->baseX;
|
||||
gOamBuffer[oam->oamId].y = oam->yOffset + spriteGroup->baseY;
|
||||
|
|
@ -438,7 +437,7 @@ void BonusBoardProcess_7B_12BF8()
|
|||
{
|
||||
oam = &spriteGroup->oam[0];
|
||||
oamData = &gOamBuffer[oam->oamId];
|
||||
oamData->priority = unk1334_0->unk1;
|
||||
oamData->priority = unk1334_0->oamPriority;
|
||||
oamData->x = oam->xOffset
|
||||
+ (gCurrentPinballGame->unkD0[(i + 1) * 2].x
|
||||
- gCurrentPinballGame->unk4C);
|
||||
|
|
@ -478,7 +477,7 @@ void BonusBoardProcess_7B_12BF8()
|
|||
{
|
||||
oam = &spriteGroup->oam[0];
|
||||
oamData = &gOamBuffer[oam->oamId];
|
||||
oamData->priority = unk1334_0->unk1;
|
||||
oamData->priority = unk1334_0->oamPriority;
|
||||
oamData->x = oam->xOffset
|
||||
+ (gCurrentPinballGame->unkD0[(i + 1) * 2].x - gCurrentPinballGame->unk4C);
|
||||
oamData->y = 200;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ void LoadBonusFieldSelectGraphics(void)
|
|||
REG_BG2CNT = BGCNT_CHARBASE(2) | BGCNT_SCREENBASE(2) | BGCNT_PRIORITY(3) | BGCNT_TXT256x256;
|
||||
REG_DISPCNT |= DISPCNT_BG2_ON;
|
||||
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
DmaCopy16(3, gBonusFieldSelectStages_Pals, (void *)PLTT, 0x200);
|
||||
DmaCopy16(3, gFieldSelectWindow_Gfx, (void *)(VRAM + 0x4000), 0x4000);
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ void sub_478D8(void)
|
|||
gCurrentPinballGame->ball->positionQ8.y = 0x17100;
|
||||
}
|
||||
|
||||
gCurrentPinballGame->ball->unk1 = 0;
|
||||
gCurrentPinballGame->ball->oamPriority = 0;
|
||||
gCurrentPinballGame->ball->prevPositionQ1 = gCurrentPinballGame->ball->positionQ1;
|
||||
|
||||
newX = gCurrentPinballGame->ball->positionQ8.x;
|
||||
|
|
@ -497,9 +497,9 @@ void sub_478D8(void)
|
|||
sub_46FD4(0);
|
||||
gCurrentPinballGame->unk29E = 0;
|
||||
if (gMain.selectedField == FIELD_RUBY)
|
||||
gCurrentPinballGame->ball->unk1 = 3;
|
||||
gCurrentPinballGame->ball->oamPriority = 3;
|
||||
else
|
||||
gCurrentPinballGame->ball->unk1 = 1;
|
||||
gCurrentPinballGame->ball->oamPriority = 1;
|
||||
|
||||
gCurrentPinballGame->unk5F7 = 0;
|
||||
gCurrentPinballGame->unkE4 = 0;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ void LoadEReaderGraphics(void)
|
|||
|
||||
gMain.bgOffsets[0].xOffset = 0xffe8;
|
||||
gMain.bgOffsets[0].yOffset = (0xffe8 - 0x48);
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
DmaCopy16(3, gUnknown_08081D20, (void*) PLTT, 0x40);
|
||||
DmaCopy16(3, gPokedexBackground_Pals + 0x80, (void*) PLTT + 0x40, 0x20);
|
||||
|
|
@ -328,7 +328,7 @@ void Ereader_State6_343C(void)
|
|||
|
||||
gMain.bgOffsets[0].xOffset = 0xffe8;
|
||||
gMain.bgOffsets[0].yOffset = (0xffe8 - 0x48);
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
DmaCopy16(3, gUnknown_08081D20, (void*) PLTT, 0x40);
|
||||
DmaCopy16(3, gPokedexBackground_Pals + 0x80, (void*) PLTT + 0x40, 0x20);
|
||||
|
|
@ -421,7 +421,7 @@ void sub_377C(void)
|
|||
{
|
||||
for(iVar4 = 0; iVar4 < 0x18; iVar4++)
|
||||
{
|
||||
sub_10708(gUnknown_080ACC60, &gUnknown_03001800[iVar2][iVar4*0x20], 1, 2);
|
||||
CopyBgTilesRect(gUnknown_080ACC60, &gUnknown_03001800[iVar2][iVar4*0x20], 1, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -435,7 +435,7 @@ void sub_37B4(s8 arg0)
|
|||
{
|
||||
for (iVar3 = 0; iVar3 < 0x18; iVar3++)
|
||||
{
|
||||
sub_10708(gUnknown_080ACC60 + (gUnknown_086A4CF8[arg0][iVar4*0x18 + iVar3] & 0xFFF0), &gUnknown_03001800[iVar4][iVar3*0x20], 1, 2);
|
||||
CopyBgTilesRect(gUnknown_080ACC60 + (gUnknown_086A4CF8[arg0][iVar4*0x18 + iVar3] & 0xFFF0), &gUnknown_03001800[iVar4][iVar3*0x20], 1, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -445,7 +445,7 @@ void sub_3828(s8 arg0, s8 arg1)
|
|||
s32 quotient = arg1 / 0x18;
|
||||
s32 remainder = arg1 % 0x18;
|
||||
|
||||
sub_10708(gUnknown_080ACC60 + (gUnknown_086A4CF8[arg0][quotient*0x18 + remainder] & 0xFFF0), &gUnknown_03001800[quotient][remainder*0x20], 1, 2);
|
||||
CopyBgTilesRect(gUnknown_080ACC60 + (gUnknown_086A4CF8[arg0][quotient*0x18 + remainder] & 0xFFF0), &gUnknown_03001800[quotient][remainder*0x20], 1, 2);
|
||||
}
|
||||
|
||||
void sub_38A0(s8 arg0, u16 arg1)
|
||||
|
|
@ -453,7 +453,7 @@ void sub_38A0(s8 arg0, u16 arg1)
|
|||
s32 quotient = arg0 / 0x18;
|
||||
s32 remainder = arg0 % 0x18;
|
||||
|
||||
sub_10708(gUnknown_080ACC60 + arg1, &gUnknown_03001800[quotient][remainder*0x20], 1, 2);
|
||||
CopyBgTilesRect(gUnknown_080ACC60 + arg1, &gUnknown_03001800[quotient][remainder*0x20], 1, 2);
|
||||
}
|
||||
|
||||
s16 GetEReaderCardIndex(void)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ void LoadFieldSelectGraphics(void)
|
|||
REG_BG2CNT = BGCNT_CHARBASE(2) | BGCNT_SCREENBASE(2) | BGCNT_PRIORITY(2) | BGCNT_TXT256x256;
|
||||
REG_DISPCNT |= DISPCNT_BG2_ON;
|
||||
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
DmaCopy16(3, gFieldSelectBGPals, (void *)(PLTT), 0x200);
|
||||
DmaCopy16(3, gFieldSelectWindow_Gfx, (void *)(VRAM + 0x4000), 0x1400);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void LoadHighScoreGraphics(void)
|
|||
REG_DISPCNT |= DISPCNT_BG2_ON;
|
||||
REG_BG3CNT = 0x420f;
|
||||
REG_DISPCNT |= DISPCNT_BG3_ON;
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
DmaCopy16(3, gUnknown_0809DBE0, (void*) PLTT, 0x200);
|
||||
DmaCopy16(3, gUnknown_080957A0, (void*) BG_VRAM + 0x4000, 0x4800);
|
||||
|
|
@ -160,9 +160,9 @@ void sub_CFD4(void)
|
|||
sub_F434(gUnknown_02002858.unk0, gUnknown_02002858.unk4, gUnknown_02002858.unkB, gUnknown_02002858.unkC);
|
||||
for(i = 0; i < HIGH_SCORE_NAME_LENGTH; i++)
|
||||
{
|
||||
gUnknown_0202C610[gUnknown_02002858.unkB][gUnknown_02002858.unkC].data.parts.name[i] = gUnknown_0201A500[i];
|
||||
gUnknown_0202C610[gUnknown_02002858.unkB][gUnknown_02002858.unkC].data.parts.name[i] = gHighScoreNameEntry[i];
|
||||
}
|
||||
gUnknown_02002858.unk16 = gUnknown_0201A500[0];
|
||||
gUnknown_02002858.unk16 = gHighScoreNameEntry[0];
|
||||
}
|
||||
if(sub_FD20() == 1)
|
||||
{
|
||||
|
|
@ -281,13 +281,13 @@ void HighScore_State2_D308(void)
|
|||
if(!gUnknown_02002858.unk12)
|
||||
{
|
||||
gUnknown_02002858.unk12 = 1;
|
||||
sub_10618(6 - (gUnknown_02002858.unkB << 1), gUnknown_08079870[gUnknown_02002858.unkC] + (gUnknown_02002858.unkB << 5), 0, 0x15, 4, 2);
|
||||
sub_10618(0, 0x17, 6 - (gUnknown_02002858.unkB << 1), gUnknown_08079870[gUnknown_02002858.unkC] + (gUnknown_02002858.unkB << 5), 4, 2);
|
||||
CopyString(6 - (gUnknown_02002858.unkB << 1), gUnknown_08079870[gUnknown_02002858.unkC] + (gUnknown_02002858.unkB << 5), 0, 0x15, 4, 2);
|
||||
CopyString(0, 0x17, 6 - (gUnknown_02002858.unkB << 1), gUnknown_08079870[gUnknown_02002858.unkC] + (gUnknown_02002858.unkB << 5), 4, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_02002858.unk12 = 0;
|
||||
sub_10618(0, 0x15, 6 - (gUnknown_02002858.unkB << 1), gUnknown_08079870[gUnknown_02002858.unkC] + (gUnknown_02002858.unkB << 5), 4, 2);
|
||||
CopyString(0, 0x15, 6 - (gUnknown_02002858.unkB << 1), gUnknown_08079870[gUnknown_02002858.unkC] + (gUnknown_02002858.unkB << 5), 4, 2);
|
||||
}
|
||||
}
|
||||
gUnknown_02002858.unk1E++;
|
||||
|
|
@ -310,7 +310,7 @@ void HighScore_State2_D308(void)
|
|||
{
|
||||
gUnknown_02002858.unk12 = 0;
|
||||
gUnknown_02002858.unk14 = 0;
|
||||
sub_10618(0, 0x15, 6 - (gUnknown_02002858.unkB << 1), gUnknown_08079870[gUnknown_02002858.unkC] +(gUnknown_02002858.unkB << 5), 4, 2);
|
||||
CopyString(0, 0x15, 6 - (gUnknown_02002858.unkB << 1), gUnknown_08079870[gUnknown_02002858.unkC] +(gUnknown_02002858.unkB << 5), 4, 2);
|
||||
}
|
||||
m4aSongNumStart(MUS_HI_SCORE);
|
||||
gMain.subState = 4;
|
||||
|
|
@ -497,7 +497,7 @@ void HighScore_State4_D664(void)
|
|||
m4aSongNumStart(SE_UNKNOWN_0x65);
|
||||
sub_FAE8(gUnknown_02002858.unkB, gUnknown_02002858.unkC, gUnknown_02002858.unk1C);
|
||||
for (i = 0; i < HIGH_SCORE_NAME_LENGTH; i++)
|
||||
gUnknown_0201A500[i] = gUnknown_0202C610[gUnknown_02002858.unkB][gUnknown_02002858.unkC].data.parts.name[i];
|
||||
gHighScoreNameEntry[i] = gUnknown_0202C610[gUnknown_02002858.unkB][gUnknown_02002858.unkC].data.parts.name[i];
|
||||
|
||||
for (i = 0; i < MAIN_FIELD_COUNT; i++)
|
||||
{
|
||||
|
|
@ -711,7 +711,7 @@ void IdleHighScore_State0_DD70(void)
|
|||
REG_DISPCNT |= DISPCNT_BG2_ON;
|
||||
REG_BG3CNT = 0x420F;
|
||||
REG_DISPCNT |= DISPCNT_BG3_ON;
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
DmaCopy16(3, gUnknown_0809DBE0, (void*) PLTT, 0x200);
|
||||
DmaCopy16(3, gUnknown_080957A0, (void*) BG_VRAM + 0x4000, 0x4800);
|
||||
DmaCopy16(3, gUnknown_0809AFC0, (void *)BG_VRAM + 0xC000, 0x2C00);
|
||||
|
|
@ -829,7 +829,7 @@ void HighScore_State12_E0EC(void)
|
|||
REG_DISPCNT |= DISPCNT_BG2_ON;
|
||||
REG_BG3CNT = 0x420f;
|
||||
REG_DISPCNT |= DISPCNT_BG3_ON;
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
DmaCopy16(3, gUnknown_0809DBE0, (void*) PLTT, 0x200);
|
||||
DmaCopy16(3, gUnknown_080957A0, (void*) BG_VRAM + 0x4000, 0x4800);
|
||||
DmaCopy16(3, gUnknown_0809AFC0, (void *)BG_VRAM + 0xC000, 0x2C00);
|
||||
|
|
@ -1867,7 +1867,7 @@ void sub_EE64(void)
|
|||
// Ruby Field Top name
|
||||
for (j = 0; j < HIGH_SCORE_NAME_LENGTH; j++)
|
||||
{
|
||||
PrintChar(gUnknown_086A7FAC[gUnknown_0202C610[FIELD_RUBY][0].data.parts.name[j]] + 0x80, 8, j + 6, 3, 1, 1);
|
||||
PrintString(gUnknown_086A7FAC[gUnknown_0202C610[FIELD_RUBY][0].data.parts.name[j]] + 0x80, 8, j + 6, 3, 1, 1);
|
||||
}
|
||||
|
||||
// Ruby Field 2nd-8th names
|
||||
|
|
@ -1875,7 +1875,7 @@ void sub_EE64(void)
|
|||
{
|
||||
for (j = 0; j < HIGH_SCORE_NAME_LENGTH; j++)
|
||||
{
|
||||
PrintChar(gUnknown_086A7FAC[gUnknown_0202C610[FIELD_RUBY][i].data.parts.name[j]] + 0xA0, 8, j + 6, i * 2 + 3, 1, 2);
|
||||
PrintString(gUnknown_086A7FAC[gUnknown_0202C610[FIELD_RUBY][i].data.parts.name[j]] + 0xA0, 8, j + 6, i * 2 + 3, 1, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1884,11 +1884,11 @@ void sub_EE64(void)
|
|||
for (j = 0; j < 14; j++)
|
||||
{
|
||||
if ((j + 1) % 3 == 0)
|
||||
PrintChar(gUnknown_0202C5C0[j] + 0x120, 9, j + 12, 2, 1, 2); // Thousands separator?
|
||||
PrintString(gUnknown_0202C5C0[j] + 0x120, 9, j + 12, 2, 1, 2); // Thousands separator?
|
||||
else
|
||||
PrintChar(gUnknown_0202C5C0[j] + 0xE0, 9, j + 12, 2, 1, 2);
|
||||
PrintString(gUnknown_0202C5C0[j] + 0xE0, 9, j + 12, 2, 1, 2);
|
||||
}
|
||||
PrintChar(gUnknown_0202C5C0[14] + 0xE0, 9, 26, 2, 1, 2);
|
||||
PrintString(gUnknown_0202C5C0[14] + 0xE0, 9, 26, 2, 1, 2);
|
||||
// Ruby Field 2nd-8th scores
|
||||
for (i = 1; i < NUM_HIGH_SCORES; i++)
|
||||
{
|
||||
|
|
@ -1896,18 +1896,18 @@ void sub_EE64(void)
|
|||
for (j = 0; j < 14; j++)
|
||||
{
|
||||
if ((j + 1) % 3 == 0)
|
||||
PrintChar(gUnknown_0202C5C0[j] + 0x1A0, 9, j + 12, i * 2 + 3, 1, 2); // Thousands separator?
|
||||
PrintString(gUnknown_0202C5C0[j] + 0x1A0, 9, j + 12, i * 2 + 3, 1, 2); // Thousands separator?
|
||||
else
|
||||
PrintChar(gUnknown_0202C5C0[j] + 0x160, 9, j + 12, i * 2 + 3, 1, 2);
|
||||
PrintString(gUnknown_0202C5C0[j] + 0x160, 9, j + 12, i * 2 + 3, 1, 2);
|
||||
}
|
||||
|
||||
PrintChar(gUnknown_0202C5C0[14] + 0x160, 9, 26, 3 + i * 2, 1, 2);
|
||||
PrintString(gUnknown_0202C5C0[14] + 0x160, 9, 26, 3 + i * 2, 1, 2);
|
||||
}
|
||||
|
||||
// Sapphire Field Top name
|
||||
for (j = 0; j < HIGH_SCORE_NAME_LENGTH; j++)
|
||||
{
|
||||
PrintChar(gUnknown_086A7FAC[gUnknown_0202C610[FIELD_SAPPHIRE][0].data.parts.name[j]] + 0x80, 8, j + 4, 35, 1, 1);
|
||||
PrintString(gUnknown_086A7FAC[gUnknown_0202C610[FIELD_SAPPHIRE][0].data.parts.name[j]] + 0x80, 8, j + 4, 35, 1, 1);
|
||||
}
|
||||
|
||||
// Sapphire Field 2nd-8th names
|
||||
|
|
@ -1915,7 +1915,7 @@ void sub_EE64(void)
|
|||
{
|
||||
for (j = 0; j < HIGH_SCORE_NAME_LENGTH; j++)
|
||||
{
|
||||
PrintChar(gUnknown_086A7FAC[gUnknown_0202C610[FIELD_SAPPHIRE][i].data.parts.name[j]] + 0xA0, 8, j + 4, i * 2 + 35, 1, 2);
|
||||
PrintString(gUnknown_086A7FAC[gUnknown_0202C610[FIELD_SAPPHIRE][i].data.parts.name[j]] + 0xA0, 8, j + 4, i * 2 + 35, 1, 2);
|
||||
}
|
||||
}
|
||||
sub_F21C(gUnknown_0202C610[FIELD_SAPPHIRE][0].data.parts.scoreHi, gUnknown_0202C610[FIELD_SAPPHIRE][0].data.parts.scoreLo);
|
||||
|
|
@ -1923,12 +1923,12 @@ void sub_EE64(void)
|
|||
for (j = 0; j < 14; j++)
|
||||
{
|
||||
if ((j + 1) % 3 == 0)
|
||||
PrintChar(gUnknown_0202C5C0[j] + 0x120, 9, j + 10, 34, 1, 2); // Thousands separator?
|
||||
PrintString(gUnknown_0202C5C0[j] + 0x120, 9, j + 10, 34, 1, 2); // Thousands separator?
|
||||
else
|
||||
PrintChar(gUnknown_0202C5C0[j] + 0xE0, 9, j + 10, 34, 1, 2);
|
||||
PrintString(gUnknown_0202C5C0[j] + 0xE0, 9, j + 10, 34, 1, 2);
|
||||
}
|
||||
|
||||
PrintChar(gUnknown_0202C5C0[j] + 0xE0, 9, 24, 34, 1, 2);
|
||||
PrintString(gUnknown_0202C5C0[j] + 0xE0, 9, 24, 34, 1, 2);
|
||||
// Sapphire Field 2nd-8th scores
|
||||
for (i = 1; i < NUM_HIGH_SCORES; i++)
|
||||
{
|
||||
|
|
@ -1936,12 +1936,12 @@ void sub_EE64(void)
|
|||
for (j = 0; j < 14; j++)
|
||||
{
|
||||
if ((j + 1) % 3 == 0)
|
||||
PrintChar(gUnknown_0202C5C0[j] + 0x1A0, 9, j + 10, i * 2 + 35, 1, 2); // Thousands separator?s
|
||||
PrintString(gUnknown_0202C5C0[j] + 0x1A0, 9, j + 10, i * 2 + 35, 1, 2); // Thousands separator?s
|
||||
else
|
||||
PrintChar(gUnknown_0202C5C0[j] + 0x160, 9, j + 10, i * 2 + 35, 1, 2);
|
||||
PrintString(gUnknown_0202C5C0[j] + 0x160, 9, j + 10, i * 2 + 35, 1, 2);
|
||||
}
|
||||
|
||||
PrintChar(gUnknown_0202C5C0[j] + 0x160, 9, 24, i * 2 + 35, 1, 2);
|
||||
PrintString(gUnknown_0202C5C0[j] + 0x160, 9, 24, i * 2 + 35, 1, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2112,7 +2112,7 @@ u32 sub_F4FC(u32 field)
|
|||
void sub_F670(u32 arg0, u32 arg1, s16 arg2, u32 arg3)
|
||||
{
|
||||
arg0 = gUnknown_086A7FAC[arg0];
|
||||
PrintChar(
|
||||
PrintString(
|
||||
gUnknown_08079730[arg3][arg1].unk8 * 32 + 0x80 + arg0,
|
||||
8,
|
||||
gUnknown_08079730[arg3][arg1].unk0 + arg2,
|
||||
|
|
@ -2380,7 +2380,7 @@ void sub_FD5C(void (*func)(void))
|
|||
DmaCopy16(3, gUnknown_0201A520[0], gUnknown_0201A520[2], PLTT_SIZE);
|
||||
DmaCopy16(3, gUnknown_0201A520[2], (void*)PLTT, PLTT_SIZE);
|
||||
|
||||
sub_1050C();
|
||||
UnblankLCD();
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
|
|
@ -2422,7 +2422,7 @@ void sub_FE04(void (*func)(void))
|
|||
DmaCopy16(3, gUnknown_0201A520[2], (void *)PLTT, 0x400);
|
||||
}
|
||||
}
|
||||
sub_10528();
|
||||
ForceBlankLDC();
|
||||
MainLoopIter();
|
||||
ClearGraphicsMemory();
|
||||
}
|
||||
|
|
@ -2437,8 +2437,8 @@ void sub_FEB8(u8 * arg0, u8 * arg1, void (*func)(void))
|
|||
DmaCopy16(3, gUnknown_0201A520[0], gUnknown_0201A520[2], PLTT_SIZE);
|
||||
DmaCopy16(3, gUnknown_0201A520[2], (void*)PLTT, PLTT_SIZE);
|
||||
|
||||
sub_1050C();
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
UnblankLCD();
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
|
|
@ -2615,7 +2615,7 @@ void sub_10424(void)
|
|||
REG_BLDY = 0x10;
|
||||
REG_BLDCNT = ((REG_DISPCNT & (DISPCNT_BG_ALL_ON | DISPCNT_OBJ_ON)) >> 8) | BLDCNT_EFFECT_LIGHTEN | BLDCNT_TGT1_BD;
|
||||
REG_DISPCNT &= ~DISPCNT_FORCED_BLANK;
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
REG_BLDY = 0x10;
|
||||
MainLoopIter();
|
||||
REG_BLDY = 0x8;
|
||||
|
|
@ -2647,15 +2647,15 @@ void sub_10480(void)
|
|||
MainLoopIter();
|
||||
}
|
||||
|
||||
void sub_1050C(void)
|
||||
void UnblankLCD(void)
|
||||
{
|
||||
REG_DISPCNT &= ~DISPCNT_FORCED_BLANK;
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
}
|
||||
|
||||
void sub_10528(void)
|
||||
void ForceBlankLDC(void)
|
||||
{
|
||||
gMain.unk16 |= DISPCNT_FORCED_BLANK;
|
||||
gMain.dispcntBackup |= DISPCNT_FORCED_BLANK;
|
||||
REG_DISPCNT |= DISPCNT_FORCED_BLANK;
|
||||
}
|
||||
|
||||
|
|
@ -2669,16 +2669,3 @@ void sub_10544(void)
|
|||
REG_IME = 0;
|
||||
REG_IF |= 1;
|
||||
}
|
||||
|
||||
// Print char? (also used by the Pokédex)
|
||||
void PrintChar(u16 glyph, u16 color, int x, int y, int arg4, int arg5)
|
||||
{
|
||||
u16 i, j;
|
||||
for(i = 0; i < arg5; i++)
|
||||
{
|
||||
for(j = 0; j < arg4; j++)
|
||||
{
|
||||
gUnknown_03005C00[y * 32 + x + i * 32 + j] = (glyph + i * 32 + j) | (color << 12);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
26
src/intro.c
26
src/intro.c
|
|
@ -128,7 +128,7 @@ void Intro_State0_929C(void)
|
|||
DmaCopy16(3, gIntroCopyright_Gfx, BG_CHAR_ADDR(1), BG_SCREEN_SIZE);
|
||||
DmaCopy16(3, gIntroCopyright_Pal, BG_PLTT, BG_PLTT_SIZE);
|
||||
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
gUnknown_0202BF10 = 0;
|
||||
gIntroSceneIndex = 0;
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ void sub_93F8(void)
|
|||
m4aSoundMain();
|
||||
VBlankIntrWait();
|
||||
DmaCopy32(3, gOamBuffer, (void *)OAM, OAM_SIZE);
|
||||
REG_DISPCNT = gMain.unk16;
|
||||
REG_DISPCNT = gMain.dispcntBackup;
|
||||
REG_BG0HOFS = gMain.bgOffsets[0].xOffset;
|
||||
REG_BG0VOFS = gMain.bgOffsets[0].yOffset;
|
||||
REG_BG1HOFS = gMain.bgOffsets[1].xOffset;
|
||||
|
|
@ -375,7 +375,7 @@ void sub_9920(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
sub_10708(&gUnknown_0201C1C0, (void *)0x60036e0, 8, 8);
|
||||
CopyBgTilesRect(&gUnknown_0201C1C0, (void *)0x60036e0, 8, 8);
|
||||
gIntroSceneIndex++;
|
||||
}
|
||||
|
||||
|
|
@ -410,7 +410,7 @@ void sub_999C(void)
|
|||
gMain.bgOffsets[0].yOffset = gUnknown_0202ADA0[1];
|
||||
if (++gUnknown_0202ADA0[5] > gUnknown_086A7768[gUnknown_0202ADA0[4]].unk2)
|
||||
{
|
||||
sub_10708(&gUnknown_0201C1C0[gUnknown_086A7788[gUnknown_0202ADA0[4]]], (void *)0x60036E0, 8, 8);
|
||||
CopyBgTilesRect(&gUnknown_0201C1C0[gUnknown_086A7788[gUnknown_0202ADA0[4]]], (void *)0x60036E0, 8, 8);
|
||||
if (++gUnknown_0202ADA0[4] > 3)
|
||||
{
|
||||
gUnknown_0201A450[3].unkC = 1;
|
||||
|
|
@ -447,9 +447,9 @@ void sub_9AB8(void)
|
|||
if (++gUnknown_0202ADA0[5] > gUnknown_086A7768[gUnknown_0202ADA0[4]].unk2)
|
||||
{
|
||||
if (gUnknown_0202ADA0[4] < 7)
|
||||
sub_10708(&gUnknown_0201C1C0[gUnknown_086A7788[gUnknown_0202ADA0[0x4]]], (void *)0x60036e0, 8, 8);
|
||||
CopyBgTilesRect(&gUnknown_0201C1C0[gUnknown_086A7788[gUnknown_0202ADA0[0x4]]], (void *)0x60036e0, 8, 8);
|
||||
else
|
||||
sub_10708(&gUnknown_0201C1C0[gUnknown_086A7788[gUnknown_0202ADA0[0x4]]], (void *)0x60032c0, 10, 10);
|
||||
CopyBgTilesRect(&gUnknown_0201C1C0[gUnknown_086A7788[gUnknown_0202ADA0[0x4]]], (void *)0x60032c0, 10, 10);
|
||||
|
||||
gUnknown_0202ADA0[0x4]++;
|
||||
}
|
||||
|
|
@ -988,7 +988,7 @@ void sub_A968(void)
|
|||
DmaCopy16(3, gUnknown_080E1740, (void *) 0x600F000, 0x800);
|
||||
DmaCopy16(3, gUnknown_080E1F40, (void *) 0x6000000, 0x4000);
|
||||
DmaCopy16(3, gUnknown_080E1540, PLTT, 0x60);
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
sub_AAA8();
|
||||
gMain.bgOffsets[0].xOffset = gUnknown_0202ADA0[0x0];
|
||||
|
|
@ -1145,7 +1145,7 @@ void sub_ADFC(void)
|
|||
gUnknown_0202ADA0[0x5] = 0;
|
||||
gUnknown_0202ADA0[0x2] = 0;
|
||||
|
||||
sub_10708(&gUnknown_03002300, (void *) 0x6002ee0, 8, 8);
|
||||
CopyBgTilesRect(&gUnknown_03002300, (void *) 0x6002ee0, 8, 8);
|
||||
|
||||
gUnknown_0202ADA0[0x6] = 0xA5;
|
||||
gUnknown_0202ADA0[0x7] = 0;
|
||||
|
|
@ -1180,7 +1180,7 @@ void sub_AE74(void)
|
|||
if (gUnknown_0202ADA0[0x5] > gUnknown_086A79FC[gUnknown_0202ADA0[4]].unk2)
|
||||
{
|
||||
gUnknown_0202ADA0[4]++;
|
||||
sub_10708(&gUnknown_03000000[gUnknown_086A7A1C[gUnknown_0202ADA0[4]]], (void *) 0x6002EE0, 8, 8);
|
||||
CopyBgTilesRect(&gUnknown_03000000[gUnknown_086A7A1C[gUnknown_0202ADA0[4]]], (void *) 0x6002EE0, 8, 8);
|
||||
}
|
||||
|
||||
sub_B0E8();
|
||||
|
|
@ -1205,7 +1205,7 @@ void sub_AF80(void)
|
|||
if (gUnknown_0202ADA0[0x04] < 7)
|
||||
{
|
||||
gUnknown_0202ADA0[0x4]++;
|
||||
sub_10708(&gUnknown_03000000[gUnknown_086A7A1C[gUnknown_0202ADA0[0x4]]], (void *) 0x6002EE0, 8, 8);
|
||||
CopyBgTilesRect(&gUnknown_03000000[gUnknown_086A7A1C[gUnknown_0202ADA0[0x4]]], (void *) 0x6002EE0, 8, 8);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1575,7 +1575,7 @@ void sub_BA3C(void)
|
|||
DmaCopy16(3, gUnknown_0810CA00, 0x06010000, 0x2000);
|
||||
DmaCopy16(3, gUnknown_08100FE0, 0x05000200, 0x160);
|
||||
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
sub_BBE0();
|
||||
|
||||
gMain.bgOffsets[0].xOffset = gUnknown_0202ADA0[0x0];
|
||||
|
|
@ -1845,7 +1845,7 @@ void sub_C228(void)
|
|||
DmaCopy16(3, gUnknown_08112840, 0x06010000, 0x2C00);
|
||||
DmaCopy16(3, gUnknown_0810EA20, 0x05000200, 0x140);
|
||||
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
sub_C2F0();
|
||||
sub_C4F0();
|
||||
sub_0CBC();
|
||||
|
|
@ -2138,7 +2138,7 @@ void sub_C948(void)
|
|||
DmaCopy16(3, gUnknown_08118680, 0x06010000, 0x7000);
|
||||
DmaCopy16(3, gUnknown_08115860, 0x05000200, 0x40);
|
||||
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
sub_CA28();
|
||||
gMain.bgOffsets[3].xOffset = gUnknown_0202ADA0[0x0];
|
||||
gMain.bgOffsets[3].yOffset = gUnknown_0202ADA0[0x1];
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ static void sub_19CC(void) // TODO
|
|||
if ((REG_DISPSTAT & 0x8) != 0)
|
||||
{
|
||||
CpuSet(gOamBuffer, (void *) 0x7000000, 0x200);
|
||||
REG_DISPCNT = gMain.unk16;
|
||||
REG_DISPCNT = gMain.dispcntBackup;
|
||||
|
||||
REG_BG0HOFS = gMain.bgOffsets[0].xOffset;
|
||||
REG_BG0VOFS = gMain.bgOffsets[0].yOffset;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ static void sub_0B8C(void)
|
|||
{
|
||||
gMain.mainState = STATE_INTRO;
|
||||
gMain.subState = 0;
|
||||
gMain.unk16 = 0;
|
||||
gMain.dispcntBackup = 0;
|
||||
gMain.heldKeys = 0;
|
||||
gMain.newKeys = 0;
|
||||
gMain.unk20 = 0;
|
||||
|
|
@ -156,7 +156,7 @@ static void sub_0B8C(void)
|
|||
gMain.unk30 = 0;
|
||||
gMain.vCount = 144;
|
||||
gMain.unk2C = 0;
|
||||
ClearSomeArray();
|
||||
ClearHighScoreNameEntry();
|
||||
ResetSomeGraphicsRelatedStuff();
|
||||
}
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ void DefaultMainCallback(void)
|
|||
{
|
||||
VBlankIntrWait();
|
||||
DmaCopy32(3, gOamBuffer, (void *)OAM, OAM_SIZE);
|
||||
REG_DISPCNT = gMain.unk16;
|
||||
REG_DISPCNT = gMain.dispcntBackup;
|
||||
REG_BG0HOFS = gMain.bgOffsets[0].xOffset;
|
||||
REG_BG0VOFS = gMain.bgOffsets[0].yOffset;
|
||||
REG_BG1HOFS = gMain.bgOffsets[1].xOffset;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ void Options_LoadGraphics(void)
|
|||
REG_BG1CNT = 0x109;
|
||||
REG_DISPCNT |= 0x200;
|
||||
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
DmaCopy16(3, gOptionsBackground_Pals, (void *)PLTT, 0x200);
|
||||
DmaCopy16(3, gOptionsText_Gfx, (void *)(VRAM + 0x4000), 0x1800);
|
||||
|
|
@ -101,8 +101,8 @@ void Options_LoadGraphics(void)
|
|||
|
||||
if (gGameBoyPlayerEnabled != TRUE)
|
||||
{
|
||||
sub_1068C(0x12, 4, 2, 1, 2);
|
||||
sub_1068C(0x12, 5, 3, 2, 2);
|
||||
SetStringPalette(18, 4, 2, 1, 2);
|
||||
SetStringPalette(18, 5, 3, 2, 2);
|
||||
}
|
||||
|
||||
DmaCopy16(3, gUnknown_03005C00, (void *)VRAM, 0x800);
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ static void sub_4A270(void)
|
|||
break;
|
||||
}
|
||||
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
REG_MOSAIC = 0;
|
||||
}
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ void sub_4A6A0(void)
|
|||
gCurrentPinballGame->ball->unk6 = 0;
|
||||
gCurrentPinballGame->ball->positionQ8.x = gCurrentPinballGame->ball->positionQ0.x << 8;
|
||||
gCurrentPinballGame->ball->positionQ8.y = gCurrentPinballGame->ball->positionQ0.y << 8;
|
||||
gCurrentPinballGame->ball->unkE = 128;
|
||||
gCurrentPinballGame->ball->scale = 0x80;
|
||||
gCurrentPinballGame->ball->unk0 = 1;
|
||||
gCurrentPinballGame->unk1F = 1;
|
||||
gCurrentPinballGame->unk730 = 0;
|
||||
|
|
@ -407,7 +407,7 @@ void sub_4A6A0(void)
|
|||
gCurrentPinballGame->ball->unk6 = 0;
|
||||
gCurrentPinballGame->ball->positionQ8.x = gCurrentPinballGame->ball->positionQ0.x << 8;
|
||||
gCurrentPinballGame->ball->positionQ8.y = gCurrentPinballGame->ball->positionQ0.y << 8;
|
||||
gCurrentPinballGame->ball->unkE = 128;
|
||||
gCurrentPinballGame->ball->scale = 0x80;
|
||||
gCurrentPinballGame->ball->unk0 = 1;
|
||||
gCurrentPinballGame->unk1F = 1;
|
||||
gCurrentPinballGame->unk730 = 0;
|
||||
|
|
@ -423,7 +423,7 @@ void sub_4A6A0(void)
|
|||
gCurrentPinballGame->ball->unk6 = 0;
|
||||
gCurrentPinballGame->ball->positionQ8.x = gCurrentPinballGame->ball->positionQ0.x << 8;
|
||||
gCurrentPinballGame->ball->positionQ8.y = gCurrentPinballGame->ball->positionQ0.y << 8;
|
||||
gCurrentPinballGame->ball->unkE = 128;
|
||||
gCurrentPinballGame->ball->scale = 0x80;
|
||||
gCurrentPinballGame->ball->unk0 = 1;
|
||||
gCurrentPinballGame->unk1F = 1;
|
||||
gCurrentPinballGame->unk730 = 0;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ void LoadPokedexGraphics(void)
|
|||
REG_BG3CNT = BGCNT_PRIORITY(3) | BGCNT_CHARBASE(3) | BGCNT_16COLOR | BGCNT_SCREENBASE(2) | BGCNT_TXT256x256;
|
||||
REG_DISPCNT |= DISPCNT_BG3_ON;
|
||||
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
DmaCopy16(3, gPokedexBgText_Gfx, (void *)BG_CHAR_ADDR(1), 0x4400);
|
||||
DmaCopy16(3, gPokedexBg_Gfx, (void *)BG_CHAR_ADDR(3), 0x1400);
|
||||
|
|
@ -1708,22 +1708,22 @@ static void PrintSelectedMonDexNum(s16 species)
|
|||
{
|
||||
if (gPokedexFlags[SPECIES_JIRACHI] != SPECIES_UNSEEN)
|
||||
{
|
||||
PrintChar(CHAR_2_FONT_1, 1, 5, 2, 1, 2);
|
||||
PrintChar(CHAR_0_FONT_1, 1, 6, 2, 1, 2);
|
||||
PrintChar(CHAR_1_FONT_1, 1, 7, 2, 1, 2);
|
||||
PrintString(CHAR_2_FONT_1, 1, 5, 2, 1, 2);
|
||||
PrintString(CHAR_0_FONT_1, 1, 6, 2, 1, 2);
|
||||
PrintString(CHAR_1_FONT_1, 1, 7, 2, 1, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintChar(CHAR_SPACE_FONT_1, 1, 5, 2, 1, 2);
|
||||
PrintChar(CHAR_SPACE_FONT_1, 1, 6, 2, 1, 2);
|
||||
PrintChar(CHAR_SPACE_FONT_1, 1, 7, 2, 1, 2);
|
||||
PrintString(CHAR_SPACE_FONT_1, 1, 5, 2, 1, 2);
|
||||
PrintString(CHAR_SPACE_FONT_1, 1, 6, 2, 1, 2);
|
||||
PrintString(CHAR_SPACE_FONT_1, 1, 7, 2, 1, 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Dex number of the selected species
|
||||
for (i = 0; i < DEX_NUM_DIGITS; i++)
|
||||
PrintChar(gPokedexEntries[species].dexNum[i] + 32, 1, i + 5, 2, 1, 2);
|
||||
PrintString(gPokedexEntries[species].dexNum[i] + 32, 1, i + 5, 2, 1, 2);
|
||||
}
|
||||
|
||||
if (gPokedexFlags[species] > SPECIES_UNSEEN)
|
||||
|
|
@ -1741,14 +1741,14 @@ static void PrintSelectedMonDexNum(s16 species)
|
|||
var0 += var2;
|
||||
}
|
||||
|
||||
sub_10708(gUnknown_03000000, (void *)0x06004C00, 8, 2);
|
||||
CopyBgTilesRect(gUnknown_03000000, (void *)0x06004C00, 8, 2);
|
||||
DmaFill16(3, 0, gUnknown_03000000, 0x800);
|
||||
var0 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 10; i++)
|
||||
sub_10708((void *)&gPokedexTextGlyphs_Gfx[ENGLISH_GLYPHS_START], (void *)0x06004C00 + i * 0x20, 1, 2);
|
||||
CopyBgTilesRect((void *)&gPokedexTextGlyphs_Gfx[ENGLISH_GLYPHS_START], (void *)0x06004C00 + i * 0x20, 1, 2);
|
||||
}
|
||||
|
||||
if (gPokedexFlags[species] == SPECIES_SEEN || gPokedexFlags[species] > SPECIES_SHARED)
|
||||
|
|
@ -1766,32 +1766,32 @@ static void PrintSelectedMonDexNum(s16 species)
|
|||
var0 += var2;
|
||||
}
|
||||
|
||||
sub_10708(gUnknown_03000000, (void *)0x06004D00, 9, 2);
|
||||
CopyBgTilesRect(gUnknown_03000000, (void *)0x06004D00, 9, 2);
|
||||
DmaFill16(3, 0, gUnknown_03000000, 0x800);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 9; i++)
|
||||
sub_10708((void *)&gPokedexTextGlyphs_Gfx[ENGLISH_GLYPHS_START], (void *)0x06004D00 + i * 0x20, 1, 2);
|
||||
CopyBgTilesRect((void *)&gPokedexTextGlyphs_Gfx[ENGLISH_GLYPHS_START], (void *)0x06004D00 + i * 0x20, 1, 2);
|
||||
}
|
||||
|
||||
if (gPokedexFlags[species] == SPECIES_CAUGHT)
|
||||
{
|
||||
PrintChar(gPokedexEntries[species].heightWeight[0] + 32, 1, 16, 6, 1, 2);
|
||||
PrintChar(gPokedexEntries[species].heightWeight[1] + 32, 1, 17, 6, 1, 2);
|
||||
PrintChar(gPokedexEntries[species].heightWeight[2] + 32, 1, 19, 6, 1, 2);
|
||||
PrintChar(gPokedexEntries[species].heightWeight[3] + 32, 1, 20, 6, 1, 2);
|
||||
PrintString(gPokedexEntries[species].heightWeight[0] + 32, 1, 16, 6, 1, 2);
|
||||
PrintString(gPokedexEntries[species].heightWeight[1] + 32, 1, 17, 6, 1, 2);
|
||||
PrintString(gPokedexEntries[species].heightWeight[2] + 32, 1, 19, 6, 1, 2);
|
||||
PrintString(gPokedexEntries[species].heightWeight[3] + 32, 1, 20, 6, 1, 2);
|
||||
for (i = 0; i < POKEMON_HEIGHT_WEIGHT_TEXT_LENGTH - 4; i++)
|
||||
PrintChar(gPokedexEntries[species].heightWeight[4 + i], 1, i + 16, 8, 1, 1);
|
||||
PrintString(gPokedexEntries[species].heightWeight[4 + i], 1, i + 16, 8, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintChar(CHAR_DASH_FONT_1, 1, 16, 6, 1, 2);
|
||||
PrintChar(CHAR_DASH_FONT_1, 1, 17, 6, 1, 2);
|
||||
PrintChar(CHAR_DASH_FONT_1, 1, 19, 6, 1, 2);
|
||||
PrintChar(CHAR_DASH_FONT_1, 1, 20, 6, 1, 2);
|
||||
PrintString(CHAR_DASH_FONT_1, 1, 16, 6, 1, 2);
|
||||
PrintString(CHAR_DASH_FONT_1, 1, 17, 6, 1, 2);
|
||||
PrintString(CHAR_DASH_FONT_1, 1, 19, 6, 1, 2);
|
||||
PrintString(CHAR_DASH_FONT_1, 1, 20, 6, 1, 2);
|
||||
for (i = 0; i < POKEMON_HEIGHT_WEIGHT_TEXT_LENGTH - 4; i++)
|
||||
PrintChar(CHAR_DASH_FONT_0, 1, i + 16, 8, 1, 1);
|
||||
PrintString(CHAR_DASH_FONT_0, 1, i + 16, 8, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1816,8 +1816,8 @@ static void PrintSeenOwnedTotals(s16 seen, s16 owned)
|
|||
|
||||
for (i = 0; i < DEX_NUM_DIGITS; i++)
|
||||
{
|
||||
PrintChar(seenDigits[i], 2, i + 25, 15, 1, 1);
|
||||
PrintChar(ownedDigits[i] + 32, 2, i + 25, 16, 1, 2);
|
||||
PrintString(seenDigits[i], 2, i + 25, 15, 1, 1);
|
||||
PrintString(ownedDigits[i] + 32, 2, i + 25, 16, 1, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1836,22 +1836,22 @@ void PrintDexNumbersFromListPosition(s16 listPosition)
|
|||
{
|
||||
if (gPokedexFlags[SPECIES_JIRACHI] != SPECIES_UNSEEN)
|
||||
{
|
||||
PrintChar(CHAR_2_FONT_1, 2, 8, i * 2 + 10, 1, 2);
|
||||
PrintChar(CHAR_0_FONT_1, 2, 9, i * 2 + 10, 1, 2);
|
||||
PrintChar(CHAR_1_FONT_1, 2, 10, i * 2 + 10, 1, 2);
|
||||
PrintString(CHAR_2_FONT_1, 2, 8, i * 2 + 10, 1, 2);
|
||||
PrintString(CHAR_0_FONT_1, 2, 9, i * 2 + 10, 1, 2);
|
||||
PrintString(CHAR_1_FONT_1, 2, 10, i * 2 + 10, 1, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintChar(CHAR_SPACE_FONT_1, 2, 8, i * 2 + 10, 1, 2);
|
||||
PrintChar(CHAR_SPACE_FONT_1, 2, 9, i * 2 + 10, 1, 2);
|
||||
PrintChar(CHAR_SPACE_FONT_1, 2, 10, i * 2 + 10, 1, 2);
|
||||
PrintString(CHAR_SPACE_FONT_1, 2, 8, i * 2 + 10, 1, 2);
|
||||
PrintString(CHAR_SPACE_FONT_1, 2, 9, i * 2 + 10, 1, 2);
|
||||
PrintString(CHAR_SPACE_FONT_1, 2, 10, i * 2 + 10, 1, 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Doesn't use listPosition for some reason, despite being the only value passed
|
||||
for (j = 0; j < DEX_NUM_DIGITS; j++)
|
||||
PrintChar(gPokedexEntries[gPokedexListPosition + i].dexNum[j] + 32, 2, j + 8, i * 2 + 10, 1, 2);
|
||||
PrintString(gPokedexEntries[gPokedexListPosition + i].dexNum[j] + 32, 2, j + 8, i * 2 + 10, 1, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1877,16 +1877,16 @@ void PrintDexNumbersFromListPosition(s16 listPosition)
|
|||
var0 += var2;
|
||||
}
|
||||
|
||||
sub_10708(gUnknown_03000000, (void *)0x06000000 + gUnknown_086A64F0[i], 8, 2);
|
||||
CopyBgTilesRect(gUnknown_03000000, (void *)0x06000000 + gUnknown_086A64F0[i], 8, 2);
|
||||
DmaFill16(3, 0, gUnknown_03000000, 0x800);
|
||||
var0 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (j = 0; j < 7; j++)
|
||||
sub_10708((void *)&gPokedexTextGlyphs_Gfx[ENGLISH_GLYPHS_START], (void *)0x06000000 + gUnknown_086A64F0[i] + j * 0x20, 1, 2);
|
||||
CopyBgTilesRect((void *)&gPokedexTextGlyphs_Gfx[ENGLISH_GLYPHS_START], (void *)0x06000000 + gUnknown_086A64F0[i] + j * 0x20, 1, 2);
|
||||
|
||||
sub_10708((void *)gPokedexTextGlyphs_Gfx, (void *)0x06000000 + gUnknown_086A64F0[i] + j * 0x20, 1, 2);
|
||||
CopyBgTilesRect((void *)gPokedexTextGlyphs_Gfx, (void *)0x06000000 + gUnknown_086A64F0[i] + j * 0x20, 1, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1899,7 +1899,7 @@ static void PrintCaughtBallFromListPosition(s16 position)
|
|||
for (i = 0; i < ENTRIES_SHOWN_COUNT; i++)
|
||||
{
|
||||
var0 = gPokedexFlags[position + i] == SPECIES_CAUGHT ? CHAR_BALL_CAUGHT : CHAR_BALL_NOT_CAUGHT;
|
||||
PrintChar(var0, 1, 4, 10 + i * 2, 2, 2);
|
||||
PrintString(var0, 1, 4, 10 + i * 2, 2, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1911,20 +1911,20 @@ void sub_6F78(s16 species)
|
|||
switch (state)
|
||||
{
|
||||
case SPECIES_UNSEEN:
|
||||
sub_10708(gPokedexSprites_Gfx + 0x5C00, (void *)0x06013400, 24, 1);
|
||||
CopyBgTilesRect(gPokedexSprites_Gfx + 0x5C00, (void *)0x06013400, 24, 1);
|
||||
DmaCopy16(3, gPokedexSprites_Pals, (void *)OBJ_PLTT + 0x20, 0x20);
|
||||
break;
|
||||
case SPECIES_SEEN:
|
||||
sub_10708(gMonPortraitGroupGfx[var1] + var2 * 0x300, (void *)0x06013400, 24, 1);
|
||||
CopyBgTilesRect(gMonPortraitGroupGfx[var1] + var2 * 0x300, (void *)0x06013400, 24, 1);
|
||||
DmaCopy16(3, gMonPortraitGroupPals[0] + 0x1E0, (void *)OBJ_PLTT + 0x20, 0x20);
|
||||
break;
|
||||
case SPECIES_SHARED:
|
||||
case SPECIES_SHARED_AND_SEEN:
|
||||
sub_10708(gMonPortraitGroupGfx[var1] + var2 * 0x300, (void *)0x06013400, 24, 1);
|
||||
CopyBgTilesRect(gMonPortraitGroupGfx[var1] + var2 * 0x300, (void *)0x06013400, 24, 1);
|
||||
sub_10170(gMonPortraitGroupPals[var1] + var2 * 0x20, (void *)OBJ_PLTT + 0x20, 0x20, 0xE);
|
||||
break;
|
||||
case SPECIES_CAUGHT:
|
||||
sub_10708(gMonPortraitGroupGfx[var1] + var2 * 0x300, (void *)0x06013400, 24, 1);
|
||||
CopyBgTilesRect(gMonPortraitGroupGfx[var1] + var2 * 0x300, (void *)0x06013400, 24, 1);
|
||||
DmaCopy16(3, gMonPortraitGroupPals[var1] + var2 * 0x20, (void *)OBJ_PLTT + 0x20, 0x20);
|
||||
break;
|
||||
}
|
||||
|
|
@ -4946,7 +4946,7 @@ void sub_8974(s16 species)
|
|||
quotient = var0 / 5;
|
||||
remainder = var0 % 5;
|
||||
|
||||
sub_10708(gUnknown_086BB6F4[quotient] + remainder * 0xD80, (void *)(OBJ_VRAM0 + 0x3800), 108, 1);
|
||||
CopyBgTilesRect(gUnknown_086BB6F4[quotient] + remainder * 0xD80, (void *)(OBJ_VRAM0 + 0x3800), 108, 1);
|
||||
DmaCopy16(3, gUnknown_086B15B4[quotient] + remainder * 0x20, (void *)OBJ_PLTT + 0x40, 0x20);
|
||||
}
|
||||
else
|
||||
|
|
@ -4955,7 +4955,7 @@ void sub_8974(s16 species)
|
|||
quotient = (var0 - 100) / 6;
|
||||
remainder = (var0 - 100) % 6;
|
||||
|
||||
sub_10708(gMonHatchSpriteGroupGfx[quotient][remainder], (void *)(OBJ_VRAM0 + 0x4800), 135, 1);
|
||||
CopyBgTilesRect(gMonHatchSpriteGroupGfx[quotient][remainder], (void *)(OBJ_VRAM0 + 0x4800), 135, 1);
|
||||
DmaCopy16(3, gMonHatchSpriteGroupPals[quotient][remainder], (void *)OBJ_PLTT + 0x60, 0x20);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
102
src/rom_1068C.c
102
src/rom_1068C.c
|
|
@ -1,117 +1,125 @@
|
|||
#include "global.h"
|
||||
#include "main.h"
|
||||
|
||||
void sub_10618(int a, int b, int c, int d, int e, int f)
|
||||
void PrintString(u16 glyph, u16 palette, int x, int y, int width, int height)
|
||||
{
|
||||
u16 i;
|
||||
u16 j;
|
||||
u16 i, j;
|
||||
|
||||
for (i = 0; i < f; i++)
|
||||
{
|
||||
for (j = 0; j < e; j++)
|
||||
{
|
||||
gUnknown_03005C00[d * 32 + c + i * 32 + j] = gUnknown_03005C00[b * 32 + a + i * 32 + j];
|
||||
}
|
||||
}
|
||||
for (j = 0; j < height; j++)
|
||||
for (i = 0; i < width; i++)
|
||||
gUnknown_03005C00[y * 0x20 + x + j * 0x20 + i] = (glyph + j * 0x20 + i) | (palette << 12);
|
||||
}
|
||||
|
||||
void sub_1068C(int a, int b, int c, int d, u16 e)
|
||||
void CopyString(int srcX, int srcY, int destX, int destY, int width, int height)
|
||||
{
|
||||
u16 i;
|
||||
u16 j;
|
||||
u16 i, j;
|
||||
|
||||
for (i = 0; i < d; i++)
|
||||
for (j = 0; j < height; j++)
|
||||
for (i = 0; i < width; i++)
|
||||
gUnknown_03005C00[destY * 0x20 + destX + j * 0x20 + i] = gUnknown_03005C00[srcY * 0x20 + srcX + j * 0x20 + i];
|
||||
}
|
||||
|
||||
void SetStringPalette(int x, int y, int width, int height, u16 palette)
|
||||
{
|
||||
u16 i, j;
|
||||
u16 index;
|
||||
|
||||
for (j = 0; j < height; j++)
|
||||
{
|
||||
for (j = 0; j < c; j++)
|
||||
for (i = 0; i < width; i++)
|
||||
{
|
||||
u16 index = b * 32 + a + i * 32 + j;
|
||||
|
||||
gUnknown_03005C00[index] = (gUnknown_03005C00[index] & 0xFFF) | (e << 12);
|
||||
index = y * 0x20 + x + j * 0x20 + i;
|
||||
gUnknown_03005C00[index] = (gUnknown_03005C00[index] & 0xFFF) | (palette << 12);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This requires volatile parameters to match. There is no reason, *ever*, to do this.
|
||||
void sub_10708(void *volatile src, void *volatile dest, s16 numTilesX, s16 numTilesY)
|
||||
void CopyBgTilesRect(void *volatile src, void *volatile dest, s16 width, s16 height)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
|
||||
for (i = 0; i < numTilesY; i++)
|
||||
for (j = 0; j < height; j++)
|
||||
{
|
||||
DmaCopy16(3, (u8 *)src + 0x400 * i, (u8 *)dest + 0x400 * i, numTilesX * 32);
|
||||
DmaCopy16(3, (u8 *)src + 0x400 * j, (u8 *)dest + 0x400 * j, width * 0x20);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_10750(void *volatile src, void *volatile dest, s16 numTilesX, s16 numTilesY)
|
||||
// This function is unused. It appears to operates on a pixel canvas where each "tile" is represented by
|
||||
// 2 bytes.
|
||||
void sub_10750(void *volatile src, void *volatile dest, s16 width, s16 height)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
|
||||
for (i = 0; i < numTilesY; i++)
|
||||
for (j = 0; j < height; j++)
|
||||
{
|
||||
DmaCopy16(3, (u8 *)src + 0x40 * i, (u8 *)dest + 0x40 * i, numTilesX * 2);
|
||||
DmaCopy16(3, (u8 *)src + 0x40 * j, (u8 *)dest + 0x40 * j, width * 2);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_10798(void *a, void *b, void (*func)(void))
|
||||
// This function is unused.
|
||||
void sub_10798(void *src1, void *src2, void (*func)(void))
|
||||
{
|
||||
u16 i;
|
||||
|
||||
DmaCopy16(3, a, gUnknown_0201A520[1], 0x200);
|
||||
DmaCopy16(3, b, gUnknown_0201A520[2], 0x200);
|
||||
DmaFill16(3, 0x7FFF, gUnknown_0201A520[0], 0x400);
|
||||
DmaCopy16(3, gUnknown_0201A520[0], gUnknown_0201A520[2], 0x400);
|
||||
DmaCopy16(3, gUnknown_0201A520[2], (void *)PLTT, 0x400);
|
||||
DmaCopy16(3, src1, gUnknown_0201A520[1], BG_PLTT_SIZE);
|
||||
DmaCopy16(3, src2, gUnknown_0201A520[2], BG_PLTT_SIZE);
|
||||
DmaFill16(3, RGB_WHITE, gUnknown_0201A520, PLTT_SIZE);
|
||||
DmaCopy16(3, gUnknown_0201A520[0], gUnknown_0201A520[2], PLTT_SIZE);
|
||||
DmaCopy16(3, gUnknown_0201A520[2], (void *)PLTT, PLTT_SIZE);
|
||||
|
||||
sub_1050C();
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
UnblankLCD();
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
for (i = 0; i <= 32; i += 16)
|
||||
for (i = 0; i <= 0x20; i += 0x10)
|
||||
{
|
||||
if (func != NULL)
|
||||
func();
|
||||
|
||||
sub_1001C(i);
|
||||
MainLoopIter();
|
||||
if (i == 32)
|
||||
if (i == 0x20)
|
||||
{
|
||||
DmaCopy16(3, gUnknown_0201A520[1], (void *)PLTT, 0x400);
|
||||
DmaCopy16(3, gUnknown_0201A520[1], (void *)PLTT, PLTT_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
DmaCopy16(3, gUnknown_0201A520[2], (void *)PLTT, 0x400);
|
||||
DmaCopy16(3, gUnknown_0201A520[2], (void *)PLTT, PLTT_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This function is unused.
|
||||
void sub_10860(void (*func)(void))
|
||||
{
|
||||
u16 i;
|
||||
|
||||
DmaCopy16(3, (void *)PLTT, gUnknown_0201A520[0], 0x400);
|
||||
DmaFill16(3, 0x7FFF, gUnknown_0201A520[1], 0x400);
|
||||
DmaCopy16(3, gUnknown_0201A520[0], gUnknown_0201A520[2], 0x400);
|
||||
DmaCopy16(3, (void *)PLTT, gUnknown_0201A520[0], PLTT_SIZE);
|
||||
DmaFill16(3, RGB_WHITE, gUnknown_0201A520[1], PLTT_SIZE);
|
||||
DmaCopy16(3, gUnknown_0201A520[0], gUnknown_0201A520[2], PLTT_SIZE);
|
||||
|
||||
for (i = 0; i <= 32; i += 16)
|
||||
for (i = 0; i <= 0x20; i += 0x10)
|
||||
{
|
||||
if (func != NULL)
|
||||
func();
|
||||
sub_1001C(i);
|
||||
MainLoopIter();
|
||||
if (i == 32)
|
||||
if (i == 0x20)
|
||||
{
|
||||
DmaCopy16(3, gUnknown_0201A520[1], (void *)PLTT, 0x400);
|
||||
DmaCopy16(3, gUnknown_0201A520[1], (void *)PLTT, PLTT_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
DmaCopy16(3, gUnknown_0201A520[2], (void *)PLTT, 0x400);
|
||||
DmaCopy16(3, gUnknown_0201A520[2], (void *)PLTT, PLTT_SIZE);
|
||||
}
|
||||
}
|
||||
MainLoopIter();
|
||||
}
|
||||
|
||||
void ClearSomeArray(void)
|
||||
void ClearHighScoreNameEntry(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < HIGH_SCORE_NAME_LENGTH; i++)
|
||||
gUnknown_0201A500[i] = 0;
|
||||
gHighScoreNameEntry[i] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,11 +132,11 @@ void sub_1493C(void)
|
|||
if (squaredMagnitude < 40)
|
||||
{
|
||||
gCurrentPinballGame->unk5F4++;
|
||||
gCurrentPinballGame->ball->unkE = 256;
|
||||
gCurrentPinballGame->ball->scale = 0x100;
|
||||
}
|
||||
else
|
||||
{
|
||||
gCurrentPinballGame->ball->unkE = 256;
|
||||
gCurrentPinballGame->ball->scale = 0x100;
|
||||
if (squaredMagnitude > 100)
|
||||
gCurrentPinballGame->unk5F4 = 0;
|
||||
}
|
||||
|
|
@ -146,7 +146,7 @@ void sub_1493C(void)
|
|||
if (gCurrentPinballGame->unk5F4 < 30)
|
||||
{
|
||||
gCurrentPinballGame->unk5F4++;
|
||||
gCurrentPinballGame->ball->unkE = ((30 - gCurrentPinballGame->unk5F4) * 128) / 10 + 128;
|
||||
gCurrentPinballGame->ball->scale = ((30 - gCurrentPinballGame->unk5F4) * 0x80) / 10 + 0x80;
|
||||
gCurrentPinballGame->ball->positionQ0.x = 119;
|
||||
gCurrentPinballGame->ball->positionQ0.y = 279;
|
||||
gCurrentPinballGame->ball->unk6 = 0;
|
||||
|
|
@ -163,7 +163,7 @@ void sub_1493C(void)
|
|||
sub_32914();
|
||||
|
||||
gCurrentPinballGame->unk22 = 7;
|
||||
gCurrentPinballGame->ball->unkE = 128;
|
||||
gCurrentPinballGame->ball->scale = 0x80;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -543,14 +543,14 @@ void sub_153CC(s32 arg0, s16* arg1, u16* arg2)
|
|||
case 1:
|
||||
if (gCurrentPinballGame->unk24 == 0)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk1 = 2;
|
||||
gCurrentPinballGame->ball->oamPriority = 2;
|
||||
gCurrentPinballGame->unk24 = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
if (gCurrentPinballGame->unk24 == 2)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk1 = 2;
|
||||
gCurrentPinballGame->ball->oamPriority = 2;
|
||||
gCurrentPinballGame->unk24 = 3;
|
||||
}
|
||||
|
||||
|
|
@ -558,12 +558,12 @@ void sub_153CC(s32 arg0, s16* arg1, u16* arg2)
|
|||
case 2:
|
||||
if (gCurrentPinballGame->unk24 == 2)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk1 = 3;
|
||||
gCurrentPinballGame->ball->oamPriority = 3;
|
||||
gCurrentPinballGame->unk24 = 0;
|
||||
}
|
||||
else if (gCurrentPinballGame->unk24 == 3)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk1 = 2;
|
||||
gCurrentPinballGame->ball->oamPriority = 2;
|
||||
gCurrentPinballGame->unk24 = 2;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,28 +33,28 @@ void sub_1642C(u8 arg0, u16* arg1, u16* arg2)
|
|||
case 2:
|
||||
if (gCurrentPinballGame->unk24 == 0)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk1 = 2;
|
||||
gCurrentPinballGame->ball->oamPriority = 2;
|
||||
gCurrentPinballGame->unk24 = 2;
|
||||
}
|
||||
else if (gCurrentPinballGame->unk24 == 2)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk1 = 2;
|
||||
gCurrentPinballGame->ball->oamPriority = 2;
|
||||
gCurrentPinballGame->unk24 = 3;
|
||||
}
|
||||
else if (gCurrentPinballGame->unk24 == 3)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk1 = 1;
|
||||
gCurrentPinballGame->ball->oamPriority = 1;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (gCurrentPinballGame->unk24 == 2)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk1 = 3;
|
||||
gCurrentPinballGame->ball->oamPriority = 3;
|
||||
gCurrentPinballGame->unk24 = 0;
|
||||
}
|
||||
else if (gCurrentPinballGame->unk24 == 3)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk1 = 2;
|
||||
gCurrentPinballGame->ball->oamPriority = 2;
|
||||
gCurrentPinballGame->unk24 = 2;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1225,20 +1225,16 @@ void sub_1C5AC(void)
|
|||
gCurrentPinballGame->ball->unk0 = 0;
|
||||
gCurrentPinballGame->unk1F = 0;
|
||||
gCurrentPinballGame->unk5FA = 0;
|
||||
gCurrentPinballGame->ball->unkE = 136;
|
||||
gCurrentPinballGame->ball->scale = 0x88;
|
||||
gCurrentPinballGame->unk5F7 = 0;
|
||||
}
|
||||
else if (gCurrentPinballGame->unk28 > 12)
|
||||
{
|
||||
gCurrentPinballGame->unk730 = 2;
|
||||
if (gCurrentPinballGame->unk28 > 21)
|
||||
{
|
||||
gCurrentPinballGame->ball->unkE = ((24 - gCurrentPinballGame->unk28) * 112 / 3) + 144;
|
||||
}
|
||||
gCurrentPinballGame->ball->scale = ((24 - gCurrentPinballGame->unk28) * 0x70 / 3) + 0x90;
|
||||
else
|
||||
{
|
||||
gCurrentPinballGame->ball->unkE = 256;
|
||||
}
|
||||
gCurrentPinballGame->ball->scale = 0x100;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1267,7 +1263,7 @@ void sub_1C73C(void)
|
|||
gCurrentPinballGame->ball->velocity.y = 0;
|
||||
gCurrentPinballGame->ball->unk0 = 0;
|
||||
gCurrentPinballGame->unk1F = 0;
|
||||
gCurrentPinballGame->ball->unkE = 0x100;
|
||||
gCurrentPinballGame->ball->scale = 0x100;
|
||||
gCurrentPinballGame->unk730 = 0;
|
||||
gCurrentPinballGame->unk25 = 0;
|
||||
if (gCurrentPinballGame->unk282 == 0)
|
||||
|
|
|
|||
|
|
@ -653,7 +653,7 @@ void sub_1DDDC(void)
|
|||
gCurrentPinballGame->unk2A5 = 6;
|
||||
gCurrentPinballGame->unk2A6 = 0;
|
||||
gCurrentPinballGame->unk2A2 = 3;
|
||||
gCurrentPinballGame->ball->unk1 = 0;
|
||||
gCurrentPinballGame->ball->oamPriority = 0;
|
||||
gCurrentPinballGame->unk3C = 5000;
|
||||
m4aSongNumStart(SE_UNKNOWN_0xD5);
|
||||
sub_11B0(7);
|
||||
|
|
@ -725,7 +725,7 @@ void sub_1DDDC(void)
|
|||
gCurrentPinballGame->unk2A5 = 12;
|
||||
gCurrentPinballGame->unk2A6 = 0;
|
||||
gCurrentPinballGame->unk2A2 = 6;
|
||||
gCurrentPinballGame->ball->unk1 = 0;
|
||||
gCurrentPinballGame->ball->oamPriority = 0;
|
||||
break;
|
||||
case 6:
|
||||
if (gUnknown_086AD862[gCurrentPinballGame->unk2A5][1] > gCurrentPinballGame->unk2A6)
|
||||
|
|
@ -749,7 +749,7 @@ void sub_1DDDC(void)
|
|||
gCurrentPinballGame->ball->positionQ8.y = 0xC700;
|
||||
gCurrentPinballGame->ball->velocity.x = -120;
|
||||
gCurrentPinballGame->ball->velocity.y = 210;
|
||||
gCurrentPinballGame->ball->unk1 = 3;
|
||||
gCurrentPinballGame->ball->oamPriority = 3;
|
||||
}
|
||||
|
||||
if (gCurrentPinballGame->unk2A5 == 14)
|
||||
|
|
|
|||
|
|
@ -1560,7 +1560,7 @@ void sub_2AADC(void)
|
|||
gCurrentPinballGame->unk71D[2] = 2;
|
||||
}
|
||||
|
||||
gCurrentPinballGame->ball->unk1 = 0;
|
||||
gCurrentPinballGame->ball->oamPriority = 0;
|
||||
gCurrentPinballGame->ball->velocity.x = 0;
|
||||
gCurrentPinballGame->ball->velocity.y = 0;
|
||||
gCurrentPinballGame->ball->positionQ8.x += gCurrentPinballGame->ball->velocity.x;
|
||||
|
|
@ -1649,8 +1649,8 @@ void sub_2AADC(void)
|
|||
|
||||
if (spriteGroup->available != 0)
|
||||
{
|
||||
spriteGroup->baseX = gCurrentPinballGame->ball->unk24;
|
||||
spriteGroup->baseY = gCurrentPinballGame->ball->unk26;
|
||||
spriteGroup->baseX = gCurrentPinballGame->ball->screenPosition.x;
|
||||
spriteGroup->baseY = gCurrentPinballGame->ball->screenPosition.y;
|
||||
|
||||
if (gCurrentPinballGame->unk13 == 5)
|
||||
{
|
||||
|
|
@ -1687,9 +1687,7 @@ void sub_2AADC(void)
|
|||
|
||||
if (gCurrentPinballGame->unk5A8 == 10 && gCurrentPinballGame->unk5A6 == 3)
|
||||
gMain.unk44[3]->available = 0;
|
||||
|
||||
break;
|
||||
|
||||
case 11:
|
||||
//TODO: fakematch; unused i. Here for the +4 to parse correctly;
|
||||
DmaCopy16(3, gUnknown_08137E14[i=gCurrentPinballGame->ballUpgradeType + 4], 0x05000220, 0x20);
|
||||
|
|
@ -1703,21 +1701,21 @@ void sub_2AADC(void)
|
|||
gCurrentPinballGame->unk5B0 = ArcTan2(-tempVector.x, tempVector.y);
|
||||
|
||||
if (gMain.selectedField > 3)
|
||||
{
|
||||
gCurrentPinballGame->unk389 = 0;
|
||||
}
|
||||
else if ((gCurrentPinballGame->unk13 == 4 && gCurrentPinballGame->unk17 == 9) ||
|
||||
(gCurrentPinballGame->unk13 == 8 && gCurrentPinballGame->unk17 == 3))
|
||||
(gCurrentPinballGame->unk13 == 8 && gCurrentPinballGame->unk17 == 3))
|
||||
{
|
||||
DmaCopy16(3, &gUnknown_020306D0, 0x050003A0, 0x20);
|
||||
}
|
||||
|
||||
for (i = 0; i <= 3; i++)
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk14[i].x = gCurrentPinballGame->ball->positionQ0.x;
|
||||
gCurrentPinballGame->ball->unk14[i].y = gCurrentPinballGame->ball->positionQ0.y;
|
||||
gCurrentPinballGame->ball->prevPositionsQ0[i].x = gCurrentPinballGame->ball->positionQ0.x;
|
||||
gCurrentPinballGame->ball->prevPositionsQ0[i].y = gCurrentPinballGame->ball->positionQ0.y;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 12:
|
||||
temp_r0 = 99 - gCurrentPinballGame->unk5A6;
|
||||
gCurrentPinballGame->unk5B0 -= (temp_r0 * 0x2000) / 100 - 0x2000;
|
||||
|
|
@ -1782,8 +1780,8 @@ void sub_2AADC(void)
|
|||
if (spriteGroup->available != 0)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk0 = 1;
|
||||
spriteGroup->baseX = gCurrentPinballGame->ball->unk24;
|
||||
spriteGroup->baseY = gCurrentPinballGame->ball->unk26;
|
||||
spriteGroup->baseX = gCurrentPinballGame->ball->screenPosition.x;
|
||||
spriteGroup->baseY = gCurrentPinballGame->ball->screenPosition.y;
|
||||
temp_r3 = gUnknown_086ACFF4[gCurrentPinballGame->unk5A8 - 17] + 7;
|
||||
|
||||
if (gCurrentPinballGame->unk13 == 5)
|
||||
|
|
@ -1877,8 +1875,8 @@ void sub_2AADC(void)
|
|||
|
||||
if (spriteGroup->available != 0)
|
||||
{
|
||||
spriteGroup->baseX = gCurrentPinballGame->ball->unk24;
|
||||
spriteGroup->baseY = gCurrentPinballGame->ball->unk26;
|
||||
spriteGroup->baseX = gCurrentPinballGame->ball->screenPosition.x;
|
||||
spriteGroup->baseY = gCurrentPinballGame->ball->screenPosition.y;
|
||||
|
||||
temp_r3 = gUnknown_086ACFF4[gCurrentPinballGame->unk5A8 - 17] + 7;
|
||||
|
||||
|
|
@ -2138,7 +2136,7 @@ void sub_2AADC(void)
|
|||
break;
|
||||
|
||||
case 33:
|
||||
gCurrentPinballGame->ball->unk1 = 3;
|
||||
gCurrentPinballGame->ball->oamPriority = 3;
|
||||
sub_23300();
|
||||
|
||||
if (gCurrentPinballGame->unk5A6 <= 229 && gCurrentPinballGame->unk210 == 150)
|
||||
|
|
@ -2262,7 +2260,7 @@ void sub_2AADC(void)
|
|||
|
||||
case 34:
|
||||
gCurrentPinballGame->unk5F7 = 0;
|
||||
gCurrentPinballGame->ball->unk1 = 3;
|
||||
gCurrentPinballGame->ball->oamPriority = 3;
|
||||
gCurrentPinballGame->unk5A4 = 0;
|
||||
gCurrentPinballGame->unk5A6 = 0;
|
||||
gCurrentPinballGame->unk5A8 = 0;
|
||||
|
|
@ -2324,12 +2322,12 @@ void sub_2AADC(void)
|
|||
break;
|
||||
}
|
||||
|
||||
gCurrentPinballGame->ball->unk14[0].x = gCurrentPinballGame->ball->positionQ0.x;
|
||||
gCurrentPinballGame->ball->unk14[0].y = gCurrentPinballGame->ball->positionQ0.y;
|
||||
gCurrentPinballGame->ball->prevPositionsQ0[0].x = gCurrentPinballGame->ball->positionQ0.x;
|
||||
gCurrentPinballGame->ball->prevPositionsQ0[0].y = gCurrentPinballGame->ball->positionQ0.y;
|
||||
|
||||
for (i = 2; i >= 0; i--)
|
||||
{
|
||||
gCurrentPinballGame->ball->unk14[i + 1].x = gCurrentPinballGame->ball->unk14[i].x;
|
||||
gCurrentPinballGame->ball->unk14[i + 1].y = gCurrentPinballGame->ball->unk14[i].y;
|
||||
gCurrentPinballGame->ball->prevPositionsQ0[i + 1].x = gCurrentPinballGame->ball->prevPositionsQ0[i].x;
|
||||
gCurrentPinballGame->ball->prevPositionsQ0[i + 1].y = gCurrentPinballGame->ball->prevPositionsQ0[i].y;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1097,7 +1097,7 @@ void sub_2E6AC(void)
|
|||
gCurrentPinballGame->unk316 = -25;
|
||||
gCurrentPinballGame->unk318 = (gCurrentPinballGame->unk320 / 10 + 157) * 10;
|
||||
gCurrentPinballGame->unk31A = (gCurrentPinballGame->unk322 / 10 + 134) * 10;
|
||||
gCurrentPinballGame->ball->unk1 = 1;
|
||||
gCurrentPinballGame->ball->oamPriority = 1;
|
||||
}
|
||||
|
||||
if (gCurrentPinballGame->unk1F)
|
||||
|
|
@ -1125,7 +1125,7 @@ void sub_2E6AC(void)
|
|||
gCurrentPinballGame->unk1F = 0;
|
||||
gCurrentPinballGame->ball->velocity.x = 128;
|
||||
gCurrentPinballGame->ball->velocity.y = 256;
|
||||
gCurrentPinballGame->ball->unk1 = 3;
|
||||
gCurrentPinballGame->ball->oamPriority = 3;
|
||||
gCurrentPinballGame->unk24 = 0;
|
||||
m4aSongNumStart(SE_UNKNOWN_0xE5);
|
||||
sub_11B0(7);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void LoadTitlescreenGraphics(void)
|
|||
REG_DISPCNT = DISPCNT_OBJ_ON| DISPCNT_FORCED_BLANK;
|
||||
REG_BG1CNT = BGCNT_256COLOR | BGCNT_PRIORITY(1) | BGCNT_CHARBASE(1) | BGCNT_SCREENBASE(0);
|
||||
REG_DISPCNT |= DISPCNT_BG1_ON;
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
DmaCopy16(3, gTitlescreenBg_Gfx, (void *)BG_CHAR_ADDR(1), 0xA000);
|
||||
DmaCopy16(3, gTitlescreenBg_Pals, (void *)BG_PLTT, BG_PLTT_SIZE);
|
||||
|
|
@ -388,13 +388,13 @@ void TitleScreen7_8011020(void)
|
|||
if (!gTitlescreen.unk2)
|
||||
{
|
||||
gTitlescreen.unk2 = 1;
|
||||
sub_10708((void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), gUnknown_03000000, 8, 2);
|
||||
sub_10708((void *)(OBJ_VRAM0 + 0x61E0), (void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), 8, 2);
|
||||
CopyBgTilesRect((void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), gUnknown_03000000, 8, 2);
|
||||
CopyBgTilesRect((void *)(OBJ_VRAM0 + 0x61E0), (void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), 8, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
gTitlescreen.unk2 = 0;
|
||||
sub_10708(gUnknown_03000000, (void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), 8, 2);
|
||||
CopyBgTilesRect(gUnknown_03000000, (void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), 8, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -489,13 +489,13 @@ void TitleScreen8_8011228(void)
|
|||
if (!gTitlescreen.unk2)
|
||||
{
|
||||
gTitlescreen.unk2 = 1;
|
||||
sub_10708((void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), gUnknown_03000000, 8, 2);
|
||||
sub_10708((void *)(OBJ_VRAM0 + 0x61E0), (void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), 8, 2);
|
||||
CopyBgTilesRect((void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), gUnknown_03000000, 8, 2);
|
||||
CopyBgTilesRect((void *)(OBJ_VRAM0 + 0x61E0), (void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), 8, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
gTitlescreen.unk2 = 0;
|
||||
sub_10708(gUnknown_03000000, (void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), 8, 2);
|
||||
CopyBgTilesRect(gUnknown_03000000, (void *)(OBJ_VRAM0 + 0x1E0 + gTitlescreen.menuCursorIndex * 0x800), 8, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ void sub_024C(void)
|
|||
| BLDCNT_EFFECT_LIGHTEN
|
||||
| BLDCNT_TGT1_BD;
|
||||
REG_DISPCNT &= ~DISPCNT_FORCED_BLANK;
|
||||
gMain.unk16 = REG_DISPCNT;
|
||||
gMain.dispcntBackup = REG_DISPCNT;
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
|
|
@ -47,7 +47,7 @@ void sub_02B4(void)
|
|||
MainLoopIter();
|
||||
}
|
||||
|
||||
gMain.unk16 |= DISPCNT_FORCED_BLANK;
|
||||
gMain.dispcntBackup |= DISPCNT_FORCED_BLANK;
|
||||
REG_DISPCNT |= DISPCNT_FORCED_BLANK;
|
||||
DmaFill16(3, 0, (void *)BG_VRAM, 0x18000);
|
||||
REG_BG0HOFS = 0;
|
||||
|
|
@ -94,7 +94,7 @@ s16 LoadSpriteSets(const struct SpriteSet *const *spriteSets, u16 numSpriteSets,
|
|||
|
||||
void ResetSomeGraphicsRelatedStuff(void)
|
||||
{
|
||||
gMain.unk16 |= DISPCNT_FORCED_BLANK;
|
||||
gMain.dispcntBackup |= DISPCNT_FORCED_BLANK;
|
||||
REG_DISPCNT |= DISPCNT_FORCED_BLANK;
|
||||
ClearGraphicsMemory();
|
||||
sub_0518();
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ gUnknown_0201A4F4: @ 0x0201A4F4
|
|||
.space 0x4
|
||||
gSelectedBonusField: @ 0x0201A4F8
|
||||
.space 0x8
|
||||
gUnknown_0201A500: @ 0x0201A500
|
||||
gHighScoreNameEntry: @ 0x0201A500
|
||||
.space 0x10
|
||||
gUnknown_0201A510: @ 0x0201A510
|
||||
.space 0x4
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user