Random Character+Vehicle Combo For Every Race -Online- [Vega]
#2
Maybe, since you use the cmpwi / beq- pattern a lot in the weight class checks, you could implement a loop w/ BL trick to shorten the code. What I mean is something like:

lightweight:
li r9, 0
bl check
.llong 0x01040506080C0D0E

middleweight:
li r9, 0x1
bl check
.llong 0x00070A0F10111214

check:
mflr rA
subi rA, rA, 0x1
li rC, 0x8

loop:
lbzu rB, 0x1 (rA)
cmpw r11, rB
beq- add_values
subic. rC, rC, 0x1
bne loop

cmpwi r9, 0x1
bne middleweight
li r9, 0x2

where rA, rB, rC are free registers. Just my two cents. Kinda cool you implemented region checks into the code itself.
Reply


Messages In This Thread
RE: Random Character+Vehicle Combo For Every Race -Online- [Vega] - by salmon01 - 01-03-2020, 11:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)