| 1 |
#ifdef HAVE_CONFIG_H |
| 2 |
#include <config.h> |
| 3 |
#endif |
| 4 |
|
| 5 |
#include "brain.h" |
| 6 |
#include "live_sprites_manager.h" |
| 7 |
#include "gfx.h" |
| 8 |
#include "live_screen.h" /* draw_sprite_game */ |
| 9 |
|
| 10 |
void one_time_brain(int h) |
| 11 |
{ |
| 12 |
|
| 13 |
//goes once then draws last frame to background |
| 14 |
|
| 15 |
if (spr[h].move_active) |
| 16 |
{ |
| 17 |
process_move(h); |
| 18 |
return; |
| 19 |
} |
| 20 |
|
| 21 |
if (spr[h].follow > 0) |
| 22 |
{ |
| 23 |
process_follow(h); |
| 24 |
} |
| 25 |
|
| 26 |
|
| 27 |
if (spr[h].seq == 0) |
| 28 |
{ |
| 29 |
draw_sprite_game(IOGFX_background, h); |
| 30 |
lsm_remove_sprite(h); |
| 31 |
return; |
| 32 |
} |
| 33 |
|
| 34 |
changedir(spr[h].dir,h,-1); |
| 35 |
automove(h); |
| 36 |
|
| 37 |
} |
| 38 |
|
| 39 |
void one_time_brain_for_real(int h) |
| 40 |
{ |
| 41 |
|
| 42 |
if (spr[h].move_active) |
| 43 |
{ |
| 44 |
process_move(h); |
| 45 |
} |
| 46 |
|
| 47 |
|
| 48 |
if (spr[h].follow > 0) |
| 49 |
{ |
| 50 |
process_follow(h); |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
if (spr[h].seq == 0) |
| 55 |
{ |
| 56 |
|
| 57 |
lsm_remove_sprite(h); |
| 58 |
return; |
| 59 |
} |
| 60 |
if (spr[h].dir > 0) |
| 61 |
{ |
| 62 |
changedir(spr[h].dir,h,-1); |
| 63 |
automove(h); |
| 64 |
} |
| 65 |
} |