reman3/game_re/r3/binders/dbg_mem.h

16 lines
479 B
C++

#ifndef BD364AE6_AD96_4DEA_9D6B_B237BC1E2C6A
#define BD364AE6_AD96_4DEA_9D6B_B237BC1E2C6A
#include <gh_datasegment.h>
template <size_t addr> inline constexpr void checkMappedMemory() {
static_assert(addr >= GH_DATA_START, "Address outside lower bound");
static_assert(addr < GH_DATA_END, "Address outside upper bound");
}
void gh_init_dbg_loader();
#define GH_MEM(addr) (checkMappedMemory<addr>(), *memoryMapSafe(addr))
#endif /* BD364AE6_AD96_4DEA_9D6B_B237BC1E2C6A */