src/player.h
changeset 6685 00490513d7b1
parent 6643 f81bee57bc09
child 6909 5cb622b3d46a
equal deleted inserted replaced
6684:2f8288bdd427 6685:00490513d7b1
   166 
   166 
   167 	byte player_color;
   167 	byte player_color;
   168 	Livery livery[LS_END];
   168 	Livery livery[LS_END];
   169 	byte player_money_fraction;
   169 	byte player_money_fraction;
   170 	byte avail_railtypes;
   170 	byte avail_railtypes;
       
   171 	byte avail_roadtypes;
   171 	byte block_preview;
   172 	byte block_preview;
   172 	PlayerByte index;
   173 	PlayerByte index;
   173 
   174 
   174 	uint16 cargo_types; ///< which cargo types were transported the last year
   175 	uint16 cargo_types; ///< which cargo types were transported the last year
   175 
   176 
   246 {
   247 {
   247 	return IS_INSIDE_1D(pi, PLAYER_FIRST, MAX_PLAYERS);
   248 	return IS_INSIDE_1D(pi, PLAYER_FIRST, MAX_PLAYERS);
   248 }
   249 }
   249 
   250 
   250 byte GetPlayerRailtypes(PlayerID p);
   251 byte GetPlayerRailtypes(PlayerID p);
       
   252 byte GetPlayerRoadtypes(PlayerID p);
   251 
   253 
   252 /** Finds out if a Player has a certain railtype available */
   254 /** Finds out if a Player has a certain railtype available */
   253 static inline bool HasRailtypeAvail(const Player *p, RailType Railtype)
   255 static inline bool HasRailtypeAvail(const Player *p, RailType Railtype)
   254 {
   256 {
   255 	return HASBIT(p->avail_railtypes, Railtype);
   257 	return HASBIT(p->avail_railtypes, Railtype);