1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 14:24:33 +01:00
Commit Graph

68 Commits

Author SHA1 Message Date
Michał Janiszewski
f8145b6edc Refactor inclusion of addresses.h
addresses.h is now only included when necessary, limiting scope as much
as possible.
2016-09-03 21:25:19 +01:00
Ted John
17b69d257b Merge pull request #4097 from marijnvdwerf/clean/string-ids-2
Continue string ID cleanup
2016-08-28 14:05:13 +01:00
Ted John
8cf7e87b5c Fix many warnings for x64 2016-08-27 23:32:15 +01:00
Marijn van der Werf
8fed70d190 Fix #4087: Month names in graphs are written out in full and overlap 2016-08-21 16:32:13 +02:00
LRFLEW
e5666683aa More RCT2_ADDRESS macro usage 2016-08-06 22:22:11 +01:00
Michał Janiszewski
c8d69c99f4 Make format_string_code capable of handling native pointers 2016-08-03 20:08:53 +02:00
Michał Janiszewski
a6d0e6916e Fix function definitions to match their declarations
This makes sure every function is properly declared, which includes
proper `extern` wrappers.
2016-07-14 14:11:49 +02:00
Marijn van der Werf
5204fb0ce9 Clean up string and sprite ID's (#3977) 2016-07-14 14:07:49 +02:00
Daniel Trujillo
4ebcf80a1a Redefine what is a "large" currency.
Decimals currencies does make sense when 10 < rate < 100, so it's
neccesary to raise the limit before hiding decimals
2016-07-01 22:02:28 +02:00
Daniel Trujillo
5302ebd951 Revert "Add other-than-selected currency support to format_currency_2dp"
This reverts commit 98d5b332bd9958296218a66e2eb7ef61600c8086.
2016-07-01 22:02:28 +02:00
Daniel Trujillo
140b4f73aa Add other-than-selected currency support to format_currency_2dp
This commit adds support for formatting currency strings using other
than the selected currency.
2016-07-01 22:02:28 +02:00
Alexander Overvoorde
ca1590c086 Add parameter to utf8_remove_formatting to allow colour codes (fixes #3638) (#3831) 2016-06-09 12:30:32 +01:00
Ted John
8efe699754 integrate gMapTooltipFormatArgs 2016-05-18 00:02:26 +01:00
Ted John
1cc35dfe6e integrate common format args 2016-05-15 22:03:53 +01:00
janisozaur
87d05f8a89 Fix compiler warnings (#3583)
Includes:
* type casting
* properly counting fields to initialise
2016-05-13 08:05:12 +01:00
janisozaur
658e877955 Name all the typdef-ed structs (#3581) 2016-05-12 22:57:40 +01:00
Alexander Overvoorde
85a2614a6a Fix pasting of formatting characters being allowed and fix memory leak 2016-05-10 14:12:06 +02:00
janisozaur
68bad6505c Add and correct licence headers to all sources (#3108) 2016-05-04 18:24:41 +01:00
Michał Janiszewski
331f9fe03b Secure memory accesses, initialise variables 2016-04-01 09:38:40 +02:00
zsilencer
66e406ab75 Fix #3048: Remove format codes in player names and chat 2016-02-29 21:33:46 -07:00
duncanspumpkin
60b8407b2b Added assert and error log for questionable localisation code 2016-02-19 17:53:35 +00:00
IntelOrca
caf9bd9939 get game working with new theme manager
Theme editor currently unavailable.
2016-02-03 18:23:44 +00:00
Michał Janiszewski
3bf1e0e06d Rename safe_strncpy to safe_strcpy 2016-01-18 20:49:52 +01:00
IntelOrca
cdee534eb1 use SDL2's platform defines to normalise platform guards 2016-01-14 20:12:43 +00:00
Marijn van der Werf
e961cc885a Use RCT2_ADDRESS_COMMON_FORMAT_ARGS instead of raw address 2016-01-11 12:55:33 +01:00
IntelOrca
3073bc64fd remove rct2_endupdate 2016-01-09 00:25:30 +00:00
IntelOrca
43a5cc92cc define STR_NONE as a rct_string_id 2016-01-07 22:14:53 +00:00
Michał Janiszewski
bcfdbbd25b Minor fixes for mapgen 2015-12-29 12:03:38 +01:00
Jonathan Haas
7149e1a4f5 Fix utf8_is_format_code 2015-12-20 12:28:44 +01: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
Kyle Kirby
caf07c2064 Clean up the comments a litte
• Make comment heads be /**
• Make rct2 addresses be double spaced indented
• Make there be a space afte rct2: and the address
• Make single-line rct2 addresses be full block comments
• Move description of method to top of comment
2015-12-11 16:19:46 -06:00
IntelOrca
46924bc9eb support unicode currencies with ascii fallback 2015-11-25 22:31:00 +00:00
Michał Janiszewski
7ba9ea2574 Make OpenRCT2 use iconv on Linux
This makes possible to run the game with non-english locales on Linux

Fixes #2300, fixes #2268, fixes #2267
2015-11-15 17:12:32 +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
Michał Janiszewski
d570163958 Fix types
Bunch of type fixes
2015-10-19 20:30:46 +02:00
Michał Janiszewski
1bd8e11c0f Make it work on Linux
Right now the project is decompiled to the point where it is feasible to
try porting it to another platform. It doesn't work 100% correctly, but
it's nearing this state.

To port it to Linux I mmapped the openrct2.exe into expected places,
disabled two offending calls (RCT2_CALLPROC_EBPSAFE(0x0040701D) and
RCT2_CALLPROC_X(0x006E7FF3…)), replaced memory management routines
with generic ones and removed all the function-pointer calls.

A basic, non-exhaustive check is included to verify that memory is
loaded correctly in place.

That last bit is probably the most intrusive one, but had to be done, as
the calling convention on Linux differs from the one on Windows. It
could possibly be emulated (just like RCT2_CALLFUNC_X) until dependency
on exe is dropped.

It is possible to completely remove calls out to original code by
commenting out contents of RCT2_CALLFUNC_X, right now this will yield
working UI, but no rendering of peeps, rides or rest of world. This can
be used as a benchmark or test platform for correctness of
implementation. The data sections will still be required for now.

Assets are expected to be in specific places, so to launch it, following
needs to satisified:
* $build/data/ has to have contents of $RCT2/Data/
* $build/data/ (same as above) has to have contents of $repo/data/
* $build/ObjData/ has to have contents of $RCT2/ObjData/
* $build/../openrct2.exe has to be $repo/openrct2.exe (as of 976ea0d)
Keep in mind you can symlink stuff and that filesystems are case
sensitive!
You can copy more of required data to possibly improve your experience.

Pretty much all of this commit will possibly have to be reverted by the
time OpenRCT2 gains independence.

Remember to build with -DDISABLE_NETWORK=ON -DDISABLE_HTTP_TWITCH=ON
2015-09-23 00:04:40 +02:00
Michał Janiszewski
4ce0e3a8b2 Linux platform file
Add bulk of the platform file for linux, change the compilation target
from shared library to executable for linux, provide necessary changes
to make it compile & load the stub of a process.

Make sure functions are marked as stubs where needed, and implementation
is expected.
2015-09-20 23:19:08 +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
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
zsilencer
6c571bab00 convert network to c++ 2015-08-14 09:13:30 -06:00
IntelOrca
fa87d8e999 implement utf8, part 14 2015-08-01 10:20:57 +01:00
IntelOrca
99c7c93764 implement utf8, part 9 2015-08-01 10:20:53 +01:00
IntelOrca
c6815b6eec implement utf8, part 8 2015-08-01 10:20:53 +01:00
IntelOrca
f14187f89d implement utf8, part 7 2015-08-01 10:20:52 +01:00
IntelOrca
d6a7025a3a implement utf8, part 6 2015-08-01 10:20:51 +01:00
IntelOrca
795c01cab5 implement utf8, part 5 2015-08-01 10:20:50 +01:00
IntelOrca
2bb0c6c53f implement utf8, part 3 2015-08-01 10:20:49 +01:00
IntelOrca
c4b355f648 implement utf8, part 1 2015-08-01 10:20:48 +01:00
IntelOrca
1d9f404b5b implement ride_construction_set_default_next_piece 2015-07-13 12:47:31 +01:00