Skip to content

Commit

Permalink
contest rank var
Browse files Browse the repository at this point in the history
  • Loading branch information
YamaArashi committed Nov 5, 2016
1 parent ee9a346 commit 279394c
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 49 deletions.
4 changes: 2 additions & 2 deletions asm/contest.s
Original file line number Diff line number Diff line change
Expand Up @@ -6234,7 +6234,7 @@ _080AE4F2:
movs r0, 0
b _080AE50A
_080AE4F6:
ldr r0, _080AE510 @ =gSpecialVar_0x8010
ldr r0, _080AE510 @ =gScriptContestRank
adds r2, r1, 0
ldrh r1, [r0]
movs r0, 0x2
Expand All @@ -6249,7 +6249,7 @@ _080AE50A:
pop {r1}
bx r1
.align 2, 0
_080AE510: .4byte gSpecialVar_0x8010
_080AE510: .4byte gScriptContestRank
thumb_func_end sub_80AE47C

thumb_func_start sub_80AE514
Expand Down
36 changes: 18 additions & 18 deletions asm/contest_link_80C2020.s
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,7 @@ sub_80C2E14: @ 80C2E14
bl sub_80BE284
movs r0, 0x2
bl sub_810FB10
ldr r0, _080C2E88 @ =gSpecialVar_0x8010
ldr r0, _080C2E88 @ =gScriptContestRank
ldrb r0, [r0]
bl sub_80B2A7C
movs r0, 0xFE
Expand Down Expand Up @@ -1751,7 +1751,7 @@ sub_80C2E14: @ 80C2E14
.align 2, 0
_080C2E80: .4byte gUnknown_02038690
_080C2E84: .4byte gUnknown_02038695
_080C2E88: .4byte gSpecialVar_0x8010
_080C2E88: .4byte gScriptContestRank
_080C2E8C: .4byte 0x02000000
_080C2E90: .4byte 0x00015ddf
_080C2E94: .4byte 0x00015dde
Expand Down Expand Up @@ -2972,7 +2972,7 @@ _080C3808: .4byte gUnknown_0203869A
_080C380C: .4byte 0x0600e000
_080C3810: .4byte gUnknown_08E964B8
_080C3814:
ldr r0, _080C3830 @ =gSpecialVar_0x8010
ldr r0, _080C3830 @ =gScriptContestRank
ldrh r2, [r0]
cmp r2, 0
bne _080C383C
Expand All @@ -2987,7 +2987,7 @@ _080C3814:
str r1, [sp, 0xC]
b _080C3870
.align 2, 0
_080C3830: .4byte gSpecialVar_0x8010
_080C3830: .4byte gScriptContestRank
_080C3834: .4byte 0x0600e000
_080C3838: .4byte gUnknown_08E964B8
_080C383C:
Expand Down Expand Up @@ -4548,7 +4548,7 @@ sub_80C43F4: @ 80C43F4
beq _080C4422
ldr r4, _080C4434 @ =gScriptContestCategory
ldrb r0, [r4]
ldr r1, _080C4438 @ =gSpecialVar_0x8010
ldr r1, _080C4438 @ =gScriptContestRank
ldrb r1, [r1]
bl sub_80AE398
ldrb r0, [r4]
Expand All @@ -4563,7 +4563,7 @@ _080C4422:
_080C442C: .4byte gUnknown_02038694
_080C4430: .4byte gPlayerParty
_080C4434: .4byte gScriptContestCategory
_080C4438: .4byte gSpecialVar_0x8010
_080C4438: .4byte gScriptContestRank
_080C443C: .4byte gScriptResult
thumb_func_end sub_80C43F4

Expand Down Expand Up @@ -4619,7 +4619,7 @@ _080C44A0:
movs r1, 0x36
_080C44A4:
bl GetMonData
ldr r1, _080C44BC @ =gSpecialVar_0x8010
ldr r1, _080C44BC @ =gScriptContestRank
ldrh r1, [r1]
cmp r0, r1
bls _080C44B2
Expand All @@ -4630,7 +4630,7 @@ _080C44B2:
pop {r1}
bx r1
.align 2, 0
_080C44BC: .4byte gSpecialVar_0x8010
_080C44BC: .4byte gScriptContestRank
thumb_func_end sub_80C4440

thumb_func_start sub_80C44C0
Expand Down Expand Up @@ -4682,7 +4682,7 @@ _080C450C:
lsrs r1, r0, 24
mov r0, sp
strb r1, [r0]
ldr r0, _080C4550 @ =gSpecialVar_0x8010
ldr r0, _080C4550 @ =gScriptContestRank
ldrh r0, [r0]
cmp r1, r0
bls _080C4530
Expand All @@ -4704,7 +4704,7 @@ _080C4538:
.align 2, 0
_080C4548: .4byte gUnknown_02038694
_080C454C: .4byte gPlayerParty
_080C4550: .4byte gSpecialVar_0x8010
_080C4550: .4byte gScriptContestRank
_080C4554:
mov r4, sp
ldr r7, _080C458C @ =gUnknown_02038694
Expand All @@ -4718,7 +4718,7 @@ _080C4554:
strb r0, [r4]
mov r0, sp
ldrb r2, [r0]
ldr r0, _080C4594 @ =gSpecialVar_0x8010
ldr r0, _080C4594 @ =gScriptContestRank
ldrh r0, [r0]
cmp r2, r0
bhi _080C465E
Expand All @@ -4735,7 +4735,7 @@ _080C4554:
.align 2, 0
_080C458C: .4byte gUnknown_02038694
_080C4590: .4byte gPlayerParty
_080C4594: .4byte gSpecialVar_0x8010
_080C4594: .4byte gScriptContestRank
_080C4598:
mov r4, sp
ldr r7, _080C45D0 @ =gUnknown_02038694
Expand All @@ -4749,7 +4749,7 @@ _080C4598:
strb r0, [r4]
mov r0, sp
ldrb r2, [r0]
ldr r0, _080C45D8 @ =gSpecialVar_0x8010
ldr r0, _080C45D8 @ =gScriptContestRank
ldrh r0, [r0]
cmp r2, r0
bhi _080C465E
Expand All @@ -4766,7 +4766,7 @@ _080C4598:
.align 2, 0
_080C45D0: .4byte gUnknown_02038694
_080C45D4: .4byte gPlayerParty
_080C45D8: .4byte gSpecialVar_0x8010
_080C45D8: .4byte gScriptContestRank
_080C45DC:
mov r4, sp
ldr r7, _080C4618 @ =gUnknown_02038694
Expand All @@ -4780,7 +4780,7 @@ _080C45DC:
strb r0, [r4]
mov r0, sp
ldrb r2, [r0]
ldr r0, _080C4620 @ =gSpecialVar_0x8010
ldr r0, _080C4620 @ =gScriptContestRank
ldrh r0, [r0]
cmp r2, r0
bhi _080C465E
Expand All @@ -4800,7 +4800,7 @@ _080C4610:
.align 2, 0
_080C4618: .4byte gUnknown_02038694
_080C461C: .4byte gPlayerParty
_080C4620: .4byte gSpecialVar_0x8010
_080C4620: .4byte gScriptContestRank
_080C4624:
mov r4, sp
ldr r7, _080C4668 @ =gUnknown_02038694
Expand All @@ -4814,7 +4814,7 @@ _080C4624:
strb r0, [r4]
mov r0, sp
ldrb r2, [r0]
ldr r0, _080C4670 @ =gSpecialVar_0x8010
ldr r0, _080C4670 @ =gScriptContestRank
ldrh r0, [r0]
cmp r2, r0
bhi _080C465E
Expand All @@ -4837,7 +4837,7 @@ _080C465E:
.align 2, 0
_080C4668: .4byte gUnknown_02038694
_080C466C: .4byte gPlayerParty
_080C4670: .4byte gSpecialVar_0x8010
_080C4670: .4byte gScriptContestRank
thumb_func_end sub_80C44C0

thumb_func_start sub_80C4674
Expand Down
16 changes: 8 additions & 8 deletions asm/matuda_debug_menu.s
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ _080AA17A:
cmp r5, 0x5
bls _080AA17A
ldr r1, _080AA258 @ =gScriptContestCategory
ldr r4, _080AA25C @ =gSpecialVar_0x8010
ldr r4, _080AA25C @ =gScriptContestRank
movs r0, 0
strh r0, [r4]
strh r0, [r1]
Expand Down Expand Up @@ -900,7 +900,7 @@ _080AA24C: .4byte gUnknown_083C9276
_080AA250: .4byte gUnknown_083C9364
_080AA254: .4byte gMenuWindow
_080AA258: .4byte gScriptContestCategory
_080AA25C: .4byte gSpecialVar_0x8010
_080AA25C: .4byte gScriptContestRank
_080AA260: .4byte gUnknown_083C9337
_080AA264: .4byte gUnknown_083C933B
_080AA268: .4byte gUnknown_083C92B4
Expand Down Expand Up @@ -2178,7 +2178,7 @@ _080AAC1A:
strh r4, [r0]
lsls r4, 24
lsrs r4, 24
ldr r0, _080AAC58 @ =gSpecialVar_0x8010
ldr r0, _080AAC58 @ =gScriptContestRank
ldrb r1, [r0]
adds r0, r4, 0
bl sub_80AE398
Expand All @@ -2195,7 +2195,7 @@ _080AAC1A:
bx r0
.align 2, 0
_080AAC54: .4byte gScriptContestCategory
_080AAC58: .4byte gSpecialVar_0x8010
_080AAC58: .4byte gScriptContestRank
thumb_func_end sub_80AABF0

thumb_func_start sub_80AAC5C
Expand All @@ -2205,16 +2205,16 @@ sub_80AAC5C: @ 80AAC5C
lsls r1, 24
cmp r1, 0
ble _080AAC78
ldr r1, _080AAC74 @ =gSpecialVar_0x8010
ldr r1, _080AAC74 @ =gScriptContestRank
ldrh r0, [r1]
adds r0, 0x1
strh r0, [r1]
adds r4, r1, 0
b _080AAC86
.align 2, 0
_080AAC74: .4byte gSpecialVar_0x8010
_080AAC74: .4byte gScriptContestRank
_080AAC78:
ldr r0, _080AACBC @ =gSpecialVar_0x8010
ldr r0, _080AACBC @ =gScriptContestRank
ldrh r2, [r0]
adds r4, r0, 0
cmp r2, 0
Expand Down Expand Up @@ -2247,7 +2247,7 @@ _080AAC92:
pop {r0}
bx r0
.align 2, 0
_080AACBC: .4byte gSpecialVar_0x8010
_080AACBC: .4byte gScriptContestRank
_080AACC0: .4byte gScriptContestCategory
thumb_func_end sub_80AAC5C

Expand Down
8 changes: 4 additions & 4 deletions asm/script_pokemon_util_80C4BF0.s
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ sub_80C4CF8: @ 80C4CF8
ldrb r0, [r0]
cmp r0, 0
bne _080C4D40
ldr r0, _080C4D30 @ =gSpecialVar_0x8010
ldr r0, _080C4D30 @ =gScriptContestRank
ldrh r0, [r0]
cmp r0, 0x3
bne _080C4D40
Expand All @@ -185,7 +185,7 @@ sub_80C4CF8: @ 80C4CF8
.align 2, 0
_080C4D28: .4byte gUnknown_02038690
_080C4D2C: .4byte gUnknown_02038695
_080C4D30: .4byte gSpecialVar_0x8010
_080C4D30: .4byte gScriptContestRank
_080C4D34: .4byte gUnknown_02038678
_080C4D38: .4byte 0x0000031f
_080C4D3C: .4byte gSpecialVar_0x8004
Expand Down Expand Up @@ -540,7 +540,7 @@ GiveMonArtistRibbon: @ 80C4FBC
ldrb r0, [r0]
cmp r0, 0
bne _080C5038
ldr r0, _080C502C @ =gSpecialVar_0x8010
ldr r0, _080C502C @ =gScriptContestRank
ldrh r0, [r0]
cmp r0, 0x3
bne _080C5038
Expand Down Expand Up @@ -568,7 +568,7 @@ _080C501C: .4byte gUnknown_02038694
_080C5020: .4byte gPlayerParty
_080C5024: .4byte gUnknown_02038690
_080C5028: .4byte gUnknown_02038695
_080C502C: .4byte gSpecialVar_0x8010
_080C502C: .4byte gScriptContestRank
_080C5030: .4byte gUnknown_02038678
_080C5034: .4byte 0x0000031f
_080C5038:
Expand Down
4 changes: 2 additions & 2 deletions asm/tv.s
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,7 @@ sub_80BE284: @ 80BE284
negs r2, r2
ands r0, r2
orrs r0, r1
ldr r1, _080BE314 @ =gSpecialVar_0x8010
ldr r1, _080BE314 @ =gScriptContestRank
ldrb r1, [r1]
ands r3, r1
lsls r3, 3
Expand Down Expand Up @@ -1489,7 +1489,7 @@ _080BE304: .4byte gSaveBlock1 + 0x2A98
_080BE308: .4byte 0xfffffca0
_080BE30C: .4byte gUnknown_03005D38
_080BE310: .4byte gScriptContestCategory
_080BE314: .4byte gSpecialVar_0x8010
_080BE314: .4byte gScriptContestRank
_080BE318: .4byte gUnknown_02038694
_080BE31C: .4byte gPlayerParty
thumb_func_end sub_80BE284
Expand Down
4 changes: 2 additions & 2 deletions constants/variables.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
.equiv RESULT, 0x800D
.equiv ITEM_ID, 0x800E
.equiv LAST_TALKED, 0x800F

.equiv CONTEST_CATEGORY, 0x8011
.equiv CONTEST_RANK, 0x8010
.equiv CONTEST_CATEGORY, 0x8011
2 changes: 1 addition & 1 deletion data/event_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gSpecialVars::
.4byte gScriptResult
.4byte gScriptItemId
.4byte gScriptLastTalked
.4byte gSpecialVar_0x8010
.4byte gScriptContestRank
.4byte gScriptContestCategory

.include "data/specials.inc"
Expand Down
8 changes: 4 additions & 4 deletions data/scripts/contest_hall.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ FallarborTown_ContestLobby_EventScript_1A4EDD:: @ 81A4EDD
return

FallarborTown_ContestLobby_EventScript_1A4EE1:: @ 81A4EE1
compare 0x8010, 0
compare CONTEST_RANK, 0
jumpeq FallarborTown_ContestLobby_EventScript_1A4EF6
msgbox FallarborTown_ContestLobby_Text_1A6340, 4
releaseall
Expand Down Expand Up @@ -207,7 +207,7 @@ LinkContestRoom1_EventScript_1A514D:: @ 81A514D
return

LinkContestRoom1_EventScript_1A51A0:: @ 81A51A0
switch 0x8010
switch CONTEST_RANK
case 0, LinkContestRoom1_EventScript_1A51D2
case 1, LinkContestRoom1_EventScript_1A51D8
case 2, LinkContestRoom1_EventScript_1A51DE
Expand Down Expand Up @@ -1033,7 +1033,7 @@ LinkContestRoom1_EventScript_1A5C23:: @ 81A5C23
return

LinkContestRoom1_EventScript_1A5C32:: @ 81A5C32
compare 0x8010, 3
compare CONTEST_RANK, 3
jumpeq LinkContestRoom1_EventScript_1A5C41
setflag 2
return
Expand Down Expand Up @@ -1123,7 +1123,7 @@ LinkContestRoom1_EventScript_1A5CFC:: @ 81A5CFC
specialval RESULT, 88
compare RESULT, 0
jumpeq LinkContestRoom1_EventScript_1A5D5B
compare 0x8010, 3
compare CONTEST_RANK, 3
jumpeq LinkContestRoom1_EventScript_1A5D3B
msgbox LinkContestRoom1_Text_1A6DF1, 3
return
Expand Down
2 changes: 1 addition & 1 deletion data/scripts/maps/FallarborTown_ContestLobby.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FallarborTown_ContestLobby_MapScript1_1539C7:: @ 81539C7

FallarborTown_ContestLobby_EventScript_1539CD:: @ 81539CD
setvar 0x800b, 6
setvar 0x8010, 1
setvar CONTEST_RANK, 1
call FallarborTown_ContestLobby_EventScript_1A4E92
call FallarborTown_ContestLobby_EventScript_1539F8
special 83
Expand Down
8 changes: 4 additions & 4 deletions data/scripts/maps/LilycoveCity_ContestLobby.inc
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ LilycoveCity_ContestLobby_EventScript_158C35:: @ 8158C35

LilycoveCity_ContestLobby_EventScript_158C42:: @ 8158C42
msgbox LilycoveCity_ContestLobby_Text_188703, 4
setvar 0x8010, 0
setvar CONTEST_RANK, 0
choosecontestpkmn
compare 0x8004, 255
jumpeq LilycoveCity_ContestLobby_EventScript_158CEA
Expand Down Expand Up @@ -484,7 +484,7 @@ LilycoveCity_ContestLobby_EventScript_158DEE:: @ 8158DEE
setvar 0x4086, 1
special 86
setvar 0x4088, 5
setvar 0x8010, 3
setvar CONTEST_RANK, 3
call LilycoveCity_ContestLobby_EventScript_158F08
end

Expand Down Expand Up @@ -572,7 +572,7 @@ LilycoveCity_ContestLobby_EventScript_158EB0:: @ 8158EB0
compare RESULT, 1
jumpeq LilycoveCity_ContestLobby_EventScript_158EE8
setvar 0x800b, 8
setvar 0x8010, 3
setvar CONTEST_RANK, 3
call LilycoveCity_ContestLobby_EventScript_1A4E92
call LilycoveCity_ContestLobby_EventScript_158F86
special 83
Expand All @@ -587,7 +587,7 @@ LilycoveCity_ContestLobby_EventScript_158EE8:: @ 8158EE8
copyvar 0x4094, 0x1
additem ITEM_CONTEST_PASS, 1
setvar 0x800b, 8
setvar 0x8010, 3
setvar CONTEST_RANK, 3
setvar 0x4099, 1
setflag 2107
end
Expand Down
Loading

0 comments on commit 279394c

Please sign in to comment.