1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00
Commit Graph

23 Commits

Author SHA1 Message Date
Michał Janiszewski
71d0861be1 Mark classes as final
This may hint compiler to de-virtualise some calls.
2016-10-04 18:14:29 +01:00
Ted John
08eb1db6d3 Fix crash due to memset to 0 on std::string 2016-10-02 19:16:09 +01:00
Ted John
5519365fe0 Clean up parsing work data after parse 2016-09-20 12:48:35 +01:00
Ted John
f31bf03ee9 Refactor LanguagePack to interface / implementation
This reduces the required amount of includes and definitions necessary in LanguagePack.h and having to declare private signatures twice.
2016-09-20 12:29:38 +01:00
Ted John
dd66ae39ae Clean up LanguagePack and fix memory leak 2016-09-19 19:42:27 +01:00
janisozaur
68bad6505c Add and correct licence headers to all sources (#3108) 2016-05-04 18:24:41 +01:00
Ted John
8b13a9e80c add warnings for when override string limit is reached 2016-04-26 18:45:51 +01:00
IntelOrca
4c1605f268 refactor and format old C++ code 2016-01-23 18:58:31 +00:00
Linus Unnebäck
4319e57024 use builtin min and max 2015-12-15 09:11:54 +01:00
duncanspumpkin
faf5d9a043 Fix #2301
Lanaguages were not falling back if there was a translated string further on in the langauge pack. This issue was caused by operating on an invalid string that was masked by a cast from a nullpointer to a size_t. The code now will not set the string if there is a nullptr
2015-11-15 09:55:01 +00:00
Michał Janiszewski
fb9a5833d6 Fix override offsets while loading LanguagePack
When loading language pack, a check is made not to double entries. This
check was wrong, because it tried to use offsets as pointers to strings.

These offsets are later rewritten to actual pointers in remaining part
of LanguagePack::LanguagePack
2015-10-09 20:19:58 +02:00
IntelOrca
c6b0d0919d fix #1982 2015-09-28 18:10:41 +01: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
02d83f860e In case any memory was allocated for lang pack, free it 2015-09-14 23:03:03 +02:00
Michał Janiszewski
34f56a262b Null-terminate buffer read from language packs 2015-09-14 22:59:44 +02:00
Michał Janiszewski
d58b4e3589 memory safeness
Just some more memory checks.

One memset appears to be wrong, is fixed now.

I think this might fix #1928, but please check.
2015-09-13 21:45:57 +02:00
Michał Janiszewski
17e635b8af In C++11 use actual pointer types instead of C's defines
This is mostly `NULL` -> `nullptr` in cpp files, but I only noticed
because `LanguagePack::GetObjectOverride` and
`LanguagePack::GetScenarioOverride` were returning false instead of real
pointer.

Also fixes some whitespaces, you can `w=1` to github's URL to make it
skip these.
2015-09-10 08:22:36 +02:00
IntelOrca
289555c082 fix #1908 2015-09-09 19:22:41 +01:00
IntelOrca
fddf057d68 add scenario overrides 2015-09-08 21:37:25 +01:00
IntelOrca
fe7879f0a3 add capacity overriding 2015-09-08 21:37:23 +01:00
IntelOrca
8085abadd3 add basic support for localisation object string overriding 2015-09-08 21:37:22 +01:00
IntelOrca
7a0478404e add new C++ memory utility functions 2015-09-08 21:37:21 +01:00
IntelOrca
952a4abdd1 implement DAT translation, part 1 2015-09-08 21:37:20 +01:00