diasurgical / diasurgical/devilution

Fix obscure function workarounds

Open
#1,274 1 comment 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
9k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

The functions in this issue use weird workarounds to obtain bin exactness, which should be looked into to find a proper fix in the future.

Uses alignment of 1:
  • GetDirection8 [missiles.cpp]
  • NetSendCmdLoc [msg.cpp]
  • NetSendCmdParam1 [msg.cpp]
Uses a volatile variable:
  • MAI_Lazhelp [monster.cpp]
Uses variable to trick optimizer:
  • gmenu_draw_menu_item [gmenu.cpp]
  • scrollrt_draw_dungeon [scrollrt.cpp]
Uses a label/goto:
  • TalkToTowner [towners.cpp]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the unchecked functions in missiles.cpp, msg.cpp, gmenu.cpp, and scrollrt.cpp, alongside the already checked cases in monster.cpp and towners.cpp. Determine how each workaround is being used to obtain bin exactness and identify the proper replacement for each case. Done means the listed workarounds are removed without changing the affected game behavior, with the relevant checks or builds passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.