Remove const declaration from setrom, fix BOOL type for Win32, and fix a major mapping glitch that crept in during my massive transcription

CQTexperiment
Chris Moeller 2013-10-13 15:06:18 -07:00
parent ff03b6705b
commit 2655f22b7d
3 changed files with 9 additions and 3 deletions

View File

@ -7,6 +7,8 @@
// //
#include <assert.h> #include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "NDSSystem.h" #include "NDSSystem.h"
#include "MMU.h" #include "MMU.h"
@ -123,7 +125,7 @@ int state_init(struct NDS_state *state)
for (; i < 0x70; ++i) for (; i < 0x70; ++i)
{ {
state->MMU_ARM9_MEM_MAP[i] = state->ARM9Mem->ARM9_OAM; state->MMU_ARM9_MEM_MAP[i] = state->ARM9Mem->ARM9_LCD;
state->MMU_ARM9_MEM_MASK[i] = 0x000FFFFF; state->MMU_ARM9_MEM_MASK[i] = 0x000FFFFF;
} }
@ -279,7 +281,7 @@ void state_deinit(struct NDS_state *state)
state->SubScreen = NULL; state->SubScreen = NULL;
} }
void state_setrom(struct NDS_state *state, const u8 * rom, u32 rom_size) void state_setrom(struct NDS_state *state, u8 * rom, u32 rom_size)
{ {
assert(!(rom_size & (rom_size - 1))); assert(!(rom_size & (rom_size - 1)));
NDS_SetROM(state, rom, rom_size - 1); NDS_SetROM(state, rom, rom_size - 1);

View File

@ -83,7 +83,7 @@ int state_init(NDS_state *state);
void state_deinit(NDS_state *state); void state_deinit(NDS_state *state);
void state_setrom(NDS_state *state, const u8 * rom, u32 rom_size); void state_setrom(NDS_state *state, u8 * rom, u32 rom_size);
void state_loadstate(NDS_state *state, const u8 * ss, u32 ss_size); void state_loadstate(NDS_state *state, const u8 * ss, u32 ss_size);

View File

@ -97,7 +97,11 @@ typedef s16 v10;
/*----------------------*/ /*----------------------*/
#ifndef OBJ_C #ifndef OBJ_C
#ifdef WIN32
typedef int BOOL;
#else
typedef signed char BOOL; typedef signed char BOOL;
#endif
#else #else
//apple also defines BOOL //apple also defines BOOL
typedef int desmume_BOOL; typedef int desmume_BOOL;