use BG_CHAR_ADDR define

This commit is contained in:
garak 2019-02-16 23:51:06 -05:00
parent 19b76bffda
commit 35575b57a0
8 changed files with 67 additions and 67 deletions

View File

@ -1933,12 +1933,12 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
if (IsContest() == TRUE)
{
RequestDma3Fill(0, (void*)(VRAM + 0x8000), 0x2000, 1);
RequestDma3Fill(0, (void*)(BG_CHAR_ADDR(2)), 0x2000, 1);
RequestDma3Fill(0xFF, (void*)(VRAM + 0xF000), 0x1000, 0);
}
else
{
RequestDma3Fill(0, (void*)(VRAM + 0x4000), 0x2000, 1);
RequestDma3Fill(0, (void*)(BG_CHAR_ADDR(1)), 0x2000, 1);
RequestDma3Fill(0xFF, (void*)(VRAM + 0xe000), 0x1000, 0);
}
@ -2460,7 +2460,7 @@ static void LoadMoveBg(u16 bgId)
else
{
LZDecompressVram(gBattleAnimBackgroundTable[bgId].tilemap, (void *)(VRAM + 0xD000));
LZDecompressVram(gBattleAnimBackgroundTable[bgId].image, (void *)(VRAM + 0x8000));
LZDecompressVram(gBattleAnimBackgroundTable[bgId].image, (void *)(BG_CHAR_ADDR(2)));
LoadCompressedPalette(gBattleAnimBackgroundTable[bgId].palette, 32, 32);
}
}

View File

