aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/main.cpp b/main.cpp
index 7fc1658..17499f7 100644
--- a/main.cpp
+++ b/main.cpp
@@ -131,7 +131,9 @@ int main(int argc, char *argv[])
game::briceLoad();
game::briceUpdate();
- //
+ // load sprites used in the inventory menu. See src/inventory.cpp
+ //initInventorySprites();
+
// get a world
//
@@ -218,7 +220,7 @@ int main(int argc, char *argv[])
const bool &run = game::engine.shouldRun;
while (run) {
render();
- game::engine.render(0);
+ game::engine.resetRender(0);
}
// on game end, get back together
@@ -254,7 +256,7 @@ int main(int argc, char *argv[])
}
void render() {
- static const Texture mouseTex ("assets/mouse.png");
+ static const Texture mouseTex ("assets/goodmouse.png");
static const glm::mat4 view = glm::lookAt(
glm::vec3(0.0f, 0.0f, 0.0f), // pos
glm::vec3(0.0f, 0.0f, -10.0f), // looking at
@@ -313,6 +315,8 @@ void render() {
// draw the player's inventory
//player->inv->draw();
+ game::engine.render(0);
+
// draw the fade overlay
ui::drawFade();
@@ -337,6 +341,6 @@ void render() {
glActiveTexture(GL_TEXTURE0);
mouseTex.use();
Render::useShader(&Render::textShader);
- Render::drawRect(ui::mouse, ui::mouse + 15, -9.9);
+ Render::drawRect(vec2(ui::mouse.x, ui::mouse.y - 64), vec2(ui::mouse.x + 64, ui::mouse.y), -9.9);
Render::textShader.unuse();
}