Merge branch 'master' of git@github.com:FacialTurd/The-Powder-Toy.git
This commit is contained in:
commit
3abc33fd3b
@ -362,6 +362,12 @@ void PIXELMETHODS_CLASS::draw_image(pixel *img, int x, int y, int w, int h, int
|
||||
int i, j, r, g, b;
|
||||
if (!img) return;
|
||||
if(y + h > VIDYRES) h = ((VIDYRES)-y)-1; //Adjust height to prevent drawing off the bottom
|
||||
if (y < 0 && -y < h)
|
||||
{
|
||||
img += -y*w;
|
||||
h += y;
|
||||
y = 0;
|
||||
}
|
||||
if(!h || y < 0) return;
|
||||
if(a >= 255)
|
||||
for (j=0; j<h; j++)
|
||||
|
@ -137,6 +137,7 @@ void PreviewModel::UpdateSave(int saveID, int saveDate)
|
||||
for(int i = 0; i < saveComments->size(); i++)
|
||||
delete saveComments->at(i);
|
||||
saveComments->clear();
|
||||
delete saveComments;
|
||||
saveComments = NULL;
|
||||
}
|
||||
notifySaveChanged();
|
||||
@ -202,6 +203,7 @@ void PreviewModel::UpdateComments(int pageNumber)
|
||||
{
|
||||
for(int i = 0; i < saveComments->size(); i++)
|
||||
delete saveComments->at(i);
|
||||
saveComments->clear();
|
||||
delete saveComments;
|
||||
saveComments = NULL;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ void * SearchModel::updateTagListT()
|
||||
void SearchModel::UpdateSaveList(int pageNumber, std::string query)
|
||||
{
|
||||
//Threading
|
||||
if(!updateSaveListWorking && !updateTagListWorking)
|
||||
if(!updateSaveListWorking)
|
||||
{
|
||||
lastQuery = query;
|
||||
lastError = "";
|
||||
@ -84,7 +84,7 @@ void SearchModel::UpdateSaveList(int pageNumber, std::string query)
|
||||
selected.clear();
|
||||
notifySelectedChanged();
|
||||
|
||||
if(GetShowTags() && !tagList.size())
|
||||
if(GetShowTags() && !tagList.size() && !updateTagListWorking)
|
||||
{
|
||||
updateTagListFinished = false;
|
||||
updateTagListWorking = true;
|
||||
|
@ -48,7 +48,7 @@ private:
|
||||
bool updateTagListWorking;
|
||||
volatile bool updateTagListFinished;
|
||||
pthread_t updateTagListThread;
|
||||
static void * updateTagListTHelper(void * obj);
|
||||
static void * updateTagListTHelper(void * obj);
|
||||
void * updateTagListT();
|
||||
public:
|
||||
SearchModel();
|
||||
|
@ -146,10 +146,13 @@ int Simulation::Load(int fullX, int fullY, GameSave * save)
|
||||
Element_PPIP::ppip_changed = 1;
|
||||
for(int i = 0; i < save->signs.size() && signs.size() < MAXSIGNS; i++)
|
||||
{
|
||||
sign tempSign = save->signs[i];
|
||||
tempSign.x += fullX;
|
||||
tempSign.y += fullY;
|
||||
signs.push_back(tempSign);
|
||||
if (save->signs[i].text[0])
|
||||
{
|
||||
sign tempSign = save->signs[i];
|
||||
tempSign.x += fullX;
|
||||
tempSign.y += fullY;
|
||||
signs.push_back(tempSign);
|
||||
}
|
||||
}
|
||||
for(int saveBlockX = 0; saveBlockX < save->blockWidth; saveBlockX++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user