comparison src/creep.c @ 13:d118fe8fb1db

Make cursor and creeps play nice
author Mike Pavone <pavone@retrodev.com>
date Sun, 12 Jan 2014 17:19:42 -0800
parents c0bb53eaa6f4
children 5c7f33441e43
comparison
equal deleted inserted replaced
12:1ee4a5c23c95 13:d118fe8fb1db
10 u16 spawn_creep(u8 species, s16 x, s16 y) 10 u16 spawn_creep(u8 species, s16 x, s16 y)
11 { 11 {
12 u16 index; 12 u16 index;
13 for (index = 0; index < MAX_SPRITE; index++) 13 for (index = 0; index < MAX_SPRITE; index++)
14 { 14 {
15 if (spriteDefCache[index].posx <= 0) { 15 if (spriteDefCache[index].posx == -0x80) {
16 break; 16 break;
17 } 17 }
18 } 18 }
19 if (index > 0) { 19 if (index > 0) {
20 VDP_setSprite(index, x, y, SPRITE_SIZE(1, 1), TILE_ATTR_FULL(2, 0, 0, 0, 'C' + TILE_FONTINDEX), spriteDefCache[0].link); 20 VDP_setSprite(index, x, y, SPRITE_SIZE(1, 1), TILE_ATTR_FULL(2, 0, 0, 0, 'C' + TILE_FONTINDEX), spriteDefCache[0].link);