summaryrefslogtreecommitdiff
path: root/src/pokedex_cry_screen.c
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-10-03 15:56:18 -0500
committerGitHub <noreply@github.com>2018-10-03 15:56:18 -0500
commitf2f28382c4ad2b283d485f70b28d14317d58c997 (patch)
tree62b8924efe80a34e979ee6103bf68430eee89542 /src/pokedex_cry_screen.c
parent1120a5dd432365f79b7cdb9b7ad9972a6d2a8432 (diff)
parent56ff2850550f1bd642218d2c5b99e3e8a7bd21f3 (diff)
Merge pull request #694 from luckytyphlosion/master
Match a few NONMATCHINGs, document some NONMATCHINGs.
Diffstat (limited to 'src/pokedex_cry_screen.c')
-rw-r--r--src/pokedex_cry_screen.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pokedex_cry_screen.c b/src/pokedex_cry_screen.c
index 72972bf06..e07b5e1c0 100644
--- a/src/pokedex_cry_screen.c
+++ b/src/pokedex_cry_screen.c
@@ -203,6 +203,7 @@ struct SpritePalette gCryMeterNeedleSpritePalettes[] = {
#endif
#ifdef NONMATCHING
+// caused by some switch branch weirdness
u8 sub_8119E3C(struct CryRelatedStruct *cry, u8 arg1)
{
u8 i;
@@ -496,18 +497,22 @@ void sub_811A0A0(u16 species)
gPokedexCryScreenPtr->unk0010 = 1;
}
+// compiler refuses to put src into r0. this can't be solved with greg asm hacks
#ifdef NONMATCHING
void sub_811A0C0(void)
{
const s8 * src;
u8 i;
+
if (gPcmDmaCounter < 2)
src = gSoundInfo.pcmBuffer;
else
src = gSoundInfo.pcmBuffer + (gSoundInfo.pcmDmaPeriod + 1 - gPcmDmaCounter) * gSoundInfo.pcmSamplesPerVBlank;
+
src += PCM_DMA_BUF_SIZE;
for (i = 0; i < 16; i++)
gPokedexCryScreenPtr->unk0000[i] = src[i * 2] * 2;
+
}
#else
NAKED void sub_811A0C0(void)