MCPcopy Create free account
hub / github.com/dborth/fceugx / LoadUNIFChunks

Function LoadUNIFChunks

source/fceultra/unif.cpp:501–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499};
500
501int 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
530static int InitializeBoard(void) {
531 int x = 0;

Callers 1

UNIFLoadFunction · 0.85

Calls 4

FCEU_freadFunction · 0.85
FCEU_read32leFunction · 0.85
FCEU_fseekFunction · 0.85
initMethod · 0.45

Tested by

no test coverage detected