19 gzFile *gVideoFile = NULL;
24 void Video_SetResolution(int Width, int Height)
27 SDL_Init(SDL_INIT_VIDEO);
31 SDL_FreeSurface(gScreen);
34 gScreen = SDL_SetVideoMode(Width, Height, 32, SDL_DOUBLEBUF);
37 if(gVideoFile) gzclose(gVideoFile);
39 gVideoFile = gzopen("universe.mv", "wb");
40 gzwrite(gVideoFile, &gScreen->pitch, 2);
41 gzwrite(gVideoFile, &gScreen->h, 2);
45 void Video_SetName(const char *Format, ...)
49 va_start(args, Format);
50 vsprintf(buf, Format, args);
51 SDL_WM_SetCaption(buf, "Universe Simulator");
55 void Video_PSet(int X, int Y, uint8_t R, uint8_t G, uint8_t B)
57 uint8_t *buf = gScreen->pixels;
59 buf[Y*gScreen->pitch + X*4] = B;
60 buf[Y*gScreen->pitch + X*4+1] = G;
61 buf[Y*gScreen->pitch + X*4+2] = R;
62 buf[Y*gScreen->pitch + X*4+3] = 0;
68 gzwrite(gVideoFile, gScreen->pixels, gScreen->pitch*gScreen->h);
74 void *Thread_Create(void *Function, void *Argument)
76 return SDL_CreateThread(Function, Argument);
79 void Thread_Yield(void)
86 # error "TODO - Acess FB Output"