Commit Graph

97 Commits

Author SHA1 Message Date
Ted John cea0f30121 integrate variable: gLandToolSize 2016-04-24 18:02:37 +01:00
Ted John fc938892d8 integrate variables for command position and expenditure 2016-04-24 17:53:39 +01:00
Ted John b9944dd33a integrate land tool variables 2016-04-24 17:28:12 +01:00
Ted John 0f6e64ac76 add global macros for map size and tile loop 2016-04-24 14:00:26 +01:00
Ted John 0ffca3a4fc use gPeepSpawns for remaining non-refactored usages 2016-04-24 11:01:19 +01:00
Ted John 4cdb2df9dc integrate screen variables 2016-04-23 11:16:46 +01:00
Ted John 171388e9a3 integrate park entrance ghost variables 2016-04-23 01:21:00 +01:00
Ted John f73e3ab0e1 integrate footpath construction variables
- uint8 gFootpathProvisionalFlags
- rct_xyz16 gFootpathProvisionalPosition
- uint8 gFootpathConstructionMode
- uint16 gFootpathSelectedId
- uint8 gFootpathSelectedType
- rct_xyz16 gFootpathConstructFromPosition
- uint8 gFootpathConstructDirection
- uint8 gFootpathConstructSlope
- uint8 gFootpathConstructValidDirections

Also fix some previous variable integrations that had been forgotten to change.
2016-04-15 19:16:48 +01:00
Ted John 84edd049d9 integrate current tool variables:
- gCurrentToolId
- gCurrentToolWidget
2016-04-15 18:26:47 +01:00
Ted John 1b3f46f960 integrate game command error string variables
- gGameCommandErrorTitle
- gGameCommandErrorText
2016-04-15 17:54:46 +01:00
Gymnasiast ddf3d7a03d Consistently use 'colour' rather than 'color' 2016-02-28 20:32:02 +01:00
Michał Janiszewski aa8437cb9d Minor fixes 2016-02-26 20:49:01 +01:00
Michał Janiszewski 6b514d1e3a Fix possible issues highlighted at higher warn levels
Mostly possibly uninitialized values and signedness
2016-02-26 12:54:00 +01: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 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
Hielke Morsink 0b445ab1a5 Fix #2747 map sprite issue. 2016-01-19 00:05:14 +01:00
Marijn van der Werf 98b5ad1bf4 Replace known addresses with constants 2016-01-15 21:01:34 +01:00
IntelOrca f0adf90660 integrate variable: gInputFlags 2016-01-04 22:53:03 +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
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 c6b023df86 fix warnings 2015-12-29 11:39:06 +00:00
Michał Janiszewski e3f5ea25ae Map unknown elem type to corrupt, update tile inspector
In map view, all unknown types are mapped to MAP_ELEMENT_TYPE_CORRUPT,
the type that prevents rendering of all following elements on given
tile.

Tile inspector now displays element type (numeric value) for unknown
types.
2015-12-27 10:34:02 +01:00
Michał Janiszewski 53970c2d77 Add tile type for corrupt element
Fixes #2558
2015-12-26 13:36:32 +01:00
Michał Janiszewski 79e5bb758d Add an assert for getting proper mapElementType 2015-12-26 13:16:03 +01:00
Aaron van Geffen 9232a9906f Inventarised instances of RCT2_ADDRESS_COMMON_FORMAT_ARGS 2015-12-26 18:24:36 +09: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
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
Dom Light bb62b7561a Replace some uses of play_sound_panned with play_sound_at_location 2015-11-18 00:03:15 +00: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
Michał Janiszewski 075b98e209 Minor cleanups
Mostly just setting variables to better define game state, with one
minor update of decompilation where an `or` instruction was used in
place of `mov` (in `sub_6CBCE2`).
2015-11-12 12:19:40 +01:00
duncanspumpkin d5688cdc4e Fix #2189. Map owned area not shown correctly.
Issue was caused by doubling up a bit of code and combining it with the next line when implementing it.
2015-11-03 18:19:23 +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
Gymnasiast 9504f3f10d Replace missed occurrence of magic numbers with defines 2015-10-26 13:53:26 +01:00
Gymnasiast 61444c8518 Display the visible/practical map size instead of the technical size, fixes #2133 2015-10-26 10:21:04 +01:00
Michał Janiszewski 7d0ce00bab Strip all whitespace 2015-10-20 20:48:51 +02:00
duncanspumpkin 9017e5ff86 Fix #1899. Prevent mountain tool from being possible for land ownership tool. 2015-10-04 20:44:17 +01:00
Gymnasiast 4d7a81bfe0 Remove unnecessary duplicate address, use more string constants 2015-08-27 16:44:18 +02:00
medsouz 7071bd9353 Document more addresses
Created defines for all the memory addresses I could find in peep/staff.c
and updated everywhere they're being used.
2015-08-16 18:25:17 -04:00
medsouz ca1a1e0ddd Document various memory addresses 2015-08-16 13:05:49 -04:00
Gymnasiast 6ec3838b0b Refactor map window 2015-08-12 14:23:13 +02:00
IntelOrca d228d13918 implement utf8, part 23 (bug fixes) 2015-08-01 16:40:15 +01:00
IntelOrca fbd402eb67 implement remaining screen_get_map_xy... functions 2015-07-11 18:23:59 +01:00
IntelOrca d5ffaefdf0 add better disable clearance cheat 2015-07-10 21:32:11 +01:00
IntelOrca f906391c9d remove registers from window events and changed to typed signatures 2015-07-10 01:39:16 +01:00
IntelOrca 46178bb44f implement finish-map-window part 6 2015-07-02 17:00:39 +01:00
IntelOrca 55c509590f implement finish-map-window part 5 2015-07-02 01:50:13 +01:00
IntelOrca 6de7a38f53 implement finish-map-window part 4 2015-07-02 00:37:55 +01:00