1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00
Commit Graph

99 Commits

Author SHA1 Message Date
Ted John
870a8b55e5 add global macros for viewport variables 2016-04-25 21:53:21 +01:00
Ted John
652b1c83db integrate variables for lightning and toolbar dirty flags 2016-04-24 21:49:09 +01:00
Ted John
a97533228c integrate window DPI variable 2016-04-24 01:40:55 +01:00
Ted John
98f732aaf7 integrate screen variables (#3411) 2016-04-24 00:36:39 +01:00
Ted John
ee509caf35 integrate game paused variable and refactor 2016-04-23 13:34:55 +01:00
Ted John
4cdb2df9dc integrate screen variables 2016-04-23 11:16:46 +01:00
janisozaur
e9bf2a742f widget_index is sint16, make sure the check is valid (#3335) 2016-04-20 18:08:05 +01:00
Yaroslav Tretyakov
c3ba519a6e Integrate audio related variables (#3322) 2016-04-17 14:20:26 +01:00
Ted John
84edd049d9 integrate current tool variables:
- gCurrentToolId
- gCurrentToolWidget
2016-04-15 18:26:47 +01:00
IntelOrca
89ad0cc769 store windows in openrct2 memory and increase max
Allocate a bigger window list and viewport list in OpenRCT2 static memory and move over all references from RCT2.
This also removes the 'active' viewport pointer list and instead changes everything to just enumerate the whole viewport list
2016-04-14 23:00:35 +01:00
Michał Janiszewski
c0caf2d222 Minor fixes 2016-02-26 11:40:07 +01:00
IntelOrca
a489fac185 implement mouse wheel for land tool size, closes #2260 2016-02-24 21:49:56 +00:00
IntelOrca
43a5cc92cc define STR_NONE as a rct_string_id 2016-01-07 22:14:53 +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
Michał Janiszewski
8a5d066efe Fix strict aliasing violations
Compiler only guarantees proper accesses to variables when using
variable's native type or `char` (i.e. single byte type) [1].

This commit fixes violations of this rule. In most cases changing code
to a simple cast was enough, some required a bit deeper modifications.

This fixes #2596.

[1] http://blog.qt.io/blog/2011/06/10/type-punning-and-strict-aliasing/
2015-12-31 13:27:26 +01:00
IntelOrca
64b589770a remove obsolete callprocs 2015-12-29 11:57:47 +00:00
IntelOrca
c6b023df86 fix warnings 2015-12-29 11:39:06 +00: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
Michał Janiszewski
d610fb5970 Remove call to 0x0040701D 2015-12-21 22:17:13 +01:00
Michał Janiszewski
54424ea275 Remove old Linux workarounds
Verified working on my machine.
2015-12-21 21:52:42 +01: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
Michał Janiszewski
39cc16d137 Plug memory leaks, check memory accesses 2015-11-29 12:15:47 +01:00
Dom Light
e9b7e41635 Refactor audio_sound_play_planned 2015-11-17 23:05:24 +00:00
Dom Light
3a8b25a0ee Sanitize audio.h 2015-11-17 01:05:14 +00:00
duncanspumpkin
251ee91bf6 Fix #2235 anti clockwise no longer crashes
Issue cause by %4 not handling negative numbers.
2015-11-08 09:22:29 +00:00
Michał Janiszewski
c0e2a5c7be Add get_current_rotation function and DEBUG_LEVEL macros 2015-11-02 22:58:15 +01:00
Alexander Overvoorde
01793e11b7 Replace RCT2_GLOBAL magic numbers with address identifiers and string ids 2015-10-29 09:44:46 +01: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
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
IntelOrca
6f1aca52f5 fix #1657 2015-07-30 00:26:32 +01:00
IntelOrca
1662b18a7e fix #1662, consistent location sign 2015-07-23 18:38:43 +01:00
zsilencer
af68e9d9ea fix #1590 2015-07-12 20:23:58 -06:00
IntelOrca
fbd402eb67 implement remaining screen_get_map_xy... functions 2015-07-11 18:23:59 +01:00
IntelOrca
f906391c9d remove registers from window events and changed to typed signatures 2015-07-10 01:39:16 +01:00
Runelaenen
15a4c958eb Changed 'wise' to 'direction' 2015-07-09 14:22:32 +02:00
Runelaenen
bec1a52bba Changed function and occurences
It doesnt have to rotate three times to get an anti-clockwise return.
2015-07-09 14:22:28 +02:00
zsilencer
9eb4958dde fix #1002 2015-07-05 08:57:01 -06:00
IntelOrca
f0bba54e79 uncapped FPS: fix viewport chopiness and reset after park load 2015-07-04 23:51:23 +01:00
IntelOrca
46178bb44f implement finish-map-window part 6 2015-07-02 17:00:39 +01:00
Robert Jordan
a3a993dabd Title Sequence editor 2015-06-24 12:25:54 -04: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
IntelOrca
ce924b4b1b add new custom title sequence to celebrate 0.0.2 release 2015-06-14 21:01:48 +01:00
Duncan Frost
adea7cb9ad Fix incorrect string text colour.
With the change in how text box colouring is done during the first drawing of any window it would default to the wrong colour due to not calling invalidate before setting the window colour global variables.
2015-06-14 09:10:56 +01:00
IntelOrca
26abb73b8e implement update_cursor_position 2015-06-12 23:29:26 +01:00
IntelOrca
b2e9559d31 fix window issues, fixes #1306 2015-06-11 13:04:55 +01:00
IntelOrca
0dd749baac refactor window event calls 2015-06-09 18:29:02 +01:00
IntelOrca
f4a4df1cb5 implement window_create_auto_pos 2015-06-07 18:14:33 +01:00