Skip to content

Commit a46648a

Browse files
unif board initializer cleanup
1 parent 195c2a5 commit a46648a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/unif.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -748,26 +748,26 @@ static int LoadUNIFChunks(FCEUFILE *fp) {
748748
}
749749

750750
static int InitializeBoard(void) {
751-
int x = 0;
751+
BMAPPING *tmp = bmap;
752752

753753
if (!sboardname)
754754
return (0);
755755

756756
CHRRAMSIZE = 0;
757757

758-
while (bmap[x].name) {
758+
while (tmp->name) {
759759
/* ignore case during board name comparing */
760-
if (string_is_equal_case_insensitive((const char *)sboardname, (const char *)bmap[x].name)) {
760+
if (string_is_equal_case_insensitive((const char *)sboardname, (const char *)tmp->name)) {
761761
if (ROM.chr.size == 0) {
762-
if (bmap[x].flags & BMCFLAG_16KCHRR) {
762+
if (tmp->flags & BMCFLAG_16KCHRR) {
763763
CHRRAMSIZE = 16;
764-
} else if (bmap[x].flags & BMCFLAG_32KCHRR) {
764+
} else if (tmp->flags & BMCFLAG_32KCHRR) {
765765
CHRRAMSIZE = 32;
766-
} else if (bmap[x].flags & BMCFLAG_128KCHRR) {
766+
} else if (tmp->flags & BMCFLAG_128KCHRR) {
767767
CHRRAMSIZE = 128;
768-
} else if (bmap[x].flags & BMCFLAG_256KCHRR) {
768+
} else if (tmp->flags & BMCFLAG_256KCHRR) {
769769
CHRRAMSIZE = 256;
770-
} else if (bmap[x].flags & BMCFLAG_512KCHRR) {
770+
} else if (tmp->flags & BMCFLAG_512KCHRR) {
771771
CHRRAMSIZE = 512;
772772
} else {
773773
CHRRAMSIZE = 8;
@@ -781,23 +781,23 @@ static int InitializeBoard(void) {
781781
return (-1);
782782
}
783783
}
784-
if (bmap[x].flags & BMCFLAG_FORCE4) {
784+
if (tmp->flags & BMCFLAG_FORCE4) {
785785
mirrortodo = 4;
786786
}
787787
MooMirroring();
788788

789-
if (bmap[x].mapper >= 0) {
790-
iNESCart.mapper = bmap[x].mapper;
789+
if (tmp->mapper >= 0) {
790+
iNESCart.mapper = tmp->mapper;
791791
}
792792
if (submapper >= 0) {
793793
iNESCart.submapper = (uint8)submapper;
794794
}
795795
GameInfo->cspecial = cspecial;
796796

797-
bmap[x].init(&iNESCart);
797+
tmp->init(&iNESCart);
798798
return (1);
799799
}
800-
x++;
800+
tmp++;
801801
}
802802
FCEU_printf("\n");
803803
FCEU_PrintError(" Board type not supported, '%s'.\n", boardname);

0 commit comments

Comments
 (0)