Team Fortress 2 Source Code as on 22/4/2020
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.

112 lines
3.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef STEAMPS3PARAMS_H
  7. #define STEAMPS3PARAMS_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. //----------------------------------------------------------------------------------------------------------------------------------------------------------//
  12. // PlayStation 3 initialization parameters
  13. //
  14. // The following structure must be passed to when loading steam_api_ps3.prx
  15. //----------------------------------------------------------------------------------------------------------------------------------------------------------//
  16. #define STEAM_PS3_PATH_MAX 1055
  17. #define STEAM_PS3_SERVICE_ID_MAX 32
  18. #define STEAM_PS3_COMMUNICATION_ID_MAX 10
  19. #define STEAM_PS3_COMMUNICATION_SIG_MAX 160
  20. #define STEAM_PS3_LANGUAGE_MAX 64
  21. #define STEAM_PS3_REGION_CODE_MAX 16
  22. #define STEAM_PS3_CURRENT_PARAMS_VER 2
  23. struct SteamPS3Params_t
  24. {
  25. uint32 m_unVersion; // set to STEAM_PS3_CURRENT_PARAMS_VER
  26. void *pReserved;
  27. uint32 m_nAppId; // set to your game's appid
  28. char m_rgchInstallationPath[ STEAM_PS3_PATH_MAX ]; // directory containing latest steam prx's and sdata. Can be read only (BDVD)
  29. char m_rgchSystemCache[ STEAM_PS3_PATH_MAX ]; // temp working cache, not persistent
  30. char m_rgchGameData[ STEAM_PS3_PATH_MAX ]; // persistent game data path for storing user data
  31. char m_rgchNpServiceID[ STEAM_PS3_SERVICE_ID_MAX ];
  32. char m_rgchNpCommunicationID[ STEAM_PS3_COMMUNICATION_ID_MAX ];
  33. char m_rgchNpCommunicationSig[ STEAM_PS3_COMMUNICATION_SIG_MAX ];
  34. // Language should be one of the following. must be zero terminated
  35. // danish
  36. // dutch
  37. // english
  38. // finnish
  39. // french
  40. // german
  41. // italian
  42. // korean
  43. // norwegian
  44. // polish
  45. // portuguese
  46. // russian
  47. // schinese
  48. // spanish
  49. // swedish
  50. // tchinese
  51. char m_rgchSteamLanguage[ STEAM_PS3_LANGUAGE_MAX ];
  52. // region codes are "SCEA", "SCEE", "SCEJ". must be zero terminated
  53. char m_rgchRegionCode[ STEAM_PS3_REGION_CODE_MAX ];
  54. // Should be SYS_TTYP3 through SYS_TTYP10, if it's 0 then Steam won't spawn a
  55. // thread to read console input at all. Using this let's you use Steam console commands
  56. // like: profile_on, profile_off, profile_dump, mem_stats, mem_validate.
  57. unsigned int m_cSteamInputTTY;
  58. struct Ps3netInit_t
  59. {
  60. bool m_bNeedInit;
  61. void *m_pMemory;
  62. int m_nMemorySize;
  63. int m_flags;
  64. } m_sysNetInitInfo;
  65. struct Ps3jpgInit_t
  66. {
  67. bool m_bNeedInit;
  68. } m_sysJpgInitInfo;
  69. struct Ps3pngInit_t
  70. {
  71. bool m_bNeedInit;
  72. } m_sysPngInitInfo;
  73. struct Ps3sysutilUserInfo_t
  74. {
  75. bool m_bNeedInit;
  76. } m_sysSysUtilUserInfo;
  77. bool m_bIncludeNewsPage;
  78. };
  79. //----------------------------------------------------------------------------------------------------------------------------------------------------------//
  80. // PlayStation 3 memory structure
  81. //----------------------------------------------------------------------------------------------------------------------------------------------------------//
  82. #define STEAMPS3_MALLOC_INUSE 0x53D04A51
  83. #define STEAMPS3_MALLOC_SYSTEM 0x0D102C48
  84. #define STEAMPS3_MALLOC_OK 0xFFD04A51
  85. struct SteamPS3Memory_t
  86. {
  87. bool m_bSingleAllocation; // If true, Steam will request one 6MB allocation and use the returned memory for all future allocations
  88. // If false, Steam will make call malloc for each allocation
  89. // required function pointers
  90. void* (*m_pfMalloc)(size_t);
  91. void* (*m_pfRealloc)(void *, size_t);
  92. void (*m_pfFree)(void *);
  93. size_t (*m_pUsable_size)(void*);
  94. };
  95. #endif // STEAMPS3PARAMS_H