Code: Select all
#define MessageBoxAndQuit(lstr) MessageBox(0, (lstr), 0, MB_OK | MB_ICONERROR); \
return 1
//allows you to draw any number of components by putting them between begin and end scene
#define QuickScene(drawcalls) driver->beginScene(); \
(drawcalls) \
driver->endScene()
#define LoadValidate(pointer, errormessage) if (!(pointer)) { MessageBoxAndQuit((errormessage)); }
Code: Select all
QuickScene(guiobject->draw(); otherobject->draw(); thing->draw(););
Also, MessageBox is in Windows.h. I planned on supporting Linux, but after finding that it takes hundreds of crazy lines to make a message box that isn't even standard, I dropped support for it lol (aka deleted 10 lines of preprocessor addled code)