grfspecial.c
changeset 438 f80cc59e69c2
parent 420 d4aa4a1df3c6
child 439 38ad92a5f1f2
equal deleted inserted replaced
437:0d279780f819 438:f80cc59e69c2
   708 	switch (prop) {
   708 	switch (prop) {
   709 		case 0x08:
   709 		case 0x08:
   710 		{	/* Class ID */
   710 		{	/* Class ID */
   711 			FOR_EACH_ENGINE {
   711 			FOR_EACH_ENGINE {
   712 				struct StationSpec *stat = &_cur_grffile->stations[stid + i];
   712 				struct StationSpec *stat = &_cur_grffile->stations[stid + i];
       
   713 				uint32 classid;
   713 
   714 
   714 				/* classid, for a change, is always little-endian */
   715 				/* classid, for a change, is always little-endian */
   715 				stat->classid = *(buf++) << 24;
   716 				classid = *(buf++) << 24;
   716 				stat->classid |= *(buf++) << 16;
   717 				classid |= *(buf++) << 16;
   717 				stat->classid |= *(buf++) << 8;
   718 				classid |= *(buf++) << 8;
   718 				stat->classid |= *(buf++);
   719 				classid |= *(buf++);
       
   720 
       
   721 				switch (classid) {
       
   722 					case 'DFLT':
       
   723 						stat->sclass = STAT_CLASS_DFLT;
       
   724 						break;
       
   725 					case 'WAYP':
       
   726 						stat->sclass = STAT_CLASS_WAYP;
       
   727 						break;
       
   728 					default:
       
   729 						stat->sclass = STAT_CLASS_CUSTOM;
       
   730 						break;
       
   731 				}
   719 			}
   732 			}
   720 			break;
   733 			break;
   721 		}
   734 		}
   722 		case 0x09:
   735 		case 0x09:
   723 		{	/* Define sprite layout */
   736 		{	/* Define sprite layout */
  1286 				struct StationSpec *stat = &_cur_grffile->stations[stid];
  1299 				struct StationSpec *stat = &_cur_grffile->stations[stid];
  1287 
  1300 
  1288 				stat->spritegroup[0] = _cur_grffile->spritegroups[groupid];
  1301 				stat->spritegroup[0] = _cur_grffile->spritegroups[groupid];
  1289 				stat->grfid = _cur_grffile->grfid;
  1302 				stat->grfid = _cur_grffile->grfid;
  1290 				SetCustomStation(stid, stat);
  1303 				SetCustomStation(stid, stat);
  1291 				stat->classid = 0;
  1304 				stat->sclass = STAT_CLASS_NONE;
  1292 			}
  1305 			}
  1293 		}
  1306 		}
  1294 		return;
  1307 		return;
  1295 	}
  1308 	}
  1296 
  1309