Feature #1157 ยป 0074-Animate-3Layer-extras-background.patch
client/tilespec.c | ||
---|---|---|
struct anim *single;
|
||
struct sprite *cardinals[MAX_INDEX_CARDINAL];
|
||
struct {
|
||
struct sprite
|
||
*background;
|
||
struct anim
|
||
*foreground,
|
||
*middleground;
|
||
*middleground,
|
||
*background;
|
||
} bmf;
|
||
struct {
|
||
struct sprite
|
||
... | ... | |
sz_strlcpy(full_tag_name, tag);
|
||
strcat(full_tag_name, "_bg");
|
||
t->sprites.extras[id].u.bmf.background = load_sprite(t, full_tag_name,
|
||
TRUE, TRUE, FALSE);
|
||
t->sprites.extras[id].u.bmf.background = anim_load(t, full_tag_name, 0);
|
||
sz_strlcpy(full_tag_name, tag);
|
||
strcat(full_tag_name, "_mg");
|
||
... | ... | |
extra_type_list_iterate(t->style_lists[ESTYLE_3LAYER], pextra) {
|
||
if (tile_has_extra(ptile, pextra)
|
||
&& is_extra_drawing_enabled(pextra)
|
||
&& t->sprites.extras[extra_index(pextra)].u.bmf.background) {
|
||
&& t->sprites.extras[extra_index(pextra)].u.bmf.background != nullptr) {
|
||
bool hidden = FALSE;
|
||
extra_type_list_iterate(pextra->hiders, phider) {
|
||
... | ... | |
} extra_type_list_iterate_end;
|
||
if (!hidden) {
|
||
ADD_SPRITE_FULL(t->sprites.extras[extra_index(pextra)].u.bmf.background);
|
||
ADD_ANIM_FULL(t->sprites.extras[extra_index(pextra)].u.bmf.background);
|
||
}
|
||
}
|
||
} extra_type_list_iterate_end;
|
||
... | ... | |
return 0;
|
||
}
|
||
#define ADD_SPRITE_IF_NOT_NULL(x) do {\
|
||
if ((x) != NULL) {\
|
||
ADD_SPRITE_FULL(x);\
|
||
}\
|
||
} while (FALSE)
|
||
#define ADD_FRAME0_IF_NOT_NULL(x) do {\
|
||
if ((x) != nullptr) {\
|
||
ADD_FRAME0_FULL(x);\
|
||
... | ... | |
} while (FALSE)
|
||
/* Corresponds to LAYER_SPECIAL{1,2,3} order. */
|
||
ADD_SPRITE_IF_NOT_NULL(t->sprites.extras[idx].u.bmf.background);
|
||
ADD_FRAME0_IF_NOT_NULL(t->sprites.extras[idx].u.bmf.background);
|
||
ADD_FRAME0_IF_NOT_NULL(t->sprites.extras[idx].u.bmf.middleground);
|
||
ADD_FRAME0_IF_NOT_NULL(t->sprites.extras[idx].u.bmf.foreground);
|
||
#undef ADD_SPRITE_IF_NOT_NULL
|
||
#undef ADD_FRAME0_IF_NOT_NULL
|
||
return sprs - saved_sprs;
|
data/alio/fortresses.spec | ||
---|---|---|
tiles = { "row", "column", "tag"
|
||
0, 0, "base.force_fortress_bg"
|
||
0, 0, "base.force_fortress_bg_0"
|
||
1, 0, "base.force_fortress_fg_0"
|
||
0, 1, "base.tower_bg"
|
||
0, 1, "base.tower_bg_0"
|
||
1, 1, "base.tower_fg_0"
|
||
}
|
data/amplio/moderncities.spec | ||
---|---|---|
0, 1, "base.airbase_mg_0"
|
||
0, 2, "tx.airbase_full"
|
||
0, 4, "base.outpost_fg_0"
|
||
0, 5, "base.outpost_bg"
|
||
0, 5, "base.outpost_bg_0"
|
||
0, 6, "city.electricage_occupied_0"
|
||
0, 6, "city.modern_occupied_0"
|
||
0, 6, "city.postmodern_occupied_0"
|
||
... | ... | |
1, 1, "base.airstrip_mg_0"
|
||
1, 4, "base.fortress_fg_0"
|
||
1, 5, "base.fortress_bg"
|
||
1, 5, "base.fortress_bg_0"
|
||
;
|
||
; city tiles
|
||
;
|
data/amplio2/bases.spec | ||
---|---|---|
0, 1, "tx.airbase_full"
|
||
;[HH]
|
||
0, 3, "base.fortress_fg_0"
|
||
0, 4, "base.fortress_bg"
|
||
0, 4, "base.fortress_bg_0"
|
||
;[HH][GS]
|
||
1, 0, "base.airstrip_mg_0"
|
||
;[El]
|
||
... | ... | |
1, 2, "extra.ruins_mg_0"
|
||
;[HH][GS]
|
||
1, 3, "base.outpost_fg_0"
|
||
1, 4, "base.outpost_bg"
|
||
1, 4, "base.outpost_bg_0"
|
||
; [SK]
|
||
1, 5, "extra.transport_hub_mg_0"
|
||
;[Lexxie]
|
||
2, 2, "base.castle2_fg_0" ; Alternate castle (larger 'closed' version which makes hidden units more plausible ...
|
||
2, 3, "base.castle2_bg" ; ... but also hides the terrain graphics)
|
||
2, 3, "base.castle2_bg_0" ; ... but also hides the terrain graphics)
|
||
2, 4, "base.castle_fg_0"
|
||
2, 5, "base.castle_bg"
|
||
2, 5, "base.castle_bg_0"
|
||
;[HH]
|
||
0, 2, "cd.occupied",
|
||
"city.european_occupied_0",
|
data/hex2t/items.spec | ||
---|---|---|
1, 5, "base.buoy_mg_0"
|
||
1, 6, "extra.ruins_mg_0"
|
||
3, 8, "base.outpost_fg_0"
|
||
3, 9, "base.outpost_bg"
|
||
3, 9, "base.outpost_bg_0"
|
||
4, 8, "base.fortress_fg_0"
|
||
4, 9, "base.fortress_bg"
|
||
4, 9, "base.fortress_bg_0"
|
||
; default city tiles
|
||
2, 2, "cd.city"
|
data/hexemplio/bases.spec | ||
---|---|---|
1, 1, "tx.airbase_full"
|
||
;[HH][GS]
|
||
1, 2, "base.outpost_fg_0"
|
||
0, 2, "base.outpost_bg"
|
||
0, 2, "base.outpost_bg_0"
|
||
;[HH]
|
||
1, 3, "base.fortress_fg_0"
|
||
0, 3, "base.fortress_bg"
|
||
0, 3, "base.fortress_bg_0"
|
||
;[HH]
|
||
0, 4, "city.disorder"
|
||
;[El]
|
data/isotrident/cities.spec | ||
---|---|---|
0, 2, "tx.airbase_full"
|
||
0, 3, "base.airstrip_mg_0"
|
||
0, 4, "base.fortress_fg_0"
|
||
0, 5, "base.fortress_bg"
|
||
0, 5, "base.fortress_bg_0"
|
||
0, 6, "extra.ruins_mg_0"
|
||
0, 7, "base.buoy_mg_0"
|
||
0, 8, "base.outpost_fg_0"
|
||
0, 9, "base.outpost_bg"
|
||
0, 9, "base.outpost_bg_0"
|
||
;
|
||
; city tiles
|
data/trident/tiles.spec | ||
---|---|---|
16, 9, "base.airstrip_mg_0"
|
||
16, 10, "base.airbase_mg_0"
|
||
16, 11, "base.outpost_mg_0"
|
||
16, 12, "base.fortress_bg"
|
||
16, 12, "base.fortress_bg_0"
|
||
; Numbers: city size: (also used for goto)
|
||