diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-05-17 15:54:31 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-05-17 15:54:31 -0400 |
commit | ee6893441e0fdb02ebf6269b91d3382645a5c0fe (patch) | |
tree | c39d5bf22bd35028cd8ca75bf941bef487bf0c5d /src | |
parent | 24934c7af876ebb6f35ed4773d1e1b7b499eebc5 (diff) |
Name Rater functions in tv.c
Diffstat (limited to 'src')
-rw-r--r-- | src/tv.c | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -9,6 +9,7 @@ #include "species.h" #include "pokedex.h" #include "naming_screen.h" +#include "rom4.h" enum { @@ -549,6 +550,47 @@ void sub_80BF9F8(void) DoNamingScreen(3, gStringVar2, spec, gender, pval, c2_080CC144); } +void c2_080CC144(void) +{ + SetMonData(&(gPlayerParty[gSpecialVar_0x8004]), MON_DATA_NICKNAME, gStringVar2); + c2_exit_to_overworld_1_continue_scripts_restart_music(); +} + +void sub_80BFAE0(void) +{ + GetMonData(&(gPlayerParty[gSpecialVar_0x8004]), MON_DATA_NICKNAME, &gStringVar1); + StringGetEnd10(gStringVar1); +} + +u32 GetPlayerTrainerId(void); + +void sub_80BFB10(void) +{ + if (GetPlayerTrainerId() == GetMonData(&(gPlayerParty[gSpecialVar_0x8004]), MON_DATA_OT_ID, 0)) + gScriptResult = 0; + else + gScriptResult = 1; +} + +u8 sub_80BFB54(u8 arg0) +{ + if (arg0 == 0) + return 0; + else if (arg0 > 0 && arg0 <= 20) + return 2; + else if (arg0 > 20 && arg0 <= 40) + return 3; + else if (arg0 > 40 && arg0 <= 60) + return 4; + else + return 0; +} + +u32 GetPlayerTrainerId(void) +{ + return (gSaveBlock2.playerTrainerId[3] << 24) | (gSaveBlock2.playerTrainerId[2] << 16) | (gSaveBlock2.playerTrainerId[1] << 8) | (gSaveBlock2.playerTrainerId[0]); +} + asm(".section .text_c"); void DoTVShowPokemonNewsMassOutbreak(void) |