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