Fix some frontier gfx, adjacent cleanup

This commit is contained in:
GriffinR
2023-07-31 20:00:34 -04:00
parent da238562f0
commit 16c0be7ed2
17 changed files with 428 additions and 612 deletions
+4 -2
View File
@@ -38,6 +38,8 @@
#include "constants/moves.h"
#include "constants/trainers.h"
#define NUM_LAYOUT_OFFSETS 8 // Assumed to be a power of 2
extern const struct MapLayout *const gMapLayouts[];
struct PyramidWildMon
@@ -55,7 +57,7 @@ struct PyramidFloorTemplate
u8 itemPositions;
u8 trainerPositions;
u8 runMultiplier;
u8 layoutOffsets[8];
u8 layoutOffsets[NUM_LAYOUT_OFFSETS];
};
struct PyramidTrainerEncounterMusic
@@ -1902,7 +1904,7 @@ static void GetPyramidFloorLayoutOffsets(u8 *layoutOffsets)
for (i = 0; i < NUM_PYRAMID_FLOOR_SQUARES; i++)
{
layoutOffsets[i] = sPyramidFloorTemplates[id].layoutOffsets[rand & 0x7];
layoutOffsets[i] = sPyramidFloorTemplates[id].layoutOffsets[rand & (NUM_LAYOUT_OFFSETS - 1)];
rand >>= 3;
if (i == 7)
{