Repository navigation
Conversation
… names Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Style guide reading (advisory, posted once) 17 possible deviation(s) from REIMPLEMENTATION_STYLE_GUIDE.md across 10 of the 18 reimplemented The match comes first. Where the ugly form is what matched, it stays -- that is the guide's own overriding rule, and rule 21 asks for a one-line comment saying what was measured so the next reader does not retry it. This report is posted once, when the PR opens, and is not repeated on later pushes.
WhereRule 14 — The shape of a file
Rule 20 — Keep nesting low; no
Rule 23 — Prefer if-else over ternary
|
| && DAT_GameState::instance.mapAndTime.year == DAT_GameState::instance.mapAndTime.yearCopy) | ||
| || DAT_GameState::instance.mapAndTime.year > DAT_GameState::instance.mapAndTime.yearCopy) { | ||
| DAT_GameState::instance.mapAndTime.militaryCampaignStage = 5; | ||
| goto missionWon; |
There was a problem hiding this comment.
It is highly unlikely the original developers wrote a goto. Can you find a source code form without the goto? Usually code duplication or moving around the arms of the function works.
There was a problem hiding this comment.
Done: a missionWon flag replaces the five gotos, and the win block runs after the mission chain. MSVC threads the constant flag back into the same jumps, so the score is unchanged (99.9%, only the trampoline label).
TheRedDaemon
left a comment
There was a problem hiding this comment.
Looks good, only three or four types of remarks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tring literals for the speech files, enum names for text groups and the option colour, no goto in updateMilitaryCampaignMissionState Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TheRedDaemon
left a comment
There was a problem hiding this comment.
Looks even better. Only two small things left from my side.
|
|
||
| #include "../General.func.hpp" | ||
|
|
||
| #pragma warning(disable : 4996) |
There was a problem hiding this comment.
The pragma please at the top of everything.
There was a problem hiding this comment.
Done, the pragma is the first line now.
| @@ -172,15 +174,15 @@ namespace UI { | |||
| (Commands::GameCommandType)52); | |||
| sprintf(DAT_GameSynchronyState::instance.receivedChatMessage, "%s :%s", | |||
There was a problem hiding this comment.
Is this string here (multiple times used in this file) possibly contained in string-literals?
There was a problem hiding this comment.
Yes, it is s__s__s_005a228c; all 18 uses in the file take it now.
… format string from string-literals Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reimplements 18 functions whose code matches the original instruction for instruction. reccmp reports them at 80-99.9% because it cannot name some symbols in the original (the exe has no relocations), so their status lines carry a
counted:remark that names what differs:Global: DetectDXVersionByLoadingDDRAW (GetProcAddressimport name), TestOSVersion (security cookie,memset)Synchrony: InitSkirmishLobbyData (memset)Map::Entities: SomeFireSpreadFunction (the constant0x10300131happens to look like an address in our DLL),EntityState::createSeagullandEntityState::computeVelocity(float constant names,_CIsin/_CIcos/_CItan/_CIsqrt,_ftol2_sse)Map::MapPropertiesState: setStartingYearAndStartingResources and updateEventYearsAndCommitBuildingAvailability (security cookie), updateMilitaryCampaignMissionState (its two tail jumps toMouseState::resetMouseCursorStatego through that function's trampoline)UI::MenuItems: General_AdvancedGameOptions, SiegeAttackingForceAndStartGoods_Main, NewInvasion_UnitButtons, TriggerInvasion_Main, WaitingForHost_ConnectToLobby, FindingNetworkSessions_Buttons (callback trampolines,sprintf, jump-table labels, security cookie)UI::MenuViews: HistoricCampaignIntro_DoEveryFrame, HistoricCampaignOutro_DoEveryFrame, HistoricMissionPicture_DoEveryFrame (float constant names,_ftol2_sse, a string label)Where a pushed or compared value is shown as a raw number on one side, I checked it against the original exe's bytes:
AdvancedGameOptionspushes0xB8E6F5in both, and the stringHistoricCampaignIntropushes isfx\speech\intro_04.wavin both.No header changes. The only status lines touched are these 18.
Checked with a build of this branch on top of
main, containing every source file of the touched folders plus the/GLcallees they reach (74 files): in all 18 the remaining differences are symbol names only, with the same per-function numbers as in my full build. Main's own functions in the build keep their scores.🤖 Generated with Claude Code