When we declare a variable of type int and we don’t tell the compiler if it is supposed to be signed or unsigned it is signed by default: This is true for all integer number types (short, int, long, long long). But there is one exception: The char type! The char Type is Special According … Continue reading The Anomaly of the char Type in C| Abstract Expression
Char siu AKA Chinese BBQ pork is one of the most iconic Chinese dishes out there. Here is a recipe to make it at home!| Kwokspots
In the previous post I had talked a little bit about image ordering, and image transparency. The way the image data was held in memory was very quirky! We had to create an entire header file for each image, and each image had to be an entirely different structure definition due to arrays of data being different from image to image. I'd like to show you a method that makes use of some clever macros in order to achieve an interesting variable-sized image structure! The idea was actually brought...| Randy Gaul's Game Programming Blog
The last post in this series was on writing to the console; this post I'd like to go over handling events within the Windows Console. There are two types of events we're interested in: Keyboard Events and Mouse Events. The rest of the type of events we're going to ignore (and MSDN actually advises this on a couple internally used event types). In order to read keyboard events and mouse events, we need to get a record of all events that have occurred to the console since the last time these ev...| Randy Gaul's Game Programming Blog
Previously I showed you all how to set up a console window! Now lets talk about writing to the Windows console. One can use printf, or fprintf, but those options aren't really exactly ideal; you don't have a desired amount of control. We're going to use the function WriteConsoleOutput in order to write a buffer of characters (array of characters) onto the console's screen buffer. The screen buffer is the inside of your game's window in which characters are written to and appear. In order to...| Randy Gaul's Game Programming Blog