HandmadeHero/docs/Day 019.md
2023-09-23 21:16:10 -04:00

1.3 KiB

Day 19

I started to do some cleanup while also following along.
handmade_win32.cpp now just holds the cpp build order when running the build script for unity builds.

I want to eventually support segemnted builds as well, that way I can make sure there isn't some unhandled usaged of a global or some other symbol in one of the source files.
Evetually I can also use gencpp perform some static analysis to make sure differnt layers are not accessing symbols that they should not.

I started to setup also pulling the polling of input out to a different function.
There are a few routes to go about it:

  • Make a separate function per input type: ( poll_keyboard, poll_xinput, poll_jsl ).
  • Make a single function that handles all input polling (poll_input or process_input).
  • (problably more...)

I'm gravitating toward the second option, the amount of content is not that large, and would keep the code all together along with its control flow.

Overall this was pretty brutual to follow along with for the vod. Thankfully handmade-notes exists.. Reading the end of the notes page for the episode showed a forum link to mmozeiko discussing use of the Windows Core Audio API to alleviate the large amount of latency required to operate with DirectSound.
I'm going to wait until after day 20 since Casey has that one titled "Debugging the Aduio Sync"