1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-27 22:24:28 +01:00

Codechange: use span size over terminator object

This commit is contained in:
Rubidium
2025-01-12 20:01:03 +01:00
committed by rubidium42
parent 2d7d085e8e
commit 44506ebc86
11 changed files with 112 additions and 319 deletions

View File

@@ -2010,12 +2010,12 @@ static ChangeInfoResult StationChangeInfo(uint first, uint last, int prop, ByteR
std::vector<DrawTileSeqStruct> tmp_layout;
for (;;) {
uint8_t delta_x = buf.ReadByte();
if (delta_x == 0x80) break;
/* no relative bounding box support */
DrawTileSeqStruct &dtss = tmp_layout.emplace_back();
MemSetT(&dtss, 0);
dtss.delta_x = buf.ReadByte();
if (dtss.IsTerminator()) break;
dtss.delta_x = delta_x;
dtss.delta_y = buf.ReadByte();
dtss.delta_z = buf.ReadByte();
dtss.size_x = buf.ReadByte();