]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
windows builddd
authorClyne Sullivan <tullivan99@gmail.com>
Thu, 2 Jun 2016 11:46:42 +0000 (07:46 -0400)
committerClyne Sullivan <tullivan99@gmail.com>
Thu, 2 Jun 2016 11:46:42 +0000 (07:46 -0400)
brice.dat
main.cpp
src/entities.cpp
src/ui.cpp
src/ui_action.cpp
src/world.cpp
win32/main.exe

index 4bfeac60c203b4b22f8a89cba605f469d3bf47d2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/brice.dat
+++ b/brice.dat
@@ -1,5 +0,0 @@
-2
-canJump
-1
-canSprint
-1
index 4cf0475924b76da23fe58f2a7b65f266c91dde59..587a28a48fcd4729c4a411ff329fd2708b3cebc5 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -295,8 +295,10 @@ int main(int argc, char *argv[]){
                }
        }).detach();
 
-       while (gameRunning)
+       while (gameRunning) {
                render();
+               ui::handleEvents();
+       }
 
        // put away the brice for later
        game::briceSave();
@@ -327,7 +329,7 @@ void mainLoop(void){
                return;
        } else {
                // handle keypresses - currentWorld could change here
-               ui::handleEvents();
+               //ui::handleEvents();
 
                if (game::time::tickHasPassed())
                        logic();
@@ -359,8 +361,8 @@ void render() {
                                                                                floor(offset.x+SCREEN_WIDTH/2),         //right
                                                                                floor(offset.y-SCREEN_HEIGHT/2),        //bottom
                                                                                floor(offset.y+SCREEN_HEIGHT/2),        //top
-                                                                               10.0f,                                                          //near
-                                                                               -10.0f);                                                        //far
+                                                                               10.0                                                          //near
+                                                                               -10.0);                                                 //far
 
        glm::mat4 view = glm::lookAt(glm::vec3(0,0,0.0f),  //pos
                                                                 glm::vec3(0,0,-10.0f), //looking at
index 2d9de76dd69678790c290e04d16a27e57cf0a8cf..f59b46281e2326c33f597d01fe94a9b8c7d2a095 100644 (file)
@@ -133,10 +133,10 @@ void Entity::die(void)
        alive = false;
        health = 0;
 
-       if (xmle) {
+       /*if (xmle) {
                xmle->SetAttribute("alive", false);
                currentXMLDoc.SaveFile(currentXML.c_str(), false);
-       }
+       }*/
 }
 
 bool Entity::isAlive(void) const
index 5a7ada16d5fd2d787cead407a4ed86f9107b9b25..ae47234163b1dc467972076b9d71e0013e0f0f19 100644 (file)
@@ -1152,7 +1152,7 @@ EXIT:
                        toggleBlackFast();
                        player->canMove = true;
                };
-
+               
                while(SDL_PollEvent(&e)) {
                        switch(e.type) {
 
index ebdc7054edbea65bc201dddcc300011826b99dbe..9029907a97ae4a3823cd0a7e416e2695241ff8b9 100644 (file)
@@ -124,7 +124,7 @@ void actionAttack(void)
             ui::toggleWhiteFast();
         }
     } else {
-        ui::dialogBox(player->name, "", false, "%s doesn't appear to be in the mood for fighting...", m->name);
+        ui::dialogBox(player->name, "", false, "%s doesn't appear to be in the mood for fighting...", m->name.c_str());
     }
 
     ACTION_EPILOUGE;
index 5ab20ede036643851bbfd3ed714bf7f3cc015b23..698db7cb76f39b9c36a838a11fdc4c410a714b1a 100644 (file)
@@ -712,12 +712,12 @@ void World::draw(Player *p)
     glEnableVertexAttribArray(worldShader_attribute_coord);
     glEnableVertexAttribArray(worldShader_attribute_tex);
 
-    uint ps = particles.size();
+    uint ps = 0;particles.size();
     uint pss = ps * 6 * 5;     
-       uint pc = 0;
+       //uint pc = 0;
        
        std::vector<GLfloat> partVec(pss);
-       GLfloat *pIndex = &partVec[0];
+       /*GLfloat *pIndex = &partVec[0];
    
        for (const auto &p : particles) {
         pc += 30;
@@ -727,7 +727,7 @@ void World::draw(Player *p)
                        break;
                }
                p.draw(pIndex);
-    }
+    }*/
 
     glVertexAttribPointer(worldShader_attribute_coord, 3, GL_FLOAT, GL_FALSE, 5 * sizeof(GLfloat), &partVec[0]);
     glVertexAttribPointer(worldShader_attribute_tex, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(GLfloat), &partVec[3]);
@@ -2193,15 +2193,15 @@ loadWorldFromXMLNoSave(std::string path) {
                vil = vil->NextSiblingElement();
        }
 
-       std::ifstream dat ((_currentXML + ".dat").data());
-       if (dat.good()) {
-               dat.close();
-               tmp->load();
-       }
-
        if (!loadedLeft && !loadedRight) {
                currentXML = _currentXML;
                currentXMLRaw = _currentXMLRaw;
+               
+               std::ifstream dat ((_currentXML + ".dat").data());
+               if (dat.good()) {
+                       dat.close();
+                       tmp->load();
+               }
        } else {
                delete _currentXMLDoc;
        }
index f77663e91ce3d7f52deccc517d291be33538a8d5..1e00343b9ee3222ac1519b9e9a3fd9cb3a239cd0 100755 (executable)
Binary files a/win32/main.exe and b/win32/main.exe differ