newgrf_house.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef NEWGRF_HOUSE_H
00013 #define NEWGRF_HOUSE_H
00014
00015 #include "newgrf_callbacks.h"
00016 #include "tile_cmd.h"
00017 #include "house_type.h"
00018
00032 struct HouseClassMapping {
00033 uint32 grfid;
00034 uint8 class_id;
00035 };
00036
00037 HouseClassID AllocateHouseClassID(byte grf_class_id, uint32 grfid);
00038
00039 void InitializeBuildingCounts();
00040 void IncreaseBuildingCount(Town *t, HouseID house_id);
00041 void DecreaseBuildingCount(Town *t, HouseID house_id);
00042
00043 void DrawNewHouseTile(TileInfo *ti, HouseID house_id);
00044 void AnimateNewHouseTile(TileIndex tile);
00045 void AnimateNewHouseConstruction(TileIndex tile);
00046
00047 uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, const Town *town, TileIndex tile, bool not_yet_constructed = false, uint8 initial_random_bits = 0);
00048
00049 bool CanDeleteHouse(TileIndex tile);
00050
00051 bool NewHouseTileLoop(TileIndex tile);
00052
00053 enum HouseTrigger {
00054
00055 HOUSE_TRIGGER_TILE_LOOP = 0x01,
00056
00057
00058
00059
00060 HOUSE_TRIGGER_TILE_LOOP_TOP = 0x02,
00061 };
00062 void TriggerHouse(TileIndex t, HouseTrigger trigger);
00063
00064 #endif