Exploring raycasters and possibly make a little "doom like" game based on it.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
raycaster/scratchpad/fenstertest.cpp

32 lines
625 B

#include "fenster/fenster.h"
#include "miniaudio.h"
#define W 480*2
#define H 480
static int run() {
Fenster f(W, H, "hello c++");
int t = 0;
while (f.loop(60)) {
for (int i = 0; i < W; i++) {
for (int j = 0; j < H; j++) {
f.px(i, j) = i ^ j ^ t;
}
}
if (f.key(0x1b)) {
break;
}
t++;
}
return 0;
}
#if defined(_WIN32)
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pCmdLine,
int nCmdShow) {
(void)hInstance, (void)hPrevInstance, (void)pCmdLine, (void)nCmdShow;
return run();
}
#else
int main() { return run(); }
#endif