For rcast you could do something like *((t*)((void*)(&(v))))
it only works on lvalues but m…
Debugging is half of the fun :)
Actually, the rules for things like selecting proper articles or suffixes in English, or any spok…
I found a bug in CTIME, which only hits when you run ctime -stats on a .ctm file on which a singl…
Since clang/gcc like to complain about c style casting at the highest warning levels I have these…
Hah, good to know, sorry for the noise. I could not find a search function to see if this was dis…
There is OSX port available here: https://gist.github.com/nil-ableton/80294aad65abdf9e1dc764e12f4…
Apologies if this has been posted before. I just wanted to share the code for making Casey's CTIM…
bytesToWrite is initialized like this
1DWORD bytesTowrite = (DWORD)win32State->totalSize;
so…
GreenLightning I like the function signature macro which I learned from Casey's Working on The Wi…
I like the function signature macro which I learned from Casey's Working on The Witness blog seri…
The KISS engine has some fun macros for debugging and testing code (using code from "Learn C the …
I am working on a text adventure engine, and there are little grammar things that come up all the…
cmuratori I am skeptical that these computed gotos are necessary to get the "improved" performanc…
Here are some of my favourites:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2…
you forgot to paste the win32_handmade.h file, so I can't check but.. You should try this:
chang…
mmozeiko As you can see it references array with global symbol "name.1758" - no initialization is…
I was talking about VS2013 which doesn't understand -Wv:18 argument. It's actually an error, not …
I have used computed goto for gcc compiler before and it does creates better code.
Here's a micr…
mmozeiko But adding -Wv:18 will generate warning for VS2013 users.
Maybe, but I tried using -Wv:3…
I am skeptical that these computed gotos are necessary to get the "improved" performance. For ex…
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 …
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 wh…
Mr4thDimention My favorite macro trick is for making something that looks like a resumable functi…
My favorite macro trick is for making something that looks like a resumable function call, sort o…
I like that even more, good thinking.
Here's a little trick to creating generic functions and types. Multiple include with the same fil…