# HG changeset patch # User David Demelier # Date 1615380312 -3600 # Node ID 1606b061e4ce11a7c9df0cc9ef164d2507f9a2a8 # Parent 5abf2ebb162148dfc9141f05b0f7a97c15f35594 examples: fix actions diff -r 5abf2ebb1621 -r 1606b061e4ce examples/example-action/main.c --- a/examples/example-action/main.c Fri Mar 05 10:08:29 2021 +0100 +++ b/examples/example-action/main.c Wed Mar 10 13:45:12 2021 +0100 @@ -291,9 +291,10 @@ { (void)act; - const int row = chest.opened ? 3 : 0; + const int row = chest.opened ? chest.sprite.nrows - 1 : 0; + const int col = chest.opened ? chest.sprite.ncols - 1 : 0; - sprite_draw(&chest.sprite, row, 0, chest.x, chest.y); + sprite_draw(&chest.sprite, row, col, chest.x, chest.y); } static void