1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
--- src/userconfiguration.cpp.old 2008-08-27 20:11:29.000000000 +0200
+++ src/userconfiguration.cpp 2008-08-27 20:16:05.000000000 +0200
@@ -1055,7 +1055,7 @@
}
void UserConfiguration::replaceSpaces(string& s) {
- replace(s.begin(), s.end(), ' ', '_');
+ s.replace(s.begin(), s.end(), ' ', '_');
}
UserConfiguration::~UserConfiguration(){
--- src/tools/dfbooks.cpp.old 2008-08-28 20:59:56.000000000 +0200
+++ src/tools/dfbooks.cpp 2008-08-28 21:00:27.000000000 +0200
@@ -49,7 +49,7 @@
generalBooks.push_back(data[i]);
}
- std::ofstream fout( GetDataPath("%s/world/booksTEST"), std::ios::binary);
+ std::ofstream fout( GetDataPath("%s/world/booksTEST").c_str(), std::ios::binary);
fout << "# Random texts found in books and notes.\n#\n# Key:\n# B: Book Name, rareness"
<< "# M: Mission name (optional: from missions.txt)\n# T: multi-line text\n# \n\n"
--- src/tools/dfcreatures.cpp.old 2008-08-28 21:01:14.000000000 +0200
+++ src/tools/dfcreatures.cpp 2008-08-28 21:01:36.000000000 +0200
@@ -67,7 +67,7 @@
void DFCreatures::Save()
{
- std::ofstream fout( GetDataPath("%s/world/creaturesTEST"), std::ios::binary );
+ std::ofstream fout( GetDataPath("%s/world/creaturesTEST").c_str(), std::ios::binary );
fout << "# Creatures\n"
<< "# \n"
--- src/tools/dfgui.cpp.old 2008-08-28 21:02:13.000000000 +0200
+++ src/tools/dfgui.cpp 2008-08-28 21:02:31.000000000 +0200
@@ -167,7 +167,7 @@
void DFGui::Save()
{
- std::ofstream fout( GetDataPath("%s/world/guiTEST"), std::ios::binary);
+ std::ofstream fout( GetDataPath("%s/world/guiTEST").c_str(), std::ios::binary);
fout << "# gui themes key:\n# (non-existing textures will appear as pure color)"
<< "\n#\n# T:theme name\n# each row is either an \"element\" (like window background) or a \"color\" like a text color."
--- src/tools/dfmissions.cpp.old 2008-08-28 21:03:00.000000000 +0200
+++ src/tools/dfmissions.cpp 2008-08-28 21:03:13.000000000 +0200
@@ -124,7 +124,7 @@
else
generalMissions.push_back( *itr );
}
- std::ofstream fout( GetDataPath("%s/world/missionsTEST"), std::ios::binary);
+ std::ofstream fout( GetDataPath("%s/world/missionsTEST").c_str(), std::ios::binary);
fout << "##########################################################\n"
<< "# Templated missions\n# Key:\n# M:type,mission template name\n"
--- src/tools/dfskills.cpp.old 2008-08-28 21:03:48.000000000 +0200
+++ src/tools/dfskills.cpp 2008-08-28 21:04:01.000000000 +0200
@@ -44,7 +44,7 @@
void DFSkills::Save()
{
- std::ofstream fout( GetDataPath("%s/world/skillsTEST"), std::ios::binary);
+ std::ofstream fout( GetDataPath("%s/world/skillsTEST").c_str(), std::ios::binary);
/**
* Possible improvement: set out skills in class sections as already done in skills.txt
--- src/tools/dfspells.cpp.old 2008-08-28 21:04:28.000000000 +0200
+++ src/tools/dfspells.cpp 2008-08-28 21:04:40.000000000 +0200
@@ -111,7 +111,7 @@
void DFSpells::Save()
{
- std::ofstream fout( GetDataPath("%s/world/spellsTEST"), std::ios::binary );
+ std::ofstream fout( GetDataPath("%s/world/spellsTEST").c_str(), std::ios::binary );
fout << "#\n"
"# key: \n"
--- src/tools/dflocations.cpp.old 2008-08-28 21:05:14.000000000 +0200
+++ src/tools/dflocations.cpp 2008-08-28 21:05:27.000000000 +0200
@@ -28,7 +28,7 @@
void DFLocations::Save()
{
- std::ofstream fout( GetDataPath("%s/world/locationsTEST"), std::ios::binary);
+ std::ofstream fout( GetDataPath("%s/world/locationsTEST").c_str(), std::ios::binary);
fout << "# Locations of relevant places on the scourge map.\n"
<< "# Key:\n"
--- src/tools/dfrpg.cpp.old 2008-08-28 21:05:53.000000000 +0200
+++ src/tools/dfrpg.cpp 2008-08-28 21:06:10.000000000 +0200
@@ -150,7 +150,7 @@
void DFRpg::Save()
{
- std::ofstream fout( GetDataPath("%s/world/rpgTEST"), std::ios::binary );
+ std::ofstream fout( GetDataPath("%s/world/rpgTEST").c_str(), std::ios::binary );
fout << "# Key:\n"
<< "# G: group name, descriptive name\n"
--- src/tools/Makefile.am.old 2008-08-28 21:08:30.000000000 +0200
+++ src/tools/Makefile.am 2008-08-28 21:08:56.000000000 +0200
@@ -56,6 +56,8 @@
subpageitemtags.cpp\
subpageitemtags.h\
subpagenames.cpp\
- subpagenames.h
+ subpagenames.h\
+ ../util.cpp\
+ ../util.h
--- src/tools/main.cpp.old 2008-08-28 21:34:28.000000000 +0200
+++ src/tools/main.cpp 2008-08-28 21:35:03.000000000 +0200
@@ -96,28 +96,28 @@
bool MyApp::OnInit()
{
DFBooks *dfBooks = new DFBooks;
- dfBooks->Load( GetDataPath("%s/world/books.txt"), "B");
+ dfBooks->Load( GetDataPath("/world/books.txt"), "B");
DFMissions *dfMissions = new DFMissions;
- dfMissions->Load( GetDataPath("%s/world/missions.txt"), "MT");
+ dfMissions->Load( GetDataPath("/world/missions.txt"), "MT");
DFGui *dfGui = new DFGui;
- dfGui->Load( GetDataPath("%s/world/gui.txt"), "T");
+ dfGui->Load( GetDataPath("/world/gui.txt"), "T");
DFSkills *dfSkills = new DFSkills;
- dfSkills->Load( GetDataPath("%s/world/skills.txt"), "S");
+ dfSkills->Load( GetDataPath("/world/skills.txt"), "S");
DFSpells *dfSpells = new DFSpells;
- dfSpells->Load( GetDataPath("%s/world/spells.txt"), "S");
+ dfSpells->Load( GetDataPath("/world/spells.txt"), "S");
DFCreatures *dfCreatures = new DFCreatures;
- dfCreatures->Load( GetDataPath("%s/world/creatures.txt"), "M");
+ dfCreatures->Load( GetDataPath("/world/creatures.txt"), "M");
DFLocations *dfLocations = new DFLocations;
- dfLocations->Load( GetDataPath("%s/world/locations.txt"), "L");
+ dfLocations->Load( GetDataPath("/world/locations.txt"), "L");
DFRpg *dfRpg = new DFRpg;
- dfRpg->Load( GetDataPath("%s/world/rpg.txt"), "GTF");
+ dfRpg->Load( GetDataPath("/world/rpg.txt"), "GTF");
g_DFList["Books"] = dfBooks;
|