@ -720,25 +720,25 @@ void DrawMainBattleBackground(void)
{
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_x2000000))
{
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_Frontier, 0x20, 0x60);
}
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
{
LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Cave, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_Groudon, 0x20, 0x60);
}
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE)
{
LZDecompressVram(gBattleTerrainTiles_Water, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Water, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Water, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_Kyogre, 0x20, 0x60);
}
else if (gBattleTypeFlags & BATTLE_TYPE_RAYQUAZA)
{
LZDecompressVram(gBattleTerrainTiles_Rayquaza, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Rayquaza, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Rayquaza, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_Rayquaza, 0x20, 0x60);
}
@ -749,14 +749,14 @@ void DrawMainBattleBackground(void)
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
if (trainerClass == TRAINER_CLASS_LEADER)
{
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_BuildingLeader, 0x20, 0x60);
return;
}
else if (trainerClass == TRAINER_CLASS_CHAMPION)
{
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_StadiumWallace, 0x20, 0x60);
return;
@ -767,47 +767,47 @@ void DrawMainBattleBackground(void)
{
default:
case MAP_BATTLE_SCENE_NORMAL:
LZDecompressVram(gBattleTerrainTable[gBattleTerrain].tileset, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTable[gBattleTerrain].tileset, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTable[gBattleTerrain].tilemap, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainTable[gBattleTerrain].palette, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_GYM:
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_BuildingGym, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_MAGMA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_StadiumMagma, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_AQUA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_StadiumAqua, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_SIDNEY:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_StadiumSidney, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_PHOEBE:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_StadiumPhoebe, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_GLACIA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_StadiumGlacia, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_DRAKE:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_StadiumDrake, 0x20, 0x60);
break;
case MAP_BATTLE_SCENE_FRONTIER:
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(VRAM + 0xD000));
LoadCompressedPalette(gBattleTerrainPalette_Frontier, 0x20, 0x60);
break;
@ -1089,8 +1089,8 @@ void DrawBattleEntryBackground(void)
{
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
{
LZDecompressVram(gUnknown_08D778F0, (void*)(VRAM + 0x4000));
LZDecompressVram(gUnknown_08D77B0C, (void*)(VRAM + 0x10000));
LZDecompressVram(gUnknown_08D778F0, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gUnknown_08D77B0C, (void*)(BG_SCREEN_ADDR(2)0));
LoadCompressedPalette(gUnknown_08D77AE4, 0x60, 0x20);
SetBgAttribute(1, BG_ATTR_SCREENSIZE, 1);
SetGpuReg(REG_OFFSET_BG1CNT, 0x5C04);
@ -1108,7 +1108,7 @@ void DrawBattleEntryBackground(void)
{
if (!(gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) || gPartnerTrainerId == TRAINER_STEVEN_PARTNER)
{
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(VRAM + 0x4000));
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(VRAM + 0xE000));
}
else
@ -1123,17 +1123,17 @@ void DrawBattleEntryBackground(void)
}
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
{
LZDecompressVram(gBattleTerrainAnimTiles_Cave, (void*)(VRAM + 0x4000));
LZDecompressVram(gBattleTerrainAnimTiles_Cave, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Cave, (void*)(VRAM + 0xE000));
}
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE)
{
LZDecompressVram(gBattleTerrainAnimTiles_Underwater, (void*)(VRAM + 0x4000));
LZDecompressVram(gBattleTerrainAnimTiles_Underwater, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Underwater, (void*)(VRAM + 0xE000));
}
else if (gBattleTypeFlags & BATTLE_TYPE_RAYQUAZA)
{
LZDecompressVram(gBattleTerrainAnimTiles_Rayquaza, (void*)(VRAM + 0x4000));
LZDecompressVram(gBattleTerrainAnimTiles_Rayquaza, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Rayquaza, (void*)(VRAM + 0xE000));
}
else
@ -1143,13 +1143,13 @@ void DrawBattleEntryBackground(void)
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
if (trainerClass == TRAINER_CLASS_LEADER)
{
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(VRAM + 0x4000));
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(VRAM + 0xE000));
return;
}
else if (trainerClass == TRAINER_CLASS_CHAMPION)
{
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(VRAM + 0x4000));
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(VRAM + 0xE000));
return;
}
@ -1157,12 +1157,12 @@ void DrawBattleEntryBackground(void)
if (GetCurrentMapBattleScene() == MAP_BATTLE_SCENE_NORMAL)
{
LZDecompressVram(gBattleTerrainTable[gBattleTerrain].entryTileset, (void*)(VRAM + 0x4000));
LZDecompressVram(gBattleTerrainTable[gBattleTerrain].entryTileset, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainTable[gBattleTerrain].entryTilemap, (void*)(VRAM + 0xE000));
}
else
{
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(VRAM + 0x4000));
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(VRAM + 0xE000));
}
}
@ -1187,11 +1187,11 @@ bool8 LoadChosenBattleElement(u8 caseId)
case 3:
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_EREADER_TRAINER))
{
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
}
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
{
LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(BG_CHAR_ADDR(2)));
}
else
{
@ -1200,12 +1200,12 @@ bool8 LoadChosenBattleElement(u8 caseId)
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
if (trainerClass == TRAINER_CLASS_LEADER)
{
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
break;
}
else if (trainerClass == TRAINER_CLASS_CHAMPION)
{
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
break;
}
}
@ -1214,31 +1214,31 @@ bool8 LoadChosenBattleElement(u8 caseId)
{
default:
case MAP_BATTLE_SCENE_NORMAL:
LZDecompressVram(gBattleTerrainTable[gBattleTerrain].tileset, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTable[gBattleTerrain].tileset, (void*)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_GYM:
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_MAGMA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_AQUA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_SIDNEY:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_PHOEBE:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_GLACIA:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_DRAKE:
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
break;
case MAP_BATTLE_SCENE_FRONTIER:
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(VRAM + 0x8000));
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
break;
}
}

View File

@ -923,7 +923,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, bool8 notTransform
}
src = gMonSpritesGfxPtr->sprites[position];
dst = (void *)(VRAM + 0x10000 + gSprites[gBattlerSpriteIds[battlerAtk]].oam.tileNum * 32);
dst = (void *)(BG_SCREEN_ADDR(2)0 + gSprites[gBattlerSpriteIds[battlerAtk]].oam.tileNum * 32);
DmaCopy32(3, src, dst, 0x800);
paletteOffset = 0x100 + battlerAtk * 16;
lzPaletteData = GetFrontSpritePalFromSpeciesAndPersonality(targetSpecies, otId, personalityValue);

View File

