Skip to content

Commit

Permalink
Change lighthouse keeper image
Browse files Browse the repository at this point in the history
  • Loading branch information
Keriew committed May 30, 2024
1 parent 4ba5532 commit e5c653a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
16 changes: 12 additions & 4 deletions src/figuretype/supplier.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,21 @@ void figure_supplier_action(figure *f)
dir * 12 + f->image_offset;
}
} else if (f->type == FIGURE_LIGHTHOUSE_SUPPLIER) {
if (f->action_state == FIGURE_ACTION_146_SUPPLIER_RETURNING) {
f->cart_image_id = resource_get_data(f->collecting_item_id)->image.cart.single_load;
} else {
f->cart_image_id = image_group(GROUP_FIGURE_CARTPUSHER_CART);
}
int dir = figure_image_normalize_direction(f->direction < 8 ? f->direction : f->previous_tile_direction);
if (f->action_state == FIGURE_ACTION_149_CORPSE) {
f->image_id = assets_get_image_id("Walkers", "Slave death 01") +
figure_image_corpse_offset(f);
f->image_id = image_group(GROUP_FIGURE_CARTPUSHER) + figure_image_corpse_offset(f) + 96;
f->cart_image_id = 0;
} else {
f->image_id = assets_get_image_id("Walkers", "Slave NE 01") +
dir * 12 + f->image_offset;
f->image_id = image_group(GROUP_FIGURE_CARTPUSHER) + dir + 8 * f->image_offset;
}
if (f->cart_image_id) {
f->cart_image_id += dir;
figure_image_set_cart_offset(f, dir);
}
} else if (f->type == FIGURE_CARAVANSERAI_SUPPLIER) {
int dir = figure_image_normalize_direction(f->direction < 8 ? f->direction : f->previous_tile_direction);
Expand Down
1 change: 1 addition & 0 deletions src/widget/city_figure.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ static void draw_figure(const figure *f, int x, int y, float scale, int highligh
case FIGURE_NATIVE_TRADER:
case FIGURE_IMMIGRANT:
case FIGURE_EMIGRANT:
case FIGURE_LIGHTHOUSE_SUPPLIER:
draw_figure_with_cart(f, x, y, scale);
break;
case FIGURE_HIPPODROME_HORSES:
Expand Down
3 changes: 1 addition & 2 deletions src/window/building/figures.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static const int FIGURE_TYPE_TO_BIG_FIGURE_IMAGE[] = {
8, 8, 34, 39, 33, 43, 27, 48, 63, 8, //50-59
8, 8, 8, 8, 53, 8, 38, 62, 54, 55, //60-69
56, 8, 8, 58, 0, 7, 50, 0, 14, 3, //70-79
3, 58, 50, 0, 0, 3, 15, 15, 0, 3, //80-89
3, 58, 50, 0, 0, 3, 15, 15, 0, 51, //80-89
0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, //90-99
};
// Starting with FIGURE_WORK_CAMP_WORKER = 73,
Expand Down Expand Up @@ -79,7 +79,6 @@ static int big_people_image(figure_type type)
{
switch (type) {
case FIGURE_WORK_CAMP_SLAVE:
case FIGURE_LIGHTHOUSE_SUPPLIER:
return assets_get_image_id("Walkers", "Slave Portrait");
case FIGURE_CARAVANSERAI_SUPPLIER:
return assets_get_image_id("Walkers", "caravanserai_overseer_portrait");
Expand Down

0 comments on commit e5c653a

Please sign in to comment.