Mercurial > hg > early-roguelike
comparison xrogue/rogue.h @ 238:e1cd27c5464f
arogue7, xrogue: improve the handling of the arguments to fuses.
fuse() now expects a pointer as the argument to a fuse function. If
this is one of the functions that takes int, fuse() follows the pointer
and stores that value in the f_list slot, in the integer field of the
argument union. When the fuse goes off, do_fuses() recognizes the
function and passes it the integer field instead of the pointer.
This has the disadvantage of hard-coding the functions that require int
in daemon.c, but since the int is copied into f_list, it no longer has
to be in static or global memory, which simplifies several files.
author | John "Elwin" Edwards |
---|---|
date | Fri, 11 Mar 2016 17:40:00 -0500 |
parents | 7c1cb43f346e |
children | 3d4252fa2ed3 |
comparison
equal
deleted
inserted
replaced
237:2236ef808bcb | 238:e1cd27c5464f |
---|---|
1243 bool can_blink(struct thing *tp); | 1243 bool can_blink(struct thing *tp); |
1244 int can_shoot(coord *er, coord *ee, coord *shoot_dir); | 1244 int can_shoot(coord *er, coord *ee, coord *shoot_dir); |
1245 bool cansee(int y, int x); | 1245 bool cansee(int y, int x); |
1246 void carry_obj(struct thing *mp, int chance); | 1246 void carry_obj(struct thing *mp, int chance); |
1247 void cast(void); | 1247 void cast(void); |
1248 void changeclass(long *newclass); | 1248 void changeclass(int newclass); |
1249 void chant(void); | 1249 void chant(void); |
1250 void chant_recovery(void); | 1250 void chant_recovery(void); |
1251 void chase(struct thing *tp, coord *ee, struct room *rer, struct room *ree, | 1251 void chase(struct thing *tp, coord *ee, struct room *rer, struct room *ree, |
1252 bool flee); | 1252 bool flee); |
1253 long check_level(void); | 1253 long check_level(void); |