Opcode.cpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2. /*
  3. * OPCODE - Optimized Collision Detection
  4. * Copyright (C) 2001 Pierre Terdiman
  5. * Homepage: http://www.codercorner.com/Opcode.htm
  6. */
  7. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  8. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  9. /**
  10. * Main file for Opcode.dll.
  11. * \file Opcode.cpp
  12. * \author Pierre Terdiman
  13. * \date March, 20, 2001
  14. */
  15. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  16. /*
  17. Finding a good name is difficult!
  18. Here's the draft for this lib.... Spooky, uh?
  19. VOID? Very Optimized Interference Detection
  20. ZOID? Zappy's Optimized Interference Detection
  21. CID? Custom/Clever Interference Detection
  22. AID / ACID! Accurate Interference Detection
  23. QUID? Quick Interference Detection
  24. RIDE? Realtime Interference DEtection
  25. WIDE? Wicked Interference DEtection (....)
  26. GUID!
  27. KID ! k-dop interference detection :)
  28. OPCODE! OPtimized COllision DEtection
  29. */
  30. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  31. // Precompiled Header
  32. #include "Stdafx.h"
  33. using namespace Opcode;
  34. static OPCODE_AbortHandler g_fnAbortHandler = NULL;
  35. bool Opcode::InitOpcode(OPCODE_AbortHandler fnAbortHandler/*=NULL*/)
  36. {
  37. //Log("// Initializing OPCODE\n\n");
  38. // LogAPIInfo();
  39. g_fnAbortHandler = fnAbortHandler;
  40. return true;
  41. }
  42. bool Opcode::CloseOpcode()
  43. {
  44. //Log("// Closing OPCODE\n\n");
  45. return true;
  46. }
  47. #ifdef ICE_MAIN
  48. void ModuleAttach(HINSTANCE hinstance)
  49. {
  50. }
  51. void ModuleDetach()
  52. {
  53. }
  54. #endif
  55. /*extern */
  56. void OPCODE_NORETURN IceAbort()
  57. {
  58. if (g_fnAbortHandler != NULL)
  59. {
  60. g_fnAbortHandler();
  61. }
  62. abort();
  63. }