import std.cstream; import std.string; import SDL; import smpeg; int main(char[][] args) { if (args.length < 2) { dout.writeLine("HIKISUU KUDASAI"); return 0; } dout.writeLine("play " ~ args[1]); SDL_Init(SDL_INIT_VIDEO); SMPEG_Info info; SMPEG* smpeg = SMPEG_new(args[1], &info, 1); SDL_WM_SetCaption(args[0], "showfont"); SDL_Surface* scr = SDL_SetVideoMode(info.width, info.height, 16, SDL_SWSURFACE); SMPEG_setdisplay(smpeg, scr, null, &SDL_UpdateRect); SMPEG_play(smpeg); while (SMPEG_status(smpeg) == SMPEG_PLAYING) { SDL_Event ev; SDL_PollEvent(&ev); if (ev.type == SDL_QUIT) break; SDL_Delay(33); } SMPEG_delete(smpeg); SDL_Quit(); return 0; }