1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00
Commit Graph

186 Commits

Author SHA1 Message Date
Marijn van der Werf
cfed9fd1c0 Clean up variable declarations 2016-03-03 14:32:28 +01:00
Marijn van der Werf
daee674894 Inline loc_6791B8_6795E4_679A8F_679F73 2016-03-03 14:32:27 +01:00
Marijn van der Werf
d8dbd8decf Use power of two for calculating round level 2016-03-03 14:32:27 +01:00
Marijn van der Werf
99555a1b81 Merge branches and don't use deprecated globals 2016-03-03 14:32:27 +01:00
Marijn van der Werf
32d45d3018 Fix zoom level check 2016-03-03 14:32:27 +01:00
Marijn van der Werf
6e59f2c02b Start code cleanup 2016-03-03 14:32:27 +01:00
Marijn van der Werf
dbd3c4942c Add assert to check whether address is ever reached 2016-03-03 14:32:27 +01:00
Marijn van der Werf
bf7092e2f9 Add comparison function 2016-03-03 14:32:27 +01:00
Marijn van der Werf
859e5cfdde Clena up code 2016-03-03 14:32:27 +01:00
Marijn van der Werf
c84681b8ee Refactor sub_679C4A 2016-03-03 14:32:27 +01:00
Marijn van der Werf
8f50003697 Refactor code 2016-03-03 14:32:26 +01:00
Marijn van der Werf
ce4590f914 Attempt to decompile sub_679C4A 2016-03-03 14:32:26 +01:00
Marijn van der Werf
a0e08146bb Make function uniform and apply fixes 2016-03-03 14:32:26 +01:00
Marijn van der Werf
6a2134896f Decompile zoom level 3 2016-03-03 14:32:26 +01:00
Marijn van der Werf
68229904e1 Decompile zoom level 2 2016-03-03 14:32:26 +01:00
Marijn van der Werf
0519130b94 Complete dpi->zoom_level == 0 2016-03-03 14:32:26 +01:00
Marijn van der Werf
ebb2ab3b0c Decompile dpi->zoom_level == 0 && image->flags & 4 2016-03-03 14:32:26 +01:00
Marijn van der Werf
cdf4b596e4 Implement further 2016-03-03 14:32:26 +01:00
Marijn van der Werf
db7b624b6e Clean up leftmost branch 2016-03-03 14:32:26 +01:00
Marijn van der Werf
8f1c7ff064 Continue decompiling 2016-03-03 14:32:25 +01:00
Marijn van der Werf
5fd4025b9b Decompile first path 2016-03-03 14:32:25 +01:00
duncanspumpkin
70f38aa68f Fix support drawing issue 2016-02-29 19:54:05 +00:00
duncanspumpkin
24df65af9d Label current paint tile max height 2016-02-29 18:04:48 +00:00
Gymnasiast
4f4111dedb Support 8 cars MOM properly while keeping our own corrupted element 2016-02-26 15:46:14 +01:00
Michał Janiszewski
14bff0c66f Rename rct_ride_type to rct_ride_entry 2016-02-25 13:33:19 +01:00
Ted John
50b42a96ce Merge pull request #2982 from duncanspumpkin/sprite_flags
Refactor sprite_flags
2016-02-23 19:32:42 +00:00
Ted John
f2a4dcddc8 Merge pull request #2998 from janisozaur/performance2
Improvements to sprite_paint_setup
2016-02-23 18:51:20 +00:00
duncanspumpkin
53df541a39 Relabelled sprite_flags to flags. Relabelled peep/fountain flags 2016-02-23 17:22:19 +00:00
duncanspumpkin
5340af4a12 Refactor sprite_flags 2016-02-23 17:09:53 +00:00
Michał Janiszewski
d375015975 Mark map element getters const
While it doesn't change a lot in terms of performance, it helps out
compiler being a bit smarter about inlining and reordering things (as
evidenced by generated assembly).
2016-02-23 15:12:48 +01:00
Michał Janiszewski
2a2a188a8b Improvements to sprite_paint_setup
This includes following changes:
* Reorder exit conditions by frequency they're hit at, this makes the
  function exit earlier in many cases without having to do expensive
  accesses to global memory.
* The code in C tested (eax > 0x2000) || (ecx > 0x2000) while I believe
  it was meant to check for >= instead (`cmp ax,2000h; jnb`)
* The check mentioned above was changed to be expressed more concisely:
  `((eax | ecx) & 0xe000)`, which generates a single `test` instead of
  two.

It improves performance by 1-2fps in parks that rely heavily on this
function, like the mega-micro park from
https://github.com/OpenRCT2/OpenRCT2/issues/2589
2016-02-23 14:18:53 +01:00
Michał Janiszewski
cafed8551b Optimise accesses to get_current_rotation() 2016-02-19 23:56:08 +01:00
Michał Janiszewski
6d6f9f3c23 Refactor rides to be only accessible with getters
This changes how rides are accessed from macros to getter functions.
2016-01-23 01:13:36 +01:00
Ted John
e69e384d43 Merge pull request #2692 from marijnvdwerf/use-named-addresses
Replace known addresses with constants, globals and wrapper functions
2016-01-15 22:59:13 +00:00
Marijn van der Werf
6568798af7 Use globals instead of addresses where applicable 2016-01-15 21:01:49 +01:00
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