ice Warning (trunk only)
This commit is contained in:
@@ -1585,6 +1585,34 @@ short func_index;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* When is the spot timer of type func_index going to expire?
|
||||
* Returns 0L if no such timer.
|
||||
*/
|
||||
long
|
||||
spot_time_expires(x,y,func_index)
|
||||
xchar x,y;
|
||||
short func_index;
|
||||
{
|
||||
timer_element *curr;
|
||||
long where = (((long)x << 16) | ((long)y));
|
||||
|
||||
for (curr = timer_base; curr; curr = curr->next) {
|
||||
if (curr->kind == TIMER_LEVEL &&
|
||||
curr->func_index == func_index && curr->arg == (genericptr_t)where)
|
||||
return curr->timeout;
|
||||
}
|
||||
return 0L;
|
||||
}
|
||||
|
||||
long
|
||||
spot_time_left(x,y,func_index)
|
||||
xchar x,y;
|
||||
short func_index;
|
||||
{
|
||||
long expires = spot_time_expires(x,y,func_index);
|
||||
return (expires > 0L) ? expires - monstermoves : 0L;
|
||||
}
|
||||
|
||||
/* Insert timer into the global queue */
|
||||
STATIC_OVL void
|
||||
|
||||
Reference in New Issue
Block a user