14 |
13 |
15 HOUSE_MAX = 110 |
14 HOUSE_MAX = 110 |
16 }; |
15 }; |
17 |
16 |
18 /** Writes the data into the Town Tile Drawing Struct |
17 /** Writes the data into the Town Tile Drawing Struct |
19 * @param s1 The first sprite of the building, mostly the ground sprite |
18 * @param s1 The first sprite of the building, mostly the ground sprite |
20 * @param s2 The second sprite of the building. |
19 * @param s2 The second sprite of the building. |
21 * @param sx The x-position of the sprite within the tile |
20 * @param sx The x-position of the sprite within the tile |
22 * @param xy the y-position of the sprite within the tile |
21 * @param xy the y-position of the sprite within the tile |
23 * @param w the width of the sprite |
22 * @param w the width of the sprite |
24 * @param h the height of the sprite |
23 * @param h the height of the sprite |
25 * @param dz the virtual height of the sprite |
24 * @param dz the virtual height of the sprite |
26 * @param p set to 1 if a lift is present |
25 * @param p set to 1 if a lift is present |
27 * @see DrawTownTileStruct |
26 * @see DrawTownTileStruct |
28 */ |
27 */ |
29 #define M(s1, s2, sx, sy, w, h, dz, p) {s1, s2, sx, sy, w - 1, h - 1, dz, p} |
28 #define M(s1, s2, sx, sy, w, h, dz, p) {s1, s2, sx, sy, w - 1, h - 1, dz, p} |
30 |
29 |
31 static const DrawBuildingsTileStruct _town_draw_tile_data[] = { |
30 static const DrawBuildingsTileStruct _town_draw_tile_data[] = { |
32 M( 0xf54, 0x58d, 0, 0, 14, 14, 8, 0), |
31 M( 0xf54, 0x58d, 0, 0, 14, 14, 8, 0), |
33 M( 0xf54, 0x58e, 0, 0, 14, 14, 60, 0), |
32 M( 0xf54, 0x58e, 0, 0, 14, 14, 60, 0), |
1926 0x801C, 0x801C, 0x801C, 0x801C, 0x801F, 0x801F, |
1925 0x801C, 0x801C, 0x801C, 0x801C, 0x801F, 0x801F, |
1927 }; |
1926 }; |
1928 assert_compile(lengthof(_housetype_flags) == HOUSE_MAX); |
1927 assert_compile(lengthof(_housetype_flags) == HOUSE_MAX); |
1929 |
1928 |
1930 static const byte _housetype_extra_flags[] = { |
1929 static const byte _housetype_extra_flags[] = { |
1931 0, 0, 0, 0,32,32, 0, 8, |
1930 0, 0, 0, 0, 32, 32, 0, 8, |
1932 0, 0, 0, 0, 0, 0, 0, 0, |
1931 0, 0, 0, 0, 0, 0, 0, 0, |
1933 0, 0, 0, 0,16, 0, 0, 0, |
1932 0, 0, 0, 0, 16, 0, 0, 0, |
1934 0, 0, 0, 0, 0, 0, 0, 0, |
1933 0, 0, 0, 0, 0, 0, 0, 0, |
1935 16, 0, 0, 0, 0, 0, 0, 0, |
1934 16, 0, 0, 0, 0, 0, 0, 0, |
1936 16, 0, 0, 0, 0, 0, 0, 0, |
1935 16, 0, 0, 0, 0, 0, 0, 0, |
1937 0, 0, 0, 0, 0, 0, 0, 0, |
1936 0, 0, 0, 0, 0, 0, 0, 0, |
1938 0, 0, 0, 0, 0, 0, 0, 0, |
1937 0, 0, 0, 0, 0, 0, 0, 0, |
1939 0, 0, 8, 0, 8, 0, 0, 0, |
1938 0, 0, 8, 0, 8, 0, 0, 0, |
1940 0, 0, 4, 0, 4, 0, 0, 0, |
1939 0, 0, 4, 0, 4, 0, 0, 0, |
1941 0, 0, 0, 0, 0, 0, 0, 4, |
1940 0, 0, 0, 0, 0, 0, 0, 4, |
1942 0, 0, 0, 0, 0, 0, 0, 0, |
1941 0, 0, 0, 0, 0, 0, 0, 0, |
1943 0, 0, 0, 8, 0, 0, 0, 0, |
1942 0, 0, 0, 8, 0, 0, 0, 0, |
1944 0, 0, 0, 0, 0, 0, |
1943 0, 0, 0, 0, 0, 0, |
1945 }; |
1944 }; |
1946 assert_compile(lengthof(_housetype_extra_flags) == HOUSE_MAX); |
1945 assert_compile(lengthof(_housetype_extra_flags) == HOUSE_MAX); |
1947 |
1946 |
1948 static const byte _housetype_population[] = { |
1947 static const byte _housetype_population[] = { |
1949 187, 85, 40, 5, 220, 220, 30, 140, |
1948 187, 85, 40, 5, 220, 220, 30, 140, |
2135 { 0, MAX_YEAR }, |
2134 { 0, MAX_YEAR }, |
2136 }; |
2135 }; |
2137 assert_compile(lengthof(_housetype_years) == HOUSE_MAX); |
2136 assert_compile(lengthof(_housetype_years) == HOUSE_MAX); |
2138 |
2137 |
2139 static const byte _housetype_cargo_passengers[] = { |
2138 static const byte _housetype_cargo_passengers[] = { |
2140 8, 8, 8, 2, 10,10,4, 6, |
2139 8, 8, 8, 2, 10, 10, 4, 6, |
2141 6, 2, 2, 2, 2, 8, 6, 6, |
2140 6, 2, 2, 2, 2, 8, 6, 6, |
2142 6, 10,6, 6, 4, 4, 4, 4, |
2141 6, 10, 6, 6, 4, 4, 4, 4, |
2143 3, 3, 3, 7, 8, 6, 8, 8, |
2142 3, 3, 3, 7, 8, 6, 8, 8, |
2144 4, 4, 4, 4, 8, 3, 3, 8, |
2143 4, 4, 4, 4, 8, 3, 3, 8, |
2145 8, 8, 8, 8, 5, 5, 3, 3, |
2144 8, 8, 8, 8, 5, 5, 3, 3, |
2146 3, 3, 8, 8, 9, 9,10, 10, |
2145 3, 3, 8, 8, 9, 9, 10, 10, |
2147 2, 2, 3, 3, 2, 2, 3, 3, |
2146 2, 2, 3, 3, 2, 2, 3, 3, |
2148 6, 6, 6, 6, 6, 6, 7, 7, |
2147 6, 6, 6, 6, 6, 6, 7, 7, |
2149 9, 9, 7, 7, 7, 7, 3, 3, |
2148 9, 9, 7, 7, 7, 7, 3, 3, |
2150 3, 3, 6, 2, 3, 6, 6, 8, |
2149 3, 3, 6, 2, 3, 6, 6, 8, |
2151 8, 6, 8, 2, 6, 3, 3, 3, |
2150 8, 6, 8, 2, 6, 3, 3, 3, |
2152 3, 3, 8, 4, 4, 8, 3, 3, |
2151 3, 3, 8, 4, 4, 8, 3, 3, |
2153 8, 8, 8, 4, 3, 3, |
2152 8, 8, 8, 4, 3, 3, |
2154 }; |
2153 }; |
2155 assert_compile(lengthof(_housetype_cargo_passengers) == HOUSE_MAX); |
2154 assert_compile(lengthof(_housetype_cargo_passengers) == HOUSE_MAX); |
2156 |
2155 |
2157 static const byte _housetype_cargo_mail[] = { |
2156 static const byte _housetype_cargo_mail[] = { |
2158 3, 3, 3, 0, 4, 4, 1, 1, |
2157 3, 3, 3, 0, 4, 4, 1, 1, |