equal
deleted
inserted
replaced
1365 case 0x8004: { |
1365 case 0x8004: { |
1366 /* Skip the first element: TTDP hack for the Action D special variables (FFFF0000 01) */ |
1366 /* Skip the first element: TTDP hack for the Action D special variables (FFFF0000 01) */ |
1367 ReadUint32(ls); ReadByte(ls); len -= 5; |
1367 ReadUint32(ls); ReadByte(ls); len -= 5; |
1368 |
1368 |
1369 ClearGRFConfigList(&_grfconfig); |
1369 ClearGRFConfigList(&_grfconfig); |
1370 GRFConfig c; |
|
1371 memset(&c, 0, sizeof(GRFConfig)); |
|
1372 |
|
1373 while (len != 0) { |
1370 while (len != 0) { |
1374 uint32 grfid = ReadUint32(ls); |
1371 uint32 grfid = ReadUint32(ls); |
1375 |
1372 |
1376 if (ReadByte(ls) == 1) { |
1373 if (ReadByte(ls) == 1) { |
1377 c.grfid = grfid; |
1374 GRFConfig *c = CallocT<GRFConfig>(1); |
1378 c.filename = "TTDP game, no information"; |
1375 c->grfid = grfid; |
1379 |
1376 c->filename = strdup("TTDP game, no information"); |
1380 AppendToGRFConfigList(&_grfconfig, &c); |
1377 |
1381 DEBUG(oldloader, 3, "TTDPatch game using GRF file with GRFID %0X", BSWAP32(c.grfid)); |
1378 AppendToGRFConfigList(&_grfconfig, c); |
|
1379 DEBUG(oldloader, 3, "TTDPatch game using GRF file with GRFID %0X", BSWAP32(c->grfid)); |
1382 } |
1380 } |
1383 len -= 5; |
1381 len -= 5; |
1384 }; |
1382 }; |
1385 |
1383 |
1386 /* Append static NewGRF configuration */ |
1384 /* Append static NewGRF configuration */ |