summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscnorton <scnorton@biociphers.org>2017-06-20 09:58:05 -0400
committerscnorton <scnorton@biociphers.org>2017-06-20 09:58:05 -0400
commit5aeef909084e6dd8ea75cfc34cdd2601cab1de39 (patch)
treee39f07a68b28b479ad6bf37a75b5e25fce363621
parent6c419f362a02a95d9b54638c222b093b22787f71 (diff)
Another three small functions in field_specials.s
-rwxr-xr-xasm/field_specials.s63
-rw-r--r--include/field_specials.h1
-rwxr-xr-xsrc/field_specials.c29
3 files changed, 30 insertions, 63 deletions
diff --git a/asm/field_specials.s b/asm/field_specials.s
index c915508a9..63eda00b6 100755
--- a/asm/field_specials.s
+++ b/asm/field_specials.s
@@ -6,69 +6,6 @@
.text
- thumb_func_start GetPlayerBigGuyGirlString
-GetPlayerBigGuyGirlString: @ 810E298
- push {lr}
- ldr r0, _0810E2AC @ =gSaveBlock2
- ldrb r0, [r0, 0x8]
- cmp r0, 0
- bne _0810E2B8
- ldr r0, _0810E2B0 @ =gStringVar1
- ldr r1, _0810E2B4 @ =gOtherText_BigGuy
- bl StringCopy
- b _0810E2C0
- .align 2, 0
-_0810E2AC: .4byte gSaveBlock2
-_0810E2B0: .4byte gStringVar1
-_0810E2B4: .4byte gOtherText_BigGuy
-_0810E2B8:
- ldr r0, _0810E2C4 @ =gStringVar1
- ldr r1, _0810E2C8 @ =gOtherText_BigGirl
- bl StringCopy
-_0810E2C0:
- pop {r0}
- bx r0
- .align 2, 0
-_0810E2C4: .4byte gStringVar1
-_0810E2C8: .4byte gOtherText_BigGirl
- thumb_func_end GetPlayerBigGuyGirlString
-
- thumb_func_start GetRivalSonDaughterString
-GetRivalSonDaughterString: @ 810E2CC
- push {lr}
- ldr r0, _0810E2E0 @ =gSaveBlock2
- ldrb r0, [r0, 0x8]
- cmp r0, 0
- bne _0810E2EC
- ldr r0, _0810E2E4 @ =gStringVar1
- ldr r1, _0810E2E8 @ =gOtherText_Daughter
- bl StringCopy
- b _0810E2F4
- .align 2, 0
-_0810E2E0: .4byte gSaveBlock2
-_0810E2E4: .4byte gStringVar1
-_0810E2E8: .4byte gOtherText_Daughter
-_0810E2EC:
- ldr r0, _0810E2F8 @ =gStringVar1
- ldr r1, _0810E2FC @ =gOtherText_Son
- bl StringCopy
-_0810E2F4:
- pop {r0}
- bx r0
- .align 2, 0
-_0810E2F8: .4byte gStringVar1
-_0810E2FC: .4byte gOtherText_Son
- thumb_func_end GetRivalSonDaughterString
-
- thumb_func_start sub_810E300
-sub_810E300: @ 810E300
- ldr r0, _0810E308 @ =gUnknown_02024D26
- ldrb r0, [r0]
- bx lr
- .align 2, 0
-_0810E308: .4byte gUnknown_02024D26
- thumb_func_end sub_810E300
-
thumb_func_start CableCarWarp
CableCarWarp: @ 810E30C
push {lr}
diff --git a/include/field_specials.h b/include/field_specials.h
index a71207656..0521c094f 100644
--- a/include/field_specials.h
+++ b/include/field_specials.h
@@ -11,6 +11,7 @@ extern u16 gSpecialVar_0x8004;
extern u16 gSpecialVar_0x8005;
extern u8 gUnknown_02039258;
extern u8 gUnknown_02039259;
+extern u8 gUnknown_02024D26;
void ResetCyclingRoadChallengeData(void);
bool32 CountSSTidalStep(u16);
diff --git a/src/field_specials.c b/src/field_specials.c
index d881deed5..ed2718d3d 100755
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -643,3 +643,32 @@ u8 GetPlayerTrainerIdOnesDigit(void)
{
return (u16)((gSaveBlock2.playerTrainerId[1] << 8) | gSaveBlock2.playerTrainerId[0]) % 10;
}
+
+void GetPlayerBigGuyGirlString(void)
+{
+ if (gSaveBlock2.playerGender == MALE)
+ {
+ StringCopy(gStringVar1, gOtherText_BigGuy);
+ }
+ else
+ {
+ StringCopy(gStringVar1, gOtherText_BigGirl);
+ }
+}
+
+void GetRivalSonDaughterString(void)
+{
+ if (gSaveBlock2.playerGender == MALE)
+ {
+ StringCopy(gStringVar1, gOtherText_Daughter);
+ }
+ else
+ {
+ StringCopy(gStringVar1, gOtherText_Son);
+ }
+}
+
+u8 sub_810E300(void)
+{
+ return gUnknown_02024D26;
+}