From 1120e1144551bfbeea53d910f754f0ca1a43c8f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20BERNIGAUD?= Date: Fri, 13 May 2011 12:55:26 +0200 Subject: [PATCH] bug fix in the campaign screen (lines on the map were not correctly shown) --- Source/Game.h | 2 +- Source/GameDraw.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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; -- 2.39.2