Merge branch 'master' of https://github.com/pret/pokeemerald into doc-windows

This commit is contained in:
GriffinR
2023-02-01 14:59:45 -05:00
259 changed files with 4375 additions and 5702 deletions
+18 -18
View File
@@ -2375,8 +2375,8 @@ static void InitDomeTrainers(void)
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_SPDEF, NULL);
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_SPEED, NULL);
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_MAX_HP, NULL);
monTypesBits |= gBitTable[gSpeciesInfo[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type1];
monTypesBits |= gBitTable[gSpeciesInfo[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type2];
monTypesBits |= gBitTable[gSpeciesInfo[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].types[0]];
monTypesBits |= gBitTable[gSpeciesInfo[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].types[1]];
}
// Count the number of types in the players party, to factor into the ranking
@@ -2410,8 +2410,8 @@ static void InitDomeTrainers(void)
rankingScores[i] += statValues[STAT_SPDEF];
rankingScores[i] += statValues[STAT_SPEED];
rankingScores[i] += statValues[STAT_HP];
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].types[0]];
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].types[1]];
}
for (monTypesCount = 0, j = 0; j < 32; j++)
@@ -2777,8 +2777,8 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int mode)
if (move == MOVE_NONE || move == MOVE_UNAVAILABLE || gBattleMoves[move].power == 0)
return 0;
defType1 = gSpeciesInfo[targetSpecies].type1;
defType2 = gSpeciesInfo[targetSpecies].type2;
defType1 = gSpeciesInfo[targetSpecies].types[0];
defType2 = gSpeciesInfo[targetSpecies].types[1];
defAbility = gSpeciesInfo[targetSpecies].abilities[0];
moveType = gBattleMoves[move].type;
@@ -3075,12 +3075,12 @@ static void Task_ShowTourneyInfoCard(u8 taskId)
DecompressAndLoadBgGfxUsingHeap(2, gDomeTourneyInfoCard_Tilemap, 0x2000, 0, 1);
DecompressAndLoadBgGfxUsingHeap(3, gDomeTourneyInfoCardBg_Tilemap, 0x800, 0, 1);
LoadCompressedSpriteSheet(sTourneyTreeButtonsSpriteSheet);
LoadCompressedPalette(gDomeTourneyTree_Pal, 0, 0x200);
LoadCompressedPalette(gDomeTourneyTreeButtons_Pal, 0x100, 0x200);
LoadCompressedPalette(gBattleWindowTextPalette, 0xF0, 0x20);
LoadCompressedPalette(gDomeTourneyTree_Pal, BG_PLTT_OFFSET, BG_PLTT_SIZE);
LoadCompressedPalette(gDomeTourneyTreeButtons_Pal, OBJ_PLTT_OFFSET, OBJ_PLTT_SIZE);
LoadCompressedPalette(gBattleWindowTextPalette, BG_PLTT_ID(15), PLTT_SIZE_4BPP);
if (mode == INFOCARD_MATCH)
LoadCompressedPalette(gDomeTourneyMatchCardBg_Pal, 0x50, 0x20); // Changes the moving info card bg to orange when in match card mode
CpuFill32(0, gPlttBufferFaded, 0x400);
LoadCompressedPalette(gDomeTourneyMatchCardBg_Pal, BG_PLTT_ID(5), PLTT_SIZE_4BPP); // Changes the moving info card bg to orange when in match card mode
CpuFill32(0, gPlttBufferFaded, PLTT_SIZE);
ShowBg(0);
ShowBg(1);
ShowBg(2);
@@ -4281,7 +4281,7 @@ static u8 Task_GetInfoCardInput(u8 taskId)
#undef tUsingAlternateSlot
// allocatedArray below needs to be large enough to hold stat totals for each mon, or totals of each type of move points
#define ALLOC_ARRAY_SIZE (NUM_STATS * FRONTIER_PARTY_SIZE >= NUM_MOVE_POINT_TYPES ? (NUM_STATS * FRONTIER_PARTY_SIZE) : NUM_MOVE_POINT_TYPES)
#define ALLOC_ARRAY_SIZE max(NUM_STATS * FRONTIER_PARTY_SIZE, NUM_MOVE_POINT_TYPES)
static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
{
@@ -5354,10 +5354,10 @@ static void Task_ShowTourneyTree(u8 taskId)
DecompressAndLoadBgGfxUsingHeap(2, gDomeTourneyLine_Gfx, 0x2000, 0, 0);
DecompressAndLoadBgGfxUsingHeap(2, gDomeTourneyLineDown_Tilemap, 0x2000, 0, 1);
DecompressAndLoadBgGfxUsingHeap(3, gDomeTourneyLineUp_Tilemap, 0x2000, 0, 1);
LoadCompressedPalette(gDomeTourneyTree_Pal, 0, 0x200);
LoadCompressedPalette(gDomeTourneyTreeButtons_Pal, 0x100, 0x200);
LoadCompressedPalette(gBattleWindowTextPalette, 0xF0, 0x20);
CpuFill32(0, gPlttBufferFaded, 0x400);
LoadCompressedPalette(gDomeTourneyTree_Pal, BG_PLTT_OFFSET, BG_PLTT_SIZE);
LoadCompressedPalette(gDomeTourneyTreeButtons_Pal, OBJ_PLTT_OFFSET, OBJ_PLTT_SIZE);
LoadCompressedPalette(gBattleWindowTextPalette, BG_PLTT_ID(15), PLTT_SIZE_4BPP);
CpuFill32(0, gPlttBufferFaded, PLTT_SIZE);
ShowBg(0);
ShowBg(1);
ShowBg(2);
@@ -5910,8 +5910,8 @@ static void InitRandomTourneyTreeResults(void)
statSums[i] += statValues[STAT_SPDEF];
statSums[i] += statValues[STAT_SPEED];
statSums[i] += statValues[STAT_HP];
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].types[0]];
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].types[1]];
}
// Because GF hates temporary vars, trainerId acts like monTypesCount here.