summaryrefslogtreecommitdiff
path: root/src/list.cpp
diff options
context:
space:
mode:
authortom <tom@apollo>2017-01-10 09:49:32 -0600
committertom <tom@apollo>2017-01-10 09:49:32 -0600
commitf6f6d81c5634f659693914b7b74efcdd39ba5d4f (patch)
tree5b51e9b82ae36c648e212cc9c95fb8233dc181c1 /src/list.cpp
parent20717aeb1b12a7179e7b29c3c8880f18b360a1c8 (diff)
-Replaced images with colored rectangles
-Removed various functions and variables pertaining to such images -Started migrating all uses of Location to SDL_Rect (I would preferably completly remove Location.hpp) -Scaled down resolution to 1080x640 (I would like to make these global constants)
Diffstat (limited to 'src/list.cpp')
-rw-r--r--src/list.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/list.cpp b/src/list.cpp
index e08531b..2fca4f4 100644
--- a/src/list.cpp
+++ b/src/list.cpp
@@ -5,12 +5,12 @@ List::List(Window m)
int i;
for(i=0;i<10;i++){
- Creature X(m,"img/Cbasic.png");
+ Creature X(m,10);
C.push_back(X);
}
for(i=0;i<100;i++){
- Resource Y(m,"img/Rbasic.png");
+ Resource Y(m,5);
R.push_back(Y);
}
@@ -41,7 +41,8 @@ void List::Behavior()
if(it->getHealth()<=0){
Location z = it->getLocation();
- Resource r = Resource(main,"img/Cdead.png",z);
+ SDL_Rect rect = it->getRect();
+ Resource r = Resource(main,rect.w,z);
R.push_back(r);
C.erase(it--);
}