diff -r 0d279780f819 -r f80cc59e69c2 grfspecial.c --- a/grfspecial.c Tue Nov 16 23:51:38 2004 +0000 +++ b/grfspecial.c Wed Nov 17 00:52:54 2004 +0000 @@ -710,12 +710,25 @@ { /* Class ID */ FOR_EACH_ENGINE { struct StationSpec *stat = &_cur_grffile->stations[stid + i]; + uint32 classid; /* classid, for a change, is always little-endian */ - stat->classid = *(buf++) << 24; - stat->classid |= *(buf++) << 16; - stat->classid |= *(buf++) << 8; - stat->classid |= *(buf++); + classid = *(buf++) << 24; + classid |= *(buf++) << 16; + classid |= *(buf++) << 8; + classid |= *(buf++); + + switch (classid) { + case 'DFLT': + stat->sclass = STAT_CLASS_DFLT; + break; + case 'WAYP': + stat->sclass = STAT_CLASS_WAYP; + break; + default: + stat->sclass = STAT_CLASS_CUSTOM; + break; + } } break; } @@ -1288,7 +1301,7 @@ stat->spritegroup[0] = _cur_grffile->spritegroups[groupid]; stat->grfid = _cur_grffile->grfid; SetCustomStation(stid, stat); - stat->classid = 0; + stat->sclass = STAT_CLASS_NONE; } } return;