Mercurial > mm7
diff Engine/Tables/StorylineTextTable.cpp @ 2499:68cdef6879a0
engine folder
author | Ritor1 |
---|---|
date | Fri, 19 Sep 2014 02:57:42 +0600 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Engine/Tables/StorylineTextTable.cpp Fri Sep 19 02:57:42 2014 +0600 @@ -0,0 +1,42 @@ +#define _CRTDBG_MAP_ALLOC +#include <stdlib.h> +#include <crtdbg.h> + +#define _CRT_SECURE_NO_WARNINGS +#include <stdlib.h> +#include <string.h> + +#include "../LOD.h" +#include "../texts.h" +#include "StorylineTextTable.h" + +char *pHistoryTXT_Raw; +struct StorylineText *pStorylineText; + +//----- (00453E6D) -------------------------------------------------------- +void StorylineText::Initialize() +{ + char* test_string; + + free(pHistoryTXT_Raw); + pHistoryTXT_Raw = (char *)pEvents_LOD->LoadRaw("history.txt", 0); + strtok(pHistoryTXT_Raw, "\r"); + + StoreLine[0].pText=nullptr; + StoreLine[0].pPageTitle=nullptr; + StoreLine[0].uTime=0; + StoreLine[0].f_9=0; + StoreLine[0].f_A=0; + StoreLine[0].f_B=0; + + for (int i=0;i<28;++i) + { + test_string = strtok(NULL, "\r") + 1; + auto tokens = Tokenize(test_string, '\t'); + + StoreLine[i+1].pText = RemoveQuotes(tokens[1]); + StoreLine[i+1].uTime = atoi(tokens[2]); //strange but in text here string not digit + StoreLine[i+1].pPageTitle = RemoveQuotes(tokens[3]); + } + +} \ No newline at end of file