cinera_handmade.network/pervognsen/bitwise/bitwise/bitwise018_1.hmml

73 lines
4.8 KiB
Plaintext

[video member=pervognsen stream_platform=twitch project=bitwise title="Making Noir" vod_platform=youtube id=s5ezMPgAbPM annotator=Miblo]
[0:08][Recap and set the stage for the day][:speech]
[1:20][Review the new support for pointer const declarations and expanded support for notes and #foreign][:admin :"code generation" :language :parsing]
[6:31][Review the newly complete support for incomplete declarations][:admin :"code generation" :language :parsing]
[8:59][Review the work on making the binding code less redundant][:admin :"code generation" :language :parsing]
[11:34][Review the :"error handling" of break / continue outside of loops, and warning of implicit breaks][:admin :"code generation" :language :parsing]
[13:13][Consider the cleanliness of this code]
[13:53][Q&A][:speech]
[14:03][:Run noir to demo its :"input handling", with some words on the plan for this :library]
[15:36][A few words on the genesis of noir, inspired by mu[ref
site=GitHubGist
page="pervognsen / mu.cpp"
url=https://gist.github.com/pervognsen/6a67966c5dc4247a0021b95c8d0a7b72][ref
site=YouTube
page="Programming a platform layer from scratch - part 1"
url=https://www.youtube.com/watch?v=NG_mUhc8LRw][ref
site=YouTube
page="Programming a platform layer from scratch - part 2"
url=https://www.youtube.com/watch?v=pAIdfsT7-EU]][:"input handling" :library :"platform layer" :speech]
[23:02][Dive into fully implementing keyboard :"input handling" in noir's update()[ref
site="SDL Wiki"
page=SDL_Keycode
url=https://wiki.libsdl.org/SDL_Keycode][ref
site="SDL Wiki"
page=SDL_GetModState
url=https://wiki.libsdl.org/SDL_GetModState]]
[35:17][:Run it to see that it's reporting Left Shift presses and releases incorrectly][:"input handling"]
[35:46][Read carefully through update() to try and determine what's wrong[ref
site="SDL Wiki"
page=SDL_GetModState
url=https://wiki.libsdl.org/SDL_GetModState]][:"input handling" :research]
[37:34][@tbodt_][Why is noir written in C and not Ion?][:language]
[38:36][@nxsy][Two KEY_LSHIFT in the array][:"input handling"]
[38:42][Fix typos in sdl_mod_map][:"input handling"]
[38:53][:Run it to see presses and releases of Left Shift][:"input handling"]
[39:14][Enable update() to handle the virtual combination keys SHIFT, CTRL and ALT][:"input handling"]
[41:04][:Run it to demo these virtual combination keys][:"input handling"]
[42:18][Introduce init_char_to_sdl_scancodes() using SDL_GetKeyFromName()[ref
site="SDL Wiki"
page=SDL_GetScancodeFromName
url=https://wiki.libsdl.org/SDL_GetScancodeFromName]][:"input handling"]
[51:16][Declare noir scancodes for our modifier keys in Ion][:"input handling"]
[56:11][:Run it to see that it still works][:"input handling"]
[56:19][Make init() call init_char_to_sdl_scancodes()][:"input handling"]
[57:27][:Run it to see how it handles punctuation keys][:"input handling"]
[58:18][Rename init_char_to_sdl_scancodes() to init_scancodes()][:"input handling"]
[58:48][:Run it to double-check that it still works][:"input handling"]
[58:51][Try printing non-modifier keys][:"input handling"]
[59:15][:Run it to see that it works][:"input handling"]
[59:46][Add support for KEY_CAPS, KEY_SPACE, KEY_BACKSPACE, KEY_TAB and Arrow keys][:"input handling"]
[1:06:05][:Run it to see that it works][:"input handling"]
[1:06:14][Introduce Noir struct to contain the keys][:"input handling"]
[1:09:08][Add quit, init, error and error_str to Noir, introducing update_events()[ref
site="SDL Wiki"
page=SDL_PollEvent
url=https://wiki.libsdl.org/SDL_PollEvent] and error codes][:"error handling" :"window management"]
[1:20:05][:Run it to see that it successfully closes][:"window management"]
[1:20:37][Introduce check_init() for create_window() to call, and test calling create_window() before init()][:"window management"]
[1:21:50][:Run it to see that we receive the correct error][:"window management"]
[1:22:51][Change error_str in Noir to be a const char * called error[ref
site=GitHubGist
page="pervognsen / mu.cpp"
url=https://gist.github.com/pervognsen/6a67966c5dc4247a0021b95c8d0a7b72]][:"error handling"]
[1:26:01][:Run it to make sure everything still works, and consider what to do in the extra stream][:"input handling"]
[1:27:14][Q&A][:speech]
[1:27:29][@tbodt_][What's the plan for imports in Ion?][:language]
[1:29:00][@nxsy][Why are we manually adding key consts vs. using an enum? (I assume the numbers starting at 0x100f is to avoid intersecting with first 255)][:"input handling"]
[1:30:16][@bar_fight][If you're converting it to a while(not) loop, do you need to put continue; after each if block?]
[1:31:25][@nxsy][Q: What are "sticky errors"?][:"error handling"]
[1:32:29][@jgomes83][@pervognsen Will the code for noir be available in GitHub?]
[1:33:08][That's it for the main stream][:speech]
[/video]