Feature #1107 ยป 0082-Make-default-animation-speed-tileset-controlled.patch
client/tilespec.c | ||
---|---|---|
int max_upkeep_height;
|
||
int svg_height;
|
||
int default_time_per_frame;
|
||
char *main_intro_filename;
|
||
enum direction8 unit_default_orientation;
|
||
... | ... | |
t->unit_upkeep_small_offset_y = secfile_lookup_int_default(file, t->unit_upkeep_offset_y,
|
||
"tilespec.unit_upkeep_small_offset_y");
|
||
t->svg_height = secfile_lookup_int_default(file, 44, "tilespec.svg_height");
|
||
t->default_time_per_frame = secfile_lookup_int_default(file, 3, "tilespec.time_per_frame");
|
||
t->city_size_offset_x = t->scale * t->city_size_offset_x;
|
||
t->city_size_offset_y = t->scale * t->city_size_offset_y;
|
||
... | ... | |
#define SET_ANIM(field, tag) \
|
||
do { \
|
||
t->sprites.field = anim_load(t, tag, 3); \
|
||
t->sprites.field = anim_load(t, tag, 0); \
|
||
if (t->sprites.field == NULL) { \
|
||
tileset_error(LOG_FATAL, tileset_name_get(t), \
|
||
_("Animation for tag '%s' missing."), tag); \
|
||
... | ... | |
/************************************************************************//**
|
||
Load an animation
|
||
@param t Tileset to load animation from
|
||
@param tag Base tag of the animation sprites
|
||
@param t Tileset to load animation from
|
||
@param tag Base tag of the animation sprites
|
||
@param time_per_frame How many refreshes there's between advancing to
|
||
the next frame. 0 for default.
|
||
****************************************************************************/
|
||
static struct anim *anim_load(struct tileset *t, const char *tag,
|
||
int time_per_frame)
|
||
... | ... | |
return nullptr;
|
||
}
|
||
if (time_per_frame <= 0) {
|
||
time_per_frame = t->default_time_per_frame;
|
||
}
|
||
ret = anim_new(frames, time_per_frame);
|
||
for (i = 0; i < frames; i++) {
|
||
... | ... | |
SET_SPRITE(unit.tired, "unit.tired");
|
||
t->sprites.unit.action_decision_want = anim_load(t, "unit.action_decision_want",
|
||
3);
|
||
0);
|
||
for (i = 0; i < NUM_TILES_HP_BAR; i++) {
|
||
fc_snprintf(buffer, sizeof(buffer), "unit.hp_%d", i*10);
|
data/3d.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
;unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|
data/alio.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|
data/amplio.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
;unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|
data/amplio2.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
;unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|
data/cimpletoon.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|
data/hex2t.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
;unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|
data/hexemplio.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
;unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|
data/isophex.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
;unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|
data/isotrident.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
;unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|
data/toonhex.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|
data/trident.tilespec | ||
---|---|---|
; valid direction for the tileset.
|
||
;unit_default_orientation = "s"
|
||
; How long (number of refreshes) it takes to move from an animation
|
||
; frame to the next.
|
||
time_per_frame = 3
|
||
; The map is rendered in "layers", just like any decent image editor
|
||
; supports. The setting below allows to change the layer drawing order. The
|
||
; first layer in the list will be drawn below the others; the second on top
|