diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 6e262dc9c..94127c554 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -164,7 +164,7 @@ struct MapHeader { /* 0x00 */ const struct MapData *mapData; /* 0x04 */ const struct MapEvents *events; - /* 0x08 */ u8 *mapScripts; + /* 0x08 */ const u8 *mapScripts; /* 0x0C */ const struct MapConnections *connections; /* 0x10 */ u16 music; /* 0x12 */ u16 mapDataId; diff --git a/src/overworld.c b/src/overworld.c index fd1173ffc..6ee338cb8 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -605,15 +605,16 @@ bool32 warp_data_is_not_neg_1(struct WarpData *warp) { if (warp->mapGroup != -1) return FALSE; - if (warp->mapNum != -1) + else if (warp->mapNum != -1) return FALSE; - if (warp->warpId != -1) + else if (warp->warpId != -1) return FALSE; - if (warp->x != -1) + else if (warp->x != -1) return FALSE; - if (warp->y != -1) + else if (warp->y != -1) return FALSE; - return TRUE; + else + return TRUE; } const struct MapHeader *Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum) @@ -2125,7 +2126,7 @@ static void map_loading_lcd_reset(void) SetGpuReg(REG_OFFSET_WIN1V, 0xFFFF); SetGpuReg(REG_OFFSET_BLDCNT, gUnknown_82EC7C4[1] | gUnknown_82EC7C4[2] | gUnknown_82EC7C4[3] | BLDCNT_TGT2_OBJ | BLDCNT_EFFECT_BLEND); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x70D); + SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(13, 7)); overworld_bg_setup(); schedule_bg_copy_tilemap_to_vram(1); schedule_bg_copy_tilemap_to_vram(2); diff --git a/src/script.c b/src/script.c index 5a1c5daa9..8c868128b 100644 --- a/src/script.c +++ b/src/script.c @@ -243,7 +243,7 @@ void ScriptContext2_RunNewScript(const u8 *ptr) u8 *mapheader_get_tagged_pointer(u8 tag) { - u8 *mapScripts = gMapHeader.mapScripts; + const u8 *mapScripts = gMapHeader.mapScripts; if (!mapScripts) return NULL;