Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

STARK: Implement the conversation log menu #1450

Merged
merged 12 commits into from Jun 24, 2018

Conversation

DouglasLiuDev
Copy link
Contributor

@DouglasLiuDev DouglasLiuDev commented Jun 16, 2018

This PR is corresponding to implementing the conversation log menu in TLJ.

@DouglasLiuDev DouglasLiuDev requested a review from bgK June 16, 2018 07:41
@DouglasLiuDev
Copy link
Contributor Author

DouglasLiuDev commented Jun 17, 2018

@bgK The whole implementation is basically finished and it's ready for review.

I find it extremely difficult to make the layout of widgets exactly the same as the original, at least not in a reasonable way. I suspect that this is due to the difference of the graphics layers. In 93327fa I did my best to make the whole layout very similar. Differences should be unnoticeable unless you put it together with the original. If you think it is not satisfactory then I think we'll need to take a deep look at the disassembly.

Common::String name = StarkGlobal->getCharacterName(logLine.characterId);
name.toUppercase();

uint color = name == "APRIL" ? _textColorApril : _textColorNormal;
Copy link
Member

Choose a reason for hiding this comment

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

This is how this test is done in other parts of the engine:

bool Speech::characterIsApril() const {

Copy link
Member

@bgK bgK left a comment

Choose a reason for hiding this comment

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

This is looking very good! I've added a few minor comments that need to be addressed before this can be merged.

@@ -92,7 +92,7 @@ void StaticLocationScreen::onMouseMove(const Common::Point &pos) {
// The first widget is always the background. It is ignored below.

if (newHoveredWidget != _hoveredWidgetIndex) {
if (_hoveredWidgetIndex > 0) {
if (_hoveredWidgetIndex > 0 && _hoveredWidgetIndex < _widgets.size()) {
Copy link
Member

Choose a reason for hiding this comment

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

Please fix the sign / unsigned comparison warning here.


++_nextTitleIndex;

if (pos.y > bottom) {
Copy link
Member

Choose a reason for hiding this comment

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

Please fix the sign / unsigned comparison warning here.

class DialogLineText;

/**
* The coversation log menu
Copy link
Member

Choose a reason for hiding this comment

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

Typo.

}

if (pos.y + height > bottom) {
break;
Copy link
Member

Choose a reason for hiding this comment

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

When we break here the objects created above are never freed.

height = dialogLineText->getHeight();

if (pos.y + height + space > bottom) {
break;
Copy link
Member

Choose a reason for hiding this comment

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

When we break here DialogLineText is not freed.

@bgK
Copy link
Member

bgK commented Jun 23, 2018

Differences should be unnoticeable unless you put it together with the original.

It looks close enough to me. I don't think anybody will mind if it's a few pixels of the original in this case.

@DouglasLiuDev
Copy link
Contributor Author

@bgK If you also think it's okay, we can merge.

@bgK bgK merged commit 32bbcd7 into residualvm:master Jun 24, 2018
@DouglasLiuDev DouglasLiuDev deleted the branch-dialog branch June 26, 2018 13:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants