Skip to content

Clean up D2EventTimerQueueStrc and Event.cpp readability - #222

Merged
Lectem merged 1 commit into
ThePhrozenKeep:masterfrom
AudriusButkevicius:fix/191-timer-queue-cleanup
Apr 26, 2026
Merged

Clean up D2EventTimerQueueStrc and Event.cpp readability#222
Lectem merged 1 commit into
ThePhrozenKeep:masterfrom
AudriusButkevicius:fix/191-timer-queue-cleanup

Conversation

@AudriusButkevicius

Copy link
Copy Markdown
Contributor

Summary

  • Restructures D2EventTimerQueueStrc to use named members instead of opaque unk0x fields:
    • unk0x04[10][64]pHead[5][64] + pTail[5][64]
    • unk0xA04[5]pInfinite[5]
    • unk0xA18pCurrent
  • Simplifies complex pointer arithmetic (bitshifts, manual offset calculations) into clean 2D array indexing
  • Renames decompiler variable v19ppQueue

Fixes #191

Note: This PR was produced using Claude Code based on the upstream issue description. The change has not been compiled or tested, as the project requires a Windows build environment which was not available. Please review carefully before merging.

Restructures D2EventTimerQueueStrc to use named members:
- unk0x04[10][64] -> pHead[5][64] + pTail[5][64]
- unk0xA04[5] -> pInfinite[5]
- unk0xA18 -> pCurrent

Simplifies complex pointer arithmetic in D2GAME_InitTimer and
sub_6FC353D0 into clean 2D array indexing.

Fixes ThePhrozenKeep#191
@Lectem
Lectem merged commit 5b5b26e into ThePhrozenKeep:master Apr 26, 2026
4 checks passed
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.

D2GAME_InitTimer_6FC351D0 Code cleanup

4 participants