forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '_RHH/master' into _RHH/upcoming
- Loading branch information
Showing
18 changed files
with
250 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef GUARD_CONSTANTS_GENERATIONAL_CHANGES_H | ||
#define GUARD_CONSTANTS_GENERATIONAL_CHANGES_H | ||
|
||
enum GenConfigTag | ||
{ | ||
GEN_CONFIG_GALE_WINGS, | ||
GEN_CONFIG_COUNT | ||
}; | ||
|
||
#endif // GUARD_CONSTANTS_GENERATIONAL_CHANGES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#ifndef GUARD_GENERATIONAL_CHANGES_H | ||
#define GUARD_GENERATIONAL_CHANGES_H | ||
|
||
#include "constants/generational_changes.h" | ||
#include "config/battle.h" | ||
|
||
static const u8 sGenerationalChanges[GEN_CONFIG_COUNT] = | ||
{ | ||
[GEN_CONFIG_GALE_WINGS] = B_GALE_WINGS, | ||
}; | ||
|
||
#if TESTING | ||
extern u8 *gGenerationalChangesTestOverride; | ||
#endif | ||
|
||
static inline u32 GetGenConfig(enum GenConfigTag configTag) | ||
{ | ||
if (configTag >= GEN_CONFIG_COUNT) return GEN_LATEST; | ||
#if TESTING | ||
if (gGenerationalChangesTestOverride == NULL) return sGenerationalChanges[configTag]; | ||
return gGenerationalChangesTestOverride[configTag]; | ||
#else | ||
return sGenerationalChanges[configTag]; | ||
#endif | ||
} | ||
|
||
static inline void SetGenConfig(enum GenConfigTag configTag, u32 value) | ||
{ | ||
#if TESTING | ||
if (configTag >= GEN_CONFIG_COUNT) return; | ||
if (gGenerationalChangesTestOverride == NULL) return; | ||
gGenerationalChangesTestOverride[configTag] = value; | ||
#endif | ||
} | ||
|
||
#if TESTING | ||
void TestInitConfigData(void); | ||
void TestFreeConfigData(void); | ||
#endif | ||
|
||
#endif // GUARD_GENERATIONAL_CHANGES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.