CStoryCore.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. // CStoryCore - [2020-04-13 11:57:47]
  2. #ifndef _CSTORYCORE_H_
  3. #define _CSTORYCORE_H_
  4. #include "TStageOperation.h"
  5. #include "CLoadingScreen.h"
  6. #include "CDataBase.h"
  7. #include "CPlayer.h"
  8. #include "CStageManager.h"
  9. #include "CSideStoryProfile.h"
  10. #include "CStoryProfile.h"
  11. #include "TPlayerInfoLight.h"
  12. #include "TStorySeason.h"
  13. #include "TStoryConfig.h"
  14. #include "CMyProfile.h"
  15. /*
  16. 0017622C CStoryCore::GetMinutes()
  17. 001E1B78 CStoryCore::Init()
  18. 001E1BA4 CStoryCore::SetupStage(int)
  19. 001E1CDC CStoryCore::GetClubTeam()
  20. 001E1CEC CStoryCore::GetNationalTeam()
  21. 001E1CFC CStoryCore::GetSeason()
  22. 001E1D30 CStoryCore::GetStageIndex()
  23. 001E1D64 CStoryCore::SetupStageX(char const*,int)
  24. 001E1D78 CStoryCore::SetupStageX(TStoryStage *)
  25. 001E1D88 CStoryCore::SetupSingleNIS(TStageOperation *)
  26. 001E1D9C CStoryCore::SetupSingleNIS(char const*,int,int)
  27. 001E1DBC CStoryCore::AddNISCommentary(int)
  28. 001E1DCC CStoryCore::SetupAndEnterGame(ELoadingScreen,bool,bool)
  29. 001E1DF8 CStoryCore::PlayStage(bool,bool)
  30. 001E1E08 CStoryCore::EnterGame(ELoadingScreen,bool)
  31. 001E1E1C CStoryCore::Process()
  32. 001E1E2C CStoryCore::RenderHUD()
  33. 001E1E3C CStoryCore::GetOppoTeam(int,int,int,int,TTeamInfo *)
  34. 001E1E8C CStoryCore::SetupNextStage()
  35. 001E1EC0 CStoryCore::LoadConfigForPromoLanguages()
  36. 001E1EEC CStoryCore::GetCorrectConfig(bool)
  37. 001E1FFC CStoryCore::LoadConfigForTimeAndRepeatNotifications()
  38. 001E2028 CStoryCore::FindLatestRepeatNotifications(long &)
  39. 001E2058 CStoryCore::FindLatestTimeNotifications(long &)
  40. 001E2088 CStoryCore::DownloadConfig()
  41. 001E20B4 CStoryCore::LoadConfig(bool)
  42. 001E2100 CStoryCore::LoadAdvertsFromConfig()
  43. 001E213C CStoryCore::LoadStages()
  44. 001E21D0 CStoryCore::OnFreeGameAssets()
  45. 001E2208 CStoryCore::GetPlayerInitialised()
  46. 001E2218 CStoryCore::GetStageInfo(int)
  47. 001E226C CStoryCore::GetTodaysDate(wchar_t *,int)
  48. 001E229C CStoryCore::GetTrophyModelName()
  49. 001E231C CStoryCore::UpdateEnvironment()
  50. 001E242C CStoryCore::RandomiseSunPos()
  51. 001E2520 CStoryCore::ProcessText(wchar_t *,int,wchar_t const*,int)
  52. 001E2798 CStoryCore::GetStageClubTeam(int)
  53. 001E27C8 CStoryCore::GetStageTeam(int)
  54. 001E2870 CStoryCore::CheckStageVersions()
  55. 001E2A40 CStoryCore::GetStageSeason(int)
  56. 001E2A98 CStoryCore::GetAreGoldenBootsEnabled()
  57. 001E2A9C CStoryCore::AttemptSideStoryEntry()
  58. 001E2B20 CStoryCore::EnterSideStory()
  59. 001E2BA4 CStoryCore::STORY_GetSeason(int)
  60. 001E2BC8 CStoryCore::GetConfigSeasonWithID(int)
  61. 001E2C04 CStoryCore::PromotionCB(int,void *)
  62. 001E2C1C CStoryCore::ShowPromotion(int,bool,bool,EPromoTriggerType,int,int,bool)
  63. 001E3124 CStoryCore::CalculateCurrentStageID()
  64. 001E31D8 CStoryCore::CountNumValidPromos()
  65. 001E3208 CStoryCore::IsPromoValid(TPromo const*,bool)
  66. 001E33D4 CStoryCore::FindValidPromo(int,bool)
  67. 001E3418 CStoryCore::SetSeason(int)
  68. 001E3448 CStoryCore::GetStageUnlockTime(int,int)
  69. 001E34A6 CStoryCore::GetStageUnlockTime(int)
  70. 001E34FC CStoryCore::GetShirtNumber()
  71. 001E3530 CStoryCore::SetStageStars(int,int)
  72. 001E3570 CStoryCore::SetStageComplete(int,int)
  73. 001E35CC CStoryCore::SetLastPlayedStageID(int)
  74. 001E35F4 CStoryCore::GetProfileStages()
  75. 001E3620 CStoryCore::ApplyUserPlayer(TPlayerInfo *)
  76. 001E3650 CStoryCore::GetTimeString(long,wchar_t *,bool)
  77. 001E3798 CStoryCore::GetTimeFromString(char *,int)
  78. 001E37BC CStoryCore::IncrementSessionStagesComplete(bool)
  79. 001E1E1C CStoryCore::Process() //game loop 0015A6F0
  80. */
  81. //---------------------------------------------------------------------------------------------------------
  82. enum EPromoTriggerType {
  83. EPromoTriggerType_Neg = -1,
  84. EPromoTriggerType_0,
  85. EPromoTriggerType_1,
  86. EPromoTriggerType_2,
  87. EPromoTriggerType_3,
  88. EPromoTriggerType_4,
  89. EPromoTriggerType_5,
  90. EPromoTriggerType_6,
  91. EPromoTriggerType_7,
  92. };
  93. //---------------------------------------------------------------------------------------------------------
  94. struct TCStoryCoreActiveStory {
  95. TStorySeason *field_0; // 00
  96. int *field_4; // 04
  97. bool *AreGettingMoreStars; // 08
  98. ushort *NationalTeam; // 0C
  99. ushort *pClubTeam; // 10:这里是ushort* 2022.1.23(SJ)
  100. PolaroidDate *field_14; // 14
  101. bool *pIsInitialised; // 18
  102. TPlayerInfoLight *field_1C; // 1C
  103. wchar_t *PlayerName; // 20
  104. };
  105. struct TStoryStages {
  106. bool field_0;
  107. int Version_4;
  108. int dCount_8; //下面这个结构的数据长度
  109. TStorySeason *list_C; //not sidestoryseason
  110. int field_10; //下面这个结构的数据长度 sidestoryseason len
  111. TStorySeason *field_14;//sidestoryseason
  112. int field_18;
  113. int i_1C;
  114. };
  115. class CFTTXmlReader;
  116. //---------------------------------------------------------------------------------------------------------
  117. class CStoryCore {
  118. public:
  119. static int GetMinutes(); // 0017622C
  120. static void Init(); // 001E1B78
  121. static int SetupStage(int); // 001E1BA4
  122. static ushort GetClubTeam(); // 001E1CDC
  123. static ushort GetNationalTeam(); // 001E1CEC
  124. static ushort GetSeason(); // 001E1CFC
  125. static ushort GetStageIndex(); // 001E1D30
  126. static void SetupStageX(char const *, int); // 001E1D64
  127. static void SetupStageX(TStoryStage *); // 001E1D78
  128. static void SetupSingleNIS(TStageOperation *); // 001E1D88
  129. static void SetupSingleNIS(char const *, int, int); // 001E1D9C
  130. static void AddNISCommentary(int); // 001E1DBC
  131. static void SetupAndEnterGame(ELoadingScreen, bool, bool); // 001E1DCC
  132. static void PlayStage(bool, bool); // 001E1DF8
  133. static void EnterGame(ELoadingScreen, bool); // 001E1E08
  134. static void Process(); // 001E1E1C
  135. static void RenderHUD(); // 001E1E2C
  136. static void GetOppoTeam(int, int, int, int, TTeamInfo *); // 001E1E3C
  137. static void SetupNextStage(); // 001E1E8C
  138. static void LoadConfigForPromoLanguages(); // 001E1EC0
  139. static CFTTXmlReader *GetCorrectConfig(bool); // 001E1EEC
  140. static void LoadConfigForTimeAndRepeatNotifications(); // 001E1FFC
  141. static void FindLatestRepeatNotifications(long &); // 001E2028
  142. static void FindLatestTimeNotifications(long &); // 001E2058
  143. bool DownloadConfig(); // 001E2088
  144. static void LoadConfig(bool); // 001E20B4
  145. void LoadAdvertsFromConfig(); // 001E2100
  146. static bool LoadStages(); // 001E213C
  147. static void OnFreeGameAssets(); // 001E21D0
  148. bool GetPlayerInitialised(); // 001E2208
  149. static TStage *GetStageInfo(int); // 001E2218
  150. static void GetTodaysDate(wchar_t *, int); // 001E226C
  151. static const char *GetTrophyModelName(); // 001E229C
  152. static void UpdateEnvironment(); // 001E231C
  153. void RandomiseSunPos(); // 001E242C
  154. static void ProcessText(wchar_t *, int, wchar_t const *, int); // 001E2520
  155. static ushort GetStageClubTeam(int); // 001E2798
  156. static ushort GetStageTeam(int); // 001E27C8
  157. void CheckStageVersions(); // 001E2870
  158. static TStorySeason *GetStageSeason(int); // 001E2A40
  159. static int GetAreGoldenBootsEnabled(); // 001E2A98
  160. static bool AttemptSideStoryEntry(); // 001E2A9C
  161. static int EnterSideStory(); // 001E2B20
  162. static TStorySeason *STORY_GetSeason(int); // 001E2BA4
  163. static TStorySeason *GetConfigSeasonWithID(int); // 001E2BC8
  164. static void PromotionCB(int, void *); // 001E2C04
  165. static int ShowPromotion(int, bool, bool, EPromoTriggerType, int, int, bool); // 001E2C1C
  166. static int CalculateCurrentStageID(); // 001E3124
  167. int CountNumValidPromos(); // 001E31D8
  168. static int IsPromoValid(TPromo const *, bool); // 001E3208
  169. static TPromo *FindValidPromo(int, bool); // 001E33D4
  170. static void SetSeason(int); // 001E3418
  171. static int GetStageUnlockTime(int, int); // 001E3448
  172. static int GetStageUnlockTime(int); // 001E34A6
  173. static uchar GetShirtNumber(); // 001E34FC
  174. static void SetStageStars(int, int); // 001E3530
  175. static void SetStageComplete(int, int); // 001E3570
  176. static void SetLastPlayedStageID(int); // 001E35CC
  177. CStoryProfileStages *GetProfileStages(); // 001E35F4
  178. static void ApplyUserPlayer(TPlayerInfo *); // 001E3620
  179. static int GetTimeString(long, wchar_t *, bool); // 001E3650
  180. static time_t GetTimeFromString(char *, int); // 001E3798
  181. static void IncrementSessionStagesComplete(bool); // 001E37BC
  182. static CStageManager m_tStageManager;
  183. static TCStoryCoreActiveStory m_tActiveStory;
  184. static CSideStoryProfile m_cSideProfile;
  185. static CStoryProfile m_cProfile;
  186. static TStoryStages m_tStages;
  187. static int m_iEnvironmentSignature;
  188. static int ms_iSessionStagesCompleted;
  189. CFTTVector32 fvec_00; // 00
  190. };
  191. //---------------------------------------------------------------------------------------------------------
  192. #endif //_CSTORYCORE_H_