1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 14:02:59 +01:00
Commit Graph

126 Commits

Author SHA1 Message Date
Michał Janiszewski
c0e2a5c7be Add get_current_rotation function and DEBUG_LEVEL macros 2015-11-02 22:58:15 +01:00
duncanspumpkin
9a76c59ec9 Fix entrance drawing issue. Fixes #2164. 2015-10-30 23:33:02 +00: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
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
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
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
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
IntelOrca
f43c7f6ac1 implement viewport_vehicle_paint_setup 2015-08-07 02:47:57 +01:00
IntelOrca
4f77cc8df3 implement gfx_draw_sprite_raw_masked 2015-08-06 01:00:03 +01:00
IntelOrca
cec486839c add 'no entrance' style and refactor a few things 2015-08-05 01:24:18 +01:00
IntelOrca
3c1190e11f implement utf8, part 26 (bug fixes) 2015-08-03 18:06:54 +01:00
IntelOrca
a9e6f8c3db implement utf8, part 12 2015-08-01 10:20:55 +01:00
Gymnasiast
ae32b463c0 Add feature to make banners display text in all caps 2015-07-25 21:38:23 +02:00
Michał Janiszewski
8f2dc5fd1a sub_0x68615B doesn't really take any params
In all cases, sub_0x68615B takes a single argument, 0xEE788C.
It now takes 0 arguments and simply knows about its initializing values.
2015-07-23 20:22:08 +02:00
IntelOrca
2bad1052b3 fix #1641 2015-07-17 21:32:22 +01:00
IntelOrca
74dc18b062 implement viewport_track_paint_setup 2015-07-17 17:25:38 +01:00
IntelOrca
e967e9465f implement sub_68B2B7 2015-07-17 16:00:46 +01:00
Duncan Frost
8504486b28 Fix entrance/exit placement.
Fixes #1591
2015-07-13 21:09:36 +01:00
Gymnasiast
0cbabb479e Fix some warnings 2015-07-13 11:56:58 +02:00
IntelOrca
3ffffc699c clean up and remove various callprocs 2015-07-12 01:46:52 +01:00
IntelOrca
48b71782fe fix sub_679023 2015-07-11 21:58:33 +01:00
IntelOrca
9dca351e8d fix mistake in sub_679023 2015-07-11 19:37:19 +01:00
IntelOrca
daaf42d581 implement sub_679023 2015-07-11 18:46:52 +01:00
IntelOrca
fbd402eb67 implement remaining screen_get_map_xy... functions 2015-07-11 18:23:59 +01:00
IntelOrca
5724567b15 implement ride_get_place_position_from_screen_position 2015-07-10 14:54:02 +01:00
zsilencer
c971a260b7 fix #1572 2015-07-09 11:00:46 -06:00
IntelOrca
0def7c0883 refactor invalidation of map tiles and viewports 2015-07-06 18:57:36 +01:00
zsilencer
9eb4958dde fix #1002 2015-07-05 08:57:01 -06:00
IntelOrca
cc54171443 remove / isolate several CALLPROCs 2015-06-30 17:13:34 +01:00
Duncan Frost
c165811017 Fix incorrect drawing of entrance elements
2 mistakes found.
1. Did not call the correct paint setup function. This caused the order of painting to be incorrect.
2. Used the wrong offset to the transparent image. This would cause little bits of transparency to appear on the top of the entrance image.

Fixes #1442.
2015-06-24 20:20:54 +01:00
Duncan Frost
d5c19437ac Make generic version of 98197C rotations. Refactor.
I've added a new function coordinate 3d to 2d. There are still quite a few different versions of this same code throughout the project that should be changed to use this function.
2015-06-21 16:23:25 +01:00
Duncan Frost
2c6312a86d Implemented 2nd rotation. Small refactor of parameter list 2015-06-21 16:23:24 +01:00
Duncan Frost
48d3f6e7e3 Switch on setup_image_on_viewport rotation 0. 2015-06-21 16:23:24 +01:00
Duncan Frost
8554d2183c Implemented more of the paint_struct setup code 2015-06-21 16:23:23 +01:00
Duncan Frost
eac5cea701 Implement left and right parts of the entrance. 2015-06-21 16:23:22 +01:00