Commit Graph

270 Commits

Author SHA1 Message Date
jacob1
63843c2bd7 add new minimumVersion setting in saves, can restrict the smallest version of TPT that is able to open the save. Uses major/minor version for this
Also add RESTRICTVERSION macro to help when adding restrictions later
Also show errors when opening broken stamps now too
2015-10-02 21:25:15 -04:00
jacksonmj
1bd861719f Turn "save from newer version" back into an error, until an improved method of checking compatibility can be devised 2015-10-02 21:10:06 +01:00
jacob1
b184c78cff "Save from a newer version" is now just a warning (OPS format never changes)
Also, actual save errors now prevent you from clicking "Open" (which allowed you to vote and do other stuff even though the save was never loaded)
2015-10-01 21:35:40 -04:00
jacob1
93d6816740 Send username with alternate update server request 2015-09-26 16:50:02 -04:00
jacob1
cae8c9e095 fix some compile errors with last commit, remove snapshot version info from HUD and add to intro text instead, add tpt.version.snapshot 2015-09-26 14:56:37 -04:00
jacob1
908f60d47a support alternate update servers, and optional changelogs 2015-09-26 11:47:51 -04:00
jacob1
9b9555226b fix compiling in visual studio, fix maybe bug with updates? 2015-09-20 00:59:37 -04:00
jacob1
9048a3c50e new lua API: platform
you can get current OS / build information, exe name, restart tpt, open a link in the web browser, and use clipboard copy/paste functions

