]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Missing preview images: Use draw_PictureSize == '0 0 0' instead of draw_PreloadPictur...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 Jan 2012 17:00:41 +0000 (19:00 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 Jan 2012 17:00:41 +0000 (19:00 +0200)
data/qcsrc/client/mapvoting.qc
data/qcsrc/menu/voret/campaign.c
data/qcsrc/menu/voret/dialog_multiplayer_create_mapinfo.c
data/qcsrc/menu/voret/maplist.c
data/qcsrc/menu/voret/playermodel.c
data/qcsrc/menu/voret/skinlist.c

index c867a6674e3c12933446ab429cfd740fd4baa05f..20220df42118456c40b66373c2e22d555e4b05e6 100644 (file)
@@ -75,7 +75,7 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        img_size -= (sbar_border_thickness * 2) * '1 1 0';\r
        if(pic == "")\r
        {\r
-               if(precache_pic(pic) == "")\r
+               if(drawgetimagesize(pic) == '0 0 0')\r
                        drawpic(pos, draw_UseSkinFor("nopreview_map"), img_size, '1 1 1', 0.7, DRAWFLAG_NORMAL);\r
                else\r
                        drawpic(pos, pic, img_size, '1 1 1', 0.7, DRAWFLAG_NORMAL);\r
index ba65cd2c5b94e1a0743d2fdd5e69967409f19295..a756cb06b62f4c502e2e7e786cfd671f9b0f2a17 100644 (file)
@@ -277,7 +277,7 @@ void drawListBoxItemVoretCampaignList(entity me, float i, vector absSize, float
        s = ftos(p);\r
        if(i > me.campaignIndex)\r
                draw_Picture(me.columnPreviewOrigin * eX, "/gfx/campaign_hidden", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);\r
-       else if(draw_PreloadPicture(strcat("/maps/", campaign_mapname[i])) == "")\r
+       else if(draw_PictureSize(strcat("/maps/", campaign_mapname[i])) == '0 0 0')\r
                draw_Picture(me.columnPreviewOrigin * eX, "nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);\r
        else\r
                draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", campaign_mapname[i]), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);\r
index 7925b80ed9a030ec87c8ddd958a8a15d3ecae179..71f6a1d108495e80f2bffb07a7d918375de2d43f 100644 (file)
@@ -66,7 +66,7 @@ void loadMapInfoVoretMapInfoDialog(entity me, float i, entity mlb)
        me.authorLabel.setText(me.authorLabel, me.currentMapAuthor);\r
        me.descriptionLabel.setText(me.descriptionLabel, me.currentMapDescription);\r
        me.featuresLabel.setText(me.featuresLabel, me.currentMapFeaturesText);\r
-       if(draw_PreloadPicture(me.currentMapPreviewImage) == "")\r
+       if(draw_PictureSize(me.currentMapPreviewImage) == '0 0 0')\r
                me.previewImage.src = "nopreview_map";\r
        else\r
                me.previewImage.src = me.currentMapPreviewImage;\r
index d4b77c39b2fbf525574d1a1eb92b71d072467bf2..9d3209a5dad91bc59b347b00f6347ab3df28c7d1 100644 (file)
@@ -186,7 +186,7 @@ void drawListBoxItemVoretMapList(entity me, float i, vector absSize, float isSel
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_MAPLIST_INCLUDEDBG, SKINALPHA_MAPLIST_INCLUDEDBG);\r
 \r
        s = ftos(p);\r
-       if(draw_PreloadPicture(strcat("/maps/", MapInfo_Map_bspname)) == "")\r
+       if(draw_PictureSize(strcat("/maps/", MapInfo_Map_bspname)) == '0 0 0')\r
                draw_Picture(me.columnPreviewOrigin * eX, "nopreview_map", me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);\r
        else\r
                draw_Picture(me.columnPreviewOrigin * eX, strcat("/maps/", MapInfo_Map_bspname), me.columnPreviewSize * eX + eY, '1 1 1', theAlpha);\r
index 639f625db23d239071a3899f69f975b0dc58f820..bb9743410aea9fad1623a21ab9a13d7f4ecb499b 100644 (file)
@@ -176,7 +176,7 @@ void drawVoretPlayerModelSelector(entity me)
        float i, n;\r
        vector o;\r
 \r
-       if(draw_PreloadPicture(me.currentModelName) == "")\r
+       if(draw_PictureSize(me.currentModelName) == '0 0 0')\r
                me.src = "nopreview_player";\r
        else\r
                me.src = me.currentModelName;\r
index 73d83bd850eb111aa9e52a0da1565fe6b807f102..89bfe0274d39c05a01ccef36358921570f3b7cc3 100644 (file)
@@ -104,7 +104,7 @@ void getSkinsVoretSkinList(entity me)
                bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_NAME, substring(s, 9, strlen(s) - 24)); // the * part\r
                bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_TITLE, "<TITLE>");\r
                bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_AUTHOR, "<AUTHOR>");\r
-               if(draw_PreloadPicture(strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")) == "")\r
+               if(draw_PictureSize(strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview")) == '0 0 0')\r
                        bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, "nopreview_menuskin");\r
                else\r
                        bufstr_set(buf, i * SKINPARM_COUNT + SKINPARM_PREVIEW, strcat("/gfx/menu/", substring(s, 9, strlen(s) - 24), "/skinpreview"));\r