Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended tile inspector #4414

Merged
merged 43 commits into from Oct 16, 2016
Merged

Conversation

Broxzier
Copy link
Member

@Broxzier Broxzier commented Sep 11, 2016

This is still work-in-progress

Make sure to compile the sprite list before testing

To do so run: openrct2.exe sprite build data\g2.dat ..\resources\g2

Example

The biggest change to the tile inspector are the two new group boxes. When the player selects any of the elements, a group box with info, and another group box with properties will be shown. The content of those depends on the type. For rides it lists the ride name and track piece ID for example.

Surface

Info

  • Terrain style
  • Edge style
  • Ownership status
  • Water level

Settings

  • Remove park fences
  • Restore park fences
  • Raised corners
  • Raise / Lower

Path

Info

  • Name
  • Additions

Settings

  • Raise / Lower
  • Change connected edges and corners

Track

Info

  • Ride type
  • Ride ID
  • Ride Name
  • Track piece ID
  • Track piece sequence

Settings

  • Raise / Lower
  • Toggle lift hill
  • 'Apply-all' Raise / Lower
  • 'Apply-all' Toggle lift hill

Scenery

Info

  • Age
  • Quarter details

Settings

  • Raise / Lower
  • Change quarter-tile location
  • Change quarter-collision flags

Entrance

Info

  • Type
  • Entrance part (0-2)
  • Station number (needs to be solved for park entrance left/right side)
  • Ride ID

Settings

  • Raise / Lower

Fence

Info

  • Type
  • Banner info

Settings

  • Switch between flat, slanted right, and slanted left
  • Raise / Lower

Large Scenery

Info

  • Type
  • Part ID
  • Banner info

Settings

  • Raise / Lower
  • 'Apply-all' Raise / Lower

Banner

Info

  • Banner info
  • No-Entry edges

Settings

  • Raise / Lower

Corrupt element

Info

...

Settings

  • Raise / Lower
  • Clamp to next element

Other things

  • Scale-able interface and defines to easily extend it
  • Sort button, to sort elements on a tile based on base height
  • Spinners for changing the current X and Y
  • Rotating banners
  • Rotating flat paths (edges and corners)
  • White selection area for both hovered and selected tile
  • Clipped strings for long entries
  • Auto enable / disable buttons (e.g. disable 'Lower' when object is at base height 0)
  • Different minimal height for each page
  • New corrupt elements spawn under the currently selected element

@marijnvdwerf
Copy link
Contributor

'Track piece ID' should probably be 'Track type', right?

Also, I think it would be better to move the 'change ride type' stuff to the tile inspector (currently in the ride window), but I don't really have an idea as to how that could look.

@Gymnasiast
Copy link
Member

Gymnasiast commented Sep 12, 2016

@marijnvdwerf:

Also, I think it would be better to move the 'change ride type' stuff to the tile inspector

I disagree. It's something that concerns the entire ride (in about the same way as the chosen vehicle) and not a track element on a tile.

@IntelOrca
Copy link
Contributor

@Gymnasiast until we implement the ability to swap ride type (track style) throughout the ride. But otherwise I agree.

@Broxzier
Copy link
Member Author

@marijnvdwerf
'Track piece ID' should probably be 'Track type', right?

That's indeed what it means. At the time I made it I thought calling it type would be confusing.

