emu_opcodes.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. EQ2Emulator: Everquest II Server Emulator
  3. Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
  4. This file is part of EQ2Emulator.
  5. EQ2Emulator is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. EQ2Emulator is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with EQ2Emulator. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef EMU_OPCODES_H
  17. #define EMU_OPCODES_H
  18. //this is the highest opcode possibly used in the regular EQ protocol
  19. #define MAX_EQ_OPCODE 0xFFFF
  20. /*
  21. the list of opcodes is in emu_oplist.h
  22. we somewhat rely on the fact that we have more than 255 opcodes,
  23. so we know the enum type for the opcode defines must be at least
  24. 16 bits, so we can use the protocol flags on them.
  25. */
  26. typedef enum { //EQEmu internal opcodes list
  27. OP_Unknown=0,
  28. //a preprocessor hack so we dont have to maintain two lists
  29. #define N(x) x
  30. #if !defined(LOGIN)
  31. #include "emu_oplist.h"
  32. #endif
  33. #ifdef LOGIN
  34. #include "login_oplist.h"
  35. #endif
  36. #undef N
  37. _maxEmuOpcode
  38. } EmuOpcode;
  39. extern const char *OpcodeNames[_maxEmuOpcode+1];
  40. #endif