#include <windows.h> //include windows header for some function like MessageBox, creating the window.
#include "d3dx9.h" //include a directx header
#include <stdio.h> //for the sprinf_s function used by DrawString
#pragma comment(lib, "d3dx9.lib") //link the library
#pragma comment(lib, "d3d9.lib") //link the library
#define Emsg(msg){MessageBox(NULL,msg,"Error",MB_OK|MB_ICONEXCLAMATION);} //macro for error pop-up
int WINDOW_WIDTH = 1024; //window width
int WINDOW_HEIGHT = 7......
阅读全文