Coding Questions and other Quandaries
Your second code with tweaked address values.
Works fine with 1 player, but in two player game pressing (-) on controller 1 changes both characters simultaneously.

loc_0x0:
lbz r4, 7(r31)
subi r10, r4, 0x1
li r12, 0x4
mtctr r12
lis r12, 0x803A
ori r12, r12, 0x1ACA
addi r10, r10, 0x1
cmpw cr7, r10, r4
lhzu r11, 0(r12)
cmpwi cr6, r11, 0x1000
crand 30, 26, 30
beq- cr7, loc_0x38

loc_0x30:
bdnz+ loc_0x30
b loc_0x50

loc_0x38:
mr r4, r0
addi r4, r4, 0x1
cmplwi r4, 7
ble- loc_0x4C
li r4, 0x0

loc_0x4C:
stw r4, 5344(r31)

loc_0x50:
lwz r4, 5344(r31)
Reply


Messages In This Thread
RE: Coding Questions and other Quandaries - by Hackwiz - 05-08-2022, 11:45 PM

Forum Jump:


Users browsing this thread: 34 Guest(s)