Commit Graph

86 Commits

Author SHA1 Message Date
Sijmen Schoon d8bc890d0a Exit scenery selection mode when done saving 2016-07-11 19:13:30 +02:00
Sijmen Schoon 79a85cd659 Save track designs as td6 file 2016-07-11 19:13:30 +02:00
Sijmen Schoon 9d1ae9b576 Fix track save system dialog crash 2016-07-11 19:13:30 +02:00
Sijmen Schoon a194c91997 Use OpenRCT2 dialog for saving tracks 2016-07-11 19:13:30 +02:00
Sijmen Schoon 66628e5131 Remove unused variable 2016-07-08 11:32:34 +02:00
Sijmen Schoon 662d92be74 Fix track load/save last-dir storing
Doesn't really belong to this PR, but it's needed anyway
2016-07-08 11:29:45 +02:00
Sijmen Schoon 47d69998e7 Straighten up window_loadsave_widgets 2016-07-07 11:50:06 +02:00
Sijmen Schoon 127d94d451 Add a default button to the loadsave window 2016-07-07 11:29:22 +02:00
Sijmen Schoon fcf4008395 Remember previous save/load location
Works for games, landscapes, scenarios and tracks (but this is commented out due to tracks not being separated or something?)
2016-07-06 18:22:08 +02:00
Michał Janiszewski 402e5a32a0 Integrate path variables used by game 2016-06-19 23:52:20 +02:00
Ted John 25ac99e04a add variable for gS6Info 2016-05-20 23:26:19 +01:00
Martin Černáč 3bdc06dc25 Refactor hard-coded strings to use string_ids.h constants (and couple sprites too) (#3658) 2016-05-18 21:51:37 +01:00
Ted John 1cc35dfe6e integrate common format args 2016-05-15 22:03:53 +01:00
janisozaur 658e877955 Name all the typdef-ed structs (#3581) 2016-05-12 22:57:40 +01:00
janisozaur 68bad6505c Add and correct licence headers to all sources (#3108) 2016-05-04 18:24:41 +01:00
Ted John 307cb9e08b add global macro: gParkFlags 2016-04-23 00:51:22 +01:00
IntelOrca 16527e749a remove network type from loadsave
Fixes a crash that happened when loading a saved game from the start server window.
2016-03-31 20:42:21 +01:00
IntelOrca 40fcfbb405 use localised strings for native file dialogs 2016-03-31 20:41:49 +01:00
IntelOrca d865e4d453 pass better data in struct to file dialog function 2016-03-31 20:41:47 +01:00
Michał Janiszewski 6b514d1e3a Fix possible issues highlighted at higher warn levels
Mostly possibly uninitialized values and signedness
2016-02-26 12:54:00 +01:00
IntelOrca c31941c6dc fix #2958: import sc4, sv4 into editor using load landscape dialog 2016-02-16 18:15:26 +00:00
anyc ffafd07c90 use enum to specify file dialog type 2016-01-29 19:03:09 +01:00
IntelOrca 162710d86a remove strange random game command call from loadsave 2016-01-19 18:04:15 +00:00
Michał Janiszewski 3bf1e0e06d Rename `safe_strncpy` to `safe_strcpy` 2016-01-18 20:49:52 +01:00
IntelOrca 3073bc64fd remove rct2_endupdate 2016-01-09 00:25:30 +00:00
Hielke Morsink 3641634aad Prevent extension from showing when saving a park for the first time. 2016-01-05 00:23:51 +01:00
IntelOrca 9b833e5f93 shorten path for scenario select debug 2016-01-02 23:14:41 +00:00
IntelOrca 950722292c use user path for default scenario save location 2016-01-02 21:05:31 +00:00
Hielke Morsink eadb03426e fix #2620 and preventing names with dots from breaking. 2016-01-02 14:59:16 +01:00
Michał Janiszewski 8a5d066efe Fix strict aliasing violations
Compiler only guarantees proper accesses to variables when using
variable's native type or `char` (i.e. single byte type) [1].

This commit fixes violations of this rule. In most cases changing code
to a simple cast was enough, some required a bit deeper modifications.

This fixes #2596.

[1] http://blog.qt.io/blog/2011/06/10/type-punning-and-strict-aliasing/
2015-12-31 13:27:26 +01:00
Ted John 69f0e9d55d Merge pull request #2398 from Broxzier/comments_and_optimizations
Refactored some util functions and some minor tweaks for saving tracks
2015-12-29 11:31:58 +00:00
Gymnasiast f87bdb0eda Sort load/save window on open, fixes #2477 2015-12-27 10:28:10 +01:00
Hielke Morsink 90e67772e0 Resolved warnings, and removed duplicated function. 2015-12-01 12:03:34 +01:00
Hielke Morsink 666da74beb Changed missleading variable name from 'filename' to 'path'. 2015-11-29 19:59:15 +01:00
Hielke Morsink 5b1d93805d More consistent use between name and paths. Improved path_get_* functions. 2015-11-29 19:41:06 +01:00
osconnoisseur b5c04a79e5 Added buttons for "up" and "new file" and fixed #2233 2015-11-11 21:51:21 -06:00
IntelOrca 7f541240e2 fix #2279, make game remember save path rather than filename 2015-11-11 21:37:26 +00:00
Ted John c70880c0a5 Merge pull request #2251 from Broxzier/fix_filename
Fixed filenames being cut off when there's a dot in them
2015-11-08 19:04:45 +00:00
IntelOrca 48e3d70e57 refactor colour maps 2015-11-08 18:55:32 +00:00
Hielke Morsink b929a27595 Fixed filenames with dots not being displayed completely. 2015-11-08 18:21:55 +01:00
duncanspumpkin 13e2f8e9ed Fix #2210. Reverts from a0909a2 that cause the up button to load the same directory 2015-11-06 18:02:27 +00:00
IntelOrca a0909a242d fix several safe_strncpy calls 2015-11-02 21:23:01 +00:00
IntelOrca 45bfdad4e3 fix #1144 2015-11-02 20:43:55 +00:00
Michał Janiszewski 9284930d7e Add safe_strncpy function
safe_strncpy is similar to strncpy, but makes sure buffer is
null-terminated. Update most of project to use this updated function to
prevent illegal memory accesses.
2015-10-30 16:01:00 +01:00
Alexander Overvoorde 01793e11b7 Replace RCT2_GLOBAL magic numbers with address identifiers and string ids 2015-10-29 09:44:46 +01:00
Michał Janiszewski fcd22dd8ca Memory handling fixes 2015-10-25 01:15:52 +02:00
Michał Janiszewski 79552feb54 Only copy strings when they're different
When called from window_loadsave_scrollmousedown,
window_loadsave_populate_list will try to strncpy a string over itself.
This commit prevents that.
2015-10-23 17:22:31 +02:00
Michał Janiszewski 7d0ce00bab Strip all whitespace 2015-10-20 20:48:51 +02:00
duncanspumpkin ee1e71f287 Fix loadlandscape breaking enabled tabs
Issue was caused by not calling sub_6DFED0 when loading the landscape. I assume in vanilla this would happen as part of the loading but due to the way loadsave now works it doesn't happen. In the process I also labelled the offset for editor step.
2015-10-15 22:16:27 +01:00
Michał Janiszewski 52252f82b3 assorted fixes 2015-09-07 20:51:21 +02:00