1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00
Commit Graph

251 Commits

Author SHA1 Message Date
Marijn van der Werf
98b5ad1bf4 Replace known addresses with constants 2016-01-15 21:01:34 +01:00
duncanspumpkin
10f85322ae Fix incorrect rct2 address comments 2016-01-15 19:17:00 +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
17c01a36a7 don't paint track of an invalid ride, should help reduce crashes 2016-01-07 23:16:17 +00:00
IntelOrca
586e5ef9cd integrate variable: gPressedWidget 2016-01-05 21:46:38 +00:00
IntelOrca
88c391120a integrate tooltip variables 2016-01-05 00:02:23 +00:00
IntelOrca
f0adf90660 integrate variable: gInputFlags 2016-01-04 22:53:03 +00:00
IntelOrca
b5069d3809 integrate variable: gInputState 2016-01-04 22:45:51 +00:00
Jonathan Haas
4d26e4c4a1 Refactor peep code
Name various fields and constants related to peeps. This includes:
  - Flags for flashing peeps in map window
  - Animation frames for picked up peeps
  - Function checking if peep should start to fall
  - Special sprite handling for slide boards and lawn mowers
  - Created array for peep sprite entries, renamed some variables and constants
2015-12-31 13:57:06 +01:00
IntelOrca
db18fa8f14 finally fix #1619: Can't place any path
RCT2_ADDRESS_TOOL_WIDGETINDEX was being read as an int32 sometimes
2015-12-21 22:28:34 +00:00
IntelOrca
1ffc9a6355 fix problems with wooden_a_supports_paint_setup and refactor 2015-12-19 21:30:32 +00:00
IntelOrca
96b9a4ed18 implement wooden_a_supports_paint_setup 2015-12-19 20:11:04 +00:00
IntelOrca
57207bac34 refactor new track painter, reduce empty jump tables 2015-12-19 12:39:07 +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
duncanspumpkin
d91a9c965c Fix #2405. Foundations under shops now correctly drawn.
Issue was caused by a mistake in implementation
2015-11-30 18:00:33 +00:00
IntelOrca
7909ba1f3b fix #2390: Not fully implemented UTF-8 currencies in building/landscaping/etc. 2015-11-28 12:10:17 +00:00
duncanspumpkin
82498c4a57 Fix #1922. Corrected invalid viewport code.
ACTIVE_VIEWPORT_PTR_ARRAY should be iterated along checking for a NULL pointer. To indicate the list end. Removed NEW_VIEWPORT macro as its description was incorrect.
2015-11-15 21:05:30 +00:00
IntelOrca
48e3d70e57 refactor colour maps 2015-11-08 18:55:32 +00:00
duncanspumpkin
6493c83efc Fix regression in last commit 2015-11-06 19:13:29 +00:00
IntelOrca
31ab7c8b98 fix several warnings 2015-11-06 18:50:37 +00:00
Jonathan Haas
96d71ac174 Fix Bug #2201 2015-11-04 12:51:00 +01:00
kmdreko
2db198e7c4 Remove unneeded call 2015-11-03 18:14:22 -06:00
kmdreko
d951bebf88 move range checks 2015-11-03 18:13:49 -06:00
kmdreko
a35472befe properly format function comment 2015-11-03 18:13:11 -06:00
kmdreko
1293325699 decompiled sub_683359 2015-11-02 23:30:48 -06:00
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