overworld review changes2

This commit is contained in:
DizzyEggg 2018-02-15 23:09:52 +01:00
parent 90fa97f810
commit 824699f505
3 changed files with 9 additions and 8 deletions

View File

@ -164,7 +164,7 @@ struct MapHeader
{ {
/* 0x00 */ const struct MapData *mapData; /* 0x00 */ const struct MapData *mapData;
/* 0x04 */ const struct MapEvents *events; /* 0x04 */ const struct MapEvents *events;
/* 0x08 */ u8 *mapScripts; /* 0x08 */ const u8 *mapScripts;
/* 0x0C */ const struct MapConnections *connections; /* 0x0C */ const struct MapConnections *connections;
/* 0x10 */ u16 music; /* 0x10 */ u16 music;
/* 0x12 */ u16 mapDataId; /* 0x12 */ u16 mapDataId;

View File

@ -605,15 +605,16 @@ bool32 warp_data_is_not_neg_1(struct WarpData *warp)
{ {
if (warp->mapGroup != -1) if (warp->mapGroup != -1)
return FALSE; return FALSE;
if (warp->mapNum != -1) else if (warp->mapNum != -1)
return FALSE; return FALSE;
if (warp->warpId != -1) else if (warp->warpId != -1)
return FALSE; return FALSE;
if (warp->x != -1) else if (warp->x != -1)
return FALSE; return FALSE;
if (warp->y != -1) else if (warp->y != -1)
return FALSE; return FALSE;
return TRUE; else
return TRUE;
} }
const struct MapHeader *Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum) 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_WIN1V, 0xFFFF);
SetGpuReg(REG_OFFSET_BLDCNT, gUnknown_82EC7C4[1] | gUnknown_82EC7C4[2] | gUnknown_82EC7C4[3] SetGpuReg(REG_OFFSET_BLDCNT, gUnknown_82EC7C4[1] | gUnknown_82EC7C4[2] | gUnknown_82EC7C4[3]
| BLDCNT_TGT2_OBJ | BLDCNT_EFFECT_BLEND); | BLDCNT_TGT2_OBJ | BLDCNT_EFFECT_BLEND);
SetGpuReg(REG_OFFSET_BLDALPHA, 0x70D); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(13, 7));
overworld_bg_setup(); overworld_bg_setup();
schedule_bg_copy_tilemap_to_vram(1); schedule_bg_copy_tilemap_to_vram(1);
schedule_bg_copy_tilemap_to_vram(2); schedule_bg_copy_tilemap_to_vram(2);

View File

@ -243,7 +243,7 @@ void ScriptContext2_RunNewScript(const u8 *ptr)
u8 *mapheader_get_tagged_pointer(u8 tag) u8 *mapheader_get_tagged_pointer(u8 tag)
{ {
u8 *mapScripts = gMapHeader.mapScripts; const u8 *mapScripts = gMapHeader.mapScripts;
if (!mapScripts) if (!mapScripts)
return NULL; return NULL;