diff options
-rw-r--r--[-rwxr-xr-x] | asm/field_specials.s | 50 | ||||
-rw-r--r--[-rwxr-xr-x] | include/gba/defines.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/global.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/player_pc.h | 0 | ||||
-rw-r--r-- | include/tv.h | 2 | ||||
-rwxr-xr-x | ld_script.txt | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | src/daycare.c | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | src/field_effect.c | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | src/field_specials.c | 19 |
9 files changed, 21 insertions, 51 deletions
diff --git a/asm/field_specials.s b/asm/field_specials.s index 5cb240ef0..cb0e547e2 100755..100644 --- a/asm/field_specials.s +++ b/asm/field_specials.s @@ -6,56 +6,6 @@ .text - thumb_func_start GetLinkPartnerNames -GetLinkPartnerNames: @ 810DAC8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - movs r6, 0 - bl sub_8008218 - lsls r0, 24 - lsrs r7, r0, 24 - bl sub_800820C - lsls r0, 24 - lsrs r5, r0, 24 - movs r4, 0 - cmp r4, r5 - bcs _0810DB12 - ldr r0, _0810DB20 @ =gUnknown_083D1464 - mov r8, r0 -_0810DAEA: - cmp r7, r4 - beq _0810DB08 - lsls r0, r6, 2 - add r0, r8 - ldr r0, [r0] - lsls r1, r4, 3 - subs r1, r4 - lsls r1, 2 - ldr r2, _0810DB24 @ =gLinkPlayers + 0x8 - adds r1, r2 - bl StringCopy - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_0810DB08: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r5 - bcc _0810DAEA -_0810DB12: - adds r0, r5, 0 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_0810DB20: .4byte gUnknown_083D1464 -_0810DB24: .4byte gLinkPlayers + 0x8 - thumb_func_end GetLinkPartnerNames - thumb_func_start SpawnBerryBlenderLinkPlayerSprites SpawnBerryBlenderLinkPlayerSprites: @ 810DB28 push {r4-r7,lr} diff --git a/include/gba/defines.h b/include/gba/defines.h index 0f7f06755..0f7f06755 100755..100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h diff --git a/include/global.h b/include/global.h index 9da4bd57c..9da4bd57c 100755..100644 --- a/include/global.h +++ b/include/global.h diff --git a/include/player_pc.h b/include/player_pc.h index f2446ebdf..f2446ebdf 100755..100644 --- a/include/player_pc.h +++ b/include/player_pc.h diff --git a/include/tv.h b/include/tv.h index 277d29750..b4847848b 100644 --- a/include/tv.h +++ b/include/tv.h @@ -18,7 +18,7 @@ enum TVSHOW_MASS_OUTBREAK = 41, }; -extern u8 *gUnknown_083D1464[3]; +extern u8 *const gUnknown_083D1464[3]; void ClearTVShowData(void); u8 sub_80BDEAC(u8 *); diff --git a/ld_script.txt b/ld_script.txt index 9f9df16c8..24f018abc 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -438,6 +438,7 @@ SECTIONS { data/pokeblock.o(.rodata); data/fldeff_flash.o(.rodata); src/time_events.o(.rodata); + src/field_specials.o(.rodata); data/field_specials.o(.rodata); data/pokedex_area_screen.o(.rodata); data/evolution_scene.o(.rodata); diff --git a/src/daycare.c b/src/daycare.c index cded18207..cded18207 100755..100644 --- a/src/daycare.c +++ b/src/daycare.c diff --git a/src/field_effect.c b/src/field_effect.c index 9591bb6a0..9591bb6a0 100755..100644 --- a/src/field_effect.c +++ b/src/field_effect.c diff --git a/src/field_specials.c b/src/field_specials.c index dc70ef2d5..b289e655e 100755..100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -12,6 +12,8 @@ #include "strings.h" #include "text.h" #include "wallclock.h" +#include "tv.h" +#include "link.h" #if ENGLISH #define CHAR_DECIMAL_SEPARATOR CHAR_PERIOD @@ -264,3 +266,20 @@ u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y) *y = 20; return 0; } + +u8 GetLinkPartnerNames(void) +{ + u8 i; + u8 j = 0; + u8 myLinkPlayerNumber = sub_8008218(); + u8 nLinkPlayers = sub_800820C(); + for (i=0; i<nLinkPlayers; i++) + { + if (myLinkPlayerNumber != i) + { + StringCopy(gUnknown_083D1464[j], gLinkPlayers[i].name); + j++; + } + } + return nLinkPlayers; +} |