Defines | |
#define | GEN_RAND_NUMBER (float)(rand())/(float)(RAND_MAX) |
#define | GEN_RAND_FROM_TO(from, to) from+ceil(GEN_RAND_NUMBER*(to-from)) |
#define | SWITCH_MACRO(e,...) switch (e) {__VA_ARGS__} |
#define | IF_X_OR_Y(var, x, y,...) |
#define | IF_X_AND_Y(var, x, y,...) |
#define | I_NAME(cname) it.name = cname; |
#define | I_ID(cid) it.id = cid; |
#define | I_CLASS(cclass) it.class = cclass; |
#define | I_LEVEL(clevel) it.level = clevel; |
#define | I_SUBCLASS(csubclass) it.subclass = csubclass; |
#define | S_NAME(cname) sk.name = cname; |
#define | S_ID(cid) sk.id = cid; |
#define | S_STATUS(cstatus) sk.status = cstatus; |
#define | S_LEVEL(clevel) sk.level = clevel; |
#define | M_NAME(cname) mon.name = cname; |
#define | M_SHOW(cshow) mon.show = cshow; |
#define | M_COLOR(ccolor) mon.color = ccolor; |
#define | M_CLASS(cclas) mon.class = cclas; |
#define | M_ID(cid) mon.id = cid; |
#define | M_MHP(cmhp) mon.mhp = cmhp; mon.hp = mon.mhp; |
#define | M_AC(cac) mon.ac = cac; |
#define | M_SPEED(cspeed) mon.speed = cspeed; |
#define | M_ATTACK(cpre, cpost, cbonus) mon.pre = cpre; mon.post = cpost; mon.bonus = cbonus; |
#define | M_DIFFICULTY(cdifficulty) mon.difficulty = cdifficulty; |
#define GEN_RAND_FROM_TO | ( | from, | |||
to | ) | from+ceil(GEN_RAND_NUMBER*(to-from)) |
#define GEN_RAND_NUMBER (float)(rand())/(float)(RAND_MAX) |
#define I_CLASS | ( | cclass | ) | it.class = cclass; |
#define I_ID | ( | cid | ) | it.id = cid; |
#define I_LEVEL | ( | clevel | ) | it.level = clevel; |
#define I_NAME | ( | cname | ) | it.name = cname; |
#define I_SUBCLASS | ( | csubclass | ) | it.subclass = csubclass; |
#define IF_X_AND_Y | ( | var, | |||
x, | |||||
y, | |||||
... | ) |
var = x; int foofoo = __VA_ARGS__; \ var = y; int barbar = __VA_ARGS__; if (foofoo && barbar)
#define IF_X_OR_Y | ( | var, | |||
x, | |||||
y, | |||||
... | ) |
var = x; int foofoo = __VA_ARGS__; \ var = y; int barbar = __VA_ARGS__; if (foofoo || barbar)
#define M_AC | ( | cac | ) | mon.ac = cac; |
#define M_ATTACK | ( | cpre, | |||
cpost, | |||||
cbonus | ) | mon.pre = cpre; mon.post = cpost; mon.bonus = cbonus; |
#define M_CLASS | ( | cclas | ) | mon.class = cclas; |
#define M_COLOR | ( | ccolor | ) | mon.color = ccolor; |
#define M_DIFFICULTY | ( | cdifficulty | ) | mon.difficulty = cdifficulty; |
#define M_ID | ( | cid | ) | mon.id = cid; |
#define M_MHP | ( | cmhp | ) | mon.mhp = cmhp; mon.hp = mon.mhp; |
#define M_NAME | ( | cname | ) | mon.name = cname; |
#define M_SHOW | ( | cshow | ) | mon.show = cshow; |
#define M_SPEED | ( | cspeed | ) | mon.speed = cspeed; |
#define S_ID | ( | cid | ) | sk.id = cid; |
#define S_LEVEL | ( | clevel | ) | sk.level = clevel; |
#define S_NAME | ( | cname | ) | sk.name = cname; |
#define S_STATUS | ( | cstatus | ) | sk.status = cstatus; |
#define SWITCH_MACRO | ( | e, | |||
... | ) | switch (e) {__VA_ARGS__} |