| 132 | return LSOK; |
| 133 | } |
| 134 | |
| 135 | bool DisplayArcadeMap::LoadTemplates(const char* filename) |
| 136 | { |
| 137 | QIFStreamB test; |
| 138 | test.AutoOpen(filename); |
| 139 | if (test.get() == 0) |
| 140 | { |
| 141 | // binary file |
| 142 | return false; |
| 143 | } |
| 144 | |
| 145 | ParamArchiveLoad ar(filename); |
| 146 | LSError result = SerializeAll(ar); |
| 147 | if (result != LSOK) |
| 148 | { |
| 149 | if (result == LSNoAddOn) |
| 150 | { |
| 151 | RString message = LocalizeString(IDS_MSG_ADDON_MISSING); |
| 152 | bool first = true; |
| 153 | for (int i = 0; i < _templateMission.missingAddOns.Size(); i++) |
| 154 | { |
| 155 | if (first) |
| 156 | { |
| 157 | first = false; |
| 158 | } |
| 159 | else |
| 160 | { |
| 161 | message = message + RString(", "); |
| 162 | } |
| 163 | message = message + _templateMission.missingAddOns[i]; |
| 164 | } |
| 165 | for (int i = 0; i < _templateIntro.missingAddOns.Size(); i++) |
| 166 | { |
| 167 | if (first) |
| 168 | { |
| 169 | first = false; |
| 170 | } |
| 171 | else |
| 172 | { |
| 173 | message = message + RString(", "); |
| 174 | } |
| 175 | message = message + _templateIntro.missingAddOns[i]; |
| 176 | } |
| 177 | for (int i = 0; i < _templateOutroWin.missingAddOns.Size(); i++) |
| 178 | { |
| 179 | if (first) |
| 180 | { |
| 181 | first = false; |
| 182 | } |
| 183 | else |
| 184 | { |
| 185 | message = message + RString(", "); |
| 186 | } |
| 187 | message = message + _templateOutroWin.missingAddOns[i]; |
| 188 | } |
| 189 | for (int i = 0; i < _templateOutroLoose.missingAddOns.Size(); i++) |
| 190 | { |
| 191 | if (first) |
nothing calls this directly
no test coverage detected