]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use draw_PictureSize == '0 0 0' instead of draw_PreloadPicture == "", since preloadin...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 Jan 2012 16:55:47 +0000 (18:55 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 Jan 2012 16:55:47 +0000 (18:55 +0200)
qcsrc/client/mapvoting.qc
qcsrc/menu/xonotic/campaign.c
qcsrc/menu/xonotic/dialog_multiplayer_create_mapinfo.c
qcsrc/menu/xonotic/maplist.c
qcsrc/menu/xonotic/playermodel.c
qcsrc/menu/xonotic/skinlist.c

index 1eeb304c7c169e29d5cc92fd43fc428f8a5b54bc..ebb2c4e746a4961ecccbfb993ee081d7ab227e65 100644 (file)
@@ -88,7 +88,7 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        }
        else
        {
-               if(precache_pic(pic) == "")
+               if(drawgetimagesize(pic) == '0 0 0')
                        drawpic(pos, draw_UseSkinFor("nopreview_map"), img_size, '1 1 1', theAlpha, DRAWFLAG_NORMAL);
                else
                        drawpic(pos, pic, img_size, '1 1 1', theAlpha, DRAWFLAG_NORMAL);
index 72191ac51f5fb34ee2b739dad1b5ba7e8d9f6714..0537967bd69cf564c33986968426c98e8acb69a7 100644 (file)
@@ -275,7 +275,7 @@ void XonoticCampaignList_drawListBoxItem(entity me, float i, vector absSize, flo
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
 
        s = ftos(p);
-       if(draw_PreloadPicture(strcat("/maps/", campaign_mapname[i])) == "")
+       if(draw_PictureSize(strcat("/maps/", campaign_mapname[i])) == '0 0 0')
                draw_Picture(me.columnPreviewOrigin * eX, "nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
        else
                draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", campaign_mapname[i]), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
index 98395eab490a6cc348e5a1bb91f4568ae483ff87..169e9734b16a6b69ae1b0633abb69ab75f5613e9 100644 (file)
@@ -54,7 +54,7 @@ void XonoticMapInfoDialog_loadMapInfo(entity me, float i, entity mlb)
        me.authorLabel.setText(me.authorLabel, me.currentMapAuthor);
        me.descriptionLabel.setText(me.descriptionLabel, me.currentMapDescription);
        me.featuresLabel.setText(me.featuresLabel, me.currentMapFeaturesText);
-       if(draw_PreloadPicture(me.currentMapPreviewImage) == "")
+       if(draw_PictureSize(me.currentMapPreviewImage) == '0 0 0')
                me.previewImage.src = "nopreview_map";
        else
                me.previewImage.src = me.currentMapPreviewImage;
index 1b1255b7378d0acbdf1bc8dc2eb43f2a3e1f2917..14bf48ec9edf0f00282075f5549ce40f3456587b 100644 (file)
@@ -186,7 +186,7 @@ void XonoticMapList_drawListBoxItem(entity me, float i, vector absSize, float is
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_MAPLIST_INCLUDEDBG, SKINALPHA_MAPLIST_INCLUDEDBG);
 
        s = ftos(p);
-       if(draw_PreloadPicture(strcat("/maps/", MapInfo_Map_bspname)) == "")
+       if(draw_PictureSize(strcat("/maps/", MapInfo_Map_bspname)) == '0 0 0')
                draw_Picture(me.columnPreviewOrigin * eX, "nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
        else
                draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", MapInfo_Map_bspname), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);
index 0548e1e8fad485d5e3b01c4e89dbf115a140a7cd..61eb4a681651f6cd0d82ec7cac6274c26df3e499 100644 (file)
@@ -137,7 +137,7 @@ void XonoticPlayerModelSelector_go(entity me, float d)
        me.currentModelDescription = strzone(bufstr_get(me.bufModels, BUFMODELS_COUNT*me.idxModels+BUFMODELS_DESC));
 
        // fix the image
-       if(draw_PreloadPicture(me.currentModelImage) == "")
+       if(draw_PictureSize(me.currentModelImage) == '0 0 0')
                me.src = "nopreview_player";
        else
                me.src = me.currentModelImage;
index f2b2d8a241ca08441009a48f29a254e56962a6f3..68314cd027edc55b740ef325dbc6ca69e3a83065 100644 (file)
@@ -104,7 +104,7 @@ void XonoticSkinList_getSkins(entity me)
                bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_NAME, substring(s, 9, strlen(s) - 24)); // the * part
                bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, _("<TITLE>"));
                bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, _("<AUTHOR>"));
-               if(draw_PreloadPicture(strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")) == "")
+               if(draw_PictureSize(strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")) == '0 0 0')
                        bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, "nopreview_menuskin");
                else
                        bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview"));