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

Add 'follow sprite' command for title sequence #5930

Closed
wants to merge 6 commits into from

Conversation

Broxzier
Copy link
Member

This PR adds a new command to the title sequence player that can set the viewport to follow a given sprite. The related windows have been updated so that the new command can be added to a sequence easily.

I've made a short video to demonstrate how this can be used: http://www.broxzier.com/files/ShareX/2017-07-17_23-45-04.mp4

@AaronVanGeffen
Copy link
Member

Nice addition! In the video, there appears to be some corruption in drawing the logo as the title screen is following the sprite. I'm assuming that's what 2213a6a is supposed to tackle?

@marijnvdwerf
Copy link
Contributor

Would it be possible to have a human-readable sprite description?

@@ -217,6 +217,9 @@ extern "C"
openrct2_write_full_version_info(ch, sizeof(buffer) - (ch - buffer));
gfx_draw_string(dpi, buffer, COLOUR_BLACK, x + 5, y + 5 - 13);

// Invalidate screen area
gfx_set_dirty_blocks(x, y, x + 500, y + 30);
Copy link
Member

Choose a reason for hiding this comment

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

x + 500, y + 30? That's a bit arbitrary, care to explain why these values exactly?

Copy link
Member Author

Choose a reason for hiding this comment

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

500 is just a large number to cover the width of the string. AppVeyor builds usually have a long version name for example. If there's a simply way to obtain the exact length, please do tell. 30 is simply the line height, to cover both the version and platform labels.

};

#define NUM_COMMANDS 8
// Basically countof(window_title_command_editor_orders)
#define NUM_COMMANDS (sizeof(window_title_command_editor_orders) / sizeof(window_title_command_editor_orders[0]))
Copy link
Member

Choose a reason for hiding this comment

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

there's a helper macro countof, please use that

@janisozaur
Copy link
Member

I like @marijnvdwerf 's suggestion too. I think it would be easy to mis-click a sprite and not know about it. Some confirmation either by naming the sprite or flashing it (you could toggle ghost flag, right?) would help alleviate that.

For the former, there should be a generic function that for each sprite would return its name in textual form. I'm actually a bit surprised there isn't one yet.

@Broxzier
Copy link
Member Author

Broxzier commented Jul 18, 2017

@AaronVanGeffen Yes, 2213a6a fixes the drawing issues in the video.
@marijnvdwerf Do you mean user feedback about the selected sprite, or clearer strings? Any suggestions?
@janisozaur I didn't know sprite had ghost flags, I'll look into it. I was thinking, maybe the sprite can be drawn inside the window instead of the sprite index.

@marijnvdwerf
Copy link
Contributor

marijnvdwerf commented Jul 18, 2017

Yeah, talking about clearer strings than 133427. Thinking of guest names, and "{{ ride.name }} - Train {{ n }}" as seen in the tooltips when you hover over a vehicle.

@Broxzier
Copy link
Member Author

Broxzier commented Oct 8, 2017

8fc980c is WIP, just wanted to rebase before continuing work for this PR.

@Gymnasiast
Copy link
Member

Superseded by #6606.

@Gymnasiast Gymnasiast closed this Nov 3, 2017
@Broxzier Broxzier deleted the follow_sprite branch June 13, 2018 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants