* Read a single string from the savegame. * @param ls The state for loading this save game. * @param index The index of the loaded custom string. * @return Always true. */
| 1397 | * @return Always true. |
| 1398 | */ |
| 1399 | bool LoadOldCustomString(LoadgameState &ls, int index) |
| 1400 | { |
| 1401 | /* |
| 1402 | * Data is stored in fixed size "cells"; read these completely. |
| 1403 | * Validation and conversion to UTF-8 are happening at a later stage. |
| 1404 | */ |
| 1405 | std::string &str = _old_name_array[index]; |
| 1406 | str.resize(_savegame_type == SGT_TTO ? 24 : 32); |
| 1407 | for (auto &c : str) c = ReadByte(ls); |
| 1408 | |
| 1409 | return true; |
| 1410 | } |
| 1411 | |
| 1412 | static const OldChunks sign_chunk[] = { |
| 1413 | OCL_VAR ( OC_UINT16, 1, &_old_string_id ), |