Also remove some older Platform.h file which wasn't really needed or used
2015-08-31 23:33:40 -04:00
jacob1
282d1fbf0c fix: CRAY from older saves should set .tmp2 to 0 2015-08-30 19:03:01 -04:00
jacob1
37794c01af .tmp2 for CRAY now sets creation offset (just like DRAY)
LIFE info moved into .ctype, no reason to use a whole extra variable for it
2015-08-29 22:02:05 -04:00
jacob1
5caf8bc8e1 allow longer signs, add 'None' justification where the pointer line isn't drawn
signs have a longer width limit and hard 45 character limit from the textbox and when loading saves
2015-08-29 18:56:38 -04:00
jacob1
4cc753edc1 fix crash from last commit (OnResponseFailed needs to check if it is a valid listener) 2015-08-29 15:20:50 -04:00
jacob1
9f9fef6cad Add new function ParseServerReturn, try to properly display all http errors
Also fix crash with invalid ptsave link, and fix some cases where it wouldn't ever tell you it errored
2015-08-29 13:14:17 -04:00
nucular
c2ba1d24d4 Fixed compiling on mingw-w64 2015-08-26 22:59:05 +02:00
jacob1
e990eead10 add CleanText function from my mod, used when copying / pasting / loading signs 2015-07-10 00:05:58 -04:00
jacob1
906b4a973f profile viewer now shows age, website, and save stats
Also, add Multiline type textboxes (allows pressing enter) and fix some other bugs
2015-07-09 20:17:04 -04:00
jacob1
c786640c74 always use a ScrollPanel in the profile viewer
also fix Textbox autosize. TODO: add a bunch more info to the profile viewer
2015-07-09 14:25:01 -04:00
jacob1
7b904c6840 fix DLAY delay in older saves 2015-06-27 21:05:28 -04:00
Aditya Vaidya
13cc593d13 Fixed most spelling errors in code. 'originaly' is read as 'original Y', so not a typo 2015-05-18 15:16:01 -05:00
jacksonmj
34567bc496 Merge pull request #247 from ryanmjacobs:fix_pointer_checks 2015-05-16 02:19:08 +01:00
jacob1
cee08b2024 On first run, set scale to 2 if screen size is large enough 2015-05-14 23:22:20 -04:00
jacksonmj
72329af09d Fix DLAY delay changing during save+load
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.
2015-03-27 17:39:05 +00:00
jacob1
a422e43beb visual studio error fix + warning fix 2015-02-25 18:56:50 -05:00
Ryan Jacobs
55a30673c4 Remove unnecessary pointer checks.
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;")
2015-02-14 22:13:26 -08:00
jacob1
57d1b4916d fix last two PVS-Studio bugs, closes #232 2015-02-13 21:45:22 -05:00
jacob1
1840f4e39c fix crash when uploading save 2015-02-04 00:37:25 -05:00
jacob1
b1a3c404b6 fix platform / sconscript flag specific warnings, --no-warnings no longer defaults to true 2015-01-16 23:39:42 -05:00
jacob1
efd69b208d fix a ton more errors in the interface code, including all the -Wreorder ones 2015-01-16 19:58:39 -05:00
jacob1
54d985f975 gcc warning fixes (up to lua files) 2015-01-16 17:26:13 -05:00
jacob1
dce874484a fix all the gcc warnings in the element files (except one in PSTN) + all the unused variable warnings 2015-01-10 22:43:33 -05:00
jacob1
b2954a7f0a Publish button in browser (replaces Unpublish button when unpublished saves are selected)
Works using the html page and isn't really the best way until @simtr implements Delete.json&Mode=Publish or something
2015-01-10 18:18:28 -05:00
jacob1
1a50217acd better fix for thumbnails getting mixed up (static int instead of rand), fixes #96 2015-01-10 15:45:35 -05:00
jacob1
4a3a6dee30 improve .desktop file installed on linux
escape Exec properly so paths with spaces or quotes work, and add Path key so that it starts in the right working directory
2015-01-10 00:14:38 -05:00
jacob1
0ad225d1fc update VIBR randoms, fix any VINE in old saves also 2015-01-07 19:32:49 -05:00
Martin Ettl
34c85c262c Fix potential memory leaks.
(Merging pull request #234, amended by jacksonmj: some leaks already fixed in develop branch.)
2014-12-29 16:37:04 +00:00
jacksonmj
236ff08da9 Fix some problems noted in http://www.viva64.com/en/b/0298/
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...
2014-12-25 17:09:35 +00:00
jacob1
16ce3a68c0 more jacksonmj suggestions: save edgeMode in saves, BVBR absorption fix, life saving fix, DEUT graphics change, PROT fix, SOAP graphics fix 2014-11-21 15:41:22 -05:00
jacob1
1289465a2c update stamps.def when deleting stamps, missing stamps show up as "error loading save" and can be deleted 2014-11-11 23:48:36 -05:00
jacksonmj
fb796c873b PSTN: allow movement amount to be set by temperature. Requires major version increment. 2014-11-04 15:38:41 +00:00
jacob1
6463d04f6c fix a few of the most spammy warnings (there are still hundreds of warnings though)
TODO: actually fix all the warnings
2014-10-23 00:42:13 -04:00
jacob1
c16caed5dd fix level 1 msvc compiling warnings + initialize debugFlags 2014-10-08 00:15:51 -04:00
Simon Robertshaw
0d617ace7b Decorate thread entry points in headers 2014-08-15 22:50:28 +01:00
Simon Robertshaw
a629eb9bfc Force stack re-alignment for entry-points from phread_create with mingw & windows to fix SSE crashes in child threads 2014-08-15 21:42:33 +01:00
jacksonmj
c83945e281 Allow PHOT deco, in old saves only 2014-08-05 22:11:07 +01:00
jacksonmj
7fdc4dc83b Mismatched new[]/delete in WebRequest::Process() 2013-12-23 19:16:04 +00:00
jacksonmj
4459bf5363 Also, mismatched new[]/delete in APIRequest::Process() 2013-12-23 17:21:14 +00:00
jacksonmj
aa74deb6d5 Mismatched new[]/delete for serialised GameSave data 2013-12-23 17:17:40 +00:00
Simon Robertshaw
e1616fdd82 Hotfix: Don't open saves larger than 200MB 2013-12-08 16:58:17 +00:00
Simon Robertshaw
c75a5a1f80 Remove debug logging for user pref reading/writing 2013-11-19 21:25:03 +00:00
Simon Robertshaw
fc25d5a466 Use NSUserDefaults for powder.pref storage on OS X, fix initial file open handling on OS X 2013-11-18 21:54:41 +00:00