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.
This commit is contained in:
parent
dafa5cc722
commit
758c6b1bf0
21 changed files with 147 additions and 124 deletions
|
|
@ -966,7 +966,6 @@ killed(struct linked_list *item, bool pr, bool points, bool treasure)
|
|||
register struct linked_list *pitem, *nexti, *mitem;
|
||||
char *monst;
|
||||
int adj; /* used for hit point adj. below. */
|
||||
long temp;
|
||||
|
||||
tp = THINGPTR(item);
|
||||
|
||||
|
|
@ -1029,8 +1028,7 @@ killed(struct linked_list *item, bool pr, bool points, bool treasure)
|
|||
if (roll(1,100) < killed_chance) {
|
||||
msg("You had a feeling this was going to happen... ");
|
||||
msg("**POOF** ");
|
||||
temp = C_ASSASSIN; /* make him pay */
|
||||
changeclass(&temp);
|
||||
changeclass(C_ASSASSIN); /* make him pay */
|
||||
}
|
||||
else {
|
||||
switch (rnd(9)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue