Merge pull request #260 from DizzyEggg/decompile_union_room

Decompile part of union room
This commit is contained in:
Diegoisawesome
2018-07-24 18:48:23 -07:00
committed by GitHub
26 changed files with 3624 additions and 5776 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -32,7 +32,7 @@ LilycoveCity_ContestLobby_MapWarps: @ 853178C
warp_def 21, 1, 0, 1, MAP_LILYCOVE_CITY_CONTEST_HALL
LilycoveCity_ContestLobby_MapBGEvents: @ 85317AC
bg_event 23, 5, 0, BG_EVENT_PLAYER_FACING_ANY, LilycoveCity_ContestLobby_EventScript_294055
bg_event 23, 5, 0, BG_EVENT_PLAYER_FACING_ANY, EventScript_PblockLink
bg_event 23, 9, 0, BG_EVENT_PLAYER_FACING_ANY, LilycoveCity_ContestLobby_EventScript_293E1E
bg_event 23, 1, 0, BG_EVENT_PLAYER_FACING_ANY, LilycoveCity_ContestLobby_EventScript_21A753
bg_event 25, 1, 0, BG_EVENT_PLAYER_FACING_ANY, LilycoveCity_ContestLobby_EventScript_21A75A
@@ -41,7 +41,7 @@ LilycoveCity_ContestLobby_MapBGEvents: @ 85317AC
bg_event 3, 1, 0, BG_EVENT_PLAYER_FACING_ANY, LilycoveCity_ContestLobby_EventScript_21A73E
bg_event 5, 1, 0, BG_EVENT_PLAYER_FACING_ANY, LilycoveCity_ContestLobby_EventScript_21A745
bg_event 7, 1, 0, BG_EVENT_PLAYER_FACING_ANY, LilycoveCity_ContestLobby_EventScript_21A74C
bg_event 27, 5, 0, BG_EVENT_PLAYER_FACING_ANY, LilycoveCity_ContestLobby_EventScript_293C3E
bg_event 27, 5, 0, BG_EVENT_PLAYER_FACING_ANY, EventScript_Pblock1_Ask
bg_event 27, 9, 0, BG_EVENT_PLAYER_FACING_ANY, LilycoveCity_ContestLobby_EventScript_293D4D
bg_event 18, 3, 0, BG_EVENT_PLAYER_FACING_ANY, LilycoveCity_ContestLobby_EventScript_21A784

View File

@@ -877,7 +877,7 @@ LilycoveCity_ContestLobby_EventScript_21ABA0:: @ 821ABA0
return
LilycoveCity_ContestLobby_EventScript_21ABA6:: @ 821ABA6
message LilycoveCity_ContestLobby_Text_27C1EA
message Text_DecideLinkLeader
waitmessage
multichoice 16, 6, 81, 0
switch VAR_RESULT

View File

@@ -1761,7 +1761,7 @@ LilycoveCity_ContestLobby_Text_27C186: @ 827C186
LilycoveCity_ContestLobby_Text_27C1C3: @ 827C1C3
.string "Which POKéMON would you like to enter?$"
LilycoveCity_ContestLobby_Text_27C1EA: @ 827C1EA
Text_DecideLinkLeader: @ 827C1EA
.string "Please decide which of you will\n"
.string "become the GROUP LEADER.\p"
.string "The other players must then choose\n"

View File

