CFEImages.cpp 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #include "CFEImages.h"
  2. #include "CFTTTexLoadOptions.h"
  3. #include "SYSCORE.h"
  4. #include "CFTTTextureCache.h"
  5. #include "CGraphicsTexLoadOptions.h"
  6. #include "str_conv.h"
  7. #include "memctrl.h"
  8. uchar CFEImages::s_tLoadScreenTextures[1088];
  9. CFEImages *CFEImages::s_pInst = nullptr;
  10. bool CFEImages::s_bScaleLoadedTexture;
  11. //-------------------------------------------------------------------------------------------------
  12. struct AtlasFileType {
  13. const char *pFile;
  14. int dType;
  15. };
  16. //-------------------------------------------------------------------------------------------------
  17. AtlasFileType list_322C28[] = {
  18. {"Data/FE/UI/common.atlas", 1},
  19. {"Data/env/adimages/adimages.atlas", 0},
  20. {"Data/FE/hud/hud.atlas", 0},
  21. {"Data/FE/hero/hero.atlas", 0},
  22. {"Data/FE/customise/customise.atlas", 0},
  23. {"Data/FE/flags/flags.atlas", 0},
  24. {"Data/FE/keyboard/keyboard.atlas", 0},
  25. };
  26. //-------------------------------------------------------------------------------------------------
  27. //0014C6F8 //^_^
  28. CFEImages::CFEImages() {
  29. }
  30. //-------------------------------------------------------------------------------------------------
  31. //0014C734 //^_^
  32. CFEImages::~CFEImages() {
  33. // empty
  34. }
  35. //-------------------------------------------------------------------------------------------------
  36. //0014C71C //^_^
  37. void CFEImages::ClearCache() {
  38. }
  39. //-------------------------------------------------------------------------------------------------
  40. //0014C738 //^_^
  41. void CFEImages::Free() {
  42. }
  43. //-------------------------------------------------------------------------------------------------
  44. //0014C758
  45. void CFEImages::FreeAtlases() {
  46. }
  47. //-------------------------------------------------------------------------------------------------
  48. //0014C7D0 //^_^ 经过单元测试,功能正常
  49. CFEImages *CFEImages::GetInstance() {
  50. // loc_14C800
  51. return s_pInst;
  52. }
  53. //-------------------------------------------------------------------------------------------------
  54. //0014C80C ^_- 经过单元测试,功能正常 有栈保护
  55. // CFEImages::GetTexture("PKG:/Data/fe/mag/magbg_1.jpg", a3, eFormat, a5, a6, a7);
  56. // FETU_GetImage(&image, "PKG:/Data/fe/splash/ftg_logo.ftc", false, EFTTTexFormat_19, false, false, true);
  57. CFTTTexture *CFEImages::GetTexture(char const *pFileName,
  58. bool b,
  59. EFTTTexFormat e,
  60. bool b1,
  61. bool b2,
  62. bool b3) {
  63. // loc_14C8BE
  64. //00222D20 CFTTTextureCache::GetTexture(char const*,CFTTTexLoadOptions const&,uint)
  65. return nullptr;
  66. }
  67. //-------------------------------------------------------------------------------------------------
  68. //0014C8E8
  69. void CFEImages::HighToLowResProcess(CFTTTexture **) {
  70. //没有调用到
  71. LOGI("CFEImages::HighToLowResProcess: Entry");
  72. }
  73. //-------------------------------------------------------------------------------------------------
  74. //0014CC84
  75. void CFEImages::CacheFree() {
  76. //没有调用到
  77. LOGI("CFEImages::CacheFree: Entry");
  78. }
  79. //-------------------------------------------------------------------------------------------------
  80. //0014CCBC -_- 经过单元测试,功能正常
  81. void CFEImages::LoadAtlasData() {
  82. }
  83. //-------------------------------------------------------------------------------------------------
  84. //0014CE24 //^_^ 经过单元测试,功能正常
  85. void CFEImages::ReorderAtlases() {
  86. // locret_14CE5C
  87. }
  88. //-------------------------------------------------------------------------------------------------
  89. //0014CE5E
  90. void CFEImages::SwapAtlasPositions(ushort a1, ushort a2) {
  91. }
  92. //-------------------------------------------------------------------------------------------------
  93. //0014CE9A //^_- 经过单元测试,功能正常
  94. void CFEImages::FreeAtlasCache(bool b) {
  95. }
  96. //-------------------------------------------------------------------------------------------------
  97. //0014CEEE
  98. void CFEImages::FreeAtlasCacheByTimestamp() {
  99. //没有调用到
  100. }
  101. //-------------------------------------------------------------------------------------------------
  102. //0014CF60 //^_- 经过单元测试,功能正常
  103. //有栈保护, 单元测试已跑过所有分支
  104. bool CFEImages::FindAndOpenAtlas(TAtlasData *pAtlasData, char const *pName) {
  105. return false;
  106. }
  107. //-------------------------------------------------------------------------------------------------