| 67 | } |
| 68 | |
| 69 | BOOL sync_monster_active(TSyncMonster *p) |
| 70 | { |
| 71 | int i, m, ndx; |
| 72 | DWORD lru; |
| 73 | |
| 74 | ndx = -1; |
| 75 | lru = 0xFFFFFFFF; |
| 76 | |
| 77 | for (i = 0; i < nummonsters; i++) { |
| 78 | m = monstactive[i]; |
| 79 | if (sync_word_6AA708[m] < lru && sgwLRU[m] < 0xFFFE) { |
| 80 | lru = sync_word_6AA708[m]; |
| 81 | ndx = monstactive[i]; |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | if (ndx == -1) { |
| 86 | return FALSE; |
| 87 | } |
| 88 | |
| 89 | sync_monster_pos(p, ndx); |
| 90 | return TRUE; |
| 91 | } |
| 92 | |
| 93 | void sync_monster_pos(TSyncMonster *p, int ndx) |
| 94 | { |
no test coverage detected