From: Côme BERNIGAUD Date: Fri, 13 May 2011 10:55:26 +0000 (+0200) Subject: bug fix in the campaign screen (lines on the map were not correctly shown) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=1120e1144551bfbeea53d910f754f0ca1a43c8f8;p=lugaru.git bug fix in the campaign screen (lines on the map were not correctly shown) --- diff --git a/Source/Game.h b/Source/Game.h index 70fdb92..00dfb53 100644 --- a/Source/Game.h +++ b/Source/Game.h @@ -139,7 +139,7 @@ class Game char campaignmapname[50][256]; char campaigndescription[50][256]; int campaignchoosenext[50]; - int campaignnumnext[50]; + int campaignnumnext[50]; // Set this to 0 on final level. As David said: he meant to add story branching, but he eventually hadn't. int campaignnextlevel[50][10]; int campaignlocationx[50]; int campaignlocationy[50]; diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index dd74893..f925078 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -2938,10 +2938,10 @@ void Game::DrawMenu() //float linestartx,lineendx,linestarty,lineendy,offsetx,offsety; linestart.x=(startx[j]+endx[j])/2; linestart.y=(starty[j]+endy[j])/2; - if(j>=NB_CAMPAIGN_MENU_ITEM+(accountactive?accountactive->getCampaignChoicesMade():0)){ - linestart.x=(startx[6+(accountactive?accountactive->getCampaignChoicesMade():0)]+endx[6+(accountactive?accountactive->getCampaignChoicesMade():0)])/2; - linestart.y=(starty[6+(accountactive?accountactive->getCampaignChoicesMade():0)]+endy[6+(accountactive?accountactive->getCampaignChoicesMade():0)])/2; - } + //~ if(j>=NB_CAMPAIGN_MENU_ITEM-1+(accountactive?accountactive->getCampaignChoicesMade():0)){ + //~ linestart.x=(startx[NB_CAMPAIGN_MENU_ITEM-1+(accountactive?accountactive->getCampaignChoicesMade():0)]+endx[NB_CAMPAIGN_MENU_ITEM-1+(accountactive?accountactive->getCampaignChoicesMade():0)])/2; + //~ linestart.y=(starty[NB_CAMPAIGN_MENU_ITEM-1+(accountactive?accountactive->getCampaignChoicesMade():0)]+endy[NB_CAMPAIGN_MENU_ITEM-1+(accountactive?accountactive->getCampaignChoicesMade():0)])/2; + //~ } // what was this if for? lineend.x=(startx[j+1]+endx[j+1])/2; lineend.y=(starty[j+1]+endy[j+1])/2; offset=lineend-linestart;