Replace spawn flags and chr flags with constants in setup files

This commit is contained in:
Ryan Dwyer
2021-05-17 22:29:56 +10:00
parent dc8c645432
commit 0b9f3c910b
26 changed files with 1137 additions and 1137 deletions
+15 -15
View File
@@ -62,10 +62,10 @@
* execution is immediately passed to the start of the new list (ie. there is no
* yield).
*/
#define set_ailist(chr, function) \
#define set_ailist(chr, ailist) \
mkshort(0x0005), \
chr, \
mkshort(function),
mkshort(ailist),
/**
* Sets the chr's return ailist. The return ailist can be jumped to using the
@@ -75,10 +75,10 @@
* set_ailist to assign a new one. The new ailist should use return to jump back
* to the original ailist.
*/
#define set_returnlist(chr, function) \
#define set_returnlist(chr, ailist) \
mkshort(0x0006), \
chr, \
mkshort(function),
mkshort(ailist),
/**
* Sets the list that should be assigned when the chr is shot.
@@ -90,9 +90,9 @@
* say something and wait for their injury animation to finish before they
* continue their regular logic.
*/
#define set_shotlist(function) \
#define set_shotlist(ailist) \
mkshort(0x0007), \
mkshort(function),
mkshort(ailist),
/**
* Assigns the chr's return list to their current one. Execution of the new list
@@ -1837,24 +1837,24 @@
/**
* Attempts to spawn a chr at the given pad.
*/
#define try_spawn_chr_at_pad(body, head, pad, function, spawnflags, label) \
#define try_spawn_chr_at_pad(body, head, pad, ailist, spawnflags, label) \
mkshort(0x00c6), \
body, \
head, \
mkshort(pad), \
mkshort(function), \
mkshort(ailist), \
mkword(spawnflags), \
label,
/**
* Attempts to spawn a chr at the given chr.
*/
#define try_spawn_chr_at_chr(body, head, u1, function, spawnflags, label) \
#define try_spawn_chr_at_chr(body, head, chrnum, ailist, spawnflags, label) \
mkshort(0x00c7), \
body, \
head, \
u1, \
mkshort(function), \
chrnum, \
mkshort(ailist), \
mkword(spawnflags), \
label,
@@ -1884,10 +1884,10 @@
mkword(flags), \
label,
#define try_spawn_clone2(chr, function, spawnflags, label) \
#define try_spawn_clone2(chr, ailist, spawnflags, label) \
mkshort(0x00ca), \
chr, \
mkshort(function), \
mkshort(ailist), \
mkword(spawnflags), \
label,
@@ -3895,9 +3895,9 @@
* Sets the current chr's darkroom ailist. This is assigned when the lights are
* switched off.
*/
#define set_darkroomlist(function) \
#define set_darkroomlist(ailist) \
mkshort(0x01c3), \
mkshort(function),
mkshort(ailist),
/**
* Sets the current chr's playerdead ailist. This is probably assigned when the
+9 -9
View File
@@ -33,18 +33,18 @@
_generic_object(0x08, scale, model, chr, flags, flags2, flags3, 1000), \
_mkword(_mkshort(weapon, 0), 0), 0x00ffffff, 0,
#define chr(unk1, id, pad, body, head, function, target_pad, target_chr, hear_dist, view_dist, flags, bank1flags, team, group, chair, group2, associated) \
#define chr(spawnflags, chrnum, pad, body, head, function, padpreset, chrpreset, hear_scale, view_dist, flags, flags2, team, squadron, chair, convtalk, tude, naturalanim, yvisang, teamscandist) \
0x09, \
unk1, \
_mkword(id, pad), \
spawnflags, \
_mkword(chrnum, pad), \
_mkword(_mkshort(body, head), function), \
_mkword(target_pad, target_chr), \
_mkword(hear_dist, view_dist), \
_mkword(padpreset, chrpreset), \
_mkword(hear_scale, view_dist), \
flags, \
bank1flags, \
_mkword(_mkshort(team, group), chair), \
group2, \
associated,
flags2, \
_mkword(_mkshort(team, squadron), chair), \
convtalk, \
_mkword(_mkshort(tude, naturalanim), _mkshort(yvisang, teamscandist)),
#define singlemonitor(scale, model, pad, flags, flags2, flags3, maxdamage, image) \
_generic_object(0x0a, scale, model, pad, flags, flags2, flags3, maxdamage), \