mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
32 lines
924 B
C
32 lines
924 B
C
#ifndef GUARD_GENERATIONAL_CHANGES_H
|
|
#define GUARD_GENERATIONAL_CHANGES_H
|
|
|
|
#include "constants/generational_changes.h"
|
|
#include "config/battle.h"
|
|
#include "config/pokerus.h"
|
|
|
|
#define UNPACK_CONFIG_STRUCT(_name, _field, _typeMaxValue, ...) INVOKE_WITH_(UNPACK_CONFIG_STRUCT_, _field, UNPACK_B(_typeMaxValue));
|
|
#define UNPACK_CONFIG_STRUCT_(_field, _type, ...) _type FIRST(__VA_OPT__(_field:BIT_SIZE(FIRST(__VA_ARGS__)),) _field)
|
|
|
|
struct GenChanges
|
|
{
|
|
BATTLE_CONFIG_DEFINITIONS(UNPACK_CONFIG_STRUCT)
|
|
POKEMON_CONFIG_DEFINITIONS(UNPACK_CONFIG_STRUCT)
|
|
// Expands to:
|
|
// u32 critChance:4;
|
|
// u32 critMultiplier:4;
|
|
// ...
|
|
};
|
|
|
|
#define GetConfig(name) GetConfigInternal(CONFIG_##name)
|
|
|
|
u32 GetConfigInternal(enum ConfigTag configTag);
|
|
void SetConfig(enum ConfigTag configTag, u32 value);
|
|
|
|
#if TESTING
|
|
void TestInitConfigData(void);
|
|
void TestFreeConfigData(void);
|
|
#endif
|
|
|
|
#endif // GUARD_GENERATIONAL_CHANGES_H
|