]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
Particles are drawn inside
authordrumsetmonkey <abelleisle@roadrunner.com>
Thu, 14 Jan 2016 13:17:43 +0000 (08:17 -0500)
committerdrumsetmonkey <abelleisle@roadrunner.com>
Thu, 14 Jan 2016 13:17:43 +0000 (08:17 -0500)
config/settings.xml
main.cpp
src/world.cpp

index 82363a8506b9c1738acbeedace78a1fa4ca9da86..c06089b42fee1d226ec884834b592688ef0ed021 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
 
-<screen width="1024" height="720" />
+<screen width="1280" height="720" />
 <hline value="3" />
index 7386186e9d82fe565bf3410c7b9d7dbc31040f04..7487e4c0df48d868198e6ca07b1fe285fc913465 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -955,7 +955,7 @@ void logic(){
        for(auto &b : currentWorld->build){
                switch(b->bsubtype){
                        case FOUNTAIN:
-                               for(int r = 0; r < (rand()%20)+10;r++){
+                               for(int r = 0; r < (rand()%25)+10;r++){
                                        currentWorld->addParticle(rand()%HLINE*3 + b->loc.x + b->width/2,b->loc.y + b->height, HLINE,HLINE, rand()%2 == 0?-(rand()%7)*.01:(rand()%7)*.01,((4+rand()%6)*.05), {0,0,1.0f}, 2500);
                                        currentWorld->particles.back()->fountain = true;
                                }
index 6ee725535a3ff748ad714421f7f021c7ab2316d5..cced2899cf8529b623088dd27aaa112c887c6ddc 100644 (file)
@@ -1360,6 +1360,7 @@ void IndoorWorld::draw(Player *p){
         *      Draw all entities.
        */
        
+       for(auto &part : particles) part->draw();
        for(auto &e : entity) e->draw();
        p->draw();
 }