newgrf_house.h

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

Generated on Tue Dec 1 00:06:17 2009 for OpenTTD by  doxygen 1.5.6