Mercurial > mm7
annotate StorylineTextTable.cpp @ 2477:fd99ee46b301
Fixing missing spell descriptions
author | Grumpy7 |
---|---|
date | Thu, 21 Aug 2014 23:27:15 +0200 |
parents | f4af3b203f65 |
children |
rev | line source |
---|---|
2415 | 1 #define _CRTDBG_MAP_ALLOC |
2 #include <stdlib.h> | |
3 #include <crtdbg.h> | |
4 | |
2253
aff7a7b072b7
adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents:
2153
diff
changeset
|
5 #define _CRT_SECURE_NO_WARNINGS |
233 | 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() | |
2283 | 18 { |
233 | 19 char* test_string; |
20 | |
2369
bddcaf5d5db2
removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents:
2283
diff
changeset
|
21 free(pHistoryTXT_Raw); |
237 | 22 pHistoryTXT_Raw = (char *)pEvents_LOD->LoadRaw("history.txt", 0); |
23 strtok(pHistoryTXT_Raw, "\r"); | |
24 | |
338 | 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; | |
2283 | 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 } | |
338 | 41 |
2283 | 42 } |