]> git.jsancho.org Git - lugaru.git/commitdiff
bug fix in the campaign screen (lines on the map were not correctly shown)
authorCôme BERNIGAUD <come.bernigaud@gmail.com>
Fri, 13 May 2011 10:55:26 +0000 (12:55 +0200)
committerCôme BERNIGAUD <come.bernigaud@gmail.com>
Fri, 13 May 2011 10:55:26 +0000 (12:55 +0200)
Source/Game.h
Source/GameDraw.cpp

index 70fdb9271fce172e39bfef49951f5ba65a8b8458..00dfb53dd47f280ed1705905f58300ec78805cca 100644 (file)
@@ -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];
index dd74893d7a9e80aa6b0b1f43e3247113f7eb3f02..f9250784564254750f0c01d42062d97d23805504 100644 (file)
@@ -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;