| 143 | } |
| 144 | |
| 145 | bool RegularOpcodeManager::LoadOpcodes(const char *filename, bool report_errors) { |
| 146 | NormalMemStrategy s; |
| 147 | s.it = this; |
| 148 | MOpcodes.lock(); |
| 149 | |
| 150 | loaded = true; |
| 151 | eq_to_emu = new EmuOpcode[MAX_EQ_OPCODE]; |
| 152 | emu_to_eq = new uint16[_maxEmuOpcode]; |
| 153 | EQOpcodeCount = MAX_EQ_OPCODE; |
| 154 | EmuOpcodeCount = _maxEmuOpcode; |
| 155 | |
| 156 | //dont need to set eq_to_emu cause every element should get a value |
| 157 | memset(eq_to_emu, 0, sizeof(EmuOpcode)*MAX_EQ_OPCODE); |
| 158 | memset(emu_to_eq, 0, sizeof(uint16)*_maxEmuOpcode); |
| 159 | |
| 160 | bool ret = LoadOpcodesFile(filename, &s, report_errors); |
| 161 | MOpcodes.unlock(); |
| 162 | return ret; |
| 163 | } |
| 164 | |
| 165 | bool RegularOpcodeManager::ReloadOpcodes(const char *filename, bool report_errors) { |
| 166 | if(!loaded) |