-
Notifications
You must be signed in to change notification settings - Fork 116
Minor tweaks to the codebase #780
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
base: master
Are you sure you want to change the base?
Conversation
- missing space between `"SpechitOverrun: Warning: unable to emulate"` and `"an overrun where numspechit=%i\n"` - `s3_floorheight >> 16` should use `FRACBITS` as it is `fixed_t` - enums in `mm_menu.c` were either missing `typedef` before `enum` or the name should be moved after `enum` as the old way created variables that are left unused
Don't mix tabs and spaces for formatting, make it uniform across the whole file. In general, two spaces are used. But new C++ code uses tabs and windows-specific code uses three tabs.
| "\xc3\xb9", | ||
| "\xc3\xbf", | ||
| "\xc3\x96", | ||
| "\xc3\x9c ", |
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.
This surprised me. It is a tab but without visible whitespace characters, it looks like a space. Found it only while looking for \t indentation. Did not check whenever or not it makes sense there, but there are other strings with 3 characters in the array, just no tab.
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.
This looks like it's in a conversion table between two binary text formats, so it's probably supposed to be there, and definitely shouldn't be changed without understanding the data thoroughly.
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.
Changing it to explicit \t does not change any behavior, just makes it easier to recognize for the character it is.
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.
Ah, that's totally reasonable, then. I'd apparently misunderstood the diff.
|
|
|
Thanks to @thecnoNSMB , I've double-checked the indentations and there was one find&replace error that I did not notice in |
| static void D_DrawTitle1(const char *name) | ||
| { | ||
| D_SetPage(name, TICRATE * 170 / 35, mus_intro); | ||
| D_SetPage(name, TICRATE * 170 / 35, mus_intro); // 35 * 170 / 35, is that correct math? |
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.
You can make this just be 170 ig
There are many changes that I've bundled into a single MR. Please say which changes you want to keep and I'll cherrypick them into dedicated MR(s).
35in all the places withTICRATE. I did not try changing value ofTICRATEbefore and after the change as I don't see it as a constant that is meant to be tweaked but more like naming the "magic number" to make the code more readableThere are two more changes I've considered:
const char * comp_lev_str[MAX_COMPATIBILITY_LEVEL]is checked asif (sizeof(comp_lev_str)/sizeof(comp_lev_str[0]) != MAX_COMPATIBILITY_LEVEL)(both ing_game.c) which should never happen and would result inI_Error("G_ReadDemoHeader: compatibility level strings incomplete");cmd->angleturn = ((unsigned char)(at = *(*data_p)++))<<8;ing_game.cwhereunsigned charis shifted left by 8, which is the same size asunsigned char- as I understand it, it is auto-promoted tounsigned intbefore the shift but I think it should be cast to it instead of casting it to type it already is (atis alreadyunsigned char).