CFTTTexture.cpp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #include "CFTTTexture.h"
  2. #include "CFTTFileSystem.h"
  3. #include "FTT2D.h"
  4. #include "memctrl.h"
  5. TFTTTexture_FileHandler *CFTTTexture::ms_pFileHandlers;
  6. int dword_30B230[20] = {16, 16, 16, 32, 4, 8, 8, 24, 8, 16, 2, 2, 4, 4, 4, 32, 64, 128, 0, 0};
  7. //-------------------------------------------------------------------------------------------------
  8. //00221DE8 //^_^ 经过单元测试,功能正常
  9. int GetBPP(EFTTTexFormat eFormat) {
  10. int dret;
  11. return dret;
  12. }
  13. //-------------------------------------------------------------------------------------------------
  14. //00221FE4 ^_- 经过单元测试,功能正常
  15. int GetFullMipChainCount(int dWidth, int dHeight, EFTTTexFormat eFormat) {
  16. int dr0 = 1;
  17. return dr0;
  18. }
  19. //-------------------------------------------------------------------------------------------------
  20. //00222034 //^_^
  21. CFTTTexture::CFTTTexture() {
  22. }
  23. //-------------------------------------------------------------------------------------------------
  24. //00222070 0022208C //^_^
  25. CFTTTexture::~CFTTTexture() {
  26. FTT2D_OnTextureDeletion(this);
  27. }
  28. //-------------------------------------------------------------------------------------------------
  29. //00222090 static //^_^
  30. void CFTTTexture::AddFileHandler(TFTTTexture_FileHandler *pFileHandler) {
  31. // 005CB218 00222092
  32. }
  33. //-------------------------------------------------------------------------------------------------
  34. //002220CC static //^_-
  35. TFTTTexture_FileHandler *CFTTTexture::DetermineBestTextureFile(char const *pDat,
  36. char *pOut,
  37. int dOutLen) {
  38. LOGI("CFTTTexture::DetermineBestTextureFil");
  39. return nullptr;
  40. }
  41. //-------------------------------------------------------------------------------------------------
  42. // static
  43. //00222128 //^_- 经过单元测试,功能正常
  44. CFTTFile *CFTTTexture::OpenBestTextureFile(char const *pFileName, TFTTTexture_FileHandler **ppFileHandler) {
  45. LOGI("CFTTTexture::OpenBestTextureFile entry %s", pFileName);
  46. LOGI("CFTTTexture::OpenBestTextureFile end");
  47. return nullptr;
  48. }
  49. //-------------------------------------------------------------------------------------------------
  50. //002221EC static
  51. bool CFTTTexture::BufferCheckFormat(void const *pDat,
  52. int a2,
  53. TFTTTexture_FileHandler const **ppFileHandler) {
  54. bool bret = false;
  55. return bret;
  56. }
  57. //-------------------------------------------------------------------------------------------------
  58. //00222224 static
  59. bool CFTTTexture::FileIsValid(char const *pFileName) {
  60. bool bret = false;
  61. // loc_222272
  62. return bret;
  63. }
  64. //-------------------------------------------------------------------------------------------------
  65. //00222278 static
  66. bool CFTTTexture::FileExists(char const *pFileName, bool b) {
  67. bool bret = false;
  68. // loc_2222AC
  69. return bret;
  70. }
  71. //-------------------------------------------------------------------------------------------------
  72. //002222D4 //^_^
  73. CFTTTexture *CFTTTexture::LoadBuffer(void const *pDat,
  74. int dLen,
  75. CFTTTexLoadOptions const &pTexOpt,
  76. TFTTTexture_FileHandler const *pFileHandler) {
  77. CFTTTexture *pret = nullptr;
  78. return pret;
  79. }
  80. //-------------------------------------------------------------------------------------------------
  81. //00222324 //^_^
  82. CFTTTexture *CFTTTexture::LoadName(char const *pName0, CFTTTexLoadOptions const &pTexLoadOpt1, bool b2) {
  83. CFTTTexture *r7_pTexture = (CFTTTexture*)rand();
  84. LOGI("CFTTTexture::LoadName End%x%x%x",pName0,pTexLoadOpt1.field_15,b2);
  85. return r7_pTexture;
  86. }
  87. //-------------------------------------------------------------------------------------------------
  88. //002223F8
  89. bool CFTTTexture::SaveName(char const *, EFTTTextureSaveQuality, EFTTRendererType) {
  90. return false;
  91. }
  92. //-------------------------------------------------------------------------------------------------
  93. //00222474
  94. bool CFTTTexture::CanSaveName(char const *, int *, int *, char *, int) {
  95. return false;
  96. }
  97. //-------------------------------------------------------------------------------------------------
  98. //00222528
  99. void CFTTTexture::RenderSaveCube(char const *, bool, CFTTVector32x4) {
  100. }
  101. //-------------------------------------------------------------------------------------------------
  102. //00222860
  103. int CFTTTexture::SplitCube() {
  104. return 0;
  105. }
  106. //-------------------------------------------------------------------------------------------------
  107. //002228DC
  108. void CFTTTexture::SaveCube(char const *) {
  109. }
  110. //-------------------------------------------------------------------------------------------------
  111. //0022294C //^_^
  112. void CFTTTexture::ResetAllFlags(int a2) {
  113. if ((flag_24 ^ a2) << 30)
  114. a2 |= 0x20u;
  115. flag_24 = a2;
  116. }
  117. //-------------------------------------------------------------------------------------------------
  118. //0022295C //^_^
  119. void CFTTTexture::ApplyTexLoadOptions(CFTTTexLoadOptions const &pTexOpt) {
  120. }
  121. //-------------------------------------------------------------------------------------------------
  122. //00222994 //^_^
  123. void CFTTTexture::AddFlags(int a2) {
  124. }
  125. //-------------------------------------------------------------------------------------------------
  126. //002229AA //^_^
  127. void CFTTTexture::RemoveAlpha() {
  128. }
  129. //-------------------------------------------------------------------------------------------------