From 57cdcfac12bccee661085a00424f015fc071666f Mon Sep 17 00:00:00 2001 From: drumsetmonkey Date: Thu, 21 Jan 2016 08:17:19 -0500 Subject: [PATCH] Player Sprite --- assets/playerk.png | Bin 375 -> 315 bytes config/settings.xml | 2 +- include/common.h | 2 +- include/entities.h | 6 +++--- main.cpp | 4 ++-- src/entities.cpp | 2 +- xcf/player.xcf | Bin 2457 -> 2495 bytes xcf/playerJ.xcf | Bin 0 -> 1431 bytes 8 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 xcf/playerJ.xcf diff --git a/assets/playerk.png b/assets/playerk.png index be98f97491f96a2a5d47e1923623394589918101..3dfb4ddf012a0d6d824d79af4e6250d9ab0e9ace 100644 GIT binary patch delta 303 zcmV+~0nq;U0=ohsiBL{Q4GJ0x0000DNk~Le0000e0000y2nGNE02I0S;E^F0e*o=C zL_t(&-tCu54uUWgMNf%4a0j|3T!%&mEerR)Z z`}%-%*jGzRh7dyhjb8Fv==YTeg%AVEd;a*hai{&22SviSIcmK;DC9vQ4+?qgXC72N zC{lYa3E7kt?fWlp915C11>Y?4e+;jK}&O#SBW!mDl`5%;=hJrev4mi47 z+=ie3q@e$T#41zEe@2%?2aK#{EP%DoVrIEIH3l!|H2^zv0HCCxKHu+GHIr9&0QPp< zP{_qjA7e~IN!MRe*bpTr@lRqCxB1XLcng{Q0I|Dz{?bUMy8r+H07*qo1w^hwV1gGt Bea`>@ delta 363 zcmV-x0hIo`0`~$TiBL{Q4GJ0x0000DNk~Le0000U0000m2nGNE00x%I-wg3KR)u4lD@@ z37#VXgPLLDAxK3p$Mq)2TJpZC@5lA!bFbI-K&4WtRI1QqswUoD9Z6X{ZS~AFg=@1S zp7SLv?yd+xyVH04&)F9M_t(b&f2^<03&6|U!~{)je56*%=(8}-l5Zpnj^9TfPLK1X z(<<9u{uvBE!tAjY*24d<@UMIIZMyH+?NPtdg!Z{~*o%ZXPii%3o&vCybpd!x1^~30 zbpSTkOdLHnzMID0%~I(E - + \ 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 c99fb42ef3c804f91e7bc05c8d68a0504fbced2c..d8991a5982963c74de82ebe81c06e3756900e0d3 100644 GIT binary patch delta 779 zcmZ9{y>8P`6u|L&a=65|wrL|v4yrenGG{}U3Nu6L!iK~WRLOhk7%Z_c@F97DC-8>E ziez;_jGcG_7M_4LzWw_qtx^xx`L_N0mR)9FjwSi=^mMWkW24MSHN+V)j-*PrF(%r` zb`ojjcJiswN+YE&JhrlzNRQDf!D(03g}K2cx~Xdl5Th*(WM^3YvoXu@>5a{M;&-e%MN=>co3vupcT+UgjPVSp%u_>bAG*mMqhYr0qss5Xf-shpzUOV zRtH)wZbJ)+=4zqUVkMUgaU701&~nQTdpWch&~n?npF*qMXMN4>CoTtC?V4B7hd0m7 z#P=&RH~p0tzrI|V%=8N%`I%W?{UIIj1)V4yj z5PyjO!Tx-*u7|;5nRkYFJ|6Zhd&(XUC4N3S>n%)VW?3Y&Hl{?GYHVi7O7*?!Q*$e& zcx`MOiS5k((Tc;w+Q?K;t-q5^P3#&bhiJ)UlJ+Anh`o4iSC-Pqt_M>SgQtlhPE1$adp!7F48UcnJTfrkRG;M}0tQh-;3 zS1@U%!7Bi&WelG8cd{{fHIqYxs+PUPT_5 zzwUh_fIkHGC|DHg`|bm++^?kJ z+zsR?NWv-QNd3o2v&Bq`G@gaiVaxFYFP_DTaH=p$f-_f~JUgkz2J&1j4N-cwp;WJn z?Sx9N(hJuMqd>gS`?Z|KhMY=`E~79LVdS05l&WLjPi3~Yht%R`s?J<5r7oz!ziWo5 zUxzw$aO!%Wf+W6-s-{^=wvR|}Qv&op#7TZvaRm0n;4On682p~W+Xg=br+xKkg3uW> z^zTA@LCOlMm4DWuwLV|ZSzlYzR^G4Ioi}Q{q zWu6n5#dvs5q&8j^VQce6Bfsf;YzSxns1Uv!Smed~T`Z;{p3M zhEKd}$pkqBmh4CEW`$V=xLI?!0dK6}X2)nlXG32{xY<(2SLoUbPKts+T`Q`t74TJ{ zYX!Pi;OqijtKtOzCA=JvXWqiM3$#^Svfp4fKzA}hISn&Uobn$5y$eNo%bfI7M_RqF jIiDau0EWQ-=h2+*usMH(8{Ll14NVt&5_;vKfhPM4Y@7wY literal 0 HcmV?d00001 -- 2.39.5