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 "town_type.h"
00016 #include "newgrf_callbacks.h"
00017 #include "tile_cmd.h"
00018 #include "house_type.h"
00019
00033 struct HouseClassMapping {
00034 uint32 grfid;
00035 uint8 class_id;
00036 };
00037
00038 HouseClassID AllocateHouseClassID(byte grf_class_id, uint32 grfid);
00039
00040 void InitializeBuildingCounts();
00041 void IncreaseBuildingCount(Town *t, HouseID house_id);
00042 void DecreaseBuildingCount(Town *t, HouseID house_id);
00043
00044 void DrawNewHouseTile(TileInfo *ti, HouseID house_id);
00045 void AnimateNewHouseTile(TileIndex tile);
00046 void ChangeHouseAnimationFrame(const struct GRFFile *file, TileIndex tile, uint16 callback_result);
00047
00048 uint16 GetHouseCallback(CallbackID callback, uint32 param1, uint32 param2, HouseID house_id, Town *town, TileIndex tile);
00049
00050 bool CanDeleteHouse(TileIndex tile);
00051
00052 bool NewHouseTileLoop(TileIndex tile);
00053
00054 enum HouseTrigger {
00055
00056 HOUSE_TRIGGER_TILE_LOOP = 0x01,
00057
00058
00059
00060
00061 HOUSE_TRIGGER_TILE_LOOP_TOP = 0x02,
00062 };
00063 void TriggerHouse(TileIndex t, HouseTrigger trigger);
00064
00065 #endif