1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00
Commit Graph

77 Commits

Author SHA1 Message Date
Ted John
8d4e4ed0e9 remove unread RCT2_GLOBALs 2016-05-17 23:39:37 +01:00
Hielke Morsink
d7aacfcde6 Fixed warning in sawyerencoding.c 2016-05-15 01:10:37 +02:00
Michał Janiszewski
90bcca11d2 More sawyercoding optimisations 2016-05-14 11:54:19 +02:00
Michał Janiszewski
9cd762b1a6 Use memset/memcpy functions for RLE chunk decoding
Reduces time spent in `decode_chunk_rle` by 4-5x.
2016-05-14 11:12:14 +02:00
janisozaur
658e877955 Name all the typdef-ed structs (#3581) 2016-05-12 22:57:40 +01:00
Ted John
4298f416d2 fix #3558: safely read chunks from S6 files
It appears many saved games have been saved with excess uncompressed data that overflows the S6 structure. This may have been caused by a save bug in an earlier version of OpenRCT2. This will now cap the uncompressed data to the amount expected.
2016-05-10 21:39:12 +01:00
janisozaur
68bad6505c Add and correct licence headers to all sources (#3108) 2016-05-04 18:24:41 +01:00
Ted John
cf7b81fd3a start moving RCT1 importer to C++ 2016-04-22 18:24:54 +01:00
Gymnasiast
2d3dfd8834 Move RCT1 file version detection to its own function 2016-04-22 18:23:46 +01:00
Michał Janiszewski
843014eac2 Silence compiler warning
Though this really should be taken care of properly, see
https://stackoverflow.com/questions/14562845/why-does-passing-char-as-const-char-generate-a-warning
2016-03-19 12:56:35 +01:00
IntelOrca
1daa657657 fix #3091: Korean words corrupted if over byte limit 2016-03-10 18:48:00 +00:00
Michał Janiszewski
016d26976e Add a note about low-hanging optimisation fruit 2016-02-15 00:17:15 +01:00
Michał Janiszewski
f447b9665a Use GCC's __builtin_ffs for bitscanforward impl 2016-02-15 00:05:33 +01:00
Michał Janiszewski
b89282cc2f Fix zlib inflate on broken builders 2016-01-24 21:36:14 +01:00
Michał Janiszewski
2439ba5b9c Fallback to non-compressed sv6 on broken builders 2016-01-24 21:01:31 +01:00
Michał Janiszewski
08fc5f817a Disable using RLE when saving for network 2016-01-20 15:30:59 +01:00
Michał Janiszewski
753d430eaa Add zlib-based compression and decompression 2016-01-20 15:30:59 +01:00
IntelOrca
24a796c3bc fix #2778: encode_chunk_repeat reads out of range memory 2016-01-19 17:54:51 +00:00
Ted John
5ef00393a4 Merge pull request #2739 from janisozaur/evergreen-gardens
Assert for evergreen gardens
2016-01-19 12:36:41 +00:00
Michał Janiszewski
3bf1e0e06d Rename safe_strncpy to safe_strcpy 2016-01-18 20:49:52 +01:00
Michał Janiszewski
5bc330f8db Minor fixes, mostly posix.c 2016-01-18 20:48:41 +01:00
Michał Janiszewski
f35fac6030 Update assert condition 2016-01-16 18:10:44 +01:00
Michał Janiszewski
2b29f252e5 Assert for evergreen gardens 2016-01-16 00:19:08 +01:00
IntelOrca
6a768c4a3c redo entire scenario highscore load / saving
- load and save highscores to new file format (highscores.dat)
- scan scenarios from RCT2 data and user data
- load highscores from legacy file (scores.dat)
- fix various issues with new scenario select window
2016-01-02 21:04:10 +00:00
Hielke Morsink
bc2ac2e28b Split extension setter into two functions 2016-01-02 20:45:00 +01:00
Hielke Morsink
f31a5f2248 More secure checks for removing and setting file extensions. 2016-01-02 18:57:11 +01:00
Hielke Morsink
eadb03426e fix #2620 and preventing names with dots from breaking. 2016-01-02 14:59:16 +01:00
Michał Janiszewski
36de7a9027 Fix warnings
Some off-by-one errors, truncation warning fix, main() in posix.c no
longer a stub.
2015-12-29 16:09:36 +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
LRFLEW
e6f771ec90 Added newlines at end of files 2015-12-20 22:03:37 -06:00
Jonathan Haas
bf536ce7b7 Add one decimal place to SI velocities 2015-12-20 11:27:03 +01:00
IntelOrca
22b4df1a99 implement SI units for distance / speed measurement, closes #2496 2015-12-18 21:12:30 +00:00
Hielke Morsink
90e67772e0 Resolved warnings, and removed duplicated function. 2015-12-01 12:03:34 +01:00
Hielke Morsink
5b1d93805d More consistent use between name and paths. Improved path_get_* functions. 2015-11-29 19:41:06 +01:00
Hielke Morsink
02349d2463 Using platform_get_path_separator for getting the filename now 2015-11-29 17:01:41 +01:00
Hielke Morsink
63184052be minor optimizations and added comments to some util functions 2015-11-29 16:00:15 +01:00
duncanspumpkin
5bd3b8d6af Implement util_rand due to rand having a poor range on some platforms 2015-11-20 21:40:36 +00:00
Michał Janiszewski
b5b1957f58 Fix some left-shifts
An explicit `1` is considered signed by compiler, if `int` is 32 bit
long, a left shift `1 << 31` is undefined. Since the type of result is
the type of left shift operand, make sure we shift unsigned int so that
the behaviour is defined correctly.

Also one fix in peep code, where it would use too big value for
`item_extra_flags`.
2015-11-12 13:38:10 +01:00
IntelOrca
31ab7c8b98 fix several warnings 2015-11-06 18:50:37 +00:00
IntelOrca
e177be305b allow user data path to be specified by command line, closes #2182
Also changed default path under linux to be ~/.config/OpenRCT2.
2015-11-03 22:20:35 +00:00
Michał Janiszewski
0f9bc229b4 Fixes to safe_strncpy
* don't touch memory at all if size passed is 0
* use original address instead of now-changed `destination`
* fix one of the calls having improper size passed
2015-11-01 23:33:02 +01: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
Daniël Heres
17b906b3a0 Use SDL_RWsize to get size info 2015-10-21 10:15:02 +02:00
Ted John
a292a21e32 Merge pull request #2094 from janisozaur/whitespace
Strip all whitespace
2015-10-20 21:29:44 +01:00
duncanspumpkin
610a7d6954 Fix #2095. Bitscanforward needs to return -1 if nothing found. 2015-10-20 20:40:17 +01:00
Michał Janiszewski
7d0ce00bab Strip all whitespace 2015-10-20 20:48:51 +02:00
Daniël Heres
d531243c98 Optimize bitscanforward using intrinsic function 2015-10-20 18:10:05 +02:00
Michał Janiszewski
9572f1b532 type and const fixes for sawyercoding 2015-10-12 23:09:49 +02:00
Michał Janiszewski
4df8761831 remove windows-only code
Step 1 on road towards Linux.

Remove windows-specific code, stub it out where needed and make sure we
can still compile it the way it is.

Take care of Travis' build matrix to include new build configuration.

Install new packages.
2015-09-18 16:01:38 +02:00
Michał Janiszewski
52252f82b3 assorted fixes 2015-09-07 20:51:21 +02:00