mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 05:43:51 +01:00
fortmatting
This commit is contained in:
parent
6761a049da
commit
b9ad5de8a0
@ -89,7 +89,7 @@ struct MailGraphics
|
|||||||
|
|
||||||
struct MailRead
|
struct MailRead
|
||||||
{
|
{
|
||||||
/*0*/ u8 strbuf[8][64];
|
/*0x0000*/ u8 strbuf[8][64];
|
||||||
/*0x0200*/ u8 playerName[12];
|
/*0x0200*/ u8 playerName[12];
|
||||||
/*0x020C*/ MainCallback callback;
|
/*0x020C*/ MainCallback callback;
|
||||||
/*0x0210*/ MainCallback callback2;
|
/*0x0210*/ MainCallback callback2;
|
||||||
|
152
src/region_map.c
152
src/region_map.c
@ -427,82 +427,82 @@ bool8 sub_8122DB0(void)
|
|||||||
{
|
{
|
||||||
switch (gRegionMap->initStep)
|
switch (gRegionMap->initStep)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (gRegionMap->bgManaged)
|
if (gRegionMap->bgManaged)
|
||||||
{
|
{
|
||||||
decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_GfxLZ, 0, 0, 0);
|
decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_GfxLZ, 0, 0, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LZ77UnCompVram(sRegionMapBkgnd_GfxLZ, (u16 *)BG_CHAR_ADDR(2));
|
LZ77UnCompVram(sRegionMapBkgnd_GfxLZ, (u16 *)BG_CHAR_ADDR(2));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (gRegionMap->bgManaged)
|
if (gRegionMap->bgManaged)
|
||||||
{
|
{
|
||||||
if (!free_temp_tile_data_buffers_if_possible())
|
if (!free_temp_tile_data_buffers_if_possible())
|
||||||
{
|
{
|
||||||
decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_TilemapLZ, 0, 0, 1);
|
decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_TilemapLZ, 0, 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LZ77UnCompVram(sRegionMapBkgnd_TilemapLZ, (u16 *)BG_SCREEN_ADDR(28));
|
LZ77UnCompVram(sRegionMapBkgnd_TilemapLZ, (u16 *)BG_SCREEN_ADDR(28));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (!free_temp_tile_data_buffers_if_possible())
|
if (!free_temp_tile_data_buffers_if_possible())
|
||||||
{
|
{
|
||||||
LoadPalette(sRegionMapBkgnd_Pal, 0x70, 0x60);
|
LoadPalette(sRegionMapBkgnd_Pal, 0x70, 0x60);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
LZ77UnCompWram(sRegionMapCursorSmallGfxLZ, gRegionMap->cursorSmallImage);
|
LZ77UnCompWram(sRegionMapCursorSmallGfxLZ, gRegionMap->cursorSmallImage);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
LZ77UnCompWram(sRegionMapCursorLargeGfxLZ, gRegionMap->cursorLargeImage);
|
LZ77UnCompWram(sRegionMapCursorLargeGfxLZ, gRegionMap->cursorLargeImage);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
RegionMap_InitializeStateBasedOnPlayerLocation();
|
RegionMap_InitializeStateBasedOnPlayerLocation();
|
||||||
gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX;
|
gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX;
|
||||||
gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY;
|
gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY;
|
||||||
gRegionMap->mapSecId = CorrectSpecialMapSecId_Internal(gRegionMap->mapSecId);
|
gRegionMap->mapSecId = CorrectSpecialMapSecId_Internal(gRegionMap->mapSecId);
|
||||||
gRegionMap->iconDrawType = get_flagnr_blue_points(gRegionMap->mapSecId);
|
gRegionMap->iconDrawType = get_flagnr_blue_points(gRegionMap->mapSecId);
|
||||||
GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16);
|
GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (gRegionMap->zoomed == FALSE)
|
if (gRegionMap->zoomed == FALSE)
|
||||||
{
|
{
|
||||||
CalcZoomScrollParams(0, 0, 0, 0, 0x100, 0x100, 0);
|
CalcZoomScrollParams(0, 0, 0, 0, 0x100, 0x100, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gRegionMap->scrollX = gRegionMap->cursorPosX * 8 - 0x34;
|
gRegionMap->scrollX = gRegionMap->cursorPosX * 8 - 0x34;
|
||||||
gRegionMap->scrollY = gRegionMap->cursorPosY * 8 - 0x44;
|
gRegionMap->scrollY = gRegionMap->cursorPosY * 8 - 0x44;
|
||||||
gRegionMap->zoomedCursorPosX = gRegionMap->cursorPosX;
|
gRegionMap->zoomedCursorPosX = gRegionMap->cursorPosX;
|
||||||
gRegionMap->zoomedCursorPosY = gRegionMap->cursorPosY;
|
gRegionMap->zoomedCursorPosY = gRegionMap->cursorPosY;
|
||||||
CalcZoomScrollParams(gRegionMap->scrollX, gRegionMap->scrollY, 0x38, 0x48, 0x80, 0x80, 0);
|
CalcZoomScrollParams(gRegionMap->scrollX, gRegionMap->scrollY, 0x38, 0x48, 0x80, 0x80, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
RegionMap_GetPositionOfCursorWithinMapSection();
|
RegionMap_GetPositionOfCursorWithinMapSection();
|
||||||
UpdateRegionMapVideoRegs();
|
UpdateRegionMapVideoRegs();
|
||||||
gRegionMap->cursorSprite = NULL;
|
gRegionMap->cursorSprite = NULL;
|
||||||
gRegionMap->playerIconSprite = NULL;
|
gRegionMap->playerIconSprite = NULL;
|
||||||
gRegionMap->cursorMovementFrameCounter = 0;
|
gRegionMap->cursorMovementFrameCounter = 0;
|
||||||
gRegionMap->blinkPlayerIcon = FALSE;
|
gRegionMap->blinkPlayerIcon = FALSE;
|
||||||
if (gRegionMap->bgManaged)
|
if (gRegionMap->bgManaged)
|
||||||
{
|
{
|
||||||
SetBgAttribute(gRegionMap->bgNum, BG_ATTR_SCREENSIZE, 2);
|
SetBgAttribute(gRegionMap->bgNum, BG_ATTR_SCREENSIZE, 2);
|
||||||
SetBgAttribute(gRegionMap->bgNum, BG_ATTR_CHARBASEINDEX, gRegionMap->charBaseIdx);
|
SetBgAttribute(gRegionMap->bgNum, BG_ATTR_CHARBASEINDEX, gRegionMap->charBaseIdx);
|
||||||
SetBgAttribute(gRegionMap->bgNum, BG_ATTR_MAPBASEINDEX, gRegionMap->mapBaseIdx);
|
SetBgAttribute(gRegionMap->bgNum, BG_ATTR_MAPBASEINDEX, gRegionMap->mapBaseIdx);
|
||||||
SetBgAttribute(gRegionMap->bgNum, BG_ATTR_WRAPAROUND, 1);
|
SetBgAttribute(gRegionMap->bgNum, BG_ATTR_WRAPAROUND, 1);
|
||||||
SetBgAttribute(gRegionMap->bgNum, BG_ATTR_PALETTEMODE, 1);
|
SetBgAttribute(gRegionMap->bgNum, BG_ATTR_PALETTEMODE, 1);
|
||||||
}
|
}
|
||||||
gRegionMap->initStep++;
|
gRegionMap->initStep++;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
gRegionMap->initStep++;
|
gRegionMap->initStep++;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user