me.itemAbsSize = '0 0 0';
SUPER(XonoticMapList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
- me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+ me.itemAbsSize.y = absSize.y * me.itemHeight;
+ me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+ me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+ me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize.y);
me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize.y;
{
float i, j, n;
string s;
- float gt, f;
- gt = MapInfo_CurrentGametype();
- f = MapInfo_CurrentFeatures();
+ Gametype gt = MapInfo_CurrentGametype();
+ int f = MapInfo_CurrentFeatures();
MapInfo_FilterGametype(gt, f, MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
if (me.stringFilter)
MapInfo_FilterString(me.stringFilter);
for(i = 0; i < MapInfo_count; ++i)
draw_PreloadPicture(strcat("/maps/", MapInfo_BSPName_ByID(i)));
- if(me.g_maplistCache)
- strunzone(me.g_maplistCache);
s = "0";
for(i = 1; i < MapInfo_count; i *= 2)
s = strcat(s, s);
);
}
}
- me.g_maplistCache = strzone(s);
+ strcpy(me.g_maplistCache, s);
if(gt != me.lastGametype || f != me.lastFeatures)
{
me.lastGametype = gt;
void MapList_StringFilterBox_Change(entity box, entity me)
{
- if(me.stringFilter)
- strunzone(me.stringFilter);
+ strfree(me.stringFilter);
if(box.text != "")
me.stringFilter = strzone(box.text);
- else
- me.stringFilter = string_null;
me.refilter(me);
}
{
float i;
string s;
- MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MapInfo_ForbiddenFlags(), 0); // all
+ _MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, MapInfo_ForbiddenFlags(), 0); // all
s = "";
for(i = 0; i < MapInfo_count; ++i)
s = strcat(s, " ", MapInfo_BSPName_ByID(i));
m = MapInfo_BSPName_ByID(i);
if (!m)
{
- LOG_INFO(_("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n"));
+ LOG_INFO(_("Huh? Can't play this (m is NULL). Refiltering so this won't happen again."));
me.refilter(me);
return;
}
}
else
{
- LOG_INFO(_("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n"));
+ LOG_INFO(_("Huh? Can't play this (invalid game type). Refiltering so this won't happen again."));
me.refilter(me);
return;
}
if(time < me.typeToSearchTime)
{
save = substring(me.typeToSearchString, 0, strlen(me.typeToSearchString) - 1);
- if(me.typeToSearchString)
- strunzone(me.typeToSearchString);
- me.typeToSearchString = strzone(save);
+ strcpy(me.typeToSearchString, save);
me.typeToSearchTime = time + 0.5;
if(strlen(me.typeToSearchString))
{
save = ch;
else
save = strcat(me.typeToSearchString, ch);
- if(me.typeToSearchString)
- strunzone(me.typeToSearchString);
- me.typeToSearchString = strzone(save);
+ strcpy(me.typeToSearchString, save);
me.typeToSearchTime = time + 0.5;
MapInfo_FindName(me.typeToSearchString);
if(MapInfo_FindName_firstResult >= 0)