Commit Graph
369 Commits
Author SHA1 Message Date
IntelOrca 45bfdad4e3 fix #1144 2015-11-02 20:43:55 +00:00
Ted John 5914558575 Merge pull request #2180 from janisozaur/safe_strncpy
Fixes to safe_strncpy
2015-11-01 22:52:17 +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
IntelOrca 61b7c77be3 add colour enum 2015-11-01 22:21:46 +00:00
duncanspumpkin 9a76c59ec9 Fix entrance drawing issue. Fixes #2164. 2015-10-30 23:33:02 +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
Ted John f1931c2cc4 Merge pull request #2155 from kmdreko/decompile_637ff3
Decompiled sub_6E7FF3
2015-10-29 18:31:19 +00:00
Alexander Overvoorde 01793e11b7 Replace RCT2_GLOBAL magic numbers with address identifiers and string ids 2015-10-29 09:44:46 +01:00
kmdreko 115c099e2a Decompiled sub_6E7FF3 2015-10-28 23:26:33 -05:00
duncanspumpkin 930bdc1669 Make suggested changes. Invis huts now correctly remove fence 2015-10-28 19:57:02 +00:00
duncanspumpkin e7c653abf2 Refactor attached ps setup code 2015-10-28 18:44:44 +00:00
duncanspumpkin c62e61bd36 Started implementing rotation 0 2015-10-28 18:44:44 +00:00
duncanspumpkin 330b6b5524 Implemented tables for top spin paint setup 2015-10-28 18:44:43 +00:00
zsilencer 00e2ca43a1 ipv6 support, non-blocking address resolve and connect 2015-10-26 22:35:34 -06:00
IntelOrca 8d84b540ad add vehicle struct and enum labels from vehicle-update branch. 2015-10-25 21:26:03 +00:00
IntelOrca 4ac42ff1b2 add vehicle struct, enum labels and helper functions from implement-ride-create-vehicles branch. 2015-10-25 16:00:21 +00:00
Daniël Heres 29976790cb Low level optimizations
* Just memcpy if we don't have to use a pallete and zoom_amount == 1
* Replace some divide operations by right-shifts
* Optimize / simplify sub_68B3FB
2015-10-24 12:32:56 +02:00
Michał Janiszewski 8e45cccb7a Minor fixes
Includes (mostly) type fixes, dead code removal, signed vs unsigned
comparison fixes, memory leaks removal.
2015-10-21 08:47:09 +02:00
Michał Janiszewski 7d0ce00bab Strip all whitespace 2015-10-20 20:48:51 +02:00
duncanspumpkin 3ee518bf87 Define CableLiftVehicle structure 2015-10-18 14:01:16 +01:00
duncanspumpkin f512c5fad0 Use correct function call for crashed vehicles 2015-10-18 13:18:10 +01:00
duncanspumpkin 0551fb7170 Fix #1914. Removed y variable as it is not part of function call 2015-10-18 12:07:45 +01: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 74d0b033df Name RCT2_ADDRESS_PALETTE 2015-10-09 20:20:05 +02:00
Jonathan Haas 8463e58922 Define some tick related addresses 2015-10-03 20:00:29 +02:00
Jonathan Haas ae82ffcd96 Rename window flags 2015-10-03 17:20:53 +02:00
Michał Janiszewski 9a1e88872f sub_6E7FF3 no longer causes problems 2015-10-01 18:57:45 +02:00
IntelOrca 015c41f6ef fix #1744 2015-09-26 14:07:17 +01:00
YamaArashi bc8bf39e1b paint setup current type constant 2015-09-22 15:43:42 -07:00
YamaArashi 7c8b0641d9 replace viewport flags numeric literals with constants 2015-09-22 15:30:19 -07: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 a3d407079f fix windows position clamping 2015-09-22 22:58:34 +02:00
Michał Janiszewski 5ceafd66a3 Fix memory leak in screenshot.c and guest.c 2015-09-22 22:58:20 +02:00
Ted John daf61d0ca5 Merge pull request #1920 from Gymnasiast/fix-warnings-2
Fix more warnings
2015-09-12 13:54:22 +01:00
Michał Janiszewski 27ea266de1 Incrementation of paint_struct pointer looks bogus
Since the value incremented is a pointer, pointer arithmetics apply,
so instead of incrementing by 52, incrementation by 52^2 = 2704 takes
place, which was confirmed by inspecting generated listing.
2015-09-11 22:53:01 +02:00
Gymnasiast 68fc066fc5 Fix two more warnings 2015-09-11 15:23:11 +02:00
IntelOrca bea74ee261 make all file IO utf8 compatible, fixes #1847 2015-08-29 13:13:23 +01:00
Ted John cfecc817f2 Merge pull request #1853 from Gymnasiast/fix-banner-count
Add a console option to fix the banner count, fixes #667
2015-08-28 12:35:05 +01:00
Gymnasiast e9b5282486 Add a console option to fix the banner count, fixes #667 2015-08-27 17:24:23 +02:00
Gymnasiast 4d7a81bfe0 Remove unnecessary duplicate address, use more string constants 2015-08-27 16:44:18 +02:00
Gymnasiast f384a9cbf8 Remove test code 2015-08-20 13:23:07 +02:00
Gymnasiast 93d49e314e Fix file menu for editor, restore menu order, add shortcut for quick saving 2015-08-20 12:13:08 +02:00
IntelOrca 4f8e289e79 finish server list and fix a couple of multiplayer issues 2015-08-16 17:29:47 +01:00
IntelOrca 094cc19411 allow joining of servers in server list window 2015-08-16 16:37:08 +01:00
Gymnasiast 7449deeffe Add console option to reset all user strings 2015-08-16 15:31:59 +02:00
IntelOrca f072440d18 add server list window (WIP) 2015-08-16 03:07:00 +01:00
IntelOrca 3f31221973 fix network merge issues, fix #1785 2015-08-14 22:06:15 +01:00
zsilencer c1e802e361 fix text for utf8 2015-08-14 09:15:07 -06:00
zsilencer 3a26f56000 fix path placement for network 2015-08-14 09:13:40 -06:00
zsilencer 3b4a4fcdac network status window 2015-08-14 09:13:39 -06:00