Pass old element to empfile callback prewrite()
Change sct_prewrite(), shp_prewrite(), pln_prewrite(), lnd_prewrite(), nuk_prewrite() accordingly. New argument isn't used for anything, yet.
This commit is contained in:
parent
0bcd0a8422
commit
c5482e4bfb
9 changed files with 33 additions and 33 deletions
|
@ -67,12 +67,12 @@ struct empfile {
|
|||
*/
|
||||
void (*postread)(int id, void *elt);
|
||||
/*
|
||||
* Called before write. ID is the element id, and ELT is the
|
||||
* element being written. May modify the element. Modifications
|
||||
* will be visible to caller of ef_write() and are written to the
|
||||
* file.
|
||||
* Called before write. ID is the element id, OLD is the element
|
||||
* being updated (null unless it is cached) and ELT is the element
|
||||
* being written. May modify the element. Modifications will be
|
||||
* visible to caller of ef_write() and are written to the file.
|
||||
*/
|
||||
void (*prewrite)(int id, void *elt);
|
||||
void (*prewrite)(int id, void *old, void *elt);
|
||||
};
|
||||
|
||||
struct emptypedstr {
|
||||
|
|
|
@ -451,7 +451,7 @@ extern int getele(char *, char *);
|
|||
/* land.c */
|
||||
extern char *prland(struct lndstr *);
|
||||
extern void lnd_postread(int, void *);
|
||||
extern void lnd_prewrite(int, void *);
|
||||
extern void lnd_prewrite(int, void *, void *);
|
||||
/* landgun.c */
|
||||
extern double seagun(int, int);
|
||||
extern double fortgun(int, int);
|
||||
|
@ -518,7 +518,7 @@ extern void nreport(natid, int, natid, int);
|
|||
/* nuke.c */
|
||||
extern char *prnuke(struct nukstr *);
|
||||
extern void nuk_postread(int, void *);
|
||||
extern void nuk_prewrite(int, void *);
|
||||
extern void nuk_prewrite(int, void *, void *);
|
||||
extern int nuk_on_plane(struct nukstr *, int);
|
||||
/* nxtitem.c */
|
||||
extern int nxtitem(struct nstr_item *, void *);
|
||||
|
@ -529,7 +529,7 @@ extern int onearg(char *, char *);
|
|||
/* plane.c */
|
||||
extern char *prplane(struct plnstr *);
|
||||
extern void pln_postread(int, void *);
|
||||
extern void pln_prewrite(int, void *);
|
||||
extern void pln_prewrite(int, void *, void *);
|
||||
/* plnsub.c */
|
||||
extern void count_planes(struct shpstr *);
|
||||
extern int get_planes(struct nstr_item *, struct nstr_item *,
|
||||
|
@ -619,7 +619,7 @@ extern void satmap(int, int, int, int, int, int);
|
|||
extern void sathead(void);
|
||||
/* sect.c */
|
||||
extern void sct_postread(int, void *);
|
||||
extern void sct_prewrite(int, void *);
|
||||
extern void sct_prewrite(int, void *, void *);
|
||||
extern void item_prewrite(short *);
|
||||
extern int issector(char *);
|
||||
/* sectdamage.c */
|
||||
|
@ -628,7 +628,7 @@ extern int sectdamage(struct sctstr *, int);
|
|||
/* ship.c */
|
||||
extern char *prship(struct shpstr *);
|
||||
extern void shp_postread(int, void *);
|
||||
extern void shp_prewrite(int, void *);
|
||||
extern void shp_prewrite(int, void *, void *);
|
||||
/* show.c */
|
||||
extern void show_bridge(int);
|
||||
extern void show_tower(int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue