Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.8 KiB

  1. //========= Copyright � 1996-2005, Valve LLC, All rights reserved. ============
  2. //
  3. // Purpose: Common XBox Launch data passed between apps
  4. //
  5. //=============================================================================
  6. #include "ps3_platform.h"
  7. #define RELAUNCH_MAGIC_NUMBER 0xbd122969
  8. // used to hold persistent states across restart
  9. struct RelaunchHeader_t
  10. {
  11. unsigned int magicNumber;
  12. unsigned int contextCode; // the context code that was used
  13. unsigned int nBytesRelaunchData;
  14. unsigned int activeDevice; // which controller was active
  15. __int64 startTime; // used to track duration of relaunch
  16. bool bRetail; // running as retail mode
  17. bool bInDebugger; // in debug session
  18. };
  19. #pragma pack()
  20. #define GetRelaunchHeader( x ) (((RelaunchHeader_t *)(((unsigned int)(x)) + MAX_LAUNCH_DATA_SIZE / 2)) - 1)
  21. // a context code is passed to installer or dashboard
  22. // the dashboard passes the context code to the installer
  23. // installer exits and launches HL2 with RelaunchHeader
  24. #define CONTEXTCODE_HL2MAGIC 0x9E000000
  25. #define CONTEXTCODE_MAGICMASK 0xFF000000
  26. // xbe image type
  27. #define CONTEXTCODE_DEBUG_XBE 0x00000001 // running the debug xbe
  28. #define CONTEXTCODE_RELEASE_XBE 0x00000002 // running the release xbe
  29. #define CONTEXTCODE_RETAIL_XBE 0x00000004 // running the retail xbe
  30. // mode options
  31. #define CONTEXTCODE_RETAIL_MODE 0x00000010 // running the desired xbe in retail mode
  32. #define CONTEXTCODE_INDEBUGGER 0x00000020 // running during a debugger session
  33. #define CONTEXTCODE_NO_XBDM 0x00000040 // No XBDM calls
  34. // operation commands
  35. #define CONTEXTCODE_DASHBOARD 0x00010000 // pass through immediately to hl2
  36. #define CONTEXTCODE_ATTRACT 0x00020000 // run the attract mode
  37. #define CONTEXTCODE_LOADMAP 0x00040000 // restart directly to load a map
  38. #define CONTEXTCODE_QUIT 0x00080000 // quit game, go directly to main menu