npc,wip: group components into stages

This commit is contained in:
xinyangli 2024-09-03 11:29:22 +08:00
parent 4c540bd109
commit fd1aae7c33
27 changed files with 2456 additions and 673 deletions

View file

@ -31,7 +31,9 @@ public:
Memory(std::filesystem::path filepath, bool is_binary, paddr_t pmem_start,
paddr_t pmem_end)
: pmem_start(pmem_start), pmem_end(pmem_end) {
read_memory(filepath, is_binary);
if (!filepath.empty()) {
read_memory(filepath, is_binary);
}
}
const word_t &operator[](std::size_t addr) { return this->read(addr); }