(svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels.

This commit is contained in:
peter1138
2007-02-20 22:09:21 +00:00
parent f91ed92648
commit 3d581f4f89
24 changed files with 315 additions and 371 deletions

View File

@@ -37,6 +37,7 @@
#include "helpers.hpp"
#include "misc/autoptr.hpp"
#include "road.h"
#include "cargotype.h"
/**
* Called if a new block is added to the station-pool
@@ -361,7 +362,7 @@ static uint GetAcceptanceMask(const Station *st)
static void ShowRejectOrAcceptNews(const Station *st, uint num_items, CargoID *cargo, StringID msg)
{
for (uint i = 0; i < num_items; i++) {
SetDParam(i + 1, _cargoc.names_s[cargo[i]]);
SetDParam(i + 1, GetCargo(cargo[i])->name);
}
SetDParam(0, st->index);