comparison libcore/core/sprite.c @ 192:4ad7420ab678

rpg: add minimalist battle system, continue #2477 @60h - Implement battle as states, - Add basic support for spells (no calculation yet), - Add won/lost state, - Add animations and messages, - Add order.
author David Demelier <markand@malikania.fr>
date Sat, 07 Nov 2020 16:00:39 +0100
parents eb0a7ab71023
children
comparison
equal deleted inserted replaced
191:633a25df450e 192:4ad7420ab678
45 45
46 return texture_ok(sprite->texture) && sprite->cellw != 0 && sprite->cellh != 0; 46 return texture_ok(sprite->texture) && sprite->cellw != 0 && sprite->cellh != 0;
47 } 47 }
48 48
49 bool 49 bool
50 sprite_draw(struct sprite *sprite, unsigned int r, unsigned int c, int x, int y) 50 sprite_draw(const struct sprite *sprite, unsigned int r, unsigned int c, int x, int y)
51 { 51 {
52 assert(sprite_ok(sprite)); 52 assert(sprite_ok(sprite));
53 assert(r < sprite->nrows); 53 assert(r < sprite->nrows);
54 assert(c < sprite->ncols); 54 assert(c < sprite->ncols);
55 55