mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-09-10 18:55:59 -05:00
Use array for TM Learnset bitmasks
This commit is contained in:
@@ -54,10 +54,7 @@ typedef struct SpeciesData {
|
||||
u8 flipSprite : 1;
|
||||
// u16 padding;
|
||||
|
||||
u32 tmLearnsetMask1; // Bitflags for whether this pokemon can learn a TM (TM1 -> TM32)
|
||||
u32 tmLearnsetMask2; // Bitflags for whether this pokemon can learn a TM (TM33 -> TM64)
|
||||
u32 tmLearnsetMask3; // Bitflags for whether this pokemon can learn a TM (TM65 -> TM92, HM1 -> HM4)
|
||||
u32 tmLearnsetMask4; // Bitflags for whether this pokemon can learn a TM (HM5 -> HM8, rest unused)
|
||||
u32 tmLearnsetMasks[4]; // Bitflags for whether this pokemon can learn a TM
|
||||
} SpeciesData;
|
||||
|
||||
typedef struct SpeciesEvolution {
|
||||
|
||||
@@ -2099,16 +2099,16 @@ u32 SpeciesData_GetValue(SpeciesData *speciesData, enum SpeciesDataParam param)
|
||||
result = speciesData->flipSprite;
|
||||
break;
|
||||
case SPECIES_DATA_TM_LEARNSET_MASK_1:
|
||||
result = speciesData->tmLearnsetMask1;
|
||||
result = speciesData->tmLearnsetMasks[0];
|
||||
break;
|
||||
case SPECIES_DATA_TM_LEARNSET_MASK_2:
|
||||
result = speciesData->tmLearnsetMask2;
|
||||
result = speciesData->tmLearnsetMasks[1];
|
||||
break;
|
||||
case SPECIES_DATA_TM_LEARNSET_MASK_3:
|
||||
result = speciesData->tmLearnsetMask3;
|
||||
result = speciesData->tmLearnsetMasks[2];
|
||||
break;
|
||||
case SPECIES_DATA_TM_LEARNSET_MASK_4:
|
||||
result = speciesData->tmLearnsetMask4;
|
||||
result = speciesData->tmLearnsetMasks[3];
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user