Skip to content
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

Fix obscure function workarounds #1274

Open
2 of 7 tasks
ghost opened this issue Jun 18, 2019 · 1 comment
Open
2 of 7 tasks

Fix obscure function workarounds #1274

ghost opened this issue Jun 18, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 18, 2019

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]
@AJenbo
Copy link
Member

AJenbo commented Jan 10, 2021

volatile is recommended by MS each time there is a bug with the compiler so probably this was added for just such a case.

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

No branches or pull requests

1 participant