by rounding temperatures to nearest instead of always flooring.
Effect on DLAY delay:
Room temperature offset - loaded as whole number of degrees C, so rounding to nearest deg C gives the same number as flooring.
Full - loaded as whole number of K = original whole deg C - 0.15. Rounding to nearest deg C means the whole deg C delay from before saving is used as the number of frames to delay, instead of deg C - 1 if flooring was used.
Note that final movement amount < 0 means no movement, it will not reverse the movement direction. This is to keep interpretation of inputs simple - PSCN always extends, other conductors always retract.
instead of adding a delta value to the current position, which might not give the correct result. Particles (except solids) were on rare occasions ending up at a point 1 pixel away from where they should be after being pushed by PSTN. This led to stacking, and in the case of save 1732622 after changing BIZS to a liquid, to disintegration of the save.
(TPT++ version of commit 2ad996dfe621887355f8532f1262c306421bc2de in jacksonmj fork)
There are *no* more spacing issues. I used tabs exclusively.
Also, I made changes off of the develop branch.
Here's the Ruby regex that I used:
text.gsub!(/(( |\t)*)if ?\((.*)\) ?{?\n?( |\t)*(free ?\(|delete |delete\[\] )(.*)\)?;/, "\\1\\5\\6;")
I've left some of the less important items, like SearchView.cpp "'then' statement is equivalent to the 'else' statement", and RequestBroker::Request::~Request, because I don't feel like spending a few days entirely rewriting those files at the moment (which is what I'd end up doing if I started fixing minor problems and refactoring...)
GameSave::readOPS - not changed. At some point we may have to move to a larger type for element IDs (probably two or four bytes), but PT_NUM isn't likely to be raised to the maximum value of that type immediately, so this check will be needed then. There should be an elements[partsData[i]].Enabled check in there too, but it might be a bit difficult - I'm not sure how to access a Simulation object from GameSave::readOPS...
Notes on changes:
Graphics::textsize, Element_FRZW::Element_FRZW - typos
Button::Draw - the extra case was originally used to invert the icon (draw it in black instead of in white) when the button was clicked. However, the icon colour is now automatically set depending on the background colour. (Note similar conditions "if(Enabled) { if(isButtonDown || (isTogglable && toggle)) " near the start of the function - same logic but in a different place, setting icon colour indirectly).
Simulation::transform_save - unused redundant function, everything uses GameSave::Transform which does much the same thing.
PreviewView::NotifySaveChanged - should be height==YRES/2, it's checking whether the preview image is the correct size, and resizing it if it isn't.
Element_FWRK::update - no idea why that line was there, even though it was my commit that originally added it...