Files
@ r10525:898f08b99221
Branch filter:
Location: cpp/openttd-patchpack/source/src/newgrf_house.h - annotation
r10525:898f08b99221
2.0 KiB
text/x-c
(svn r14782) -Update: WebTranslator2 update to 2009-01-02 18:38:20
arabic_egypt - 7 fixed by khaloofah (7)
brazilian_portuguese - 14 fixed, 5 changed by tucalipe (19)
catalan - 14 fixed by arnaullv (14)
finnish - 14 fixed by jpx_ (14)
hungarian - 14 fixed by alyr (14)
indonesian - 6 changed by fanioz (6)
korean - 13 fixed by dlunch (13)
malay - 8 fixed by tombakemas (8)
serbian - 29 fixed, 2 changed by nummer (31)
thai - 2 fixed by chat9780 (2)
ukrainian - 13 fixed by mad (1), znikoz (12)
urdu - 20 fixed by yasirniazkhan (20)
arabic_egypt - 7 fixed by khaloofah (7)
brazilian_portuguese - 14 fixed, 5 changed by tucalipe (19)
catalan - 14 fixed by arnaullv (14)
finnish - 14 fixed by jpx_ (14)
hungarian - 14 fixed by alyr (14)
indonesian - 6 changed by fanioz (6)
korean - 13 fixed by dlunch (13)
malay - 8 fixed by tombakemas (8)
serbian - 29 fixed, 2 changed by nummer (31)
thai - 2 fixed by chat9780 (2)
ukrainian - 13 fixed by mad (1), znikoz (12)
urdu - 20 fixed by yasirniazkhan (20)
r6332:7393965b5322 r6332:7393965b5322 r9111:983de9c5a848 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r8213:466402e95092 r7327:28855024ff6c r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r8707:7817a5018c47 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r9018:0a11b607e602 r6332:7393965b5322 r7327:28855024ff6c r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r6332:7393965b5322 r7861:9082dbb3187c r7861:9082dbb3187c r7861:9082dbb3187c r7861:9082dbb3187c r7861:9082dbb3187c r7861:9082dbb3187c r7861:9082dbb3187c r7861:9082dbb3187c r7861:9082dbb3187c r7861:9082dbb3187c r7861:9082dbb3187c r6332:7393965b5322 | /* $Id$ */
/** @file newgrf_house.h Functions related to NewGRF houses. */
#ifndef NEWGRF_HOUSE_H
#define NEWGRF_HOUSE_H
#include "town_type.h"
#include "newgrf_callbacks.h"
/**
* Makes class IDs unique to each GRF file.
* Houses can be assigned class IDs which are only comparable within the GRF
* file they were defined in. This mapping ensures that if two houses have the
* same class as defined by the GRF file, the classes are different within the
* game. An array of HouseClassMapping structs is created, and the array index
* of the struct that matches both the GRF ID and the class ID is the class ID
* used in the game.
*
* Although similar to the HouseIDMapping struct above, this serves a different
* purpose. Since the class ID is not saved anywhere, this mapping does not
* need to be persistent; it just needs to keep class ids unique.
*/
struct HouseClassMapping {
uint32 grfid; ////< The GRF ID of the file this class belongs to
uint8 class_id; ////< The class id within the grf file
};
void UpdateHousesAndTowns();
HouseClassID AllocateHouseClassID(byte grf_class_id, uint32 grfid);
void InitializeBuildingCounts();
void IncreaseBuildingCount(Town *t, HouseID house_id);
void DecreaseBuildingCount(Town *t, HouseID house_id);
void DrawNewHouseTile(TileInfo *ti, HouseID house_id);
void AnimateNewHouseTile(TileIndex tile);
void ChangeHouseAnimationFrame(const struct GRFFile *file, TileIndex tile, uint16 callback_result);
uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile);
bool CanDeleteHouse(TileIndex tile);
bool NewHouseTileLoop(TileIndex tile);
enum HouseTrigger {
/* The tile of the house has been triggered during the tileloop. */
HOUSE_TRIGGER_TILE_LOOP = 0x01,
/*
* The top tile of a (multitile) building has been triggered during and all
* the tileloop other tiles of the same building get the same random value.
*/
HOUSE_TRIGGER_TILE_LOOP_TOP = 0x02,
};
void TriggerHouse(TileIndex t, HouseTrigger trigger);
#endif /* NEWGRF_HOUSE_H */
|