MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / LoadOldSign

Function LoadOldSign

src/saveload/oldloader_sl.cpp:1423–1440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1421};
1422
1423static bool LoadOldSign(LoadgameState &ls, int num)
1424{
1425 Sign *si = new (SignID(num)) Sign();
1426 if (!LoadChunk(ls, si, sign_chunk)) return false;
1427
1428 if (_old_string_id != 0) {
1429 if (_savegame_type == SGT_TTO) {
1430 if (_old_string_id != 0x140A) si->name = CopyFromOldName(_old_string_id + 0x2A00);
1431 } else {
1432 si->name = CopyFromOldName(RemapOldStringID(_old_string_id));
1433 }
1434 si->owner = OWNER_NONE;
1435 } else {
1436 delete si;
1437 }
1438
1439 return true;
1440}
1441
1442static const OldChunks engine_chunk[] = {
1443 OCL_SVAR( OC_UINT16, Engine, company_avail ),

Callers

nothing calls this directly

Calls 3

LoadChunkFunction · 0.85
CopyFromOldNameFunction · 0.85
RemapOldStringIDFunction · 0.85

Tested by

no test coverage detected