From aa9f53090bc0bd3421bf84930a9dc6b2223033f9 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 2 Jun 2016 07:46:42 -0400 Subject: windows builddd --- brice.dat | 5 ----- main.cpp | 10 ++++++---- src/entities.cpp | 4 ++-- src/ui.cpp | 2 +- src/ui_action.cpp | 2 +- src/world.cpp | 20 ++++++++++---------- win32/main.exe | Bin 6027539 -> 6226815 bytes 7 files changed, 20 insertions(+), 23 deletions(-) diff --git a/brice.dat b/brice.dat index 4bfeac6..e69de29 100644 --- a/brice.dat +++ b/brice.dat @@ -1,5 +0,0 @@ -2 -canJump -1 -canSprint -1 diff --git a/main.cpp b/main.cpp index 4cf0475..587a28a 100644 --- 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 diff --git a/src/entities.cpp b/src/entities.cpp index 2d9de76..f59b462 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -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 diff --git a/src/ui.cpp b/src/ui.cpp index 5a7ada1..ae47234 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -1152,7 +1152,7 @@ EXIT: toggleBlackFast(); player->canMove = true; }; - + while(SDL_PollEvent(&e)) { switch(e.type) { diff --git a/src/ui_action.cpp b/src/ui_action.cpp index ebdc705..9029907 100644 --- a/src/ui_action.cpp +++ b/src/ui_action.cpp @@ -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; diff --git a/src/world.cpp b/src/world.cpp index 5ab20ed..698db7c 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -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 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; } diff --git a/win32/main.exe b/win32/main.exe index f77663e..1e00343 100755 Binary files a/win32/main.exe and b/win32/main.exe differ -- cgit v1.2.3