1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00
Commit Graph

87 Commits

Author SHA1 Message Date
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
Robert Jordan
9f9143a5c6 textbox widget 2015-06-06 17:04:53 -04:00
Duncan Frost
c9543005de Fix small issues with scrolling.
I've found the cause of the cursors not correctly changing. It would appear ebx is popped to its previous value as the call function returns. This causes the cursor value to never change. This can be solved when all windows are complete. Fixes points i, ii, iii, iv of #1127 (Fixed by reseting scroll positions when the height is 0. And actually passing the scroll index to the calling function)
2015-06-03 20:54:28 +01:00
Duncan Frost
3bd3fccb57 Fix rotation disapearing sprites
This was caused by the sprite quadrant assignment not being reset when a new rotation was assigned
2015-05-30 10:15:29 +01:00
IntelOrca
6f1cd77f3c implement textinput_cancel and refactor textinput event calls 2015-05-28 01:15:58 +01:00
Robert Jordan
ab942236d7 Added in-game object selection
New console commands:
- open (opens a window)
- windows (lists windows usable with open)
- load_object (loads the specified obj with the given filename)
- object_count (lists the number of objects in the scenary)
Console commands now have a usage variable.

Use: "open object_selection" for the object selection window.
Once the object selection window is closed, all objects will
automatically be researched whether or not they were already in the base
scenario.
The object selection window will close any other windows when selecting
an object to prevent a crash.
2015-05-23 14:56:54 -04:00
Gymnasiast
36ccfe77e0 Add GUI option for switching to the RCT1 colour scheme, along with proper invalidation of the affected windows 2015-05-21 12:28:51 +02:00
Robert Jordan
dc38087f07 Fixed tooltip issue #1053
Tooltips should now behave more like RCT2.
2015-05-20 12:53:02 -04:00
Robert Jordan
a8ec43f065 Select size strings now use args 2015-05-13 11:38:44 -04:00
Ted John
e08e4b7f61 Merge pull request #988 from Garogolun/footpath-stuff
Added two footpath functions
2015-04-12 23:15:20 +01:00
Timmy Weerwag
930a9d61dd Fixes for a couple of warnings 2015-04-12 23:26:15 +02:00
Timmy Weerwag
5f55bd97be Decompiled sub_688972 2015-04-04 14:39:46 +02:00
Timmy Weerwag
b20efdada8 Refactored common code into viewport_coord_to_map_coord 2015-04-03 21:11:03 +02:00