| 499 | }; |
| 500 | |
| 501 | int LoadUNIFChunks(FCEUFILE *fp) { |
| 502 | int x; |
| 503 | int t; |
| 504 | for (;; ) { |
| 505 | t = FCEU_fread(&uchead, 1, 4, fp); |
| 506 | if (t < 4) { |
| 507 | if (t > 0) |
| 508 | return 0; |
| 509 | return 1; |
| 510 | } |
| 511 | if (!(FCEU_read32le(&uchead.info, fp))) |
| 512 | return 0; |
| 513 | t = 0; |
| 514 | x = 0; |
| 515 | while (bfunc[x].name) { |
| 516 | if (!memcmp(&uchead, bfunc[x].name, strlen(bfunc[x].name))) { |
| 517 | if (!bfunc[x].init(fp)) |
| 518 | return 0; |
| 519 | t = 1; |
| 520 | break; |
| 521 | } |
| 522 | x++; |
| 523 | } |
| 524 | if (!t) |
| 525 | if (FCEU_fseek(fp, uchead.info, SEEK_CUR) < 0) |
| 526 | return(0); |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | static int InitializeBoard(void) { |
| 531 | int x = 0; |
no test coverage detected