|
Lines 364-374
Link Here
|
| 364 |
int n; |
364 |
int n; |
| 365 |
int w, h; |
365 |
int w, h; |
| 366 |
int flags = 0; |
366 |
int flags = 0; |
|
|
367 |
int status; |
| 367 |
|
368 |
|
| 368 |
printf("CGA Screen Emulation\n"); |
369 |
printf("CGA Screen Emulation\n"); |
| 369 |
printf("init screen: "); |
370 |
printf("init screen: "); |
| 370 |
|
371 |
|
| 371 |
SDL_Init(SDL_INIT_VIDEO); |
372 |
status = SDL_Init(SDL_INIT_VIDEO); |
|
|
373 |
if (status == -1) |
| 374 |
{ |
| 375 |
fprintf(stderr, "Unable to locate video device. Exiting.\n"); |
| 376 |
exit(1); |
| 377 |
} |
| 372 |
srand(time(NULL)); |
378 |
srand(time(NULL)); |
| 373 |
set_icon(symbol_plane[rand() % 2][rand() % 16]); |
379 |
set_icon(symbol_plane[rand() % 2][rand() % 16]); |
| 374 |
|
380 |
|