Skip to content

Commit fda3d6b

Browse files
committed
temple complex: moved statues/tiles images id to config
1 parent 637af52 commit fda3d6b

File tree

2 files changed

+61
-27
lines changed

2 files changed

+61
-27
lines changed

src/building/building_temple_complex.cpp

+18-17
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ int building_temple_complex::static_params_t<T>::planer_update_relative_orientat
3737

3838
template<class T>
3939
void building_temple_complex::static_params_t<T>::planer_setup_preview_graphics(build_planner &planer) const {
40-
int flooring_image_id = this->anim["tiles"].first_img();
41-
int statue1_image_id = this->anim["statue_1"].first_img();
42-
int statue2_image_id = this->anim["statue_2"].first_img();
43-
4440
int EMPTY = 0;
4541
int main_n = this->anim["main_n"].first_img();
4642
int main_w = this->anim["main_w"].first_img();
@@ -49,24 +45,29 @@ void building_temple_complex::static_params_t<T>::planer_setup_preview_graphics(
4945
int altar_n = this->anim["altar_n"].first_img();
5046
int altar_w = this->anim["altar_w"].first_img();
5147

52-
int tiles_0 = flooring_image_id + 0;
53-
int tiles_1 = flooring_image_id + 1;
54-
int tiles_2 = flooring_image_id + 2;
55-
int tiles_3 = flooring_image_id + 3;
48+
int tiles_0 = this->anim["tiles_0"].first_img();
49+
int tiles_1 = this->anim["tiles_1"].first_img();
50+
int tiles_2 = this->anim["tiles_2"].first_img();
51+
int tiles_3 = this->anim["tiles_3"].first_img();
5652

53+
int statue1_image_id = this->anim["statue_1"].first_img();
5754
int statue_0 = statue1_image_id + 0; // north
5855
int statue_1 = statue1_image_id + 1; // east
5956
int statue_2 = statue1_image_id + 2; // south
6057
int statue_3 = statue1_image_id + 3; // west
6158

62-
int statue_2n_F = statue2_image_id + 0; // north
63-
int statue_2n_B = statue2_image_id + 1;
64-
int statue_2e_A = statue2_image_id + 2; // east
65-
int statue_2e_B = statue2_image_id + 3;
66-
int statue_2s_A = statue2_image_id + 4; // south
67-
int statue_2s_B = statue2_image_id + 5;
68-
int statue_2w_A = statue2_image_id + 6; // west
69-
int statue_2w_B = statue2_image_id + 7;
59+
int statue2n = this->anim["statue_2n"].first_img();
60+
int statue_2n_F = statue2n + 0; // north
61+
int statue_2n_B = statue2n + 1;
62+
int statue2e = this->anim["statue_2e"].first_img();
63+
int statue_2e_A = statue2e + 0; // east
64+
int statue_2e_B = statue2e + 1;
65+
int statue2s = this->anim["statue_2s"].first_img();
66+
int statue_2s_A = statue2s + 0; // south
67+
int statue_2s_B = statue2s + 1;
68+
int statue2w = this->anim["statue_2w"].first_img();
69+
int statue_2w_A = statue2w + 0; // west
70+
int statue_2w_B = statue2w + 1;
7071

7172
switch (planer.relative_orientation) {
7273
case 0:
@@ -164,7 +165,7 @@ void building_temple_complex_upgrade::static_params_t<T>::planer_ghost_preview(b
164165
}
165166

166167
tile2i offset = { 0, 0 };
167-
int bsize = building_size - 1;
168+
int bsize = this->building_size - 1;
168169
switch (city_orientation) {
169170
case 0: offset = { 0, bsize }; break;
170171
case 1: offset = { 0, 0 }; break;

src/scripts/buildings.js

+43-10
Original file line numberDiff line numberDiff line change
@@ -1894,9 +1894,16 @@ building building_temple_complex_osiris = {
18941894
oracle_w : { pack:PACK_TEMPLE_NILE, id:2, offset:3 },
18951895
altar_n : { pack:PACK_TEMPLE_NILE, id:3 },
18961896
altar_w : { pack:PACK_TEMPLE_NILE, id:3, offset:3 },
1897-
tiles : { pack:PACK_TEMPLE_NILE, id:4 },
1897+
tiles_0 : { pack:PACK_TEMPLE_NILE, id:4 },
1898+
tiles_1 : { pack:PACK_TEMPLE_NILE, id:4, offset:1 },
1899+
tiles_2 : { pack:PACK_TEMPLE_NILE, id:4, offset:2 },
1900+
tiles_3 : { pack:PACK_TEMPLE_NILE, id:4, offset:3 },
18981901
statue_1 : { pack:PACK_TEMPLE_NILE, id:5 },
1899-
statue_2 : { pack:PACK_TEMPLE_NILE, id:6 },
1902+
statue_2n : { pack:PACK_TEMPLE_NILE, id:6 },
1903+
statue_2e : { pack:PACK_TEMPLE_NILE, id:6, offset:2 },
1904+
statue_2s : { pack:PACK_TEMPLE_NILE, id:6, offset:4 },
1905+
statue_2w : { pack:PACK_TEMPLE_NILE, id:6, offset:6 },
1906+
19001907
},
19011908

19021909
building_size : 3,
@@ -1915,9 +1922,15 @@ building building_temple_complex_ra = {
19151922
oracle_w : { pack:PACK_TEMPLE_RA, id:2, offset:3 },
19161923
altar_n : { pack:PACK_TEMPLE_RA, id:3 },
19171924
altar_w : { pack:PACK_TEMPLE_RA, id:3, offset:3 },
1918-
tiles : { pack:PACK_TEMPLE_RA, id:4 },
1925+
tiles_0 : { pack:PACK_TEMPLE_RA, id:4 },
1926+
tiles_1 : { pack:PACK_TEMPLE_RA, id:4, offset:1 },
1927+
tiles_2 : { pack:PACK_TEMPLE_RA, id:4, offset:2 },
1928+
tiles_3 : { pack:PACK_TEMPLE_RA, id:4, offset:3 },
19191929
statue_1 : { pack:PACK_TEMPLE_RA, id:5 },
1920-
statue_2 : { pack:PACK_TEMPLE_RA, id:6 },
1930+
statue_2n : { pack:PACK_TEMPLE_RA, id:6 },
1931+
statue_2e : { pack:PACK_TEMPLE_RA, id:6, offset:2 },
1932+
statue_2s : { pack:PACK_TEMPLE_RA, id:6, offset:4 },
1933+
statue_2w : { pack:PACK_TEMPLE_RA, id:6, offset:6 },
19211934
},
19221935

19231936
building_size : 3,
@@ -1936,9 +1949,16 @@ building building_temple_complex_ptah = {
19361949
oracle_w : { pack:PACK_TEMPLE_PTAH, id:2, offset:3 },
19371950
altar_n : { pack:PACK_TEMPLE_PTAH, id:3 },
19381951
altar_w : { pack:PACK_TEMPLE_PTAH, id:3, offset:3 },
1939-
tiles : { pack:PACK_TEMPLE_PTAH, id:4 },
1952+
tiles_0 : { pack:PACK_TEMPLE_PTAH, id:4 },
1953+
tiles_1 : { pack:PACK_TEMPLE_PTAH, id:4, offset:1 },
1954+
tiles_2 : { pack:PACK_TEMPLE_PTAH, id:4, offset:2 },
1955+
tiles_3 : { pack:PACK_TEMPLE_PTAH, id:4, offset:3 },
19401956
statue_1 : { pack:PACK_TEMPLE_PTAH, id:5 },
1941-
statue_2 : { pack:PACK_TEMPLE_PTAH, id:6 },
1957+
statue_2n : { pack:PACK_TEMPLE_PTAH, id:6 },
1958+
statue_2e : { pack:PACK_TEMPLE_PTAH, id:6, offset:2 },
1959+
statue_2s : { pack:PACK_TEMPLE_PTAH, id:6, offset:4 },
1960+
statue_2w : { pack:PACK_TEMPLE_PTAH, id:6, offset:6 },
1961+
19421962
},
19431963

19441964
building_size : 3,
@@ -1957,9 +1977,16 @@ building building_temple_complex_seth = {
19571977
oracle_w : { pack:PACK_TEMPLE_SETH, id:2, offset:3 },
19581978
altar_n : { pack:PACK_TEMPLE_SETH, id:3 },
19591979
altar_w : { pack:PACK_TEMPLE_SETH, id:3, offset:3 },
1960-
tiles : { pack:PACK_TEMPLE_SETH, id:4 },
1980+
tiles_0 : { pack:PACK_TEMPLE_SETH, id:4 },
1981+
tiles_1 : { pack:PACK_TEMPLE_SETH, id:4, offset:1 },
1982+
tiles_2 : { pack:PACK_TEMPLE_SETH, id:4, offset:2 },
1983+
tiles_3 : { pack:PACK_TEMPLE_SETH, id:4, offset:3 },
19611984
statue_1 : { pack:PACK_TEMPLE_SETH, id:5 },
1962-
statue_2 : { pack:PACK_TEMPLE_SETH, id:6 },
1985+
statue_2n : { pack:PACK_TEMPLE_SETH, id:6 },
1986+
statue_2e : { pack:PACK_TEMPLE_SETH, id:6, offset:2 },
1987+
statue_2s : { pack:PACK_TEMPLE_SETH, id:6, offset:4 },
1988+
statue_2w : { pack:PACK_TEMPLE_SETH, id:6, offset:6 },
1989+
19631990
},
19641991

19651992
building_size : 3,
@@ -1978,9 +2005,15 @@ building building_temple_complex_bast = {
19782005
oracle_w : { pack:PACK_TEMPLE_BAST, id:2, offset:3 },
19792006
altar_n : { pack:PACK_TEMPLE_BAST, id:3 },
19802007
altar_w : { pack:PACK_TEMPLE_BAST, id:3, offset:3 },
1981-
tiles : { pack:PACK_TEMPLE_BAST, id:4 },
2008+
tiles_0 : { pack:PACK_TEMPLE_BAST, id:4 },
2009+
tiles_1 : { pack:PACK_TEMPLE_BAST, id:4, offset:1 },
2010+
tiles_2 : { pack:PACK_TEMPLE_BAST, id:4, offset:2 },
2011+
tiles_3 : { pack:PACK_TEMPLE_BAST, id:4, offset:3 },
19822012
statue_1 : { pack:PACK_TEMPLE_BAST, id:5 },
1983-
statue_2 : { pack:PACK_TEMPLE_BAST, id:6 },
2013+
statue_2n : { pack:PACK_TEMPLE_BAST, id:6 },
2014+
statue_2e : { pack:PACK_TEMPLE_BAST, id:6, offset:2 },
2015+
statue_2s : { pack:PACK_TEMPLE_BAST, id:6, offset:4 },
2016+
statue_2w : { pack:PACK_TEMPLE_BAST, id:6, offset:6 },
19842017
},
19852018

19862019
building_size : 3,

0 commit comments

Comments
 (0)