sub_812CAD8
New macro `PRESSED(x)` tests `gMain.newKeys & (x)`. The macro itself is inoptimal. However, its use is required to match this function. We suspect this macro may have been implemented globally, hence we put it in `global.h`. Propagating its use through the remainder of this project, as well as [Ruby](/pret/pokeruby) and [Emerald](/pret/pokeemerald), has been left as a to-do item.
This commit is contained in:
@@ -62,6 +62,13 @@
|
||||
#define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
|
||||
#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
|
||||
|
||||
// This macro is required to prevent the compiler from optimizing
|
||||
// a dpad up/down check in sub_812CAD8 (fame_checker.c).
|
||||
// We suspect it was used globally.
|
||||
// GameFreak never ceases to amaze.
|
||||
// TODO: Propagate use of this macro
|
||||
#define PRESSED(button) ({gMain.newKeys & (button);})
|
||||
|
||||
extern u8 gStringVar1[];
|
||||
extern u8 gStringVar2[];
|
||||
extern u8 gStringVar3[];
|
||||
|
||||
Reference in New Issue
Block a user