// TODO
The main dev tools Casey uses are Emacs as his text editor, MSVC as his compiler, and Visual Studio as his debugger
Alternatives that I'll be using:
4coder is an editor which was developed contemporaneously with Handmade Hero
Likewise for the debugger RemedyBG
#include <windows.h>
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){
MessageBoxA(NULL, "Text", "Caption", 0);
}#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN
#include <windows.h>
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){
MessageBoxA(NULL, "Text", "Caption", 0);
}[...] at the time the symbol was introduced, precompiled header files were not in common use. As I recall, on a 50MHz 80486 with 8MB of memory, switching to WIN32_LEAN_AND_MEAN shaved three seconds off the compile time of each C file. When your project consists of 20 C files, that’s a whole minute saved right there.
Where did WIN32_LEAN_AND_MEAN come from?
Now imagine we took this to its extreme
typedef void* HINSTANCE;
typedef unsigned int UINT;
typedef char* LPSTR;
typedef const char* LPCSTR;
int MessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){
MessageBoxA(NULL, "Text", "Caption", 0);
}typedef void* HINSTANCE;
typedef unsigned int UINT;
typedef char* LPSTR;
typedef const char* LPCSTR;
extern "C" __declspec(dllimport) int __stdcall MessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);
#pragma comment(lib, "user32.lib")
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){
MessageBoxA(NULL, "Text", "Caption", 0);
}