mirror of
https://github.com/pret/pokeruby.git
synced 2026-08-08 18:45:06 -05:00
GetLinkPartnerNames
This commit is contained in:
parent
ce2e475b9c
commit
2aa77fc3c6
50
asm/field_specials.s
Executable file → Normal file
50
asm/field_specials.s
Executable file → Normal file
|
|
@ -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}
|
||||
|
|
|
|||
0
include/gba/defines.h
Executable file → Normal file
0
include/gba/defines.h
Executable file → Normal file
0
include/global.h
Executable file → Normal file
0
include/global.h
Executable file → Normal file
0
include/player_pc.h
Executable file → Normal file
0
include/player_pc.h
Executable file → Normal file
|
|
@ -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 *);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
0
src/daycare.c
Executable file → Normal file
0
src/daycare.c
Executable file → Normal file
0
src/field_effect.c
Executable file → Normal file
0
src/field_effect.c
Executable file → Normal file
19
src/field_specials.c
Executable file → Normal file
19
src/field_specials.c
Executable file → Normal file
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user