KEMBAR78
SCUMM HE: Add "Create session" dialog for Football 2002. by LittleToonCat · Pull Request #4886 · scummvm/scummvm · GitHub
Skip to content

Conversation

@LittleToonCat
Copy link
Contributor

This adds a new dialog box allowing the user to name for their network game session in Backyard Football 2002. This also adds the ability to set their own name in both the Host and Join session dialogs.

@LittleToonCat LittleToonCat requested a review from sev- April 6, 2023 09:02
Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

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

I finished my review. Several questions, mostly related to translations

res = 1;
break;

case 1030:
Copy link
Member

Choose a reason for hiding this comment

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

Eventually, we need to derive these enums from the original

// If there's a custom game name, use that instead.
if (ConfMan.hasKey("game_session_name")) {
Common::String gameSessionName = ConfMan.get("game_session_name");
return _vm->_net->hostGame(const_cast<char *>(gameSessionName.c_str()), userName);
Copy link
Member

Choose a reason for hiding this comment

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

c_str() is already char *. Is this cast really needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

c_str() actually returns an const char*, which will result in an invalid conversion error. So this cast is indeed needed.

if (runDialog(createDialog)) {
return -1;
} else {
return -2;
Copy link
Member

Choose a reason for hiding this comment

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

As I understand, these magic numbers are processed by the SCUMM scripts. Still, of possible, I'd prefer turning them into enums.

width = '480'
height = '250'
/>
<layout type = 'horizontal' padding = '-80, 8, 8, 8'>
Copy link
Member

Choose a reason for hiding this comment

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

That's unusually high negative padding. How does it look like?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

scummvm-football2002-00007

This was done so that the label and edit boxes would properly appear to the left of the dialog instead of the center. And for comparision, here's with the default 8 padding:

scummvm-football2002-00008

Actually, now that I think about it, it doesn't make too much of a difference, I'll revert the padding back to 8.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Edited and force pushed the themes commit with padding now set to 8.

width = '480'
height = '250'
/>
<layout type = 'horizontal' padding = '-80, 8, 8, 8'>
Copy link
Member

Choose a reason for hiding this comment

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

-80 is like 1/4 of a 320 pixels wide screen. Doesn't feel right. Could you please post a screenshot?

@LittleToonCat LittleToonCat force-pushed the create-session-dialog branch from d20273a to 93c5d4e Compare April 6, 2023 10:05
@sev-
Copy link
Member

sev- commented Apr 7, 2023

Thanks!

@sev- sev- merged commit 9de54e5 into scummvm:master Apr 7, 2023
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.

2 participants