X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fcampaign_file.qc;h=4f099b53301010a383b9efaa5a27d9e2e5ceebaf;hp=69dbb0b1d3af124d6900d59381e6f67919f31036;hb=e0012447bfce1b551df3dc01b043655aa93dafad;hpb=9eb82dd6fc682e3ddecd471835f9047816236342 diff --git a/qcsrc/common/campaign_file.qc b/qcsrc/common/campaign_file.qc index 69dbb0b1d3..4f099b5330 100644 --- a/qcsrc/common/campaign_file.qc +++ b/qcsrc/common/campaign_file.qc @@ -1,8 +1,7 @@ +#include "campaign_file.qh" #if defined(CSQC) #elif defined(MENUQC) #elif defined(SVQC) - #include "../dpdefs/progsdefs.qh" - #include "../dpdefs/dpextensions.qh" #include "util.qh" #include "campaign_common.qh" #endif @@ -53,8 +52,6 @@ float CampaignFile_Load(int offset, float n) a = ""; \ else \ ++i -// What you're seeing here is what people will do when your compiler supports -// C-style macros but no line continuations. i = -1; // starts at -1 so I don't need postincrement; that is, i points to BEFORE the current arg! CAMPAIGN_GETARG; campaign_gametype[campaign_entries] = strzone(a); @@ -89,17 +86,15 @@ void CampaignFile_Unload() { if(campaign_title) { - strunzone(campaign_title); - int i; - for(i = 0; i < campaign_entries; ++i) + strfree(campaign_title); + for(int i = 0; i < campaign_entries; ++i) { - strunzone(campaign_gametype[i]); - strunzone(campaign_mapname[i]); - strunzone(campaign_mutators[i]); - strunzone(campaign_shortdesc[i]); - strunzone(campaign_longdesc[i]); + strfree(campaign_gametype[i]); + strfree(campaign_mapname[i]); + strfree(campaign_mutators[i]); + strfree(campaign_shortdesc[i]); + strfree(campaign_longdesc[i]); } campaign_entries = 0; - campaign_title = string_null; } }