Two fakematches out
This commit is contained in:
parent
a4a382a004
commit
ff2dcf5413
3 changed files with 25 additions and 36 deletions
|
@ -4083,7 +4083,7 @@ extern const u32 gContestConfetti_Pal[];
|
||||||
extern const u32 gUnknown_08C093F0[];
|
extern const u32 gUnknown_08C093F0[];
|
||||||
extern const u32 gSubstituteDollTilemap[];
|
extern const u32 gSubstituteDollTilemap[];
|
||||||
extern const u32 gSubstituteDollGfx[];
|
extern const u32 gSubstituteDollGfx[];
|
||||||
extern const u16 gSubstituteDollPal[];
|
extern const u32 gSubstituteDollPal[];
|
||||||
extern const u32 gHealthboxSinglesPlayerGfx[];
|
extern const u32 gHealthboxSinglesPlayerGfx[];
|
||||||
extern const u32 gHealthboxSinglesOpponentGfx[];
|
extern const u32 gHealthboxSinglesOpponentGfx[];
|
||||||
extern const u32 gHealthboxDoublesPlayerGfx[];
|
extern const u32 gHealthboxDoublesPlayerGfx[];
|
||||||
|
|
|
@ -819,15 +819,11 @@ static void Task_HandleSendLinkBuffersData(u8 taskId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fix me
|
|
||||||
void sub_8033648(void)
|
void sub_8033648(void)
|
||||||
{
|
{
|
||||||
u8 i;
|
u8 i;
|
||||||
s32 j;
|
s32 j;
|
||||||
u16 r6;
|
|
||||||
u8 *recvBuffer;
|
u8 *recvBuffer;
|
||||||
u8 *dest;
|
|
||||||
u8 *src;
|
|
||||||
|
|
||||||
if (gReceivedRemoteLinkPlayers != 0 && (gBattleTypeFlags & BATTLE_TYPE_20))
|
if (gReceivedRemoteLinkPlayers != 0 && (gBattleTypeFlags & BATTLE_TYPE_20))
|
||||||
{
|
{
|
||||||
|
@ -838,25 +834,24 @@ void sub_8033648(void)
|
||||||
{
|
{
|
||||||
ResetBlockReceivedFlag(i);
|
ResetBlockReceivedFlag(i);
|
||||||
recvBuffer = (u8 *)gBlockRecvBuffer[i];
|
recvBuffer = (u8 *)gBlockRecvBuffer[i];
|
||||||
#ifndef NONMATCHING
|
|
||||||
asm("");
|
|
||||||
recvBuffer = (u8 *)&gBlockRecvBuffer[i];
|
|
||||||
#endif
|
|
||||||
r6 = gBlockRecvBuffer[i][2];
|
|
||||||
|
|
||||||
if (gTasks[sLinkReceiveTaskId].data[14] + 9 + r6 > 0x1000)
|
|
||||||
{
|
{
|
||||||
gTasks[sLinkReceiveTaskId].data[12] = gTasks[sLinkReceiveTaskId].data[14];
|
u8 *dest, *src;
|
||||||
gTasks[sLinkReceiveTaskId].data[14] = 0;
|
u16 r6 = gBlockRecvBuffer[i][2];
|
||||||
|
|
||||||
|
if (gTasks[sLinkReceiveTaskId].data[14] + 9 + r6 > 0x1000)
|
||||||
|
{
|
||||||
|
gTasks[sLinkReceiveTaskId].data[12] = gTasks[sLinkReceiveTaskId].data[14];
|
||||||
|
gTasks[sLinkReceiveTaskId].data[14] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
dest = &gLinkBattleRecvBuffer[gTasks[sLinkReceiveTaskId].data[14]];
|
||||||
|
src = recvBuffer;
|
||||||
|
|
||||||
|
for (j = 0; j < r6 + 8; j++)
|
||||||
|
dest[j] = src[j];
|
||||||
|
|
||||||
|
gTasks[sLinkReceiveTaskId].data[14] = gTasks[sLinkReceiveTaskId].data[14] + r6 + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
dest = &gLinkBattleRecvBuffer[gTasks[sLinkReceiveTaskId].data[14]];
|
|
||||||
src = recvBuffer;
|
|
||||||
|
|
||||||
for (j = 0; j < r6 + 8; j++)
|
|
||||||
dest[j] = src[j];
|
|
||||||
|
|
||||||
gTasks[sLinkReceiveTaskId].data[14] = gTasks[sLinkReceiveTaskId].data[14] + r6 + 8;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -945,10 +945,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
|
||||||
|
|
||||||
void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite)
|
void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite)
|
||||||
{
|
{
|
||||||
u8 position;
|
s32 i, position, palOffset;
|
||||||
s32 i;
|
|
||||||
u32 var;
|
|
||||||
const void *substitutePal;
|
|
||||||
|
|
||||||
if (!loadMonSprite)
|
if (!loadMonSprite)
|
||||||
{
|
{
|
||||||
|
@ -964,19 +961,16 @@ void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite)
|
||||||
else
|
else
|
||||||
LZDecompressVram(gSubstituteDollTilemap, gMonSpritesGfxPtr->sprites[position]);
|
LZDecompressVram(gSubstituteDollTilemap, gMonSpritesGfxPtr->sprites[position]);
|
||||||
|
|
||||||
i = 1;
|
for (i = 1; i < 4; i++)
|
||||||
var = battlerId * 16;
|
|
||||||
substitutePal = gSubstituteDollPal;
|
|
||||||
for (; i < 4; i++)
|
|
||||||
{
|
{
|
||||||
register void *dmaSrc asm("r0") = gMonSpritesGfxPtr->sprites[position];
|
u8 (*ptr)[4][0x800] = gMonSpritesGfxPtr->sprites[position];
|
||||||
void *dmaDst = (i * 0x800) + dmaSrc;
|
ptr++;ptr--; // Needed to match.
|
||||||
u32 dmaSize = 0x800;
|
|
||||||
DmaCopy32(3, dmaSrc, dmaDst, dmaSize);
|
DmaCopy32Defvars(3, (*ptr)[0], (*ptr)[i], 0x800);
|
||||||
i++;i--;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadCompressedPalette(substitutePal, 0x100 + var, 32);
|
palOffset = (battlerId * 16) + 0x100;
|
||||||
|
LoadCompressedPalette(gSubstituteDollPal, palOffset, 32);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue