MCPcopy Create free account
hub / github.com/EQEmu/EQEmu / LoadOpcodes

Method LoadOpcodes

common/opcodemgr.cpp:145–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145bool 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
165bool RegularOpcodeManager::ReloadOpcodes(const char *filename, bool report_errors) {
166 if(!loaded)

Callers 9

ClientManagerMethod · 0.80
ClientlistMethod · 0.80
RegisterFunction · 0.80
RegisterFunction · 0.80
RegisterFunction · 0.80
RegisterFunction · 0.80
RegisterFunction · 0.80
RegisterFunction · 0.80
RegisterFunction · 0.80

Calls 2

lockMethod · 0.80
unlockMethod · 0.80

Tested by

no test coverage detected