newgrf_house.h
Go to the documentation of this file.00001
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
00048 HOUSE_TRIGGER_TILE_LOOP = 0x01,
00049
00050
00051
00052
00053 HOUSE_TRIGGER_TILE_LOOP_TOP = 0x02,
00054 };
00055 void TriggerHouse(TileIndex t, HouseTrigger trigger);
00056
00057 #endif