 
			
				
				
				
				
					
						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…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						Horrowind Not too interesting, but funny:
1#define private public
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 cod…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						Not too interesting, but funny:
1#define private public
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						Thanks for the kind words!  Really glad the series had that effect.  It's had the same effect for…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						When I did this I didn't bother replicating the macros, and instead hard-coded with A suffixes. S…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						Extended Public Beta
The fixing of the bugs has led Jeroen to redesign some key aspects of the d…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						Regarding the latest episode, where Casey thought about calling pow(x, 2.2) for gamma correction,…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						oh nice catch, thanks mmozeiko 
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						But adding -Wv:18 will generate warning for VS2013 users.
VS2015 users need to modify build scrip…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						I dislike macros that create multiple statements. Doing them for definitions or declarations is f…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						That's wrong. It should be GetModuleHandleW, because you are using LPCWSTR argument. That is wide…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						In this case it will be even better - compiler will notice that values you are initializing array…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						Hi, I'm using stb_truetype.h and I've got some questions on how to properly position characters.
…
					
				
			 
			
		 
    
		
			 
			
				
				
				
					rizoma — 
				 
				
					
						While reading the k&r book I found an interesting example (at least for a noob like me) of wh…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						Oh my goodness, how embarrassing!
That was it, also I had to define GetModuleHandle as GetModuleH…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						You need to wrap the code inside of extern "C" scope:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						I rather like this idea, the last time I checked the pre-processor output the windows guff made m…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						Thanks, I'll look into that one. It's nice to have this topic, always stuff to learn.
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						Hi everyone :)
I'm a long time follower, first time poster, that just want to say a big Thank Yo…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						I like the SCALL! That could come in handy.
I just stumbled on another reflection-ish trick with…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						Honestly I'm a big fan of macros, sometimes I even unnecessarily overuse them.
I either use it t…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						The Handmade Hero code triggers a lot of warnings (primarily variable shadowing) in VS2015. These…
					
				
			 
			
		 
    
		
			 
			
				
				
				
				
					
						I learned of a neat macro trick today, maybe old hat to most of you but maybe not
"#" is a "stri…