Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INJECT @ 8069b894 <-- TESTED CONFIRMED WORKING IN BRAWL
- ----
- #check if name is a repeat
- cmpwi r19, 0
- blt- rejectname
- #prevent race condition other person entered name first
- #pretend name is a repeat
- lis r8, 0x8000
- ori r8,r8,0x2800
- lwz r8, 0(r8)
- cmpwi r8, 0
- beq setflag
- #set name index to FFFFFFFF so it will reject it
- lis r19, 0xFFFF
- ori r19,r19, 0xFFFF
- #branch to reject name
- rejectname:
- lis r7, 0x8069
- ori r7,r7,0xB9C4
- mtctr r7
- bctr
- #meets conditionals
- setflag:
- li r7, 0x1
- lis r8, 0x8000
- ori r8,r8,0x2800
- stw r7, 0(r8)
- #set index of new name, store at offset 0x4(r8)
- stw r19, 4(r8)
- ----
- leave game if leave flag is set
- ---- VERIFIED WORKING +++++++++
- inject @ 8068d7c0
- lis r8, 0x8000
- ori r8,r8,0x2800
- lwz r8, 0(r8)
- cmpwi r8,0
- beq replacedline
- #New name was entered, lets go to controls page
- #set up necessary register values
- li r0, 0xc
- li r3, 0x4
- li r6, 0x4
- li r29, 0x4
- li r30, 0x55
- li r31, 0x3
- #branch to leave vs. menu line and dont link
- lis r16, 0x8068
- ori r16,r16,0xd7f4
- mtctr r16
- bctr
- replacedline:
- cmpw r0, r30
- ----
- if changing scene and leave flag is set, setNextSequence change r4 to custom controls page
- ----
- inject @ 8002d654
- #check if leave flag was on, that means we want to go to controls page
- lis r8, 0x8000
- ori r8,r8,0x2800
- lwz r8, 0(r8)
- cmpwi r8,0
- beq replacedline
- cmpwi r8,1
- beq tocontrols
- cmpwi r8,2
- beq backtoversus
- #code to run if we are going to controls page
- #replace r4 with the controls sequence
- tocontrols:
- lis r4, 0x8070
- ori r4,r4, 0x18ec
- #set flag to state 2, meaning when we leave controls we want to go back to vs.
- li r7, 0x2
- lis r8, 0x8000
- ori r8,r8,0x2800
- stw r7, 0(r8)
- b replacedline
- backtoversus:
- #replace r4 with the vs. menu sequence
- lis r4, 0x8070
- ori r4,r4, 0x17e0
- #set flag to state 2, meaning when we leave controls we want to go back to vs.
- li r7, 0x0
- lis r8, 0x8000
- ori r8,r8,0x2800
- stw r7, 0(r8)
- #replace line that we overwrote for the hook
- replacedline:
- mr r26, r3
- ----
- setNext/[sqButton] will go to correct name from vs. screen
- ---
- inject @ 806f8430
- #we could probably do without this code if we write to the place it reads from in the first place
- #check if flag has been set
- lis r8, 0x8000
- ori r8,r8,0x2800
- lwz r20, 0(r8)
- cmpwi r20,0
- beq replacedline
- #get the table index from our stored var
- lwz r20, 4(r8)
- b end
- replacedline:
- #we get the variable from the normal place
- lbz r20, 0x0028(r17)
- end:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement