Skip to content

Commit

Permalink
Converted sTMHMLearnsets to gTMHMLearnsets and static const u32 to co…
Browse files Browse the repository at this point in the history
…nst u32 in src/data/pokemon//tmhm_learnsets.h
  • Loading branch information
HunarPG committed Aug 1, 2023
1 parent e3b2f9c commit 328d8d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/data/pokemon/tmhm_learnsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// This table determines which TMs and HMs a species is capable of learning.
// Each entry is a 64-bit bit array spread across two 32-bit values, with
// each bit corresponding to a machine.
static const u32 sTMHMLearnsets[][2] =
const u32 gTMHMLearnsets[][2] =
{
[SPECIES_NONE] = TMHM_LEARNSET(0),

Expand Down
4 changes: 2 additions & 2 deletions src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -5717,12 +5717,12 @@ u32 CanMonLearnTMHM(struct Pokemon *mon, u8 tm)
else if (tm < 32)
{
u32 mask = 1 << tm;
return sTMHMLearnsets[species][0] & mask;
return gTMHMLearnsets[species][0] & mask;
}
else
{
u32 mask = 1 << (tm - 32);
return sTMHMLearnsets[species][1] & mask;
return gTMHMLearnsets[species][1] & mask;
}
}

Expand Down

0 comments on commit 328d8d5

Please sign in to comment.