CFTTTextureManager.cpp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #include "CFTTTextureManager.h"
  2. #include "CFTTGraphicsDevice.h"
  3. #include "CFTTTexLoadOptions.h"
  4. #include "memctrl.h"
  5. CFTTTextureManager *FTT_pTex = nullptr;
  6. int CFTTTextureManager::s_iDummyTextureRefCount;
  7. CFTTTexture *CFTTTextureManager::s_pDummyTextures[5];
  8. //-------------------------------------------------------------------------------------------------
  9. //00223464 //^_-
  10. CFTTTextureManager::CFTTTextureManager(int dCount) : Mutex_10(nullptr, EFTTProtocol_0) {
  11. LOGI("CFTTTextureManager::CFTTTextureManager Entry %d", dCount);
  12. }
  13. //-------------------------------------------------------------------------------------------------
  14. //002235EC
  15. CFTTTextureManager::~CFTTTextureManager() {
  16. }
  17. //-------------------------------------------------------------------------------------------------
  18. //00223688 //^_^
  19. void CFTTTextureManager::IncreaseReferenceCount(int dIndex) {
  20. LOGI("CFTTTextureManager::IncreaseReferenceCount End");
  21. }
  22. //-------------------------------------------------------------------------------------------------
  23. //002236B0
  24. void CFTTTextureManager::ReleaseAllTextures() {
  25. Mutex_10.Lock();
  26. Mutex_10.Unlock();
  27. }
  28. //-------------------------------------------------------------------------------------------------
  29. //00223704
  30. bool CFTTTextureManager::ReleaseTexture(CFTTTexture *pTexture) {
  31. return false;
  32. }
  33. //-------------------------------------------------------------------------------------------------
  34. //00223752 //^_^
  35. void CFTTTextureManager::ReleaseTexture(int dIndex) {
  36. LOGE("%x",this);
  37. LOGE("%x",dIndex);
  38. }
  39. //-------------------------------------------------------------------------------------------------
  40. //0022378A
  41. void CFTTTextureManager::ReleaseAllOtherTextures(CFTTTexture **ppTexture, int a2) {
  42. }
  43. //-------------------------------------------------------------------------------------------------
  44. //002237F0 //^_^
  45. int CFTTTextureManager::FindTexture(uint dHash, EFTTTextureType eType) const {
  46. return -1;
  47. }
  48. //-------------------------------------------------------------------------------------------------
  49. //00223822
  50. int CFTTTextureManager::GetTextureID(char const *pName) {
  51. return -1;
  52. }
  53. //-------------------------------------------------------------------------------------------------
  54. //00223852 //^_^
  55. int CFTTTextureManager::FindFreeTexIndex() {
  56. return 0;
  57. }
  58. //-------------------------------------------------------------------------------------------------
  59. //00223882 //^_- 经过单元测试,功能正常
  60. int CFTTTextureManager::LoadTexture(char const *pName,
  61. CFTTTexLoadOptions const &pTexLoadOptions) {
  62. LOGI("CFTTTextureManager::LoadTexture entry%x%x",pName,pTexLoadOptions);
  63. int dret = rand();
  64. return dret;
  65. }
  66. //-------------------------------------------------------------------------------------------------
  67. //002239A4 //^_^
  68. CFTTTexture *CFTTTextureManager::CreateTexture(char const *pName,
  69. CFTTTexLoadOptions const &pTexLoadOptions) {
  70. return CFTTTexture::LoadName(pName, pTexLoadOptions, true);
  71. }
  72. //-------------------------------------------------------------------------------------------------
  73. //002239B0
  74. int CFTTTextureManager::AddTexture(CFTTTexture *pTexture,
  75. EFTTTextureType eType,
  76. char const *pName,
  77. int *pDat,
  78. bool b) {
  79. return 0;
  80. }
  81. //-------------------------------------------------------------------------------------------------
  82. //00223A2C //^_^
  83. CFTTTexture *CFTTTextureManager::GetDummyTexture(EFTTDummyTexture eDummyTexture) {
  84. return s_pDummyTextures[eDummyTexture];
  85. }
  86. //-------------------------------------------------------------------------------------------------
  87. //00223A3C
  88. int CFTTTextureManager::GetTotalUseCount() {
  89. int dret = 0;
  90. return dret;
  91. }
  92. //-------------------------------------------------------------------------------------------------
  93. //00223A5E
  94. char *CFTTTextureManager::GetTextureName(int dIndex) {
  95. char *pRet = nullptr;
  96. return pRet;
  97. }
  98. //-------------------------------------------------------------------------------------------------