MCPcopy Create free account
hub / github.com/TASEmulators/fceux / LoadUNIFChunks

Function LoadUNIFChunks

src/unif.cpp:497–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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