@@ -1,22 +1,36 @@
LilycoveCity_ContestLobby_Text_292DEE: @ 8292DEE
@ The scripts there concern pokeblock events in LilyCove City's Contest Lobby
@ 'PblockX' number of offline opponents
@ 'Ask' talking with a blender machine
@ 'Yes' agreeing to blend
@ 'No' refusing to blend
@ 'KnowHow' asking if the player knows the blending process
@ 'Explain' explaining the blender process
@ 'Start' start blending
@ 'TalkX' talking with a person next to a blender machine
@ 'NoBerries' can't blend cause they have no berries
@ 'FullPokeblock' can't blend cause full pokeblock case
@ 'NoPokeblock' can't blend cause they have no pokeblock case
Text_Pblock1_Ask: @ 8292DEE
.string "Oh? Did you want to make some {POKEBLOCK}S\n"
.string "with this old-timer?$"
LilycoveCity_ContestLobby_Text_292E28: @ 8292E28
Text_Pblock1_Yes: @ 8292E28
.string "Excellent!$"
LilycoveCity_ContestLobby_Text_292E33: @ 8292E33
Text_Pblock1_No: @ 8292E33
.string "Oh…\n"
.string "Youve made this old-timer sad…$"
LilycoveCity_ContestLobby_Text_292E57: @ 8292E57
Text_Pblock1_KnowHow: @ 8292E57
.string "Do you know how to make a {POKEBLOCK}?$"
LilycoveCity_ContestLobby_Text_292E78: @ 8292E78
Text_Pblock1_Start: @ 8292E78
.string "Lets get started, then!\p"
.string "Lets BERRY BLENDER!$"
LilycoveCity_ContestLobby_Text_292EA6: @ 8292EA6
Text_Pblock1_Explain: @ 8292EA6
.string "Okay, a little explanation, then.\p"
.string "Oh, dont worry, its quite simple.\p"
.string "When the BLENDERs arrow comes to\n"
@@ -24,7 +38,7 @@ LilycoveCity_ContestLobby_Text_292EA6: @ 8292EA6
.string "Thats all you have to do.\n"
.string "Youll see how easy it is when you try.$"
LilycoveCity_ContestLobby_Text_292F77: @ 8292F77
Text_Pblock1_NoBerries: @ 8292F77
.string "Oh?\n"
.string "You dont have any BERRIES?\p"
.string "If you dont have any BERRIES,\n"
@@ -43,12 +57,12 @@ LilycoveCity_ContestLobby_Text_29307D: @ 829307D
.string "But, I dont have any to spare today.\n"
.string "Well have to do this another time.$"
LilycoveCity_ContestLobby_Text_293101: @ 8293101
Text_Pblock1_FullPokeblock: @ 8293101
.string "But your {POKEBLOCK} CASE is full.\p"
.string "You should use some {POKEBLOCK}S before\n"
.string "you come see me again.$"
LilycoveCity_ContestLobby_Text_293157: @ 8293157
Text_Pblock1_NoPokeblock: @ 8293157
.string "But you dont have a {POKEBLOCK} CASE.\p"
.string "You should get a {POKEBLOCK} CASE and then\n"
.string "come see me.$"
@@ -171,43 +185,43 @@ LilycoveCity_ContestLobby_Text_29388F: @ 829388F
.string "Im going to make delicious {POKEBLOCK}S\n"
.string "and make my POKéMON cuter.$"
LilycoveCity_ContestLobby_Text_2938CD: @ 82938CD
Text_PblockLink_Ask: @ 82938CD
.string "{POKEBLOCK}S will be made with your friends \n"
.string "from BERRIES in the BERRY BLENDER.\p"
.string "Is it okay to save the game before\n"
.string "linking with your friends?$"
LilycoveCity_ContestLobby_Text_293955: @ 8293955
Text_PblockLink_Searching: @ 8293955
.string "Searching for your friends…\n"
.string "… … B Button: Cancel$"
LilycoveCity_ContestLobby_Text_293986: @ 8293986
Text_PblockLink_1Arrived: @ 8293986
.string "{STR_VAR_1} arrived.$"
LilycoveCity_ContestLobby_Text_293992: @ 8293992
Text_PblockLink_2Arrived: @ 8293992
.string "{STR_VAR_1} and {STR_VAR_2} arrived.$"
LilycoveCity_ContestLobby_Text_2939A5: @ 82939A5
Text_PblockLink_3Arrived: @ 82939A5
.string "{STR_VAR_1}, {STR_VAR_2}, and\n"
.string "{STR_VAR_3} arrived.$"
LilycoveCity_ContestLobby_Text_2939BD: @ 82939BD
Text_PblockLink_NoBerries: @ 82939BD
.string "You have no BERRIES.\n"
.string "The BERRY BLENDER cant be used.$"
LilycoveCity_ContestLobby_Text_2939F3: @ 82939F3
Text_PblockLink_FullPokeblock: @ 82939F3
.string "Your {POKEBLOCK} CASE is full.\n"
.string "The BERRY BLENDER cant be used.$"
LilycoveCity_ContestLobby_Text_293A2D: @ 8293A2D
Text_PblockLink_NoPokeblock: @ 8293A2D
.string "You dont have a {POKEBLOCK} CASE.\n"
.string "The BERRY BLENDER cant be used.$"
LilycoveCity_ContestLobby_Text_293A6B: @ 8293A6B
Text_Pblock1_Talk_0: @ 8293A6B
.string "I love making {POKEBLOCK}S.\p"
.string "I always have some BERRIES with me.$"
LilycoveCity_ContestLobby_Text_293AA5: @ 8293AA5
Text_Pblock1_Talk_1: @ 8293AA5
.string "If youd like, we could make some\n"
.string "{POKEBLOCK}S together using the\l"
.string "BERRY BLENDER.$"
@@ -231,76 +245,76 @@ LilycoveCity_ContestLobby_Text_293BB4: @ 8293BB4
.string "But, I dont have any to spare today.\n"
.string "Sorry about that.$"
LilycoveCity_ContestLobby_EventScript_293C3E:: @ 8293C3E
EventScript_Pblock1_Ask:: @ 8293C3E
lockall
checkflag FLAG_0x340
goto_if 0, LilycoveCity_ContestLobby_EventScript_293EFB
setvar VAR_0x8009, 1
applymovement 16, LilycoveCity_ContestLobby_Movement_294053
waitmovement 0
msgbox LilycoveCity_ContestLobby_Text_292DEE, 5
msgbox Text_Pblock1_Ask, 5
compare VAR_RESULT, 1
goto_eq LilycoveCity_ContestLobby_EventScript_293CEE
goto LilycoveCity_ContestLobby_EventScript_293C70
goto_eq EventScript_Pblock1_Yes
goto EventScript_Pblock1_No
end
LilycoveCity_ContestLobby_EventScript_293C70:: @ 8293C70
msgbox LilycoveCity_ContestLobby_Text_292E33, 4
EventScript_Pblock1_No: @ 8293C70
msgbox Text_Pblock1_No, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_293C7A:: @ 8293C7A
msgbox LilycoveCity_ContestLobby_Text_292F77, 4
EventScript_Pblock1_NoBerries: @ 8293C7A
msgbox Text_Pblock1_NoBerries, 4
dodailyevents
checkflag FLAG_0x921
goto_eq LilycoveCity_ContestLobby_EventScript_293C92
goto LilycoveCity_ContestLobby_EventScript_293C9C
end
LilycoveCity_ContestLobby_EventScript_293C92:: @ 8293C92
LilycoveCity_ContestLobby_EventScript_293C92: @ 8293C92
msgbox LilycoveCity_ContestLobby_Text_29307D, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_293C9C:: @ 8293C9C
LilycoveCity_ContestLobby_EventScript_293C9C: @ 8293C9C
msgbox LilycoveCity_ContestLobby_Text_292FD1, 4
giveitem_std ITEM_PECHA_BERRY
setflag FLAG_0x921
goto LilycoveCity_ContestLobby_EventScript_293CB9
goto EventScript_Pblock1_KnowHow
end
LilycoveCity_ContestLobby_EventScript_293CB9:: @ 8293CB9
msgbox LilycoveCity_ContestLobby_Text_292E57, 5
EventScript_Pblock1_KnowHow: @ 8293CB9
msgbox Text_Pblock1_KnowHow, 5
compare VAR_RESULT, 1
goto_eq LilycoveCity_ContestLobby_EventScript_293CD2
goto LilycoveCity_ContestLobby_EventScript_293CE0
goto_eq EventScript_Pblock1_Start
goto EventScript_Pblock1_Explain
end
LilycoveCity_ContestLobby_EventScript_293CD2:: @ 8293CD2
msgbox LilycoveCity_ContestLobby_Text_292E78, 4
goto LilycoveCity_ContestLobby_EventScript_293D2C
EventScript_Pblock1_Start: @ 8293CD2
msgbox Text_Pblock1_Start, 4
goto EventScript_StartBlending
end
LilycoveCity_ContestLobby_EventScript_293CE0:: @ 8293CE0
msgbox LilycoveCity_ContestLobby_Text_292EA6, 4
goto LilycoveCity_ContestLobby_EventScript_293CD2
EventScript_Pblock1_Explain: @ 8293CE0
msgbox Text_Pblock1_Explain, 4
goto EventScript_Pblock1_Start
end
LilycoveCity_ContestLobby_EventScript_293CEE:: @ 8293CEE
EventScript_Pblock1_Yes: @ 8293CEE
checkitem ITEM_POKEBLOCK_CASE, 1
compare VAR_RESULT, 0
goto_eq LilycoveCity_ContestLobby_EventScript_293D43
goto_eq EventScript_Pblock1_NoPokeblock
specialvar VAR_RESULT, GetFirstFreePokeblockSlot
compare VAR_RESULT, 65535
goto_eq LilycoveCity_ContestLobby_EventScript_293D39
goto_eq EventScript_Pblock1_FullPokeblock
specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, 0
goto_eq LilycoveCity_ContestLobby_EventScript_293C7A
msgbox LilycoveCity_ContestLobby_Text_292E28, 4
goto LilycoveCity_ContestLobby_EventScript_293CB9
goto_eq EventScript_Pblock1_NoBerries
msgbox Text_Pblock1_Yes, 4
goto EventScript_Pblock1_KnowHow
end
LilycoveCity_ContestLobby_EventScript_293D2C:: @ 8293D2C
EventScript_StartBlending: @ 8293D2C
copyvar VAR_0x8004, VAR_0x8009
fadescreen 1
special DoBerryBlending
@@ -308,13 +322,13 @@ LilycoveCity_ContestLobby_EventScript_293D2C:: @ 8293D2C
releaseall
end
LilycoveCity_ContestLobby_EventScript_293D39:: @ 8293D39
msgbox LilycoveCity_ContestLobby_Text_293101, 4
EventScript_Pblock1_FullPokeblock: @ 8293D39
msgbox Text_Pblock1_FullPokeblock, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_293D43:: @ 8293D43
msgbox LilycoveCity_ContestLobby_Text_293157, 4
EventScript_Pblock1_NoPokeblock: @ 8293D43
msgbox Text_Pblock1_NoPokeblock, 4
releaseall
end
@@ -330,34 +344,34 @@ LilycoveCity_ContestLobby_EventScript_293D4D:: @ 8293D4D
goto LilycoveCity_ContestLobby_EventScript_293D7D
end
LilycoveCity_ContestLobby_EventScript_293D7D:: @ 8293D7D
LilycoveCity_ContestLobby_EventScript_293D7D: @ 8293D7D
msgbox LilycoveCity_ContestLobby_Text_29323D, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_293D87:: @ 8293D87
LilycoveCity_ContestLobby_EventScript_293D87: @ 8293D87
msgbox LilycoveCity_ContestLobby_Text_293394, 4
release
end
LilycoveCity_ContestLobby_EventScript_293D91:: @ 8293D91
LilycoveCity_ContestLobby_EventScript_293D91: @ 8293D91
msgbox LilycoveCity_ContestLobby_Text_29328C, 5
compare VAR_RESULT, 1
goto_eq LilycoveCity_ContestLobby_EventScript_293DAA
goto LilycoveCity_ContestLobby_EventScript_293DB8
end
LilycoveCity_ContestLobby_EventScript_293DAA:: @ 8293DAA
LilycoveCity_ContestLobby_EventScript_293DAA: @ 8293DAA
msgbox LilycoveCity_ContestLobby_Text_2932C3, 4
goto LilycoveCity_ContestLobby_EventScript_293D2C
goto EventScript_StartBlending
end
LilycoveCity_ContestLobby_EventScript_293DB8:: @ 8293DB8
LilycoveCity_ContestLobby_EventScript_293DB8: @ 8293DB8
msgbox LilycoveCity_ContestLobby_Text_2932F1, 4
goto LilycoveCity_ContestLobby_EventScript_293DAA
end
LilycoveCity_ContestLobby_EventScript_293DC6:: @ 8293DC6
LilycoveCity_ContestLobby_EventScript_293DC6: @ 8293DC6
specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, 0
goto_eq LilycoveCity_ContestLobby_EventScript_293D87
@@ -372,12 +386,12 @@ LilycoveCity_ContestLobby_EventScript_293DC6:: @ 8293DC6
goto_eq LilycoveCity_ContestLobby_EventScript_293E0A
end
LilycoveCity_ContestLobby_EventScript_293E0A:: @ 8293E0A
LilycoveCity_ContestLobby_EventScript_293E0A: @ 8293E0A
msgbox LilycoveCity_ContestLobby_Text_29343E, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_293E14:: @ 8293E14
LilycoveCity_ContestLobby_EventScript_293E14: @ 8293E14
msgbox LilycoveCity_ContestLobby_Text_2934A2, 4
releaseall
end
@@ -396,34 +410,34 @@ LilycoveCity_ContestLobby_EventScript_293E1E:: @ 8293E1E
goto LilycoveCity_ContestLobby_EventScript_293E5A
end
LilycoveCity_ContestLobby_EventScript_293E5A:: @ 8293E5A
LilycoveCity_ContestLobby_EventScript_293E5A: @ 8293E5A
msgbox LilycoveCity_ContestLobby_Text_293558, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_293E64:: @ 8293E64
LilycoveCity_ContestLobby_EventScript_293E64: @ 8293E64
msgbox LilycoveCity_ContestLobby_Text_29367D, 4
release
end
LilycoveCity_ContestLobby_EventScript_293E6E:: @ 8293E6E
LilycoveCity_ContestLobby_EventScript_293E6E: @ 8293E6E
msgbox LilycoveCity_ContestLobby_Text_29357E, 5
compare VAR_RESULT, 1
goto_eq LilycoveCity_ContestLobby_EventScript_293E87
goto LilycoveCity_ContestLobby_EventScript_293E95
end
LilycoveCity_ContestLobby_EventScript_293E87:: @ 8293E87
LilycoveCity_ContestLobby_EventScript_293E87: @ 8293E87
msgbox LilycoveCity_ContestLobby_Text_2935B1, 4
goto LilycoveCity_ContestLobby_EventScript_293D2C
goto EventScript_StartBlending
end
LilycoveCity_ContestLobby_EventScript_293E95:: @ 8293E95
LilycoveCity_ContestLobby_EventScript_293E95: @ 8293E95
msgbox LilycoveCity_ContestLobby_Text_2935E5, 4
goto LilycoveCity_ContestLobby_EventScript_293E87
end
LilycoveCity_ContestLobby_EventScript_293EA3:: @ 8293EA3
LilycoveCity_ContestLobby_EventScript_293EA3: @ 8293EA3
specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, 0
goto_eq LilycoveCity_ContestLobby_EventScript_293E64
@@ -438,17 +452,17 @@ LilycoveCity_ContestLobby_EventScript_293EA3:: @ 8293EA3
goto_eq LilycoveCity_ContestLobby_EventScript_293EE7
end
LilycoveCity_ContestLobby_EventScript_293EE7:: @ 8293EE7
LilycoveCity_ContestLobby_EventScript_293EE7: @ 8293EE7
msgbox LilycoveCity_ContestLobby_Text_293738, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_293EF1:: @ 8293EF1
LilycoveCity_ContestLobby_EventScript_293EF1: @ 8293EF1
msgbox LilycoveCity_ContestLobby_Text_293792, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_293EFB:: @ 8293EFB
LilycoveCity_ContestLobby_EventScript_293EFB: @ 8293EFB
lockall
setvar VAR_0x8009, 1
msgbox LilycoveCity_ContestLobby_Text_2C42F4, 5
@@ -458,12 +472,12 @@ LilycoveCity_ContestLobby_EventScript_293EFB:: @ 8293EFB
releaseall
end
LilycoveCity_ContestLobby_EventScript_293F1E:: @ 8293F1E
LilycoveCity_ContestLobby_EventScript_293F1E: @ 8293F1E
msgbox LilycoveCity_ContestLobby_Text_2C439D, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_293F28:: @ 8293F28
LilycoveCity_ContestLobby_EventScript_293F28: @ 8293F28
checkitem ITEM_POKEBLOCK_CASE, 1
compare VAR_RESULT, 0
goto_eq LilycoveCity_ContestLobby_EventScript_293F8E
@@ -477,24 +491,24 @@ LilycoveCity_ContestLobby_EventScript_293F28:: @ 8293F28
goto_eq LilycoveCity_ContestLobby_EventScript_293F98
end
LilycoveCity_ContestLobby_EventScript_293F64:: @ 8293F64
LilycoveCity_ContestLobby_EventScript_293F64: @ 8293F64
msgbox LilycoveCity_ContestLobby_Text_2C43FA, 5
compare VAR_RESULT, 0
call_if 1, LilycoveCity_ContestLobby_EventScript_293F85
msgbox LilycoveCity_ContestLobby_Text_2C451B, 4
goto LilycoveCity_ContestLobby_EventScript_293D2C
goto EventScript_StartBlending
end
LilycoveCity_ContestLobby_EventScript_293F85:: @ 8293F85
LilycoveCity_ContestLobby_EventScript_293F85: @ 8293F85
msgbox LilycoveCity_ContestLobby_Text_2C444C, 4
return
LilycoveCity_ContestLobby_EventScript_293F8E:: @ 8293F8E
LilycoveCity_ContestLobby_EventScript_293F8E: @ 8293F8E
msgbox LilycoveCity_ContestLobby_Text_2C4573, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_293F98:: @ 8293F98
LilycoveCity_ContestLobby_EventScript_293F98: @ 8293F98
msgbox LilycoveCity_ContestLobby_Text_2C45E8, 4
releaseall
end
@@ -516,10 +530,10 @@ LilycoveCity_ContestLobby_EventScript_293FBD:: @ 8293FBD
goto LilycoveCity_ContestLobby_EventScript_293FC8
end
LilycoveCity_ContestLobby_EventScript_293FC8:: @ 8293FC8
LilycoveCity_ContestLobby_EventScript_293FC8: @ 8293FC8
lock
faceplayer
msgbox LilycoveCity_ContestLobby_Text_293A6B, 4
msgbox Text_Pblock1_Talk_0, 4
specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, 1
goto_eq LilycoveCity_ContestLobby_EventScript_293FEE
@@ -527,12 +541,12 @@ LilycoveCity_ContestLobby_EventScript_293FC8:: @ 8293FC8
goto_eq LilycoveCity_ContestLobby_EventScript_293FF8
end
LilycoveCity_ContestLobby_EventScript_293FEE:: @ 8293FEE
msgbox LilycoveCity_ContestLobby_Text_293AA5, 4
LilycoveCity_ContestLobby_EventScript_293FEE: @ 8293FEE
msgbox Text_Pblock1_Talk_1, 4
release
end
LilycoveCity_ContestLobby_EventScript_293FF8:: @ 8293FF8
LilycoveCity_ContestLobby_EventScript_293FF8: @ 8293FF8
checkitem ITEM_POKEBLOCK_CASE, 1
compare VAR_RESULT, 0
goto_eq LilycoveCity_ContestLobby_EventScript_294028
@@ -545,12 +559,12 @@ LilycoveCity_ContestLobby_EventScript_293FF8:: @ 8293FF8
goto LilycoveCity_ContestLobby_EventScript_294032
end
LilycoveCity_ContestLobby_EventScript_294028:: @ 8294028
LilycoveCity_ContestLobby_EventScript_294028: @ 8294028
msgbox LilycoveCity_ContestLobby_Text_293BB4, 4
release
end
LilycoveCity_ContestLobby_EventScript_294032:: @ 8294032
LilycoveCity_ContestLobby_EventScript_294032: @ 8294032
msgbox LilycoveCity_ContestLobby_Text_293AF0, 4
giveitem_std ITEM_PECHA_BERRY
setflag FLAG_0x921
@@ -562,73 +576,73 @@ LilycoveCity_ContestLobby_Movement_294053: @ 8294053
walk_in_place_fastest_right
step_end
LilycoveCity_ContestLobby_EventScript_294055:: @ 8294055
EventScript_PblockLink:: @ 8294055
lockall
specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, 0
goto_eq LilycoveCity_ContestLobby_EventScript_2940B1
goto_eq EventScript_PblocLink_NoBerries
checkitem ITEM_POKEBLOCK_CASE, 1
compare VAR_RESULT, 0
goto_eq LilycoveCity_ContestLobby_EventScript_29416C
goto_eq EventScript_PblocLink_NoPokeblock
specialvar VAR_RESULT, GetFirstFreePokeblockSlot
compare VAR_RESULT, 65535
goto_if 5, LilycoveCity_ContestLobby_EventScript_294092
goto_if 5, EventScript_PblocLink_Ask
compare VAR_RESULT, 65535
goto_eq LilycoveCity_ContestLobby_EventScript_294162
goto_eq EventScript_PblocLink_FullPokeblock
end
LilycoveCity_ContestLobby_EventScript_294092:: @ 8294092
msgbox LilycoveCity_ContestLobby_Text_2938CD, 5
EventScript_PblocLink_Ask: @ 8294092
msgbox Text_PblockLink_Ask, 5
compare VAR_RESULT, 1
goto_eq LilycoveCity_ContestLobby_EventScript_2940BB
goto_eq EventScript_PblocLink_TryConnect
compare VAR_RESULT, 0
goto_eq LilycoveCity_ContestLobby_EventScript_294160
goto_eq EventScript_PblocLink_End
end
LilycoveCity_ContestLobby_EventScript_2940B1:: @ 82940B1
msgbox LilycoveCity_ContestLobby_Text_2939BD, 4
EventScript_PblocLink_NoBerries: @ 82940B1
msgbox Text_PblockLink_NoBerries, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_2940BB:: @ 82940BB
EventScript_PblocLink_TryConnect: @ 82940BB
call LilycoveCity_ContestLobby_EventScript_27134F
compare VAR_RESULT, 0
goto_eq LilycoveCity_ContestLobby_EventScript_294160
goto_eq EventScript_PblocLink_End
specialvar VAR_RESULT, IsWirelessAdapterConnected
compare VAR_RESULT, 1
goto_eq LilycoveCity_ContestLobby_EventScript_2941ED
message LilycoveCity_ContestLobby_Text_293955
message Text_PblockLink_Searching
waitmessage
special sub_80B2FD8
waitstate
compare VAR_RESULT, 1
goto_eq LilycoveCity_ContestLobby_EventScript_2941AA
goto_eq EventScript_PblocLink_SpawnPartners
compare VAR_RESULT, 2
goto_eq LilycoveCity_ContestLobby_EventScript_294176
goto_eq EventScript_PblocLink_SomeoneNotReady
compare VAR_RESULT, 3
goto_eq LilycoveCity_ContestLobby_EventScript_294183
goto_eq EventScript_PblocLink_DifferentSelections
compare VAR_RESULT, 5
goto_eq LilycoveCity_ContestLobby_EventScript_294190
goto_eq EventScript_PblocLink_CloseLink
compare VAR_RESULT, 6
goto_eq LilycoveCity_ContestLobby_EventScript_29419D
goto_eq EventScript_PblocLink_LinkError
end
LilycoveCity_ContestLobby_EventScript_29411D:: @ 829411D
msgbox LilycoveCity_ContestLobby_Text_293986, 4
goto LilycoveCity_ContestLobby_EventScript_294147
EventScript_PblocLink_1Arrived: @ 829411D
msgbox Text_PblockLink_1Arrived, 4
goto EventScript_PblocLink_StartLinkBlending
end
LilycoveCity_ContestLobby_EventScript_29412B:: @ 829412B
msgbox LilycoveCity_ContestLobby_Text_293992, 4
goto LilycoveCity_ContestLobby_EventScript_294147
EventScript_PblocLink_2Arrived: @ 829412B
msgbox Text_PblockLink_2Arrived, 4
goto EventScript_PblocLink_StartLinkBlending
end
LilycoveCity_ContestLobby_EventScript_294139:: @ 8294139
msgbox LilycoveCity_ContestLobby_Text_2939A5, 4
goto LilycoveCity_ContestLobby_EventScript_294147
EventScript_PblocLink_3Arrived: @ 8294139
msgbox Text_PblockLink_3Arrived, 4
goto EventScript_PblocLink_StartLinkBlending
end
LilycoveCity_ContestLobby_EventScript_294147:: @ 8294147
EventScript_PblocLink_StartLinkBlending: @ 8294147
setvar VAR_0x8004, 0
fadescreen 1
removeobject 240
@@ -640,109 +654,109 @@ LilycoveCity_ContestLobby_EventScript_294147:: @ 8294147
releaseall
end
LilycoveCity_ContestLobby_EventScript_294160:: @ 8294160
EventScript_PblocLink_End: @ 8294160
releaseall
end
LilycoveCity_ContestLobby_EventScript_294162:: @ 8294162
msgbox LilycoveCity_ContestLobby_Text_2939F3, 4
EventScript_PblocLink_FullPokeblock: @ 8294162
msgbox Text_PblockLink_FullPokeblock, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_29416C:: @ 829416C
msgbox LilycoveCity_ContestLobby_Text_293A2D, 4
EventScript_PblocLink_NoPokeblock: @ 829416C
msgbox Text_PblockLink_NoPokeblock, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_294176:: @ 8294176
EventScript_PblocLink_SomeoneNotReady: @ 8294176
special CloseLink
msgbox LilycoveCity_ContestLobby_Text_2781C7, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_294183:: @ 8294183
EventScript_PblocLink_DifferentSelections: @ 8294183
special CloseLink
msgbox LilycoveCity_ContestLobby_Text_278255, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_294190:: @ 8294190
EventScript_PblocLink_CloseLink: @ 8294190
special CloseLink
msgbox gUnknown_08272D9C, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_29419D:: @ 829419D
EventScript_PblocLink_LinkError: @ 829419D
special CloseLink
msgbox LilycoveCity_ContestLobby_Text_27821C, 4
releaseall
end
LilycoveCity_ContestLobby_EventScript_2941AA:: @ 82941AA
EventScript_PblocLink_SpawnPartners: @ 82941AA
fadescreen 1
specialvar VAR_RESULT, GetLinkPartnerNames
copyvar VAR_0x8008, VAR_RESULT
copyvar VAR_0x8004, VAR_0x8008
special SpawnLinkPartnerEventObject
goto LilycoveCity_ContestLobby_EventScript_2941C4
goto EventScript_PblocLink_Arrived
end
LilycoveCity_ContestLobby_EventScript_2941C4:: @ 82941C4
EventScript_PblocLink_Arrived: @ 82941C4
fadescreen 0
switch VAR_0x8008
case 2, LilycoveCity_ContestLobby_EventScript_29411D
case 3, LilycoveCity_ContestLobby_EventScript_29412B
case 4, LilycoveCity_ContestLobby_EventScript_294139
case 2, EventScript_PblocLink_1Arrived
case 3, EventScript_PblocLink_2Arrived
case 4, EventScript_PblocLink_3Arrived
end
LilycoveCity_ContestLobby_EventScript_2941ED:: @ 82941ED
LilycoveCity_ContestLobby_EventScript_2941ED: @ 82941ED
setvar VAR_0x8004, 13
goto LilycoveCity_ContestLobby_EventScript_2941F8
goto EventScript_PblocLink_DecideLeader
end
LilycoveCity_ContestLobby_EventScript_2941F8:: @ 82941F8
message LilycoveCity_ContestLobby_Text_27C1EA
EventScript_PblocLink_DecideLeader: @ 82941F8
message Text_DecideLinkLeader
waitmessage
multichoice 16, 6, 81, 0
switch VAR_RESULT
case 0, LilycoveCity_ContestLobby_EventScript_29425D
case 1, LilycoveCity_ContestLobby_EventScript_294235
case 2, LilycoveCity_ContestLobby_EventScript_294190
case 127, LilycoveCity_ContestLobby_EventScript_294190
case 0, EventScript_PblocLink_TryJoinGroup
case 1, EventScript_PblocLink_TryBecomeLeader
case 2, EventScript_PblocLink_CloseLink
case 127, EventScript_PblocLink_CloseLink
end
LilycoveCity_ContestLobby_EventScript_294235:: @ 8294235
call LilycoveCity_ContestLobby_EventScript_294285
EventScript_PblocLink_TryBecomeLeader: @ 8294235
call EventScript_PblocLink_BecomeLeader
compare VAR_RESULT, 1
goto_eq LilycoveCity_ContestLobby_EventScript_29428F
goto_eq EventScript_PblocLink_SpawnPartners_
compare VAR_RESULT, 5
goto_eq LilycoveCity_ContestLobby_EventScript_2941F8
goto_eq EventScript_PblocLink_DecideLeader
compare VAR_RESULT, 8
goto_eq LilycoveCity_ContestLobby_EventScript_294235
goto_eq EventScript_PblocLink_TryBecomeLeader
release
end
LilycoveCity_ContestLobby_EventScript_29425D:: @ 829425D
call LilycoveCity_ContestLobby_EventScript_29428A
EventScript_PblocLink_TryJoinGroup: @ 829425D
call EventScript_PblocLink_JoinGroup
compare VAR_RESULT, 1
goto_eq LilycoveCity_ContestLobby_EventScript_29428F
goto_eq EventScript_PblocLink_SpawnPartners_
compare VAR_RESULT, 5
goto_eq LilycoveCity_ContestLobby_EventScript_2941F8
goto_eq EventScript_PblocLink_DecideLeader
compare VAR_RESULT, 8
goto_eq LilycoveCity_ContestLobby_EventScript_29425D
goto_eq EventScript_PblocLink_TryJoinGroup
release
end
LilycoveCity_ContestLobby_EventScript_294285:: @ 8294285
EventScript_PblocLink_BecomeLeader: @ 8294285
special BerryBlenderLinkBecomeLeader
waitstate
return
LilycoveCity_ContestLobby_EventScript_29428A:: @ 829428A
EventScript_PblocLink_JoinGroup: @ 829428A
special BerryBlenderLinkJoinGroup
waitstate
return
LilycoveCity_ContestLobby_EventScript_29428F:: @ 829428F
goto LilycoveCity_ContestLobby_EventScript_2941AA
EventScript_PblocLink_SpawnPartners_: @ 829428F
goto EventScript_PblocLink_SpawnPartners
end

View File

@@ -9,5 +9,7 @@
void sub_80B37D4(TaskFunc taskFunc);
u8 sub_80B3050(void);
void sub_80B360C(void);
bool32 sub_80B2AF4(u16 *arg0, u16 *arg1);
#endif //GUARD_CABLE_CLUB_H

View File

@@ -37,5 +37,6 @@ bool8 sub_8068894(void);
bool8 sub_8068A64(struct MapPosition *, u16);
u8 sub_8068F18(void);
bool8 dive_warp(struct MapPosition *position, u16 b);
void sub_809D2BC(void);
#endif // GUARD_FIELDCONTROLAVATAR_H

View File

@@ -14,5 +14,6 @@ void UpdateWeatherPerDay(u16 days);
void sub_80AC3D0(void);
void sub_80AC3E4(void);
void PreservePaletteInWeather(u8);
void sub_80AF128(void);
#endif //GUARD_FIELD_SCREEN_H

View File

@@ -47,7 +47,7 @@ enum
RFU_UNK3A,
RFU_UNK3B,
RFU_UNK3C,
RFU_STOP_MODE, //3D
RFU_STOP_MODE, // 3D
};
struct RfuPacket8
@@ -67,7 +67,7 @@ union RfuPacket
struct RfuPacket8 rfuPacket8;
};
struct __attribute__((packed)) UnkLinkRfuStruct_02022B14
struct UnkLinkRfuStruct_02022B14Substruct
{
u16 unk_00_0:4;
u16 unk_00_4:1;
@@ -79,9 +79,14 @@ struct __attribute__((packed)) UnkLinkRfuStruct_02022B14
u16 unk_01_2:4;
u16 unk_01_6:2;
u8 playerTrainerId[2];
};
struct __attribute__((packed)) UnkLinkRfuStruct_02022B14
{
struct UnkLinkRfuStruct_02022B14Substruct unk_00;
u8 unk_04[4];
u16 unk_08_0:10;
u16 unk_09_2:6;
u16 species:10;
u16 type:6;
u8 unk_0a_0:7;
u8 unk_0a_7:1;
u8 playerGender:1;
@@ -200,8 +205,6 @@ extern struct RfuUnk1* gUnknown_03007870[4];
extern void* sub_82E53F4;
extern void rfu_STC_clearAPIVariables(void);
struct UnkLinkRfuStruct_02022B14;
void STWI_init_all(struct RfuIntrStruct *interruptStruct, IntrFunc *interrupt, bool8 copyInterruptToRam);
void rfu_REQ_stopMode(void);
void rfu_waitREQComplete(void);

View File

@@ -122,7 +122,7 @@ struct LinkPlayer
/* 0x08 */ u8 name[11];
/* 0x13 */ u8 gender;
/* 0x14 */ u32 linkType;
/* 0x18 */ u16 lp_field_18; // battle bank in battles
/* 0x18 */ u16 id; // battler id in battles
/* 0x1A */ u16 language;
};