@ -589,8 +589,8 @@ static u8 sub_80D7E44(u8 *a)
case 0:
gPaletteFade.bufferTransferDisabled = TRUE;
RequestDma3Fill(0, (void *)VRAM, 0x8000, 1);
RequestDma3Fill(0, (void *)VRAM + 0x8000, 0x8000, 1);
RequestDma3Fill(0, (void *)VRAM + 0x10000, 0x8000, 1);
RequestDma3Fill(0, (void *)BG_CHAR_ADDR(2), 0x8000, 1);
RequestDma3Fill(0, (void *)BG_SCREEN_ADDR(2)0, 0x8000, 1);
break;
case 1:
LZDecompressVram(gContestMiscGfx, (void *)VRAM);
@ -3340,12 +3340,12 @@ static u8 sub_80DC9EC(u8 a)
CpuFill32(0, gContestResources->field_38 + 0x500, 0x300);
RequestDma3Copy(gContestResources->field_34,
(u8 *)(VRAM + 0x10000 + gSprites[spriteId1].oam.tileNum * 32),
(u8 *)(BG_SCREEN_ADDR(2)0 + gSprites[spriteId1].oam.tileNum * 32),
0x800,
1);
RequestDma3Copy(gContestResources->field_38,
(u8 *)(VRAM + 0x10000 + gSprites[spriteId2].oam.tileNum * 32),
(u8 *)(BG_SCREEN_ADDR(2)0 + gSprites[spriteId2].oam.tileNum * 32),
0x800,
1);
@ -3870,8 +3870,8 @@ static void sub_80DD940(void)
src = gContestApplauseMeterGfx + 64;
else
src = gContestApplauseMeterGfx;
CpuCopy32(src, (void *)(VRAM + 0x10000 + (gSprites[sContest.applauseMeterSpriteId].oam.tileNum + 17 + i) * 32), 32);
CpuCopy32(src + 32, (void *)(VRAM + 0x10000 + (gSprites[sContest.applauseMeterSpriteId].oam.tileNum + 25 + i) * 32), 32);
CpuCopy32(src, (void *)(BG_SCREEN_ADDR(2)0 + (gSprites[sContest.applauseMeterSpriteId].oam.tileNum + 17 + i) * 32), 32);
CpuCopy32(src + 32, (void *)(BG_SCREEN_ADDR(2)0 + (gSprites[sContest.applauseMeterSpriteId].oam.tileNum + 25 + i) * 32), 32);
if (sContest.applauseLevel > 4)
sub_80DDA20();
@ -4120,7 +4120,7 @@ static void sub_80DE008(bool8 a)
{
if (sContestantStatus[i].turnOrderMod != 0 && a)
{
CpuCopy32(GetTurnOrderNumberGfx(i), (void *)(VRAM + 0x10000 + (gSprites[gContestResources->field_14[i].unk1].oam.tileNum + 6) * 32), 32);
CpuCopy32(GetTurnOrderNumberGfx(i), (void *)(BG_SCREEN_ADDR(2)0 + (gSprites[gContestResources->field_14[i].unk1].oam.tileNum + 6) * 32), 32);
gSprites[gContestResources->field_14[i].unk1].pos1.y = gUnknown_08587A70[gUnknown_02039F26[i]];
gSprites[gContestResources->field_14[i].unk1].invisible = FALSE;
}
@ -4212,7 +4212,7 @@ static void sub_80DE350(void)
s32 i;
u16 bg1Cnt;
RequestDma3Fill(0,(void *)(VRAM + 0x8000), 0x2000, 0x1);
RequestDma3Fill(0,(void *)(BG_CHAR_ADDR(2)), 0x2000, 0x1);
CpuFill32(0, gContestResources->field_24[1], 0x1000);
Contest_SetBgCopyFlags(1);
bg1Cnt = GetGpuReg(REG_OFFSET_BG1CNT);

View File

@ -2960,8 +2960,8 @@ u8 sub_80B8F98(void)
{
for (i = 0; i < 8; i++)
{
*(u16*)(VRAM + 0x8000 + (k + 1) * 32 + i * 4) = (gUnknown_0855B630[k * 32 + i * 4 + 1] << 8) + gUnknown_0855B630[k * 32 + i * 4];
*(u16*)(VRAM + 0x8000 + (k + 1) * 32 + i * 4 + 2) = (gUnknown_0855B630[k * 32 + i * 4 + 3] << 8) + gUnknown_0855B630[k * 32 + i * 4 + 2];
*(u16*)(BG_CHAR_ADDR(2) + (k + 1) * 32 + i * 4) = (gUnknown_0855B630[k * 32 + i * 4 + 1] << 8) + gUnknown_0855B630[k * 32 + i * 4];
*(u16*)(BG_CHAR_ADDR(2) + (k + 1) * 32 + i * 4 + 2) = (gUnknown_0855B630[k * 32 + i * 4 + 3] << 8) + gUnknown_0855B630[k * 32 + i * 4 + 2];
}
}
return spriteId;

View File

@ -1092,7 +1092,7 @@ static void Task_IntroLoadPart1Graphics(u8 taskId)
SetGpuReg(REG_OFFSET_BG1VOFS, 0x18);
SetGpuReg(REG_OFFSET_BG0VOFS, 0x28);
LZ77UnCompVram(gIntro1BGLeavesGfx, (void *)VRAM);
LZ77UnCompVram(gIntro1BG0_Tilemap, (void *)(VRAM + 0x8000));
LZ77UnCompVram(gIntro1BG0_Tilemap, (void *)(BG_CHAR_ADDR(2)));
DmaClear16(3, VRAM + 0x8800, 0x800);
LZ77UnCompVram(gIntro1BG1_Tilemap, (void *)(VRAM + 0x9000));
DmaClear16(3, VRAM + 0x9800, 0x800);
@ -1549,7 +1549,7 @@ static void Task_IntroLoadPart3Graphics(u8 taskId)
{
intro_reset_and_hide_bgs();
LZ77UnCompVram(gIntro3Pokeball_Gfx, (void *)VRAM);
LZ77UnCompVram(gIntro3Pokeball_Tilemap, (void *)(VRAM + 0x4000));
LZ77UnCompVram(gIntro3Pokeball_Tilemap, (void *)(BG_CHAR_ADDR(1)));
LoadPalette(gIntro3PokeballPal, 0, 0x200);
gTasks[taskId].data[0] = 0;
gTasks[taskId].data[1] = 0;
@ -1601,8 +1601,8 @@ static void Task_IntroLoadGroudonScene(u8 taskId)
FreeAllSpritePalettes();
gReservedSpritePaletteCount = 8;
LZDecompressVram(gIntro3GroudonGfx, (void *)VRAM);
LZDecompressVram(gIntro3GroudonTilemap, (void *)(VRAM + 0xC000));
LZDecompressVram(gIntro3LegendBgGfx, (void *)(VRAM + 0x4000));
LZDecompressVram(gIntro3GroudonTilemap, (void *)(BG_CHAR_ADDR(3)));
LZDecompressVram(gIntro3LegendBgGfx, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gIntro3GroudonBgTilemap, (void *)(VRAM + 0xE000));
LoadCompressedSpriteSheetUsingHeap(&gBattleAnimPicTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_ROCKS)]);
LoadCompressedSpritePaletteUsingHeap(&gBattleAnimPaletteTable[GET_TRUE_SPRITE_INDEX(ANIM_TAG_ROCKS)]);
@ -1824,7 +1824,7 @@ static void Task_IntroLoadKyogreScene(u8 taskId)
{
ResetSpriteData();
LZDecompressVram(gIntro3KyogreGfx, (void *)VRAM);
LZDecompressVram(gIntro3KyogreTilemap, (void *)(VRAM + 0xC000));
LZDecompressVram(gIntro3KyogreTilemap, (void *)(BG_CHAR_ADDR(3)));
LZDecompressVram(gIntro3KyogreBgTilemap, (void *)(VRAM + 0xE000));
LoadCompressedSpriteSheet(gUnknown_085E4C88);
LoadSpritePalette(gUnknown_085E4C98);
@ -2087,14 +2087,14 @@ static void Task_IntroLoadClouds1(u8 taskId)
SetGpuReg(REG_OFFSET_BG2HOFS, 0);
SetGpuReg(REG_OFFSET_BG2VOFS, 0);
LZDecompressVram(gIntro3CloudsGfx, (void *)VRAM);
LZDecompressVram(gIntro3CloudsGfx, (void *)(VRAM + 0x4000));
LZDecompressVram(gIntro3CloudsGfx, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gIntro3Clouds3Tilemap, (void *)(VRAM + 0xE000));
gTasks[taskId].func = Task_IntroLoadClouds2;
}
static void Task_IntroLoadClouds2(u8 taskId)
{
LZDecompressVram(gIntro3Clouds1Tilemap, (void *)(VRAM + 0xC000));
LZDecompressVram(gIntro3Clouds1Tilemap, (void *)(BG_CHAR_ADDR(3)));
LZDecompressVram(gIntro3Clouds2Tilemap, (void *)(VRAM + 0xD000));
gTasks[taskId].func = Task_IntroLoadClouds3;
}
@ -2141,8 +2141,8 @@ static void Task_IntroCloudScene(u8 taskId)
static void Task_IntroLoadRayquazaLightningScene(u8 taskId)
{
LZDecompressVram(gIntro3RayquazaTilemap, (void *)(VRAM + 0xE000));
LZDecompressVram(gIntro3Clouds4Tilemap, (void *)(VRAM + 0xC000));
LZDecompressVram(gIntro3RayquazaGfx, (void *)(VRAM + 0x4000));
LZDecompressVram(gIntro3Clouds4Tilemap, (void *)(BG_CHAR_ADDR(3)));
LZDecompressVram(gIntro3RayquazaGfx, (void *)(BG_CHAR_ADDR(1)));
LZDecompressVram(gIntro3Clouds2Gfx, (void *)VRAM);
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0
| DISPCNT_OBJ_1D_MAP

View File

@ -331,7 +331,7 @@ static void sub_817B458(u8);
void load_intro_part2_graphics(u8 a)
{
LZ77UnCompVram(gUnknown_085F0740, (void *)(VRAM + 0x4000));
LZ77UnCompVram(gUnknown_085F0740, (void *)(BG_CHAR_ADDR(1)));
LZ77UnCompVram(gUnknown_085F0BC0, (void *)(VRAM + 0x7800));
LoadPalette(&gUnknown_085F06E0, 240, 32);
switch (a)
@ -438,7 +438,7 @@ void sub_817B150(u8 a)
void sub_817B1C8(u8 a)
{
LZ77UnCompVram(gUnknown_085F0740, (void *)(VRAM + 0x4000));
LZ77UnCompVram(gUnknown_085F0740, (void *)(BG_CHAR_ADDR(1)));
LZ77UnCompVram(gUnknown_085F0BC0, (void *)(VRAM + 0x7800));
switch (a)
{
@ -449,7 +449,7 @@ void sub_817B1C8(u8 a)
LZ77UnCompVram(gUnknown_085F1398, (void *)(VRAM + 0x3000));
LoadPalette(&gUnknown_085F0CFC, 0, 96);
LoadCompressedSpriteSheet(gUnknown_085F5064);
LZ77UnCompVram(gUnknown_085F16A8, (void *)(VRAM + 0x10000));
LZ77UnCompVram(gUnknown_085F16A8, (void *)(BG_SCREEN_ADDR(2)0));
LoadPalette(&gUnknown_085F1668, 256, 32);
sub_817B76C();
break;
@ -459,7 +459,7 @@ void sub_817B1C8(u8 a)
LZ77UnCompVram(gUnknown_085F1398, (void *)(VRAM + 0x3000));
LoadPalette(&gUnknown_085F0D5C, 0, 96);
LoadCompressedSpriteSheet(gUnknown_085F5064);
LZ77UnCompVram(gUnknown_085F16A8, (void *)(VRAM + 0x10000));
LZ77UnCompVram(gUnknown_085F16A8, (void *)(BG_SCREEN_ADDR(2)0));
LoadPalette(&gUnknown_085F1688, 256, 32);
sub_817B76C();
break;

View File

@ -509,9 +509,9 @@ void CB2_InitTitleScreen(void)
LZ77UnCompVram(gTitleScreenPokemonLogoGfx, (void *)VRAM);
LZ77UnCompVram(gUnknown_08DE0644, (void *)(VRAM + 0x4800));
LoadPalette(gTitleScreenBgPalettes, 0, 0x1E0);
LZ77UnCompVram(sTitleScreenRayquazaGfx, (void *)(VRAM + 0x8000));
LZ77UnCompVram(sTitleScreenRayquazaGfx, (void *)(BG_CHAR_ADDR(2)));
LZ77UnCompVram(sTitleScreenRayquazaTilemap, (void *)(VRAM + 0xD000));
LZ77UnCompVram(sTitleScreenCloudsGfx, (void *)(VRAM + 0xC000));
LZ77UnCompVram(sTitleScreenCloudsGfx, (void *)(BG_CHAR_ADDR(3)));
LZ77UnCompVram(gUnknown_08DDE458, (void *)(VRAM + 0xD800));
ScanlineEffect_Stop();
ResetTasks();