3 HOUSE_STADIUM = 0x14, |
3 HOUSE_STADIUM = 0x14, |
4 HOUSE_MODERN_STADIUM = 0x20, |
4 HOUSE_MODERN_STADIUM = 0x20, |
5 HOUSE_ARCT_CHURCH = 0x3c, |
5 HOUSE_ARCT_CHURCH = 0x3c, |
6 HOUSE_SNOW_CHURCH = 0x3d, |
6 HOUSE_SNOW_CHURCH = 0x3d, |
7 HOUSE_TROP_CHURCH = 0x53, |
7 HOUSE_TROP_CHURCH = 0x53, |
8 HOUSE_TOY_CHURCH = 0x5b |
8 HOUSE_TOY_CHURCH = 0x5b, |
|
9 |
|
10 HOUSE_MAX = 110 |
9 }; |
11 }; |
10 |
12 |
11 #define M(s1, s2, sx, sy, w, h, dz, p) {s1, s2, sx, sy, w - 1, h - 1, dz, p} |
13 #define M(s1, s2, sx, sy, w, h, dz, p) {s1, s2, sx, sy, w - 1, h - 1, dz, p} |
12 |
14 |
13 static const DrawTownTileStruct _town_draw_tile_data[] = { |
15 static const DrawTownTileStruct _town_draw_tile_data[] = { |
1771 M( 0x1244, 0x125a, 0, 0, 16, 16, 50, 0), |
1773 M( 0x1244, 0x125a, 0, 0, 16, 16, 50, 0), |
1772 M( 0x1244, 0x125a, 0, 0, 16, 16, 50, 0), |
1774 M( 0x1244, 0x125a, 0, 0, 16, 16, 50, 0), |
1773 M( 0x1244, 0x125a, 0, 0, 16, 16, 50, 0), |
1775 M( 0x1244, 0x125a, 0, 0, 16, 16, 50, 0), |
1774 }; |
1776 }; |
1775 #undef M |
1777 #undef M |
|
1778 // 4 variants * 4 build stages |
|
1779 assert_compile(lengthof(_town_draw_tile_data) == HOUSE_MAX * 4 * 4); |
1776 |
1780 |
1777 |
1781 |
1778 static const StringID _town_tile_names[] = { |
1782 static const StringID _town_tile_names[] = { |
1779 STR_200F_TALL_OFFICE_BLOCK, |
1783 STR_200F_TALL_OFFICE_BLOCK, |
1780 STR_2010_OFFICE_BLOCK, |
1784 STR_2010_OFFICE_BLOCK, |
1885 STR_200F_TALL_OFFICE_BLOCK, |
1889 STR_200F_TALL_OFFICE_BLOCK, |
1886 STR_2016_STATUE, |
1890 STR_2016_STATUE, |
1887 STR_205B_TEAPOT_HOUSE, |
1891 STR_205B_TEAPOT_HOUSE, |
1888 STR_205C_PIGGY_BANK, |
1892 STR_205C_PIGGY_BANK, |
1889 }; |
1893 }; |
|
1894 assert_compile(lengthof(_town_tile_names) == HOUSE_MAX); |
1890 |
1895 |
1891 static const uint16 _housetype_flags[110] = { |
1896 static const uint16 _housetype_flags[] = { |
1892 0x1010, 0x1018, 0x100E, 0x100F, 0x7010, 0x0810, 0x100F, 0x1014, |
1897 0x1010, 0x1018, 0x100E, 0x100F, 0x7010, 0x0810, 0x100F, 0x1014, |
1893 0x0000, 0x7018, 0x7010, 0x1004, 0x1008, 0x1018, 0x101C, 0x101C, |
1898 0x0000, 0x7018, 0x7010, 0x1004, 0x1008, 0x1018, 0x101C, 0x101C, |
1894 0x101C, 0x7010, 0x1010, 0x1010, 0x100F, 0x0000, 0x0000, 0x0000, |
1899 0x101C, 0x7010, 0x1010, 0x1010, 0x100F, 0x0000, 0x0000, 0x0000, |
1895 0x1003, 0x1001, 0x100F, 0x101C, 0x101C, 0x101C, 0x5014, 0x1018, |
1900 0x1003, 0x1001, 0x100F, 0x101C, 0x101C, 0x101C, 0x5014, 0x1018, |
1896 0x700F, 0x0000, 0x0000, 0x0000, 0x7018, 0x2003, 0x0803, 0x101C, |
1901 0x700F, 0x0000, 0x0000, 0x0000, 0x7018, 0x2003, 0x0803, 0x101C, |
1902 0x401E, 0x4001, 0x401C, 0x400E, 0x401E, 0x401C, 0x401C, 0x4018, |
1907 0x401E, 0x4001, 0x401C, 0x400E, 0x401E, 0x401C, 0x401C, 0x4018, |
1903 0x4000, 0x401C, 0x4018, 0x801F, 0x801F, 0x8003, 0x800F, 0x800F, |
1908 0x4000, 0x401C, 0x4018, 0x801F, 0x801F, 0x8003, 0x800F, 0x800F, |
1904 0x800F, 0x800F, 0x801C, 0x801F, 0x0000, 0x801C, 0x8001, 0x8001, |
1909 0x800F, 0x800F, 0x801C, 0x801F, 0x0000, 0x801C, 0x8001, 0x8001, |
1905 0x801C, 0x801C, 0x801C, 0x801C, 0x801F, 0x801F, |
1910 0x801C, 0x801C, 0x801C, 0x801C, 0x801F, 0x801F, |
1906 }; |
1911 }; |
|
1912 assert_compile(lengthof(_housetype_flags) == HOUSE_MAX); |
1907 |
1913 |
1908 static const byte _housetype_extra_flags[110] = { |
1914 static const byte _housetype_extra_flags[] = { |
1909 0, 0, 0, 0,32,32, 0, 8, |
1915 0, 0, 0, 0,32,32, 0, 8, |
1910 0, 0, 0, 0, 0, 0, 0, 0, |
1916 0, 0, 0, 0, 0, 0, 0, 0, |
1911 0, 0, 0, 0,16, 0, 0, 0, |
1917 0, 0, 0, 0,16, 0, 0, 0, |
1912 0, 0, 0, 0, 0, 0, 0, 0, |
1918 0, 0, 0, 0, 0, 0, 0, 0, |
1913 16, 0, 0, 0, 0, 0, 0, 0, |
1919 16, 0, 0, 0, 0, 0, 0, 0, |
1919 0, 0, 0, 0, 0, 0, 0, 4, |
1925 0, 0, 0, 0, 0, 0, 0, 4, |
1920 0, 0, 0, 0, 0, 0, 0, 0, |
1926 0, 0, 0, 0, 0, 0, 0, 0, |
1921 0, 0, 0, 8, 0, 0, 0, 0, |
1927 0, 0, 0, 8, 0, 0, 0, 0, |
1922 0, 0, 0, 0, 0, 0, |
1928 0, 0, 0, 0, 0, 0, |
1923 }; |
1929 }; |
|
1930 assert_compile(lengthof(_housetype_extra_flags) == HOUSE_MAX); |
1924 |
1931 |
1925 static const byte _housetype_population[110] = { |
1932 static const byte _housetype_population[] = { |
1926 187, 85, 40, 5, 220, 220, 30, 140, |
1933 187, 85, 40, 5, 220, 220, 30, 140, |
1927 0, 0, 0, 0, 0, 150, 95, 95, |
1934 0, 0, 0, 0, 0, 150, 95, 95, |
1928 95, 130, 6, 110, 65, 0, 0, 0, |
1935 95, 130, 6, 110, 65, 0, 0, 0, |
1929 15, 12, 13, 100, 170, 100, 180, 35, |
1936 15, 12, 13, 100, 170, 100, 180, 35, |
1930 65, 0, 0, 0, 140, 15, 15, 35, |
1937 65, 0, 0, 0, 140, 15, 15, 35, |
1936 16, 7, 45, 8, 18, 90, 120, 250, |
1943 16, 7, 45, 8, 18, 90, 120, 250, |
1937 0, 80, 180, 8, 18, 7, 15, 17, |
1944 0, 80, 180, 8, 18, 7, 15, 17, |
1938 19, 21, 75, 35, 0, 85, 11, 10, |
1945 19, 21, 75, 35, 0, 85, 11, 10, |
1939 67, 86, 95, 30, 25, 18, |
1946 67, 86, 95, 30, 25, 18, |
1940 }; |
1947 }; |
|
1948 assert_compile(lengthof(_housetype_population) == HOUSE_MAX); |
1941 |
1949 |
1942 static const byte _housetype_mailamount[110] = { |
1950 static const byte _housetype_mailamount[] = { |
1943 70, 55, 20, 2, 85, 85, 12, 22, |
1951 70, 55, 20, 2, 85, 85, 12, 22, |
1944 22, 0, 0, 0, 0, 65, 48, 48, |
1952 22, 0, 0, 0, 0, 65, 48, 48, |
1945 48, 50, 10, 55, 5, 5, 5, 5, |
1953 48, 50, 10, 55, 5, 5, 5, 5, |
1946 6, 7, 8, 35, 50, 40, 64, 23, |
1954 6, 7, 8, 35, 50, 40, 64, 23, |
1947 5, 5, 5, 5, 65, 6, 6, 23, |
1955 5, 5, 5, 5, 65, 6, 6, 23, |
1953 5, 4, 15, 3, 7, 24, 25, 80, |
1961 5, 4, 15, 3, 7, 24, 25, 80, |
1954 80, 23, 90, 3, 5, 3, 6, 6, |
1962 80, 23, 90, 3, 5, 3, 6, 6, |
1955 6, 6, 20, 9, 0, 18, 3, 3, |
1963 6, 6, 20, 9, 0, 18, 3, 3, |
1956 22, 23, 28, 10, 8, 7, |
1964 22, 23, 28, 10, 8, 7, |
1957 }; |
1965 }; |
|
1966 assert_compile(lengthof(_housetype_mailamount) == HOUSE_MAX); |
1958 |
1967 |
1959 |
1968 static const byte _housetype_remove_cost[] = { |
1960 static const byte _housetype_remove_cost[110] = { |
|
1961 150, 140, 100, 90, 160, 160, 80, 180, |
1969 150, 140, 100, 90, 160, 160, 80, 180, |
1962 180, 65, 65, 60, 60, 130, 110, 105, |
1970 180, 65, 65, 60, 60, 130, 110, 105, |
1963 107, 200, 145, 155, 250, 250, 250, 250, |
1971 107, 200, 145, 155, 250, 250, 250, 250, |
1964 70, 75, 71, 135, 145, 132, 155, 220, |
1972 70, 75, 71, 135, 145, 132, 155, 220, |
1965 250, 250, 250, 250, 170, 70, 70, 210, |
1973 250, 250, 250, 250, 170, 70, 70, 210, |
1971 80, 30, 130, 90, 80, 110, 120, 190, |
1979 80, 30, 130, 90, 80, 110, 120, 190, |
1972 190, 110, 180, 90, 90, 70, 80, 80, |
1980 190, 110, 180, 90, 90, 70, 80, 80, |
1973 80, 80, 160, 90, 90, 150, 60, 60, |
1981 80, 80, 160, 90, 90, 150, 60, 60, |
1974 140, 145, 165, 90, 75, 85, |
1982 140, 145, 165, 90, 75, 85, |
1975 }; |
1983 }; |
|
1984 assert_compile(lengthof(_housetype_remove_cost) == HOUSE_MAX); |
1976 |
1985 |
1977 static const uint16 _housetype_remove_ratingmod[110] = { |
1986 static const uint16 _housetype_remove_ratingmod[] = { |
1978 140, 130, 90, 230, 160, 160, 80, 150, |
1987 140, 130, 90, 230, 160, 160, 80, 150, |
1979 150, 40, 40, 75, 75, 110, 100, 100, |
1988 150, 40, 40, 75, 75, 110, 100, 100, |
1980 100, 150, 110, 110, 300, 300, 300, 300, |
1989 100, 150, 110, 110, 300, 300, 300, 300, |
1981 75, 75, 75, 100, 170, 135, 180, 230, |
1990 75, 75, 75, 100, 170, 135, 180, 230, |
1982 300, 300, 300, 300, 250, 75, 75, 230, |
1991 300, 300, 300, 300, 250, 75, 75, 230, |
1988 80, 30, 95, 200, 80, 95, 95, 140, |
1997 80, 30, 95, 200, 80, 95, 95, 140, |
1989 140, 95, 150, 200, 90, 50, 75, 75, |
1998 140, 95, 150, 200, 90, 50, 75, 75, |
1990 75, 75, 130, 80, 80, 130, 45, 45, |
1999 75, 75, 130, 80, 80, 130, 45, 45, |
1991 130, 130, 130, 70, 65, 95, |
2000 130, 130, 130, 70, 65, 95, |
1992 }; |
2001 }; |
|
2002 assert_compile(lengthof(_housetype_remove_ratingmod) == HOUSE_MAX); |
1993 |
2003 |
1994 |
2004 |
1995 typedef struct { |
2005 typedef struct { |
1996 byte min,max; |
2006 byte min,max; |
1997 } HousetypeYear; |
2007 } HousetypeYear; |
1998 |
2008 |
1999 static const HousetypeYear _housetype_years[110] = { |
2009 static const HousetypeYear _housetype_years[] = { |
2000 {43, 255}, |
2010 {43, 255}, |
2001 {37, 255}, |
2011 {37, 255}, |
2002 {48, 255}, |
2012 {48, 255}, |
2003 {0, 255}, |
2013 {0, 255}, |
2004 {55, 255}, |
2014 {55, 255}, |
2106 {0, 255}, |
2116 {0, 255}, |
2107 {0, 255}, |
2117 {0, 255}, |
2108 {0, 255}, |
2118 {0, 255}, |
2109 {0, 255}, |
2119 {0, 255}, |
2110 }; |
2120 }; |
|
2121 assert_compile(lengthof(_housetype_years) == HOUSE_MAX); |
2111 |
2122 |
2112 static const byte _housetype_cargo_passengers[110] = { |
2123 static const byte _housetype_cargo_passengers[] = { |
2113 8, 8, 8, 2, 10,10,4, 6, |
2124 8, 8, 8, 2, 10,10,4, 6, |
2114 6, 2, 2, 2, 2, 8, 6, 6, |
2125 6, 2, 2, 2, 2, 8, 6, 6, |
2115 6, 10,6, 6, 4, 4, 4, 4, |
2126 6, 10,6, 6, 4, 4, 4, 4, |
2116 3, 3, 3, 7, 8, 6, 8, 8, |
2127 3, 3, 3, 7, 8, 6, 8, 8, |
2117 4, 4, 4, 4, 8, 3, 3, 8, |
2128 4, 4, 4, 4, 8, 3, 3, 8, |
2123 3, 3, 6, 2, 3, 6, 6, 8, |
2134 3, 3, 6, 2, 3, 6, 6, 8, |
2124 8, 6, 8, 2, 6, 3, 3, 3, |
2135 8, 6, 8, 2, 6, 3, 3, 3, |
2125 3, 3, 8, 4, 4, 8, 3, 3, |
2136 3, 3, 8, 4, 4, 8, 3, 3, |
2126 8, 8, 8, 4, 3, 3, |
2137 8, 8, 8, 4, 3, 3, |
2127 }; |
2138 }; |
|
2139 assert_compile(lengthof(_housetype_cargo_passengers) == HOUSE_MAX); |
2128 |
2140 |
2129 static const byte _housetype_cargo_mail[110] = { |
2141 static const byte _housetype_cargo_mail[] = { |
2130 3, 3, 3, 0, 4, 4, 1, 1, |
2142 3, 3, 3, 0, 4, 4, 1, 1, |
2131 1, 0, 0, 0, 0, 2, 2, 2, |
2143 1, 0, 0, 0, 0, 2, 2, 2, |
2132 2, 3, 3, 2, 0, 0, 0, 0, |
2144 2, 3, 3, 2, 0, 0, 0, 0, |
2133 1, 1, 1, 2, 3, 2, 3, 2, |
2145 1, 1, 1, 2, 3, 2, 3, 2, |
2134 0, 0, 0, 0, 3, 1, 1, 2, |
2146 0, 0, 0, 0, 3, 1, 1, 2, |
2140 1, 1, 2, 0, 1, 2, 2, 3, |
2152 1, 1, 2, 0, 1, 2, 2, 3, |
2141 3, 2, 3, 0, 2, 1, 1, 1, |
2153 3, 2, 3, 0, 2, 1, 1, 1, |
2142 1, 1, 4, 1, 1, 4, 1, 1, |
2154 1, 1, 4, 1, 1, 4, 1, 1, |
2143 4, 4, 4, 1, 1, 2, |
2155 4, 4, 4, 1, 1, 2, |
2144 }; |
2156 }; |
|
2157 assert_compile(lengthof(_housetype_cargo_mail) == HOUSE_MAX); |
2145 |
2158 |
2146 static const byte _housetype_cargo_goods[] = { |
2159 static const byte _housetype_cargo_goods[] = { |
2147 4, 4, 1, 0, 6, 6, 0, 2, |
2160 4, 4, 1, 0, 6, 6, 0, 2, |
2148 2, 0, 0, 0, 0, 4, 3, 3, |
2161 2, 0, 0, 0, 0, 4, 3, 3, |
2149 3, 6, 8, 6, 0, 0, 0, 0, |
2162 3, 6, 8, 6, 0, 0, 0, 0, |
2157 0, 0, 1, 0, 0, 1, 1, 4, |
2170 0, 0, 1, 0, 0, 1, 1, 4, |
2158 4, 1, 4, 0, 2, 1, 2, 2, |
2171 4, 1, 4, 0, 2, 1, 2, 2, |
2159 2, 2, 2, 2, 2, 2, 1, 1, |
2172 2, 2, 2, 2, 2, 2, 1, 1, |
2160 0, 0, 2, 2, 2, 0 |
2173 0, 0, 2, 2, 2, 0 |
2161 }; |
2174 }; |
|
2175 assert_compile(lengthof(_housetype_cargo_goods) == HOUSE_MAX); |
2162 |
2176 |
2163 static const byte _housetype_cargo_food[] = { |
2177 static const byte _housetype_cargo_food[] = { |
2164 0, 0, 0, 0, 0, 0, 0, 0, |
2178 0, 0, 0, 0, 0, 0, 0, 0, |
2165 0, 0, 0, 0, 0, 0, 0, 0, |
2179 0, 0, 0, 0, 0, 0, 0, 0, |
2166 0, 0, 0, 0, 0, 0, 0, 0, |
2180 0, 0, 0, 0, 0, 0, 0, 0, |
2174 2, 1, 0, 0, 2, 0, 0, 0, |
2188 2, 1, 0, 0, 2, 0, 0, 0, |
2175 0, 0, 0, 0, 0, 0, 0, 0, |
2189 0, 0, 0, 0, 0, 0, 0, 0, |
2176 0, 0, 0, 0, 0, 0, 0, 0, |
2190 0, 0, 0, 0, 0, 0, 0, 0, |
2177 4, 4, 0, 0, 0, 4 |
2191 4, 4, 0, 0, 0, 4 |
2178 }; |
2192 }; |
|
2193 assert_compile(lengthof(_housetype_cargo_food) == HOUSE_MAX); |
2179 |
2194 |
2180 static const byte _house_more_flags[110] = { |
2195 static const byte _house_more_flags[] = { |
2181 8, 8, 8, 8, 8, 8, 8, 12, |
2196 8, 8, 8, 8, 8, 8, 8, 12, |
2182 0, 8, 8, 8, 8, 8, 8, 8, |
2197 0, 8, 8, 8, 8, 8, 8, 8, |
2183 8, 8, 8, 8, 15, 0, 0, 0, |
2198 8, 8, 8, 8, 15, 0, 0, 0, |
2184 8, 8, 8, 8, 8, 8, 8, 8, |
2199 8, 8, 8, 8, 8, 8, 8, 8, |
2185 15, 0, 0, 0, 8, 8, 8, 8, |
2200 15, 0, 0, 0, 8, 8, 8, 8, |
2191 8, 8, 8, 8, 8, 8, 8, 10, |
2206 8, 8, 8, 8, 8, 8, 8, 10, |
2192 0, 8, 8, 8, 8, 8, 8, 8, |
2207 0, 8, 8, 8, 8, 8, 8, 8, |
2193 8, 8, 8, 12, 0, 8, 8, 8, |
2208 8, 8, 8, 12, 0, 8, 8, 8, |
2194 8, 8, 8, 8, 8, 8, |
2209 8, 8, 8, 8, 8, 8, |
2195 }; |
2210 }; |
2196 |
2211 assert_compile(lengthof(_house_more_flags) == HOUSE_MAX); |