41 va_start(
args, eventcode);
46 op = va_arg(
args,
object *);
48 (*(*gh).second)(&rt, eventcode,
op);
55 (*(*gh).second)(&rt, eventcode);
61 (*(*gh).second)(&rt, eventcode);
67 op = va_arg(
args,
object *);
68 op2 = va_arg(
args,
object *);
70 (*(*gh).second)(&rt, eventcode,
op, op2);
76 op = va_arg(
args,
object *);
77 op2 = va_arg(
args,
object *);
79 (*(*gh).second)(&rt, eventcode,
op, op2);
88 (*(*gh).second)(&rt, eventcode,
pl,
buf);
97 (*(*gh).second)(&rt, eventcode,
pl,
buf);
103 op = va_arg(
args,
object *);
106 (*(*gh).second)(&rt, eventcode,
op,
map);
112 op = va_arg(
args,
object *);
115 (*(*gh).second)(&rt, eventcode,
op,
map);
123 (*(*gh).second)(&rt, eventcode,
map);
129 op = va_arg(
args,
object *);
131 (*(*gh).second)(&rt, eventcode,
op);
137 op = va_arg(
args,
object *);
139 i = va_arg(
args,
int);
141 (*(*gh).second)(&rt, eventcode,
op,
buf, i);
147 op = va_arg(
args,
object *);
148 buf = va_arg(
args,
const char *);
149 op2 = va_arg(
args,
object *);
151 (*(*gh).second)(&rt, eventcode,
op,
buf, op2);
157 op = va_arg(
args,
object *);
160 (*(*gh).second)(&rt, eventcode,
op,
buf);
166 op = va_arg(
args,
object *);
169 (*(*gh).second)(&rt, eventcode,
op,
buf);
177 (*(*gh).second)(&rt, eventcode,
map);
185 (*(*gh).second)(&rt, eventcode,
map);
193 (*(*gh).second)(&rt, eventcode,
map);
206 object *
inv =
op->inv;
218 bool debug_events = (getenv(
"CF_DEBUG_EVENTS") != NULL);
228 LOG(
llevDebug,
"********** EVENT HANDLER **********\n");
235 if (
tmp->title != NULL)
237 if (
tmp->slaying != NULL)
239 if (
tmp->name != NULL)
243 if (
tmp->title == NULL) {
245 LOG(
llevError,
"Event object without title at %d/%d in map %s\n",
env->x,
env->y,
env->map ?
env->map->name :
"(null map)");
248 }
else if (
tmp->slaying == NULL) {
250 LOG(
llevError,
"Event object without slaying at %d/%d in map %s\n",
env->x,
env->y,
env->map ?
env->map->name :
"(null map)");
257 LOG(
llevError,
"The requested handler doesn't exist: %s at %d/%d in map %s\n",
tmp->title,
env->x,
env->y,
env->map ?
env->map->name :
"(null map)");
291 LOG(
llevDebug,
"events: registered object handler %s\n",
id);
296 LOG(
llevDebug,
"events: unregistered object handler %s\n",
id);