diff options
-rw-r--r-- | brice.dat | 8 | ||||
-rw-r--r-- | main.cpp | 21 | ||||
-rw-r--r-- | xml/bobshouse.xml | 2 | ||||
-rw-r--r-- | xml/town.xml | 4 |
4 files changed, 18 insertions, 17 deletions
@@ -1,7 +1,7 @@ 3 -Slow -0 -canJump -0 canSprint 1 +canJump +0 +Slow +0 @@ -413,20 +413,21 @@ void render() { offset.y = std::max(player->loc.y + player->height / 2, SCREEN_HEIGHT / 2.0f); // "setup" - glm::mat4 projection = glm::ortho( floor(offset.x-SCREEN_WIDTH/2), //left - floor(offset.x+SCREEN_WIDTH/2), //right - floor(offset.y-SCREEN_HEIGHT/2), //bottom - floor(offset.y+SCREEN_HEIGHT/2), //top - 10.0, //near - -10.0); //far + glm::mat4 projection = glm::ortho(floor(offset.x - SCREEN_WIDTH / 2), // left + floor(offset.x + SCREEN_WIDTH / 2), // right + floor(offset.y - SCREEN_HEIGHT / 2), // bottom + floor(offset.y + SCREEN_HEIGHT / 2), // top + static_cast<decltype(floor(10.0f))>(10.0), // near + static_cast<decltype(floor(10.0f))>(-10.0)); // far - glm::mat4 view = glm::lookAt(glm::vec3(0,0,0.0f), //pos - glm::vec3(0,0,-10.0f), //looking at - glm::vec3(0,1.0f,0)); //up vector + glm::mat4 view = glm::lookAt(glm::vec3(0.0f, 0.0f, 0.0f), // pos + glm::vec3(0.0f, 0.0f, -10.0f), // looking at + glm::vec3(0.0f, 1.0f, 0.0f)); // up vector glm::mat4 ortho = projection * view; - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + // TODO add depth glEnable(GL_DEPTH_TEST); //glEnable(GL_CULL_FACE); diff --git a/xml/bobshouse.xml b/xml/bobshouse.xml index 2d69813..0319b89 100644 --- a/xml/bobshouse.xml +++ b/xml/bobshouse.xml @@ -3,5 +3,5 @@ <style background="1" bgm="assets/music/embark.wav" folder="assets/style/classic/"/> <floor width="1600"/> <link outside="town.xml"/> - <npc name="Bob" hasDialog="false" spawnx="30" health="1" x="-229.27991" y="0" dindex="9999"/> + <npc name="Bob" hasDialog="false" spawnx="30" health="1" x="-275.90805" y="0" dindex="9999"/> </IndoorWorld> diff --git a/xml/town.xml b/xml/town.xml index b9da09c..32ee1cc 100644 --- a/xml/town.xml +++ b/xml/town.xml @@ -4,8 +4,8 @@ <generation type="Random" width="1600"/> <time>6000</time> <spawnx>-300</spawnx> - <npc name="Sanc" hasDialog="true" health="1" x="464.45755" y="65.399185" dindex="0"/> - <npc name="Bob" hasDialog="true" spawnx="30" health="1" x="-772.5" y="59.999001" dindex="0"/> + <npc name="Sanc" hasDialog="true" health="1" x="287.3468" y="66.099106" dindex="9999"/> + <npc name="Bob" hasDialog="true" spawnx="30" health="1" x="-630.755" y="65.798988" dindex="0"/> <structure type="1" spawnx="300" alive="1"/> <structure inside="bobshouse.xml" type="1" spawnx="10" alive="1"/> <chest alive="1"/> |