#ifndef WILD_OPCODE_READER_HPP_ #define WILD_OPCODE_READER_HPP_ #include class opcode_reader { public: opcode_reader(uint8_t* opcode_address) : opcode_address(opcode_address) { } template T read(uint32_t offset) { if (this->opcode_address != 0) return *reinterpret_cast(this->opcode_address + offset); return static_cast(0); } private: uint8_t* opcode_address; }; #endif