]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
fixed item dialog
authorClyne Sullivan <tullivan99@gmail.com>
Wed, 2 Dec 2015 12:38:27 +0000 (07:38 -0500)
committerClyne Sullivan <tullivan99@gmail.com>
Wed, 2 Dec 2015 12:38:27 +0000 (07:38 -0500)
Changelog
Goals.txt
src/entities.cpp
src/gameplay.cpp

index c09d63a79cc10a6381a4c5135e5fa739729356d3..f1e88418047c89b3106102b1669342d4213e8f19 100644 (file)
--- a/Changelog
+++ b/Changelog
        - began writing songs for game soundtrack
 
        ~ About 4280 lines of code + documentation written ( +7ish pages of story on gdoc)
+
+12/1/2015:
+==========
+
+       - ran game through valgrind, fixed almost all memory leaks/errors
+       - smoothed out game animations
+       - broke the game
index 0164d82fd58410c1f5fc38ea25b9a879c9d91f32..208c7e585f5ed4ae7353237493157bfebe35f1f3 100644 (file)
--- a/Goals.txt
+++ b/Goals.txt
@@ -22,6 +22,13 @@ End of November:
        - work on GLSL shaders to replace the current 'fake' ones
        - redesign what currently exists to match what is desired
 
+Summary:
+       Textures have been formalized, with a namespace and class for loading and using textures. The
+idea of a parallaxed background was applied, with up to four layers of tiled background material.
+Combinations of background layers were sorted and added to the World class with a World::setBackground()
+function. The inventory was created, with an animated inventory view based off of the player finished
+by the end of the month.
+
 End of December:
 ================
 
index 7dc561b23a587f3c7f75e78e4f7b2b21cc72fae4..1e6fad5bb9d5ba30d36d155421286167ae7e328c 100644 (file)
@@ -341,17 +341,18 @@ void NPC::interact(){ //have the npc's interact back to the player
 
 extern void waitForDialog(void);
 void Object::interact(void){
-       if(questObject){
-               char opt[]=":Yes:No";
-               ui::dialogBox("You",opt,pickupDialog);
-               do{
-                       if(ui::dialogOptChosen == 1 && this->alive == true){
-                               player->inv->addItem((ITEM_ID)(identifier), (char)1);
-                               this->alive = false;
-                       }
-               }while(ui::dialogBoxExists);
+       if(questObject && alive){
+               
+               ui::dialogBox("You",":Yes:No",pickupDialog);            
+               while(ui::dialogBoxExists);
+
+               if(ui::dialogOptChosen == 1 && alive){
+                       player->inv->addItem((ITEM_ID)(identifier), (char)1);
+                       alive = false;
+                       return;
+               }       
        }else{
-               this->alive = false;
+               alive = false;
                player->inv->addItem((ITEM_ID)(identifier), (char)1);
        }
 }
index a4fec884f580a4a08d9701d202b108643ec7648d..cc9ae6a178b877ec7b3d2aa947e08dd1d7fa7dca 100644 (file)
@@ -76,11 +76,8 @@ void initEverything(void){
        playerSpawnHill=new World();
        
        playerSpawnHill->setBackground(BG_FOREST);
-<<<<<<< Updated upstream
        playerSpawnHill->generateFunc(1280,playerSpawnHillFunc);
        //playerSpawnHill->generate(1920);
-=======
->>>>>>> Stashed changes
 
        /*
         *      Setup the current world, making the player initially spawn in `test`.