void gvarWeightItem(coord_t x, coord_t y, MixData *md, uint8_t attr, uint8_t event) { u_int8int16_t weight; MD_WEIGHT_TO_UNION(md, weight); weight.word = GVAR_MENU_ITEM(x, y, weight.word, GV_RANGELARGE_WEIGHT_NEG, GV_RANGELARGE_WEIGHT, attr, 0, event); MD_UNION_TO_WEIGHT(weight, md); }
void mixSetWeight(MixData* md, int8_t weight) { u_int8int16_t tmp; tmp.word=weight; MD_UNION_TO_WEIGHT(tmp,md); // MD_SETWEIGHT(md,weight); doesn't matter here in code cost compiler optimizes this anyway }