diff --git a/asm/link.s b/asm/link.s index c32a4d8ac..931a7c26a 100644 --- a/asm/link.s +++ b/asm/link.s @@ -5,75 +5,6 @@ .text - thumb_func_start sub_800B080 -sub_800B080: @ 800B080 - push {r4,r5,lr} - sub sp, 0xC - ldr r1, =g2BlankTilesGfx - movs r0, 0 - movs r2, 0x20 - movs r3, 0 - bl LoadBgTiles - ldr r1, =gWirelessLinkDisplayGfx - movs r5, 0 - str r5, [sp] - movs r0, 0x1 - movs r2, 0 - movs r3, 0 - bl copy_decompressed_tile_data_to_vram_autofree - ldr r1, =gWirelessLinkDisplayTilemap - movs r0, 0x1 - movs r2, 0 - movs r3, 0 - bl CopyToBgTilemapBuffer - movs r0, 0x1 - bl CopyBgTilemapBufferToVram - ldr r0, =gWirelessLinkDisplayPal - movs r1, 0 - movs r2, 0x20 - bl LoadPalette - movs r0, 0 - movs r1, 0 - bl FillWindowPixelBuffer - movs r0, 0x2 - movs r1, 0 - bl FillWindowPixelBuffer - ldr r4, =gUnknown_082ED224 - str r4, [sp] - str r5, [sp, 0x4] - ldr r0, =gText_CommErrorEllipsis - str r0, [sp, 0x8] - movs r0, 0 - movs r1, 0x3 - movs r2, 0x2 - movs r3, 0x6 - bl box_print - str r4, [sp] - str r5, [sp, 0x4] - ldr r0, =gText_MoveCloserToLinkPartner - str r0, [sp, 0x8] - movs r0, 0x2 - movs r1, 0x3 - movs r2, 0x2 - movs r3, 0x1 - bl box_print - movs r0, 0 - bl PutWindowTilemap - movs r0, 0x2 - bl PutWindowTilemap - movs r0, 0 - movs r1, 0 - bl CopyWindowToVram - movs r0, 0x2 - movs r1, 0x3 - bl CopyWindowToVram - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_800B080 - thumb_func_start sub_800B138 sub_800B138: @ 800B138 push {lr} diff --git a/include/menu.h b/include/menu.h index d8b2afc5c..e0d06e715 100644 --- a/include/menu.h +++ b/include/menu.h @@ -29,5 +29,6 @@ bool8 free_temp_tile_data_buffers_if_possible(void); u64 sub_8198A50(struct WindowTemplate*, u8, u8, u8, u8, u8, u8, u16); // returns something but it isn't used, fix when menu.s is decomp'd void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos); s8 sub_8198C58(void); +void copy_decompressed_tile_data_to_vram_autofree(u8 arg0, const void *arg1, bool32 arg2, u16 arg3, u8 arg4); #endif // GUARD_MENU_H diff --git a/include/strings.h b/include/strings.h index fcdb1eca4..299d637b8 100644 --- a/include/strings.h +++ b/include/strings.h @@ -75,5 +75,7 @@ extern const u8 gText_NoRegistry[]; extern const u8 gText_OkayToDeleteFromRegistry[]; extern const u8 gText_RegisteredDataDeleted[]; extern const u8 gUnknown_085EA79D[]; +extern const u8 gText_CommErrorEllipsis[]; +extern const u8 gText_MoveCloserToLinkPartner[]; #endif //GUARD_STRINGS_H diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 589e8901d..9d1f6fd0e 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -58,20 +58,14 @@ extern const u8 gText_NickHatchPrompt[]; extern u8* GetMonNick(struct Pokemon* mon, u8* dst); extern u8* GetBoxMonNick(struct BoxPokemon* boxMon, u8* dst); extern u8 sav1_map_get_name(void); -extern s8 sub_8198C58(void); extern void TVShowConvertInternationalString(u8* str1, u8* str2, u8); extern void sub_806A068(u16, u8); extern void fade_screen(u8, u8); extern void overworld_free_bg_tilemaps(void); extern void sub_80AF168(void); -extern void AllocateMonSpritesGfx(void); -extern void FreeMonSpritesGfx(void); extern void remove_some_task(void); -extern void reset_temp_tile_data_buffers(void); extern void c2_exit_to_overworld_2_switch(void); extern void play_some_sound(void); -extern void copy_decompressed_tile_data_to_vram_autofree(u8 bg_id, const void* src, u16 size, u16 offset, u8 mode); -extern void CreateYesNoMenu(const struct WindowTemplate*, u16, u8, u8); extern void DoNamingScreen(u8, const u8*, u16, u8, u32, MainCallback); extern void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor* colors, s8 speed, u8 *str); extern u16 sub_80D22D0(void); diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 101feab56..569dcfe35 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -75,9 +75,6 @@ extern const u8 gText_PkmnStoppedEvolving[]; extern const u8 gText_EllipsisQuestionMark[]; extern const u8 gText_CommunicationStandby5[]; -extern void copy_decompressed_tile_data_to_vram_autofree(u8 arg0, const void *arg1, bool32 arg2, u16 arg3, u8 arg4); -extern u32 sub_80391E0(u8, u8); -extern void SpriteCallbackDummy_2(struct Sprite *sprite); extern void sub_80356D0(void); extern void sub_807B154(void); extern void sub_806A068(u16, u8); diff --git a/src/link.c b/src/link.c index c9a555dbb..09f3b6d6f 100644 --- a/src/link.c +++ b/src/link.c @@ -20,6 +20,7 @@ #include "menu.h" #include "new_menu_helpers.h" #include "text.h" +#include "strings.h" #include "sound.h" #include "trade.h" #include "battle.h" @@ -1659,3 +1660,20 @@ void CB2_LinkError(void) SetMainCallback2(sub_800B1A0); } } + +void sub_800B080(void) +{ + LoadBgTiles(0, g2BlankTilesGfx, 0x20, 0); + copy_decompressed_tile_data_to_vram_autofree(1, gWirelessLinkDisplayGfx, FALSE, 0, 0); + CopyToBgTilemapBuffer(1, gWirelessLinkDisplayTilemap, 0, 0); + CopyBgTilemapBufferToVram(1); + LoadPalette(gWirelessLinkDisplayPal, 0, 0x20); + FillWindowPixelBuffer(0, 0x00); + FillWindowPixelBuffer(2, 0x00); + box_print(0, 3, 2, 6, gUnknown_082ED224, 0, gText_CommErrorEllipsis); + box_print(2, 3, 2, 1, gUnknown_082ED224, 0, gText_MoveCloserToLinkPartner); + PutWindowTilemap(0); + PutWindowTilemap(2); + CopyWindowToVram(0, 0); + CopyWindowToVram(2, 3); +}