vehicle.c
changeset 3040 c3473d1fb81f
parent 3039 69cdde904bb5
child 3047 acae37f12efb
equal deleted inserted replaced
3039:69cdde904bb5 3040:c3473d1fb81f
   696 	uint32 image = v->cur_image;
   696 	uint32 image = v->cur_image;
   697 
   697 
   698 	if (v->vehstatus & VS_DISASTER) {
   698 	if (v->vehstatus & VS_DISASTER) {
   699 		MAKE_TRANSPARENT(image);
   699 		MAKE_TRANSPARENT(image);
   700 	} else if (v->vehstatus & VS_DEFPAL) {
   700 	} else if (v->vehstatus & VS_DEFPAL) {
   701 		image |= (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : SPRITE_PALETTE(PLAYER_SPRITE_COLOR(v->owner));
   701 		image |= (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
   702 	}
   702 	}
   703 
   703 
   704 	AddSortableSpriteToDraw(image, v->x_pos + v->x_offs, v->y_pos + v->y_offs,
   704 	AddSortableSpriteToDraw(image, v->x_pos + v->x_offs, v->y_pos + v->y_offs,
   705 		v->sprite_width, v->sprite_height, v->z_height, v->z_pos);
   705 		v->sprite_width, v->sprite_height, v->z_height, v->z_pos);
   706 }
   706 }
  2038 	}
  2038 	}
  2039 
  2039 
  2040 	return unit;
  2040 	return unit;
  2041 }
  2041 }
  2042 
  2042 
       
  2043 // XXX Temporary stub -- will be expanded
       
  2044 PalSpriteID GetEngineColourMap(PlayerID player)
       
  2045 {
       
  2046 	return SPRITE_PALETTE(PLAYER_SPRITE_COLOR(player));
       
  2047 }
       
  2048 
  2043 // Save and load of vehicles
  2049 // Save and load of vehicles
  2044 const SaveLoad _common_veh_desc[] = {
  2050 const SaveLoad _common_veh_desc[] = {
  2045 	SLE_VAR(Vehicle,subtype,					SLE_UINT8),
  2051 	SLE_VAR(Vehicle,subtype,					SLE_UINT8),
  2046 
  2052 
  2047 	SLE_REF(Vehicle,next,							REF_VEHICLE_OLD),
  2053 	SLE_REF(Vehicle,next,							REF_VEHICLE_OLD),