View File

@@ -232,5 +232,37 @@ void sub_8011068(u8 a0);
void sub_8011170(u32 a0);
void sub_8011A64(u8 a0, u16 a1);
u8 sub_801048C(bool32 a0);
void sub_800DF90(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2);
void sub_8010F84(u8 a0, u32 a1, u32 a2);
void sub_8011C10(u32 a0);
bool32 sub_8012240(void);
void sub_800EF38(void);
bool32 sub_80105EC(void);
bool32 sub_801064C(u16 a0, const u8 *a1);
void sub_8010688(u8 a0, u16 a1, const u8 *a2);
u32 sub_8010714(u16 a0, const u8 *a1);
void sub_8011DC0(const u8 *a0, u16 a1);
bool8 sub_800EF1C(void);
bool32 sub_800EF58(bool32 a0);
void sub_800E084(void);
void sub_801103C(void);
void sub_8011C5C(void);
void sub_80106D4(void);
void sub_800E3A8(void);
void sub_800ED10(void);
void sub_800ED28(void);
void sub_8011090(u8 a0, u32 a1, u32 a2);
void sub_8011FC8(u8 *a0, u16 a1);
void sub_8010FA0(bool32 a0, bool32 a1);
void sub_8010F60(void);
void sub_8010FCC(u32 a0, u32 a1, u32 a2);
void sub_8011C84(void);
void sub_8012188(const u8 *a0, struct UnkLinkRfuStruct_02022B14 *arg1, u8 arg2);
bool32 sub_8011B90(void);
void sub_800FE50(u16 *a0);
bool32 sub_800E540(u16 id, u8 *name);
void sub_8011DE0(u32 arg0);
u8 sub_801100C(int a0);
void sub_800EF7C(void);
#endif //GUARD_LINK_RFU_H

