Caleb —
Since clang/gcc like to complain about c style casting at the highest warning levels I have these …
AM —
Hah, good to know, sorry for the noise. I could not find a search function to see if this was disc…
There is OSX port available here: It's mentioned in comments for gist from Casey:
AM —
Apologies if this has been posted before. I just wanted to share the code for making Casey's CTIME…
bytesToWrite is initialized like this so it should not matter.you can check bytesWritten to make …
To create a new command: // definition COMMAND(do_something) { // code } [/code] If you need to…
I like the function signature macro which I learned from Casey's Working on The Witness blog serie…
The KISS engine has some fun macros for debugging and testing code (using code from "Learn C the H…
I am working on a , and there are little grammar things that come up all the time, where having so…
Casey[/quote] It to emit the bounds check because pc can be anything (being passed in through poin…
Here are some of my favourites: // Static Assertion #define STATIC_ASSERT3(cond, msg) typedef cha…
rizoma —
you forgot to paste the win32_handmade.h file, so I can't check but.. You should try this: } [/c…
rizoma —
Ahh the magic of assembly, I will try to look at the disassembly more often! Thanks Mr.Mārtiņš…
I was talking about VS2013 which doesn't understand -Wv:18 argument. It's actually an error, not w…
I have used computed goto for gcc compiler before and it does creates better code. Here's a micro-…
Maybe, but I tried using -Wv:30, and VS2015 just did what it normally would. I have never done a…
I am skeptical that these computed gotos are necessary to get the "improved" performance. For exa…
Thanks, I wanted to be sure I wasn't misunderstanding what the lfb was.
Computed goto statements are a very nice thing. They allow to create lower-overhead interpreters t…
That's how Casey is using real windows.h - he directly calls W or A functions. No need for macros.
This is technically outside the scope of stb_truetype; what the font defines the values to and wha…
struct State{ int pc; }; #define DrYield(c,v) do{ state->pc = c; return(v); resume_##c:; } while…
My favorite macro trick is for making something that looks like a resumable function call, sort of…
I like that even more, good thinking.
Here's a little trick to creating generic functions and types. Multiple include with the same file…
[/quote] That's not complete without
Jason —
I wonder if some kind soul could spend some time and tell me where I went wrong with the live code…
Not too interesting, but funny:
Thanks for the kind words! Really glad the series had that effect. It's had the same effect for …