Merge branch 'master' of git@github.com:FacialTurd/The-Powder-Toy.git

This commit is contained in:
cracker64 2013-03-03 16:32:11 -05:00
commit 2be0b22211
5 changed files with 12 additions and 32 deletions

View File

@ -1172,10 +1172,10 @@ void Renderer::render_parts()
fnx = sim->parts[i].x;
fny = sim->parts[i].y;
if((sim->photons[ny][nx]&0xFF) && !(sim->elements[t].Properties & TYPE_ENERGY) && t!=PT_STKM && t!=PT_STKM2 && t!=PT_FIGH)
continue;
if(nx >= XRES || nx < 0 || ny >= YRES || ny < 0)
continue;
if((sim->photons[ny][nx]&0xFF) && !(sim->elements[t].Properties & TYPE_ENERGY) && t!=PT_STKM && t!=PT_STKM2 && t!=PT_FIGH)
continue;
//Defaults
pixel_mode = 0 | PMODE_FLAT;

View File

@ -1,10 +1,3 @@
/*
* PreviewController.cpp
*
* Created on: Jan 21, 2012
* Author: Simon
*/
#include <sstream>
#include "client/Client.h"
#include "PreviewController.h"

View File

@ -1,10 +1,3 @@
/*
* PreviewModel.cpp
*
* Created on: Jan 21, 2012
* Author: Simon
*/
#include <cmath>
#include "PreviewModel.h"
#include "client/Client.h"
@ -25,7 +18,6 @@ PreviewModel::PreviewModel():
commentsPageNumber(1),
commentBoxEnabled(false)
{
// TODO Auto-generated constructor stub
}

View File

@ -1,10 +1,3 @@
/*
* PreviewView.cpp
*
* Created on: Jan 21, 2012
* Author: Simon
*/
#include <sstream>
#include <vector>
#include <cmath>
@ -274,7 +267,7 @@ void PreviewView::OnDraw()
g->drawrect(Position.X, Position.Y, (XRES/2)+1, (YRES/2)+1, 255, 255, 255, 100);
g->draw_line(Position.X+XRES/2, Position.Y+1, Position.X+XRES/2, Position.Y+Size.Y-2, 200, 200, 200, 255);
if(!(!votesUp && !votesDown))
if(votesUp || votesDown)
{
float ryf;
int nyu, nyd;
@ -573,5 +566,7 @@ PreviewView::~PreviewView()
RemoveComponent(submitCommentButton);
delete submitCommentButton;
}
if(savePreview)
delete savePreview;
}

View File

@ -2947,10 +2947,10 @@ int Simulation::create_part(int p, int x, int y, int tv)
parts[i].life = 75;
break;
/*Testing
case PT_WOOD:
parts[i].life = 150;
break;
End Testing*/
case PT_WOOD:
parts[i].life = 150;
break;
End Testing*/
case PT_WARP:
parts[i].life = rand()%95+70;
break;
@ -3555,7 +3555,7 @@ void Simulation::update_particles_i(int start, int inc)
{
golnum = parts[r>>8].ctype+1;
if (golnum<=0 || golnum>NGOLALT) {
parts[r>>8].type = PT_NONE;
kill_part(r>>8);
continue;
}
if (parts[r>>8].tmp == grule[golnum][9]-1) {
@ -3575,7 +3575,7 @@ void Simulation::update_particles_i(int start, int inc)
} else {
parts[r>>8].tmp --;
if (parts[r>>8].tmp<=0)
parts[r>>8].type = PT_NONE;//using kill_part makes it not work
kill_part(r>>8);
}
}
//}
@ -3604,7 +3604,7 @@ void Simulation::update_particles_i(int start, int inc)
parts[r>>8].tmp --;
}
if (r && parts[r>>8].tmp<=0)
parts[r>>8].type = PT_NONE;//using kill_part makes it not work
kill_part(r>>8);
}
for ( z = 0; z<=NGOL; z++)
gol2[ny][nx][z] = 0;//this improves performance A LOT compared to the memset, i was getting ~23 more fps with this.