View File

@@ -50,6 +50,9 @@ void sub_81B1F18(u8 taskId, u8 pokemonIdx, s8 a, s16 hp, TaskFunc func);
void sub_81B1B5C(void *a, u8 b);
u8 sub_81B1BD4();
void sub_81B8448();
void sub_81B8518(u8 unused);
u8 sub_81B1360(void);
void sub_81B8904(u8 arg0, void (*callback)(void));
void OpenPartyMenuInBattle(u8 caseId);
#endif // GUARD_PARTY_MENU_H

View File

@@ -7,6 +7,8 @@
// Exported ROM declarations
int sub_807A728(void);
s32 sub_807A728(void);
void sub_80773AC(void);
void sub_807AE50(void);
#endif //GUARD_TRADE_H

View File

@@ -32,4 +32,8 @@ struct TrainerCard
extern struct TrainerCard gTrainerCards[4];
void sub_80C3120(struct TrainerCard *arg0, u16 *arg1, u8 gameVersion);
void sub_80C4E74(u8 arg0, void (*callback)(void));
void sub_80C30A4(u16 *arg0);
#endif // GUARD_TRAINER_CARD_H

View File

@@ -55,6 +55,7 @@ SECTIONS {
src/link.o(.text);
src/link_rfu.o(.text);
asm/link_rfu.o(.text);
src/rom_8011DC0.o(.text);
asm/rom_8011DC0.o(.text);
src/rtc.o(.text);
src/main_menu.o(.text);
@@ -366,6 +367,7 @@ SECTIONS {
src/string_util.o(.rodata);
src/link.o(.rodata);
src/link_rfu.o(.rodata);
src/rom_8011DC0.o(.rodata);
data/rom_8011DC0.o(.rodata);
src/rtc.o(.rodata);
src/main_menu.o(.rodata);

View File

@@ -279,7 +279,7 @@ static void sub_8035C4C(void)
{
if (gBattleOutcome == B_OUTCOME_WON)
{
switch (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18)
switch (gLinkPlayers[gBattleScripting.multiplayerId].id)
{
case 0:
BattlePutTextOnWindow(gText_Win, 0x16);
@@ -301,7 +301,7 @@ static void sub_8035C4C(void)
}
else
{
switch (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18)
switch (gLinkPlayers[gBattleScripting.multiplayerId].id)
{
case 0:
BattlePutTextOnWindow(gText_Win, 0x17);
@@ -324,7 +324,7 @@ static void sub_8035C4C(void)
}
else if (gBattleOutcome == B_OUTCOME_WON)
{
if (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18 != 0)
if (gLinkPlayers[gBattleScripting.multiplayerId].id != 0)
{
BattlePutTextOnWindow(gText_Win, 0x17);
BattlePutTextOnWindow(gText_Loss, 0x16);
@@ -337,7 +337,7 @@ static void sub_8035C4C(void)
}
else
{
if (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18 != 0)
if (gLinkPlayers[gBattleScripting.multiplayerId].id != 0)
{
BattlePutTextOnWindow(gText_Win, 0x16);
BattlePutTextOnWindow(gText_Loss, 0x17);
@@ -366,23 +366,23 @@ void sub_8035D74(u8 taskId)
name = gLinkPlayers[i].name;
linkPlayer = &gLinkPlayers[i];
switch (linkPlayer->lp_field_18)
switch (linkPlayer->id)
{
case 0:
BattlePutTextOnWindow(name, 0x11);
sub_8035AE4(taskId, linkPlayer->lp_field_18, 1, 2, 4);
sub_8035AE4(taskId, linkPlayer->id, 1, 2, 4);
break;
case 1:
BattlePutTextOnWindow(name, 0x12);
sub_8035AE4(taskId, linkPlayer->lp_field_18, 2, 2, 4);
sub_8035AE4(taskId, linkPlayer->id, 2, 2, 4);
break;
case 2:
BattlePutTextOnWindow(name, 0x13);
sub_8035AE4(taskId, linkPlayer->lp_field_18, 1, 2, 8);
sub_8035AE4(taskId, linkPlayer->id, 1, 2, 8);
break;
case 3:
BattlePutTextOnWindow(name, 0x14);
sub_8035AE4(taskId, linkPlayer->lp_field_18, 2, 2, 8);
sub_8035AE4(taskId, linkPlayer->id, 2, 2, 8);
break;
}
}
@@ -393,7 +393,7 @@ void sub_8035D74(u8 taskId)
u8 opponentId = playerId ^ BIT_SIDE;
u8 opponentId_copy = opponentId;
if (gLinkPlayers[playerId].lp_field_18 != 0)
if (gLinkPlayers[playerId].id != 0)
opponentId = playerId, playerId = opponentId_copy;
name = gLinkPlayers[playerId].name;

View File

@@ -264,67 +264,67 @@ static void InitSinglePlayerBtlControllers(void)
for (var = gUnknown_0203C7B4, i = 0; i < MAX_BATTLERS_COUNT; i++)
{
switch (gLinkPlayers[i].lp_field_18)
switch (gLinkPlayers[i].id)
{
case 0:
case 3:
sub_81B8D64(gLinkPlayers[i].lp_field_18, 0);
sub_81B8D64(gLinkPlayers[i].id, 0);
break;
case 1:
case 2:
sub_81B8D64(gLinkPlayers[i].lp_field_18, 1);
sub_81B8D64(gLinkPlayers[i].id, 1);
break;
}
if (i == var)
{
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToRecordedPlayer;
switch (gLinkPlayers[i].lp_field_18)
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToRecordedPlayer;
switch (gLinkPlayers[i].id)
{
case 0:
case 3:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_PLAYER_LEFT;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_PLAYER_LEFT;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
break;
case 1:
case 2:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_PLAYER_RIGHT;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_PLAYER_RIGHT;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
break;
}
}
else if ((!(gLinkPlayers[i].lp_field_18 & 1) && !(gLinkPlayers[var].lp_field_18 & 1))
|| ((gLinkPlayers[i].lp_field_18 & 1) && (gLinkPlayers[var].lp_field_18 & 1)))
else if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[var].id & 1))
|| ((gLinkPlayers[i].id & 1) && (gLinkPlayers[var].id & 1)))
{
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToRecordedPlayer;
switch (gLinkPlayers[i].lp_field_18)
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToRecordedPlayer;
switch (gLinkPlayers[i].id)
{
case 0:
case 3:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_PLAYER_LEFT;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_PLAYER_LEFT;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
break;
case 1:
case 2:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_PLAYER_RIGHT;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_PLAYER_RIGHT;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
break;
}
}
else
{
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToRecordedOpponent;
switch (gLinkPlayers[i].lp_field_18)
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToRecordedOpponent;
switch (gLinkPlayers[i].id)
{
case 0:
case 3:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_OPPONENT_LEFT;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_OPPONENT_LEFT;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
break;
case 1:
case 2:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = B_POSITION_OPPONENT_RIGHT;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
gBattlerPositions[gLinkPlayers[i].id] = B_POSITION_OPPONENT_RIGHT;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
break;
}
}
@@ -506,69 +506,69 @@ static void InitLinkBtlControllers(void)
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
{
switch (gLinkPlayers[i].lp_field_18)
switch (gLinkPlayers[i].id)
{
case 0:
case 3:
sub_81B8D64(gLinkPlayers[i].lp_field_18, 0);
sub_81B8D64(gLinkPlayers[i].id, 0);
break;
case 1:
case 2:
sub_81B8D64(gLinkPlayers[i].lp_field_18, 1);
sub_81B8D64(gLinkPlayers[i].id, 1);
break;
}
if (i == multiplayerId)
{
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToPlayer;
switch (gLinkPlayers[i].lp_field_18)
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToPlayer;
switch (gLinkPlayers[i].id)
{
case 0:
case 3:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 0;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
gBattlerPositions[gLinkPlayers[i].id] = 0;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
break;
case 1:
case 2:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 2;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
gBattlerPositions[gLinkPlayers[i].id] = 2;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
break;
}
}
else
{
if ((!(gLinkPlayers[i].lp_field_18 & 1) && !(gLinkPlayers[multiplayerId].lp_field_18 & 1))
|| ((gLinkPlayers[i].lp_field_18 & 1) && (gLinkPlayers[multiplayerId].lp_field_18 & 1)))
if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[multiplayerId].id & 1))
|| ((gLinkPlayers[i].id & 1) && (gLinkPlayers[multiplayerId].id & 1)))
{
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToLinkPartner;
switch (gLinkPlayers[i].lp_field_18)
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToLinkPartner;
switch (gLinkPlayers[i].id)
{
case 0:
case 3:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 0;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
gBattlerPositions[gLinkPlayers[i].id] = 0;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
break;
case 1:
case 2:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 2;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
gBattlerPositions[gLinkPlayers[i].id] = 2;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
break;
}
}
else
{
gBattlerControllerFuncs[gLinkPlayers[i].lp_field_18] = SetControllerToLinkOpponent;
switch (gLinkPlayers[i].lp_field_18)
gBattlerControllerFuncs[gLinkPlayers[i].id] = SetControllerToLinkOpponent;
switch (gLinkPlayers[i].id)
{
case 0:
case 3:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 1;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 0;
gBattlerPositions[gLinkPlayers[i].id] = 1;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 0;
break;
case 1:
case 2:
gBattlerPositions[gLinkPlayers[i].lp_field_18] = 3;
gBattlerPartyIndexes[gLinkPlayers[i].lp_field_18] = 3;
gBattlerPositions[gLinkPlayers[i].id] = 3;
gBattlerPartyIndexes[gLinkPlayers[i].id] = 3;
break;
}
}

View File

@@ -828,7 +828,7 @@ static void SetAllPlayersBerryData(void)
for (i = 0; i < numPlayers; i++)
{
src = (struct BattleEnigmaBerry *)(gBlockRecvBuffer[i] + 2);
battlerId = gLinkPlayers[i].lp_field_18;
battlerId = gLinkPlayers[i].id;
for (j = 0; j < BERRY_NAME_COUNT - 1; j++)
gEnigmaBerries[battlerId].name[j] = src->name[j];
@@ -965,8 +965,8 @@ static void CB2_HandleStartBattle(void)
if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00)
{
gLinkPlayers[0].lp_field_18 = 0;
gLinkPlayers[1].lp_field_18 = 1;
gLinkPlayers[0].id = 0;
gLinkPlayers[1].id = 1;
}
SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32);
@@ -1153,10 +1153,10 @@ static void CB2_HandleStartMultiPartnerBattle(void)
{
u8 language;
gLinkPlayers[0].lp_field_18 = 0;
gLinkPlayers[1].lp_field_18 = 2;
gLinkPlayers[2].lp_field_18 = 1;
gLinkPlayers[3].lp_field_18 = 3;
gLinkPlayers[0].id = 0;
gLinkPlayers[1].id = 2;
gLinkPlayers[2].id = 1;
gLinkPlayers[3].id = 3;
GetFrontierTrainerName(gLinkPlayers[2].name, gTrainerBattleOpponent_A);
GetFrontierTrainerName(gLinkPlayers[3].name, gTrainerBattleOpponent_B);
sub_8165B88(&language, gTrainerBattleOpponent_A);
@@ -1214,7 +1214,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
if ((GetBlockReceivedStatus() & 3) == 3)
{
ResetBlockReceivedFlags();
if (gLinkPlayers[playerMultiplayerId].lp_field_18 != 0)
if (gLinkPlayers[playerMultiplayerId].id != 0)
{
memcpy(gPlayerParty, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2);
memcpy(gPlayerParty + 3, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2);
@@ -1238,7 +1238,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
if ((GetBlockReceivedStatus() & 3) == 3)
{
ResetBlockReceivedFlags();
if (gLinkPlayers[playerMultiplayerId].lp_field_18 != 0)
if (gLinkPlayers[playerMultiplayerId].id != 0)
{
memcpy(gPlayerParty + 2, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon));
memcpy(gPlayerParty + 5, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon));
@@ -1429,8 +1429,8 @@ static void CB2_PreInitMultiBattle(void)
if (numPlayers == 4)
{
if ((!(gLinkPlayers[i].lp_field_18 & 1) && !(gLinkPlayers[playerMultiplierId].lp_field_18 & 1))
|| (gLinkPlayers[i].lp_field_18 & 1 && gLinkPlayers[playerMultiplierId].lp_field_18 & 1))
if ((!(gLinkPlayers[i].id & 1) && !(gLinkPlayers[playerMultiplierId].id & 1))
|| (gLinkPlayers[i].id & 1 && gLinkPlayers[playerMultiplierId].id & 1))
{
memcpy(gUnknown_02022FF8, gBlockRecvBuffer[i], sizeof(struct UnknownPokemonStruct4) * 3);
}
@@ -1590,7 +1590,7 @@ static void CB2_HandleStartMultiBattle(void)
for (id = 0; id < MAX_LINK_PLAYERS; id++)
{
sub_8185F90(gBlockRecvBuffer[id][1]);
switch (gLinkPlayers[id].lp_field_18)
switch (gLinkPlayers[id].id)
{
case 0:
gTasks[var].data[3] |= gBlockRecvBuffer[id][1] & 0x3F;
@@ -1627,7 +1627,7 @@ static void CB2_HandleStartMultiBattle(void)
{
if (id == playerMultiplayerId)
{
switch (gLinkPlayers[id].lp_field_18)
switch (gLinkPlayers[id].id)
{
case 0:
case 3:
@@ -1641,10 +1641,10 @@ static void CB2_HandleStartMultiBattle(void)
}
else
{
if ((!(gLinkPlayers[id].lp_field_18 & 1) && !(gLinkPlayers[playerMultiplayerId].lp_field_18 & 1))
|| ((gLinkPlayers[id].lp_field_18 & 1) && (gLinkPlayers[playerMultiplayerId].lp_field_18 & 1)))
if ((!(gLinkPlayers[id].id & 1) && !(gLinkPlayers[playerMultiplayerId].id & 1))
|| ((gLinkPlayers[id].id & 1) && (gLinkPlayers[playerMultiplayerId].id & 1)))
{
switch (gLinkPlayers[id].lp_field_18)
switch (gLinkPlayers[id].id)
{
case 0:
case 3:
@@ -1658,7 +1658,7 @@ static void CB2_HandleStartMultiBattle(void)
}
else
{
switch (gLinkPlayers[id].lp_field_18)
switch (gLinkPlayers[id].id)
{
case 0:
case 3:
@@ -1690,7 +1690,7 @@ static void CB2_HandleStartMultiBattle(void)
{
if (id == playerMultiplayerId)
{
switch (gLinkPlayers[id].lp_field_18)
switch (gLinkPlayers[id].id)
{
case 0:
case 3:
@@ -1704,10 +1704,10 @@ static void CB2_HandleStartMultiBattle(void)
}
else
{
if ((!(gLinkPlayers[id].lp_field_18 & 1) && !(gLinkPlayers[playerMultiplayerId].lp_field_18 & 1))
|| ((gLinkPlayers[id].lp_field_18 & 1) && (gLinkPlayers[playerMultiplayerId].lp_field_18 & 1)))
if ((!(gLinkPlayers[id].id & 1) && !(gLinkPlayers[playerMultiplayerId].id & 1))
|| ((gLinkPlayers[id].id & 1) && (gLinkPlayers[playerMultiplayerId].id & 1)))
{
switch (gLinkPlayers[id].lp_field_18)
switch (gLinkPlayers[id].id)
{
case 0:
case 3:
@@ -1721,7 +1721,7 @@ static void CB2_HandleStartMultiBattle(void)
}
else
{
switch (gLinkPlayers[id].lp_field_18)
switch (gLinkPlayers[id].id)
{
case 0:
case 3:
@@ -2095,7 +2095,7 @@ static void sub_8038B94(u8 taskId)
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
{
switch (gLinkPlayers[r2].lp_field_18)
switch (gLinkPlayers[r2].id)
{
case 0:
case 2:

View File

@@ -2383,25 +2383,25 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
toCpy = text;
break;
case B_TXT_LINK_PLAYER_MON1_NAME: // link first player poke name
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].lp_field_18]],
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id]],
MON_DATA_NICKNAME, text);
StringGetEnd10(text);
toCpy = text;
break;
case B_TXT_LINK_OPPONENT_MON1_NAME: // link first opponent poke name
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].lp_field_18 ^ 1]],
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id ^ 1]],
MON_DATA_NICKNAME, text);
StringGetEnd10(text);
toCpy = text;
break;
case B_TXT_LINK_PLAYER_MON2_NAME: // link second player poke name
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].lp_field_18 ^ 2]],
GetMonData(&gPlayerParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id ^ 2]],
MON_DATA_NICKNAME, text);
StringGetEnd10(text);
toCpy = text;
break;
case B_TXT_LINK_OPPONENT_MON2_NAME: // link second opponent poke name
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].lp_field_18 ^ 3]],
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gLinkPlayers[multiplayerID].id ^ 3]],
MON_DATA_NICKNAME, text);
StringGetEnd10(text);
toCpy = text;
@@ -2467,7 +2467,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
}
else
{
if (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18 == gPotentialItemEffectBattler)
if (gLinkPlayers[gBattleScripting.multiplayerId].id == gPotentialItemEffectBattler)
{
StringCopy(text, gEnigmaBerries[gPotentialItemEffectBattler].name);
StringAppend(text, sText_BerrySuffix);
@@ -2562,13 +2562,13 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
toCpy = gLinkPlayers[multiplayerID].name;
break;
case B_TXT_1F: // link partner name?
toCpy = gLinkPlayers[GetBattlerMultiplayerId(2 ^ gLinkPlayers[multiplayerID].lp_field_18)].name;
toCpy = gLinkPlayers[GetBattlerMultiplayerId(2 ^ gLinkPlayers[multiplayerID].id)].name;
break;
case B_TXT_20: // link opponent 1 name?
toCpy = gLinkPlayers[GetBattlerMultiplayerId(1 ^ gLinkPlayers[multiplayerID].lp_field_18)].name;
toCpy = gLinkPlayers[GetBattlerMultiplayerId(1 ^ gLinkPlayers[multiplayerID].id)].name;
break;
case B_TXT_21: // link opponent 2 name?
toCpy = gLinkPlayers[GetBattlerMultiplayerId(3 ^ gLinkPlayers[multiplayerID].lp_field_18)].name;
toCpy = gLinkPlayers[GetBattlerMultiplayerId(3 ^ gLinkPlayers[multiplayerID].id)].name;
break;
case B_TXT_22: // link scripting active name
toCpy = gLinkPlayers[GetBattlerMultiplayerId(gBattleScripting.battler)].name;
@@ -2832,7 +2832,7 @@ static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst)
{
if (hword == ITEM_ENIGMA_BERRY)
{
if (gLinkPlayers[gBattleScripting.multiplayerId].lp_field_18 == gPotentialItemEffectBattler)
if (gLinkPlayers[gBattleScripting.multiplayerId].id == gPotentialItemEffectBattler)
{
StringCopy(dst, gEnigmaBerries[gPotentialItemEffectBattler].name);
StringAppend(dst, sText_BerrySuffix);

View File

@@ -304,7 +304,7 @@ void LinkTestScreen(void)
void sub_8009628(u8 a0)
{
gLocalLinkPlayer.lp_field_18 = a0;
gLocalLinkPlayer.id = a0;
}
static void InitLocalLinkPlayer(void)

View File

@@ -2126,7 +2126,7 @@ void sub_800DD94(struct UnkLinkRfuStruct_02022B14 *data, u8 r9, bool32 r2, int r
for (i = 0; i < 2; i++)
{
data->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
data->unk_00.playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
}
for (i = 0; i < 4; i++)
{
@@ -2136,14 +2136,14 @@ void sub_800DD94(struct UnkLinkRfuStruct_02022B14 *data, u8 r9, bool32 r2, int r
data->playerGender = gSaveBlock2Ptr->playerGender;
data->unk_0a_0 = r9;
data->unk_0a_7 = r2;
data->unk_00_0 = 2;
data->unk_01_2 = 3;
data->unk_00_4 = 0;
data->unk_00_5 = 0;
data->unk_00_6 = 0;
data->unk_00_7 = FlagGet(FLAG_0x87F);
data->unk_01_0 = IsNationalPokedexEnabled();
data->unk_01_1 = FlagGet(FLAG_SYS_GAME_CLEAR);
data->unk_00.unk_00_0 = 2;
data->unk_00.unk_01_2 = 3;
data->unk_00.unk_00_4 = 0;
data->unk_00.unk_00_5 = 0;
data->unk_00.unk_00_6 = 0;
data->unk_00.unk_00_7 = FlagGet(FLAG_0x87F);
data->unk_00.unk_01_0 = IsNationalPokedexEnabled();
data->unk_00.unk_01_1 = FlagGet(FLAG_SYS_GAME_CLEAR);
}
bool8 sub_800DE7C(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx)
@@ -2155,12 +2155,12 @@ bool8 sub_800DE7C(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx)
retVal = TRUE;
if (sub_8010454(gUnknown_03007890->unk_14[idx].unk_04) && ((gUnknown_03007890->unk_07 >> idx) & 1))
{
memcpy(buff1, &gUnknown_03007890->unk_14[idx].unk_06, sizeof(gUnknown_03007890->unk_14[idx].unk_06));
memcpy(buff1, &gUnknown_03007890->unk_14[idx].unk_06, 0xD);
memcpy(buff2, gUnknown_03007890->unk_14[idx].unk_15, sizeof(gUnknown_03007890->unk_14[idx].unk_15));
}
else
{
memset(buff1, 0, sizeof(gUnknown_03007890->unk_14[idx].unk_06));
memset(buff1, 0, 0xD);
memset(buff2, 0, sizeof(gUnknown_03007890->unk_14[idx].unk_15));
}
}
@@ -2169,12 +2169,12 @@ bool8 sub_800DE7C(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx)
retVal = FALSE;
if (sub_8010454(gUnknown_03007890->unk_14[idx].unk_04))
{
memcpy(buff1, &gUnknown_03007890->unk_14[idx].unk_06, sizeof(gUnknown_03007890->unk_14[idx].unk_06));
memcpy(buff1, &gUnknown_03007890->unk_14[idx].unk_06, 0xD);
memcpy(buff2, gUnknown_03007890->unk_14[idx].unk_15, sizeof(gUnknown_03007890->unk_14[idx].unk_15));
}
else
{
memset(buff1, 0, sizeof(gUnknown_03007890->unk_14[idx].unk_06));
memset(buff1, 0, 0xD);
memset(buff2, 0, sizeof(gUnknown_03007890->unk_14[idx].unk_15));
}
}
@@ -2850,7 +2850,7 @@ void sub_800EF38(void)
gUnknown_03005000.unk_ce7 = gUnknown_03004140.unk_00;
}
bool8 sub_800EF58(bool32 a0)
bool32 sub_800EF58(bool32 a0)
{
if (gUnknown_03005000.unk_04 == 17 || a0)
{
@@ -4104,7 +4104,7 @@ bool8 sub_8010540(void)
return retval;
}
bool8 sub_80105EC(void)
bool32 sub_80105EC(void)
{
u8 flags = 0;
int i;
@@ -4129,7 +4129,7 @@ bool8 sub_80105EC(void)
return FALSE;
}
bool8 sub_801064C(u16 a0, const u8 *a1)
bool32 sub_801064C(u16 a0, const u8 *a1)
{
u8 r1 = sub_8011CE4(a1, a0);
if (r1 == 0xFF)
@@ -4154,14 +4154,14 @@ void sub_80106D4(void)
rfu_NI_setSendData(1 << gUnknown_03005000.unk_c3e, 8, &gUnknown_03005000.unk_c85, 1);
}
u8 sub_8010714(u16 a0, const u8 *a1)
u32 sub_8010714(u16 a0, const u8 *a1)
{
u8 r0 = sub_8011CE4(a1, a0);
if (r0 == 0xff)
return 2;
if (gUnknown_03007880[r0]->unk_0 == 0)
return TRUE;
return FALSE;
return 1;
return 0;
}
void sub_8010750(void)
@@ -4512,14 +4512,14 @@ void sub_8010F84(u8 a0, u32 a1, u32 a2)
void sub_8010FA0(bool32 a0, bool32 a1)
{
gUnknown_02022B14.unk_00_4 = a0;
gUnknown_02022B14.unk_00_5 = a1;
gUnknown_02022B14.unk_00.unk_00_4 = a0;
gUnknown_02022B14.unk_00.unk_00_5 = a1;
}
void sub_8010FCC(u32 a0, u32 a1, u32 a2)
{
gUnknown_02022B14.unk_09_2 = a0;
gUnknown_02022B14.unk_08_0 = a1;
gUnknown_02022B14.type = a0;
gUnknown_02022B14.species = a1;
gUnknown_02022B14.unk_0b_1 = a2;
}

View File

@@ -38,7 +38,7 @@ EWRAM_DATA struct PokemonStorage gPokemonStorage = {0};
EWRAM_DATA u8 gSaveblock3_DMA[SAVEBLOCK_MOVE_RANGE] = {0};
EWRAM_DATA struct LoadedSaveData gLoadedSaveData = {0};
EWRAM_DATA u32 gLastEncryptionKey = {0};
EWRAM_DATA u32 gLastEncryptionKey = 0;
// IWRAM common
IWRAM_DATA bool32 gFlashMemoryPresent;

View File

@@ -1752,7 +1752,7 @@ bool8 sub_80688F8(u8 caseId, u8 battlerId)
return FALSE;
if (!gMain.inBattle)
return FALSE;
if (gLinkPlayers[GetMultiplayerId()].lp_field_18 == battlerId)
if (gLinkPlayers[GetMultiplayerId()].id == battlerId)
return FALSE;
break;
case 2:
@@ -1774,7 +1774,7 @@ bool8 sub_80688F8(u8 caseId, u8 battlerId)
return FALSE;
if (gBattleTypeFlags & BATTLE_TYPE_MULTI)
{
if (gLinkPlayers[GetMultiplayerId()].lp_field_18 == battlerId)
if (gLinkPlayers[GetMultiplayerId()].id == battlerId)
return FALSE;
}
else
@@ -4806,7 +4806,7 @@ void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies)
bool8 sub_806D7EC(void)
{
bool8 retVal = FALSE;
switch (gLinkPlayers[GetMultiplayerId()].lp_field_18)
switch (gLinkPlayers[GetMultiplayerId()].id)
{
case 0:
case 3:
@@ -4823,7 +4823,7 @@ bool8 sub_806D7EC(void)
u16 GetLinkTrainerFlankId(u8 linkPlayerId)
{
u16 flankId = 0;
switch (gLinkPlayers[linkPlayerId].lp_field_18)
switch (gLinkPlayers[linkPlayerId].id)
{
case 0:
case 3:
@@ -4841,7 +4841,7 @@ s32 GetBattlerMultiplayerId(u16 a1)
{
s32 id;
for (id = 0; id < MAX_LINK_PLAYERS; id++)
if (gLinkPlayers[id].lp_field_18 == a1)
if (gLinkPlayers[id].id == a1)
break;
return id;
}
@@ -5694,7 +5694,7 @@ const u8 *GetTrainerPartnerName(void)
else
{
u8 id = GetMultiplayerId();
return gLinkPlayers[GetBattlerMultiplayerId(gLinkPlayers[id].lp_field_18 ^ 2)].name;
return gLinkPlayers[GetBattlerMultiplayerId(gLinkPlayers[id].id ^ 2)].name;
}
}
@@ -5824,7 +5824,7 @@ u8 sub_806EF08(u8 arg0)
s32 i;
s32 var = 0;
u8 multiplayerId = GetMultiplayerId();
switch (gLinkPlayers[multiplayerId].lp_field_18)
switch (gLinkPlayers[multiplayerId].id)
{
case 0:
case 2:
@@ -5837,7 +5837,7 @@ u8 sub_806EF08(u8 arg0)
}
for (i = 0; i < 4; i++)
{
if (gLinkPlayers[i].lp_field_18 == (s16)(var))
if (gLinkPlayers[i].id == (s16)(var))
break;
}
return i;
@@ -5847,7 +5847,7 @@ u8 sub_806EF84(u8 arg0, u8 arg1)
{
s32 i;
s32 var = 0;
switch (gLinkPlayers[arg1].lp_field_18)
switch (gLinkPlayers[arg1].id)
{
case 0:
case 2:
@@ -5860,7 +5860,7 @@ u8 sub_806EF84(u8 arg0, u8 arg1)
}
for (i = 0; i < 4; i++)
{
if (gLinkPlayers[i].lp_field_18 == (s16)(var))
if (gLinkPlayers[i].id == (s16)(var))
break;
}
return i;

View File

@@ -159,7 +159,7 @@ void sub_8184E58(void)
{
sPlayers[i].trainerId = gLinkPlayers[i].trainerId;
sPlayers[i].gender = gLinkPlayers[i].gender;
sPlayers[i].battlerId = gLinkPlayers[i].lp_field_18;
sPlayers[i].battlerId = gLinkPlayers[i].id;
sPlayers[i].language = gLinkPlayers[i].language;
if (i < linkPlayersCount)
@@ -1340,7 +1340,7 @@ static void SetRecordedBattleVarsFromSave(struct RecordedBattleSave *src)
}
gLinkPlayers[i].gender = src->playersGender[i];
gLinkPlayers[i].language = src->playersLanguage[i];
gLinkPlayers[i].lp_field_18 = src->playersBattlers[i];
gLinkPlayers[i].id = src->playersBattlers[i];
gLinkPlayers[i].trainerId = src->playersTrainerId[i];
if (var)
@@ -1453,7 +1453,7 @@ u8 GetActiveBattlerLinkPlayerGender(void)
for (i = 0; i < MAX_LINK_PLAYERS; i++)
{
if (gLinkPlayers[i].lp_field_18 == gActiveBattler)
if (gLinkPlayers[i].id == gActiveBattler)
break;
}

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,6 @@ extern const u8 gText_Peekaboo[];
extern u8 *GetWaldaPhrasePtr(void);
extern bool32 IsWaldaPhraseEmpty(void);
extern void sub_80AF168(void);
extern void CB2_ReturnToField(void);
extern void SetWaldaPhrase(const u8 *src);
extern void SetWaldaWallpaperPatternId(u8 patternId);
extern void SetWaldaWallpaperIconId(u8 iconId);