Ok, I found that the problem with rect string - working nice without it. And here I found the main problem.
This code works perfect:
PHP Code:
#ifndef DRAW_WEAPON_ITEM
#define DRAW_WEAPON_ITEM(_key, _name) \
itemDef \
{ \
name "button_" ## #_name \
visible 1 \
rect _key 128 24 \
forecolor GLOBAL_UNFOCUSED_COLOR \
dvar "ui_weapon_" ## #_name \
textfont UI_FONT_NORMAL \
textscale .25 \
textstyle ITEM_TEXTSTYLE_SHADOWED \
textalignx 10 \
textaligny 20 \
}
#endif
DRAW_WEAPON_ITEM(ORIGIN_CHOICEA, m1carbine_mp)
And this code doesn't:
PHP Code:
#ifndef DRAW_WEAPON_ITEM
#define DRAW_WEAPON_ITEM(_key, _name) \
itemDef \
{ \
name "button_" ## #_name \
visible 1 \
rect _key 128 24 \
forecolor GLOBAL_UNFOCUSED_COLOR \
dvar "ui_weapon_" ## #_name \
textfont UI_FONT_NORMAL \
textscale .25 \
textstyle ITEM_TEXTSTYLE_SHADOWED \
textalignx 10 \
textaligny 20 \
}
#endif
#define DRAW_WEAPON(_key, _name) DRAW_WEAPON_ITEM(_key, _name)
DRAW_WEAPON(ORIGIN_CHOICEA, m1carbine_mp)
But as we know (from old kung's message) we can use macroses with variables in macroses. So, I think, the problem with ORIGIN_CHOICEA. In second case something is wrong with it. And I guess that ORIGIN_CHOICEA in DRAW_WEAPON is setting to real variables. In first case we set just in DRAW_WEAPON_ITEM directly.
Well, trying to find, how to fix it.