cinera_handmade.network/cmuratori/hero/code/code511.hmml

58 lines
5.2 KiB
Plaintext
Raw Permalink Normal View History

[video output=day511 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Merging HHT Parsing into the Asset System" vod_platform=youtube id=-6M7yekHfiU annotator=Miblo]
2019-02-10 23:25:40 +00:00
[0:01][Recap and set the stage for the day][:speech]
[2:18][Show our tag :"file format" and the separation of .hht files from the source assets][:speech]
[4:37][Organise our uncompressed cutscene layer images for all eleven shots into a single directory[ref
site=Lagmonster
page="Renaming Multiple Files"
url=http://lagmonster.org/docs/DOS7/z-ren1.html]][:admin]
[11:26][][:speech][quote 642]
[11:49][Continue to organise our cutscene images][:admin]
[17:32][Tag our cutscene image assets in intro_cutscene.hht][:admin :"asset system"]
[26:32][Enable ParseTagList() and GetToken() to parse numbers][:"asset system" :parsing]
[39:10][Move the :parsing code into handmade_asset.cpp, and remove handmade_hht.h and .cpp][:"asset system"]
[43:05][Finding vs specifying parent-directories of files][:"file io" :speech]
[46:37][Enable Win32GetAllFilesOfTypeBegin() to handle .hht files][:"file io" :"platform layer"]
[49:42][Introduce PLATFORM_GET_FILE_BY_PATH() and Win32GetFileInfoFromWildCard()][:"file io" :"platform layer"]
[1:06:33][Replace PNG and WAV platform_file_type with a general HHT][:"asset system"]
[1:09:47][Introduce UTF8FromUTF16() and UTF16FromUTF8()[ref
site=MSDN
page="WideCharToMultiByte function"
url=https://docs.microsoft.com/en-us/windows/desktop/api/stringapiset/nf-stringapiset-widechartomultibyte]][:"file io" :"platform layer" :"string manipulation"]
[1:19:00][Remove Win32GetFileInfoFromWildCard(), implement Win32GetFileByPath() and introduce Win32AllocateFileInfo()[ref
site=MSDN
page="GetFileAttributesExA function"
url=https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfileattributesexa][ref
site=MSDN
page="WIN32_FILE_ATTRIBUTE_DATA structure"
url=https://docs.microsoft.com/en-gb/windows/desktop/api/fileapi/ns-fileapi-_win32_file_attribute_data][ref
site=MSDN
page="WIN32_FIND_DATAA structure"
url=https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-_win32_find_dataa]][:"file io" :memory :"platform layer"]
[1:32:43][Disable ImportChangedAssets()][:"asset system"]
[1:33:11][Find that the .hha files still get found][:"asset system" :run]
[1:33:40][Add a "HHA" field to the parser and handle merging of the "default" block][:"asset system" :parsing]
[1:40:40][Tying in our .hht parser with the asset parser][:"asset system" :parsing :speech]
[1:44:42][Make ParseTopLevelBlock() (in the .hht parser) call the asset parser's BeginTags(), ParsePieces() and EndTags(), introducing SetCategory()][:"asset system" :parsing]
[1:56:43][Duplicated tag :parsing][:"asset system" :speech]
[1:58:25][Revert our changes in the asset parser, and make EndTags() copy previously parsed tags][:"asset system" :parsing]
[2:02:50][Add a version of Error() in the tokeniser that doesn't take a token, and one of Outf_() that takes a va_list][:parsing]
[2:08:10][Add a FileName, LineNumber and ErrorStream to the tokenizer, and clean up compile errors][:parsing]
[2:21:59][Reflect on our .hht parser and glimpse into the future loading in asset source files][:parsing :speech]
[2:23:02][Q&A][:speech]
[2:24:10][@s0imn][Q: What are the flaws of converting a decimal floating point number to a binary equivalent by first :parsing the number, and converting it to a regular integer, ignoring the decimal point. Then using the parsed number as the mantissa, and an accumulated value for the exponent, for the floating point number?]
[2:28:03][@violetasthethird][Q: What do you think about WebAssembly as a platform for cross-platform applications and games?][:"file format"]
[2:31:03][@tbodt_][WebAssembly has always had a binary format, which is the default, and a text format to be able to read it][:"file format"]
[2:31:38][@uplinkcoder][@handmade_hero: That's asm.js][:"file format"]
[2:32:09][@somebody_took_my_name][Q: How would you convince a seasoned OO-programmer of the merits of not using it? What is your best statement?][:language]
2019-03-06 23:56:10 +00:00
[2:32:45][@wwwwwvwwwwwvwwwwwwwwwwwww][Q: Have you ever read any of The Art of Computer Programming?][:language]
2019-02-10 23:25:40 +00:00
[2:33:08][@drealrak][Q: Why you don't use switch in our while(Parsing(Tokenizer)) loop?][:parsing]
[2:34:06][@xxthebigfoxx][Q: Can you explain a bit more of what Windows considers UTF-16? I see it mentioned plenty of times on MSDN but usually it just means wchar_t, not actual utf16 with surrogates]
[2:36:03][@aidsjorb][Q: Has the intentionally deliberate pace for [~hero Handmade Hero] helped you in your day job at all (as say a reminder / refresher), or is it always just tedious to program in this fashion after all these years?]
[2:38:06][@bradsheridanmn][Q: Hey, just saw your talk on "Papers I Love"[ref
site="Casey's Blog"
page="Papers I Have Loved (2016)"
url=https://caseymuratori.com/blog_0030] or whatever they call it. Super impressed, has brought me back to [~hero Handmade Hero]]
[2:38:48][@ivereadthesequel][Q: If [@naysayer88 Jon] can't come tomorrow, can @Molly at least be here to celebrate episode 512 with a party hat? And cake (not for @Molly)?]
[2:39:16][We're done with questions][:speech]
[/video]