summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2018-12-26 14:50:47 +0100
committerDizzyEggg <jajkodizzy@wp.pl>2018-12-26 14:50:47 +0100
commitb9ad5de8a044623b9d4d76307a76c00e2fcf0da6 (patch)
tree14996bf160fc925f34692bd838cd01a03e8a7bf4 /src
parent6761a049daa44bce169638356dd1760c55e786c5 (diff)
fortmatting
Diffstat (limited to 'src')
-rw-r--r--src/mail.c2
-rw-r--r--src/region_map.c152
2 files changed, 77 insertions, 77 deletions
diff --git a/src/mail.c b/src/mail.c
index 287a91e65..45e96e85e 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -89,7 +89,7 @@ struct MailGraphics
struct MailRead
{
- /*0*/ u8 strbuf[8][64];
+ /*0x0000*/ u8 strbuf[8][64];
/*0x0200*/ u8 playerName[12];
/*0x020C*/ MainCallback callback;
/*0x0210*/ MainCallback callback2;
diff --git a/src/region_map.c b/src/region_map.c
index fa5ed2159..4752d96f0 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -427,82 +427,82 @@ bool8 sub_8122DB0(void)
{
switch (gRegionMap->initStep)
{
- case 0:
- if (gRegionMap->bgManaged)
- {
- decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_GfxLZ, 0, 0, 0);
- }
- else
- {
- LZ77UnCompVram(sRegionMapBkgnd_GfxLZ, (u16 *)BG_CHAR_ADDR(2));
- }
- break;
- case 1:
- if (gRegionMap->bgManaged)
- {
- if (!free_temp_tile_data_buffers_if_possible())
- {
- decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_TilemapLZ, 0, 0, 1);
- }
- }
- else
- {
- LZ77UnCompVram(sRegionMapBkgnd_TilemapLZ, (u16 *)BG_SCREEN_ADDR(28));
- }
- break;
- case 2:
- if (!free_temp_tile_data_buffers_if_possible())
- {
- LoadPalette(sRegionMapBkgnd_Pal, 0x70, 0x60);
- }
- break;
- case 3:
- LZ77UnCompWram(sRegionMapCursorSmallGfxLZ, gRegionMap->cursorSmallImage);
- break;
- case 4:
- LZ77UnCompWram(sRegionMapCursorLargeGfxLZ, gRegionMap->cursorLargeImage);
- break;
- case 5:
- RegionMap_InitializeStateBasedOnPlayerLocation();
- gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX;
- gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY;
- gRegionMap->mapSecId = CorrectSpecialMapSecId_Internal(gRegionMap->mapSecId);
- gRegionMap->iconDrawType = get_flagnr_blue_points(gRegionMap->mapSecId);
- GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16);
- break;
- case 6:
- if (gRegionMap->zoomed == FALSE)
- {
- CalcZoomScrollParams(0, 0, 0, 0, 0x100, 0x100, 0);
- }
- else
- {
- gRegionMap->scrollX = gRegionMap->cursorPosX * 8 - 0x34;
- gRegionMap->scrollY = gRegionMap->cursorPosY * 8 - 0x44;
- gRegionMap->zoomedCursorPosX = gRegionMap->cursorPosX;
- gRegionMap->zoomedCursorPosY = gRegionMap->cursorPosY;
- CalcZoomScrollParams(gRegionMap->scrollX, gRegionMap->scrollY, 0x38, 0x48, 0x80, 0x80, 0);
- }
- break;
- case 7:
- RegionMap_GetPositionOfCursorWithinMapSection();
- UpdateRegionMapVideoRegs();
- gRegionMap->cursorSprite = NULL;
- gRegionMap->playerIconSprite = NULL;
- gRegionMap->cursorMovementFrameCounter = 0;
- gRegionMap->blinkPlayerIcon = FALSE;
- if (gRegionMap->bgManaged)
- {
- SetBgAttribute(gRegionMap->bgNum, BG_ATTR_SCREENSIZE, 2);
- SetBgAttribute(gRegionMap->bgNum, BG_ATTR_CHARBASEINDEX, gRegionMap->charBaseIdx);
- SetBgAttribute(gRegionMap->bgNum, BG_ATTR_MAPBASEINDEX, gRegionMap->mapBaseIdx);
- SetBgAttribute(gRegionMap->bgNum, BG_ATTR_WRAPAROUND, 1);
- SetBgAttribute(gRegionMap->bgNum, BG_ATTR_PALETTEMODE, 1);
- }
- gRegionMap->initStep++;
- return FALSE;
- default:
- return FALSE;
+ case 0:
+ if (gRegionMap->bgManaged)
+ {
+ decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_GfxLZ, 0, 0, 0);
+ }
+ else
+ {
+ LZ77UnCompVram(sRegionMapBkgnd_GfxLZ, (u16 *)BG_CHAR_ADDR(2));
+ }
+ break;
+ case 1:
+ if (gRegionMap->bgManaged)
+ {
+ if (!free_temp_tile_data_buffers_if_possible())
+ {
+ decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_TilemapLZ, 0, 0, 1);
+ }
+ }
+ else
+ {
+ LZ77UnCompVram(sRegionMapBkgnd_TilemapLZ, (u16 *)BG_SCREEN_ADDR(28));
+ }
+ break;
+ case 2:
+ if (!free_temp_tile_data_buffers_if_possible())
+ {
+ LoadPalette(sRegionMapBkgnd_Pal, 0x70, 0x60);
+ }
+ break;
+ case 3:
+ LZ77UnCompWram(sRegionMapCursorSmallGfxLZ, gRegionMap->cursorSmallImage);
+ break;
+ case 4:
+ LZ77UnCompWram(sRegionMapCursorLargeGfxLZ, gRegionMap->cursorLargeImage);
+ break;
+ case 5:
+ RegionMap_InitializeStateBasedOnPlayerLocation();
+ gRegionMap->playerIconSpritePosX = gRegionMap->cursorPosX;
+ gRegionMap->playerIconSpritePosY = gRegionMap->cursorPosY;
+ gRegionMap->mapSecId = CorrectSpecialMapSecId_Internal(gRegionMap->mapSecId);
+ gRegionMap->iconDrawType = get_flagnr_blue_points(gRegionMap->mapSecId);
+ GetMapName(gRegionMap->mapSecName, gRegionMap->mapSecId, 16);
+ break;
+ case 6:
+ if (gRegionMap->zoomed == FALSE)
+ {
+ CalcZoomScrollParams(0, 0, 0, 0, 0x100, 0x100, 0);
+ }
+ else
+ {
+ gRegionMap->scrollX = gRegionMap->cursorPosX * 8 - 0x34;
+ gRegionMap->scrollY = gRegionMap->cursorPosY * 8 - 0x44;
+ gRegionMap->zoomedCursorPosX = gRegionMap->cursorPosX;
+ gRegionMap->zoomedCursorPosY = gRegionMap->cursorPosY;
+ CalcZoomScrollParams(gRegionMap->scrollX, gRegionMap->scrollY, 0x38, 0x48, 0x80, 0x80, 0);
+ }
+ break;
+ case 7:
+ RegionMap_GetPositionOfCursorWithinMapSection();
+ UpdateRegionMapVideoRegs();
+ gRegionMap->cursorSprite = NULL;
+ gRegionMap->playerIconSprite = NULL;
+ gRegionMap->cursorMovementFrameCounter = 0;
+ gRegionMap->blinkPlayerIcon = FALSE;
+ if (gRegionMap->bgManaged)
+ {
+ SetBgAttribute(gRegionMap->bgNum, BG_ATTR_SCREENSIZE, 2);
+ SetBgAttribute(gRegionMap->bgNum, BG_ATTR_CHARBASEINDEX, gRegionMap->charBaseIdx);
+ SetBgAttribute(gRegionMap->bgNum, BG_ATTR_MAPBASEINDEX, gRegionMap->mapBaseIdx);
+ SetBgAttribute(gRegionMap->bgNum, BG_ATTR_WRAPAROUND, 1);
+ SetBgAttribute(gRegionMap->bgNum, BG_ATTR_PALETTEMODE, 1);
+ }
+ gRegionMap->initStep++;
+ return FALSE;
+ default:
+ return FALSE;
}
gRegionMap->initStep++;
return TRUE;