GFXSCENE.cpp 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #include "GFXSCENE.h"
  2. #include "CLegacyLitShader.h"
  3. #include "CMatchSetup.h"
  4. #include "CGfxEnv.h"
  5. #include "Matrix.h"
  6. CFTTVector32 GFXSCENE_vLightDir; //004613D8
  7. MYSTATIC int gs_i_3A4144;
  8. //------------------------------------------------------------------------------------------------
  9. //0018BF4C
  10. void GFXSCENE_Init() {
  11. //empty
  12. }
  13. //------------------------------------------------------------------------------------------------
  14. //0018BF50
  15. void GFXSCENE_Shutdown() {
  16. //没有调用到
  17. }
  18. //------------------------------------------------------------------------------------------------
  19. //0018BF84
  20. void GFXSCENE_Apply(CLightingLUTSceneSettings const* plightingLUTSceneSettings0) {
  21. //LOGE("GFXSCENE_Apply");
  22. LOGE("GFXSCENE_Apply=%x",plightingLUTSceneSettings0);
  23. //loc_18C0F6
  24. return;
  25. }
  26. //------------------------------------------------------------------------------------------------
  27. //0018c19c ^_^ resetgame到 加载Hero场景没问题
  28. void GFXSCENE_CheckLUTs(ELightingLUTMat emat0) {
  29. //LOGI("GFXSCENE_CheckLUTs entry %d", emat0);
  30. //LOGE("GFXSCENE_CheckLUTs");
  31. //0018C19C
  32. if (gs_plightingLUTState_46121C[emat0].pTexture_0) {
  33. if (gs_plightingLUTState_46121C[emat0].Matches(emat0))
  34. return;
  35. //loc_18C1BC
  36. if (gs_plightingLUTState_46121C[emat0].pTexture_0) {
  37. // LOGE("GFXSCENE_CheckLUTs");
  38. delete gs_plightingLUTState_46121C[emat0].pTexture_0;
  39. }
  40. gs_plightingLUTState_46121C[emat0].pTexture_0 = 0;
  41. //loc_18C1C6
  42. if (gs_plightingLUTState_46121C[emat0].pTexture_4)
  43. delete gs_plightingLUTState_46121C[emat0].pTexture_4;
  44. gs_plightingLUTState_46121C[emat0].pTexture_4 = 0;
  45. }
  46. //LOGI("GFXSCENE_CheckLUTs loc_18C1DE");
  47. //loc_18C1DE
  48. memcpy(&gs_plightingLUTState_46121C[emat0].tSetting_8, pLUTSceneSettings_33F448, sizeof(CLightingLUTSceneSettings));
  49. gs_plightingLUTState_46121C[emat0].Generate(emat0);
  50. //LOGI("GFXSCENE_CheckLUTs end");
  51. }
  52. //------------------------------------------------------------------------------------------------
  53. //0018c8d8 ^_^ resetgame 到没问题
  54. CFTTTexture* GFXSCENE_GetDiffRimLUT(ELightingLUTMat emat0) {
  55. //LOGE("GFXSCENE_GetDiffRimLUT");
  56. GFXSCENE_CheckLUTs(emat0);
  57. return NULL;
  58. }
  59. //------------------------------------------------------------------------------------------------
  60. //0018c8f0 ^_^ resetgame到没问题
  61. CFTTTexture* GFXSCENE_GetSpecularLUT(ELightingLUTMat emat0) {
  62. //LOGE("GFXSCENE_GetSpecularLUT");
  63. return 0;
  64. }
  65. //------------------------------------------------------------------------------------------------
  66. //0018c90c ^_^ 测试玩俩关
  67. CFTTVector32 GFXSCENE_GetLightDirConst() {
  68. //LOGE("GFXSCENE_GetLightDirConst");
  69. //loc_18C926
  70. return GFXSCENE_vLightDir;
  71. }
  72. //------------------------------------------------------------------------------------------------