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
Conversation
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? |
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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])) |
There was a problem hiding this comment.
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
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. |
@AaronVanGeffen Yes, 2213a6a fixes the drawing issues in the video. |
Yeah, talking about clearer strings than |
a83b311
to
8fc980c
Compare
8fc980c is WIP, just wanted to rebase before continuing work for this PR. |
Superseded by #6606. |
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