4 ms·
125 lines seems fairly 'behemoth' for a hello world C program to me. This for example is a hello world for sdl: #include <SDL/SDL.h> int main(int argc
by grawprog 6y ago
125 lines seems fairly 'behemoth' for a hello world C program to me. This for example is a hello world for sdl:
#include <SDL/SDL.h>
int main(int argc, char *argv[]) {
int gogogo = 1;
SDL_Event event;
SDL_Init(SDL_INIT_EVERYTHING);
SDL_WM_SetCaption("Hello World! :D", NULL);
SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE);
while (gogogo) {
SDL_WaitEvent(&event);
if (event.type == SDL_QUIT)
gogogo = 0;
}
SDL_Quit();
return 0;
}
https://www.badprog.com/c-sdl-simple-directmedia-layer-hello-world https://www.badprog.com/c-sdl-simple-directmedia-layer-hello...
- krapp 6y agoBecause all of the platform-specific code is offloaded to the library and compiled in. It's still there, hidden behind the abstractions.