Mercurial > mm7
comparison Engine/Tables/StorylineTextTable.cpp @ 2499:68cdef6879a0
engine folder
author | Ritor1 |
---|---|
date | Fri, 19 Sep 2014 02:57:42 +0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2498:92eeeb5200f2 | 2499:68cdef6879a0 |
---|---|
1 #define _CRTDBG_MAP_ALLOC | |
2 #include <stdlib.h> | |
3 #include <crtdbg.h> | |
4 | |
5 #define _CRT_SECURE_NO_WARNINGS | |
6 #include <stdlib.h> | |
7 #include <string.h> | |
8 | |
9 #include "../LOD.h" | |
10 #include "../texts.h" | |
11 #include "StorylineTextTable.h" | |
12 | |
13 char *pHistoryTXT_Raw; | |
14 struct StorylineText *pStorylineText; | |
15 | |
16 //----- (00453E6D) -------------------------------------------------------- | |
17 void StorylineText::Initialize() | |
18 { | |
19 char* test_string; | |
20 | |
21 free(pHistoryTXT_Raw); | |
22 pHistoryTXT_Raw = (char *)pEvents_LOD->LoadRaw("history.txt", 0); | |
23 strtok(pHistoryTXT_Raw, "\r"); | |
24 | |
25 StoreLine[0].pText=nullptr; | |
26 StoreLine[0].pPageTitle=nullptr; | |
27 StoreLine[0].uTime=0; | |
28 StoreLine[0].f_9=0; | |
29 StoreLine[0].f_A=0; | |
30 StoreLine[0].f_B=0; | |
31 | |
32 for (int i=0;i<28;++i) | |
33 { | |
34 test_string = strtok(NULL, "\r") + 1; | |
35 auto tokens = Tokenize(test_string, '\t'); | |
36 | |
37 StoreLine[i+1].pText = RemoveQuotes(tokens[1]); | |
38 StoreLine[i+1].uTime = atoi(tokens[2]); //strange but in text here string not digit | |
39 StoreLine[i+1].pPageTitle = RemoveQuotes(tokens[3]); | |
40 } | |
41 | |
42 } |