@duncanspumpkin duncanspumpkin added this to the v0.0.5 - fourth stable milestone Sep 12, 2016
@@ -1165,6 +1165,8 @@ enum {
STR_CONSTRUCTION_RIGHTS_NOT_FOR_SALE = 1727,
STR_CANT_BUY_CONSTRUCTION_RIGHTS_HERE = 1728,
STR_LAND_NOT_OWNED_BY_PARK = 1729,
STR_LAND_NOT_OWNED_AND_NOT_AVAILABLE = 5933,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String IDs should be sorted numerically.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I placed it there because they are very related, but I've moved everything down now.

@janisozaur janisozaur added enhancement An improvement to an existing feature (no alteration). user interface Has to do with user interfaces. labels Sep 14, 2016
@Broxzier Broxzier force-pushed the extended_tile_inspector branch 4 times, most recently from 0248898 to 09dfd5b Compare September 18, 2016 19:51
@Broxzier
Copy link
Member Author

Broxzier commented Oct 4, 2016

The tile inspector is ready to be tested. I will rebase this on the develop branch tomorrow.

@janisozaur
Copy link
Member

Remember to update g2 if you want to test it

@janisozaur
Copy link
Member

Changes to src/drawing/sprite.c look superfluous.

@@ -200,7 +200,7 @@ void window_guest_list_open()
window->enabled_widgets =
(1 << WIDX_CLOSE) |
(1 << WIDX_PAGE_DROPDOWN) |
(1 << WIDX_PAGE_DROPDOWN_BUTTON) |
//(1 << WIDX_PAGE_DROPDOWN_BUTTON) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed aswell. 6586636 is a messed up commit. will fix this today.

@Broxzier
Copy link
Member Author

Broxzier commented Oct 5, 2016

@janisozaur: That check is to see if both pointers have been set, just to break out of the loop earlier. It can be replaced with i > max(first, second), or even removed entirely (but making it continue iterate over the remaining elements).

*firstElement = *secondElement; copyies the second map element to the first element, swapping them.

@Broxzier
Copy link
Member Author

Broxzier commented Oct 5, 2016

Rebased!

Appveyor artifacts can be downloaded here: https://ci.appveyor.com/project/IntelOrca/openrct2-ject9/build/0.0.5.5356/job/iiw1ohv4eq38tltv/artifacts

@janisozaur janisozaur added pending review testing required PR needs to be tested before it is merged. and removed work in progress labels Oct 5, 2016
@@ -4230,8 +4230,70 @@ STR_5918 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COM
STR_5919 :{COMMA16}
STR_5920 :Render weather effects
STR_5921 :{SMALLFONT}{BLACK}If enabled, rain and gloomy colours will be rendered during storms.
<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed with a second rebase now.

@janisozaur
Copy link
Member

janisozaur commented Oct 8, 2016

Line 1335: stray printf

For some reason the dropdown arrow on fence slope detail does not raise after it's released (stays in "clicked" state)

Raising all 4 corners of surface yields weird results. Can you check if everything is correct in the code? Perhaps it would be better to have raising all 4 corners simply increase surface's base height a notch?

tile_inspector.c:714:8: error: unused variable ‘sequence’

tile_inspector.c:1490:12: error: unused variable ‘detailsAnchor’

tile_inspector.c:1353, 1354, 1867, 1868, 614, 622 and more shift signed values, which is undefined behaviour, please change it to multiplication or change windowTileInspectorTileX and Y to be unsigned, if it is valid thing to do.

@janisozaur
Copy link
Member

I have tested it a little now and posted my comments above. Otherwise it looks to do what it is meant to. 👍

strings should be in order, and code formatted was to make it more consistant
Corrupt elements are now placed right under the selected element
Local tile-inspector variables now all use camelCaseNames
Removed unused string, and shifted string IDs
@todo: For park entrances, the left and right tile do not show the entrance ID. Will solve this later.
These defines are used to calculate the edges of the widgets. They are
now ordered in the same way the widgets are listed for the pages.
This commit also adds some extra defines, to make it more easy to tweak
the sizes and padding of widgets.
This commit also renamed a flag, and corrected the use of one. The
flags in question are WALL_SCENERY_BANNER, WALL_SCENERY_2_FLAG4, and
WALL_SCENERY_2_FLAG5.
- Replaces places where the first element was requested to use the same function
@Broxzier
Copy link
Member Author

@IntelOrca @duncanspumpkin If one of you could test and merge this, that would be appreciated. Rebasing on future conflicts will only costs me more time.

@IntelOrca IntelOrca merged commit 00e907d into OpenRCT2:develop Oct 16, 2016
@IntelOrca
Copy link
Contributor

@Broxzier two things which I will let you do in a follow up PR:

  • collision is spelt wrong
  • inspecting an entrance tile doesn't show base height correctly, just a blank box.

STR_5929 :Fence details
STR_5930 :Large scenery details
STR_5931 :Banner details
STR_5932 :Currupt element details
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo - Currupt should be Corrupt

@Broxzier Broxzier deleted the extended_tile_inspector branch December 26, 2016 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement to an existing feature (no alteration). testing required PR needs to be tested before it is merged. user interface Has to do with user interfaces.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants