File diff r9110:c1c12a8355e3 → r9111:983de9c5a848
src/newgrf_cargo.cpp
Show inline comments
 
/* $Id$ */
 

	
 
/** @file newgrf_cargo.cpp Implementation of NewGRF cargoes. */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "debug.h"
 
#include "cargotype.h"
 
#include "newgrf.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_spritegroup.h"
 
#include "newgrf_cargo.h"
 

	
 

	
 
static uint32 CargoGetRandomBits(const ResolverObject *object)
 
{
 
	return 0;
 
}
 

	
 

	
 
static uint32 CargoGetTriggers(const ResolverObject *object)
 
{
 
	return 0;
 
}
 

	
 

	
 
static void CargoSetTriggers(const ResolverObject *object, int triggers)
 
{
 
	return;
 
}
 

	
 

	
 
static uint32 CargoGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available)
 
{
 
	DEBUG(grf, 1, "Unhandled cargo property 0x%X", variable);
 

	
 
	*available = false;
 
	return 0;
 
}
 

	
 

	
 
static const SpriteGroup *CargoResolveReal(const ResolverObject *object, const SpriteGroup *group)
 
{
 
	/* Cargo action 2s should always have only 1 "loaded" state, but some
 
	 * times things don't follow the spec... */
 
	if (group->g.real.num_loaded > 0) return group->g.real.loaded[0];
 
	if (group->g.real.num_loading > 0) return group->g.real.loading[0];
 

	
 
	return NULL;
 
}