diff --git a/demo/demo.cpp b/demo/demo.cpp index 66364b7..a399c1f 100644 --- a/demo/demo.cpp +++ b/demo/demo.cpp @@ -1,7 +1,7 @@ #include "demo.h" void game::run(SDL_Renderer* renderer) -{ +{/* for (int i = 0; i < 360; i += 1) { float x = 1 * sinf(i); @@ -11,7 +11,7 @@ void game::run(SDL_Renderer* renderer) SDL_RenderDrawLine(renderer, ray2.start.x, ray2.start.y, ray2.end.x, ray2.end.y); } global::entList.at(0)->x = global::mousePos.x; - global::entList.at(0)->y = global::mousePos.y; - global::entList.run(renderer); + global::entList.at(0)->y = global::mousePos.y;*/ + //global::entList.run(renderer); global::entList3D.run(renderer); } \ No newline at end of file diff --git a/main.cpp b/main.cpp index 613702c..bfb5aaa 100644 --- a/main.cpp +++ b/main.cpp @@ -18,8 +18,8 @@ int main(int argc, char** argv) SETRENDER_WHITE; SDL_Event eventHandler; - global::entList.push_back(&square(200, 200, 50)); - //global::entList3D.push_back(&cube(200, 200, 200, 50)); + //global::entList.push_back(&square(200, 200, 50)); + global::entList3D.push_back(&cube(200, 200, 200, 50)); while (global::running) { diff --git a/stuff/objects/entityList3D.h b/stuff/objects/entityList3D.h index daae1e4..0191f8d 100644 --- a/stuff/objects/entityList3D.h +++ b/stuff/objects/entityList3D.h @@ -6,14 +6,14 @@ /* entityList3D is the 3D entity container class */ -class entityList3D : public std::vector +class entityList3D : public std::vector { public: void run(SDL_Renderer* renderer) { - for (cube entity : *this) + for (cube* entity : *this) { - entity.run(renderer); + entity->run(renderer); } } }; \ No newline at end of file