OpenTTD Source  12.0-beta2
newgrf_townname.cpp File Reference
#include "stdafx.h"
#include "newgrf_townname.h"
#include "core/alloc_func.hpp"
#include "string_func.h"
#include "table/strings.h"
#include "safeguards.h"

Go to the source code of this file.

Functions

GRFTownNameGetGRFTownName (uint32 grfid)
 
GRFTownNameAddGRFTownName (uint32 grfid)
 
void DelGRFTownName (uint32 grfid)
 
static char * RandomPart (char *buf, GRFTownName *t, uint32 seed, byte id, const char *last)
 
char * GRFTownNameGenerate (char *buf, uint32 grfid, uint16 gen, uint32 seed, const char *last)
 
void InitGRFTownGeneratorNames ()
 Allocate memory for the NewGRF town names.
 
const std::vector< StringID > & GetGRFTownNameList ()
 
StringID GetGRFTownNameName (uint gen)
 
void CleanUpGRFTownNames ()
 
uint32 GetGRFTownNameId (int gen)
 
uint16 GetGRFTownNameType (int gen)
 

Variables

static GRFTownName_grf_townnames = nullptr
 
static std::vector< StringID_grf_townname_names
 

Detailed Description

Implementation of Action 0F "universal holder" structure and functions. This file implements a linked-lists of townname generators, holding everything that the newgrf action 0F will send over to OpenTTD.

Definition in file newgrf_townname.cpp.