Conditionally restore old functionality which got broken for mingw
builds with commit c93c1c7. Allow building with old version of code, but
generate a warning when doing so.
This is mostly refactoring of cmake scripts, but also touches build.sh
and install.sh. The cmake should be much more palatable now for major
Linux distributions.
At the same time, new configuration is introduced to Linux version, one
with Twitch enabled.
Please note, however, this change requires update of orctlibs.zip for
mingw builds.
Issue was caused by a change I asked to be done a month back. Dropdowns are awkward windows the global array for dropdown content should be populated before creating them but not anything else as that will get reset. In this case the disabled items were reset. The same happens for highlighted index if that is specified before window creation
> Issue was caused by incorrectly translating btr and bts to C. In addition the operation was on a word and not a byte so it wouldn't change the maze correctly for all rotations. I've also refactored the code to make it a bit easier to follow.
Issue was being caused by passing the incorrect x and y parameters due to missing a widget dereference. I've also moved the x/y coordinates of the hand open/close to closer match what it feels like.
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
`platform_enumerate_files_begin` (and it directory counterpart) can
return `-1`, make sure we handle that value properly when passed on
to `platform_enumerate_files_next` and `platform_enumerate_files_end`
As it turns out, you have to declare your link directories before you
use them in cmake, otherwise your executables/binaries will have no
knowledge of them.
This should fix travis builds for mingw.