Remove unused variables
This commit is contained in:
@@ -53,9 +53,6 @@ static int PRGram[32];
|
||||
uint8 *PRGptr[32];
|
||||
uint8 *CHRptr[32];
|
||||
|
||||
uint32 PRGchip_max;
|
||||
uint32 CHRchip_max;
|
||||
|
||||
uint32 PRGsize[32];
|
||||
uint32 CHRsize[32];
|
||||
|
||||
@@ -107,8 +104,6 @@ void ResetCartMapping(void) {
|
||||
for (x = 0; x < 8; x++) {
|
||||
MMC5SPRVPage[x] = MMC5BGVPage[x] = VPageR[x] = nothing - 0x400 * x;
|
||||
}
|
||||
PRGchip_max = 0;
|
||||
CHRchip_max = 0;
|
||||
}
|
||||
|
||||
void SetupCartPRGMapping(int chip, uint8 *p, uint32 size, int ram) {
|
||||
|
||||
@@ -49,9 +49,6 @@ DECLFW(CartBW);
|
||||
extern uint8 *PRGptr[32];
|
||||
extern uint8 *CHRptr[32];
|
||||
|
||||
extern uint32 PRGchip_max;
|
||||
extern uint32 CHRchip_max;
|
||||
|
||||
extern uint32 PRGsize[32];
|
||||
extern uint32 CHRsize[32];
|
||||
|
||||
|
||||
25
src/unif.c
25
src/unif.c
@@ -687,9 +687,6 @@ static int InitializeBoard(void) {
|
||||
mirrortodo = 4;
|
||||
MooMirroring();
|
||||
|
||||
PRGchip_max = prg_chip_count - 1;
|
||||
if (chr_chip_count)
|
||||
CHRchip_max = chr_chip_count - 1;
|
||||
UNIFCart.submapper = submapper;
|
||||
GameInfo->cspecial = cspecial;
|
||||
|
||||
@@ -756,18 +753,20 @@ int UNIFLoad(const char *name, FCEUFILE *fp) {
|
||||
VROM = (uint8*)malloc(VROM_size);
|
||||
|
||||
for (x = 0; x < 16; x++) {
|
||||
if (malloced[prg_idx[x]]) {
|
||||
memcpy(ROM + PRGptr, malloced[(prg_idx[x])], mallocedsizes[(prg_idx[x])]);
|
||||
PRGptr += mallocedsizes[(prg_idx[x])];
|
||||
free(malloced[(prg_idx[x])]);
|
||||
malloced[(prg_idx[x])] = 0;
|
||||
unsigned p = prg_idx[x];
|
||||
unsigned c = 16 + chr_idx[x];
|
||||
if (malloced[p]) {
|
||||
memcpy(ROM + PRGptr, malloced[p], mallocedsizes[p]);
|
||||
PRGptr += mallocedsizes[p];
|
||||
free(malloced[p]);
|
||||
malloced[p] = 0;
|
||||
}
|
||||
|
||||
if (malloced[16 + (chr_idx[x])]) {
|
||||
memcpy(VROM + CHRptr, malloced[16 + (chr_idx[x])], mallocedsizes[16 + (chr_idx[x])]);
|
||||
CHRptr += mallocedsizes[16 + (chr_idx[x])];
|
||||
free(malloced[16 + (chr_idx[x])]);
|
||||
malloced[16 + (chr_idx[x])] = 0;
|
||||
if (malloced[c]) {
|
||||
memcpy(VROM + CHRptr, malloced[c], mallocedsizes[c]);
|
||||
CHRptr += mallocedsizes[c];
|
||||
free(malloced[c]);
|
||||
malloced[c] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user