newgrf_house.h

Go to the documentation of this file.
00001 /* $Id: newgrf_house.h 12381 2008-03-18 12:28:21Z skidd13 $ */
00002 
00005 #ifndef NEWGRF_HOUSE_H
00006 #define NEWGRF_HOUSE_H
00007 
00008 #include "town_type.h"
00009 #include "newgrf_callbacks.h"
00010 
00024 struct HouseClassMapping {
00025   uint32 grfid;     
00026   uint8  class_id;  
00027 };
00028 
00029 void UpdateHousesAndTowns();
00030 
00031 HouseClassID AllocateHouseClassID(byte grf_class_id, uint32 grfid);
00032 
00033 void InitializeBuildingCounts();
00034 void IncreaseBuildingCount(Town *t, HouseID house_id);
00035 void DecreaseBuildingCount(Town *t, HouseID house_id);
00036 
00037 void DrawNewHouseTile(TileInfo *ti, HouseID house_id);
00038 void AnimateNewHouseTile(TileIndex tile);
00039 void ChangeHouseAnimationFrame(TileIndex tile, uint16 callback_result);
00040 
00041 uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile);
00042 
00043 bool CanDeleteHouse(TileIndex tile);
00044 
00045 bool NewHouseTileLoop(TileIndex tile);
00046 
00047 enum HouseTrigger {
00048   /* The tile of the house has been triggered during the tileloop. */
00049   HOUSE_TRIGGER_TILE_LOOP     = 0x01,
00050   /*
00051    * The top tile of a (multitile) building has been triggered during and all
00052    * the tileloop other tiles of the same building get the same random value.
00053    */
00054   HOUSE_TRIGGER_TILE_LOOP_TOP = 0x02,
00055 };
00056 void TriggerHouse(TileIndex t, HouseTrigger trigger);
00057 
00058 #endif /* NEWGRF_HOUSE_H */

Generated on Mon Sep 22 20:34:17 2008 for openttd by  doxygen 1.5.6