From: drumsetmonkey Date: Thu, 21 Jan 2016 13:17:19 +0000 (-0500) Subject: Player Sprite X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=57cdcfac12bccee661085a00424f015fc071666f;p=clyne%2Fgamedev.git Player Sprite --- diff --git a/assets/playerk.png b/assets/playerk.png index be98f97..3dfb4dd 100644 Binary files a/assets/playerk.png and b/assets/playerk.png differ diff --git a/config/settings.xml b/config/settings.xml index c06089b..d981664 100644 --- a/config/settings.xml +++ b/config/settings.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/include/common.h b/include/common.h index f5952eb..763ecc6 100644 --- a/include/common.h +++ b/include/common.h @@ -110,7 +110,7 @@ extern unsigned int SCREEN_HEIGHT; * */ -#define HLINE 3 +#define HLINE 4 /** * A 'wrapper' for libc's srand(), as we hope to eventually have our own random number diff --git a/include/entities.h b/include/entities.h index edf7022..7925bb9 100644 --- a/include/entities.h +++ b/include/entities.h @@ -93,9 +93,9 @@ public: glEnable(GL_TEXTURE_2D); glColor3ub(255,255,255); glBegin(GL_QUADS); - glTexCoord2f(.25*index.x, .126*index.y); glVertex2i(loc.x, loc.y); - glTexCoord2f(.26*index.x, .126*index.y); glVertex2i(loc.x + width, loc.y); - glTexCoord2f(.26*index.x, .125*index.y); glVertex2i(loc.x + width, loc.y + height); + glTexCoord2f(.25*index.x, .125*index.y); glVertex2i(loc.x, loc.y); + glTexCoord2f(.25*index.x, .125*index.y); glVertex2i(loc.x + width, loc.y); + glTexCoord2f(.25*index.x, .125*index.y); glVertex2i(loc.x + width, loc.y + height); glTexCoord2f(.25*index.x, .125*index.y); glVertex2i(loc.x, loc.y + width); glEnd(); glDisable(GL_TEXTURE_2D); diff --git a/main.cpp b/main.cpp index fb13b5a..717fc1e 100644 --- a/main.cpp +++ b/main.cpp @@ -173,7 +173,7 @@ std::string readFile(const char *filePath) { if(!fileStream.is_open()) { std::cerr << "Could not read file " << filePath << ". File does not exist." << std::endl; - return ""; + return "cancer"; } std::string line = ""; @@ -965,7 +965,7 @@ void logic(){ HLINE*1.25, rand()%2 == 0?-(rand()%7)*.01:(rand()%7)*.01, ((4+rand()%6)*.05), - {0.0f,0.0f,255.0f}, + {0,0,255}, 2500); currentWorld->particles.back()->fountain = true; diff --git a/src/entities.cpp b/src/entities.cpp index 76b9aa4..7817891 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -92,7 +92,7 @@ Player::Player(){ //sets all of the player specific traits on object creation subtype = 0; health = maxHealth = 100; speed = 1; - tex = new Texturec(3, "assets/player1.png", "assets/player.png", "assets/player2.png"); + tex = new Texturec(3, "assets/player1.png", "assets/playerk.png", "assets/player2.png"); //tex = new Texturec(3, "assets/maybeplayer.png", "assets/maybeplayer.png", "assets/maybeplayer.png"); inv = new Inventory(PLAYER_INV_SIZE); } diff --git a/xcf/player.xcf b/xcf/player.xcf index c99fb42..d8991a5 100644 Binary files a/xcf/player.xcf and b/xcf/player.xcf differ diff --git a/xcf/playerJ.xcf b/xcf/playerJ.xcf new file mode 100644 index 0000000..7f0cc59 Binary files /dev/null and b/xcf/playerJ.xcf differ