• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Completed Stock Dependent Revival Platform Colors

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Stock Dependent Revival Platform Colors (1.02) [Achilles]
Code:
C20D5008 0000001E
7C7E1B78 3FE08016
63FFB094 7FE803A6
4E800021 2C030001
408200D0 3C60801A
60634340 7C6803A6
3C608047 60639D30
88630000 4E800021
2C030001 418200AC
7FC3F378 3E608045
626FBF12 8A0F0002
2C100004 40820094
3E00804D 821064FC
626F310E 8BE3006C
1DDF0E90 7DEE78AE
2C0F0001 41820050
2C0F0003 41820020
2C0F0002 4182002C
3E20BAB0 6231FFFF
3E408000 625280FF
4800003C 3E2000FF
623100FF 3E400059
625200FF 48000028
3E20FF99 623100FF
3E409F5F 625200FF
48000014 3E20FF00
623100FF 3E409000
625200FF 92300AC4
92500AF0 92300B90
92300CE0 92300D18
7FC3F378 00000000
4 stocks left (via a minigame or something...) = purple
3 stocks left = green
2 stocks left = orange
1 stock left = red

stock.PNG


Code:
ASM
----------
inject @ 800d5008 - mr r30,r3
- in the Rebirth function

#default code line
mr r30,r3
# load stock match check function
lis r31,0x8016
ori r31,r31,0xb094
mtlr r31
blrl
cmpwi r3,1
#branch to end if not in a stock match
bne- END
# load single player check function
lis r3,0x801a
ori r3,r3,0x4340
mtlr r3
# load menu controller major as function input
lis r3,0x8047
ori r3,r3,0x9d30
lbz r3,0(r3)
blrl
cmpwi r3,1
# branch to end if in single player mode
beq- END
mr r3,r30
lis r19,0x8045
ori r15,r19,0xBF12
lbz r16,2(r15)
cmpwi r16,4
# branch to end if not a 4 stock match
bne- END
# load PlCo.dat pointer
lis r16,0x804D
lwz r16,0x64FC(r16)
ori r15,r19,0x310E
# load port number for this player
lbz r31,0x6c(r3)
# player blocks are 0xe90 apart
mulli r14,r31,0xE90
# load stocks from player block
lbzx r15,r14,r15
cmpwi r15,1
beq- RED
cmpwi r15,3
beq- GREEN
cmpwi r15,2
beq- ORANGE
PURPLE:
lis r17,0xBAB0
ori r17,r17,0xFFFF     # BAB0FF = Lighter Purple
lis r18,0x8000
ori r18,r18,0x80FF     # 800080 = Dark Purple
b STORE_COLORS
GREEN:
lis r17,0x00FF
ori r17,r17,0x00FF     # 00FF00 = Green
lis r18,0x0059
ori r18,r18,0x00FF     # 005900 = Dark Green
b STORE_COLORS
ORANGE:
lis r17,0xFF99
ori r17,r17,0x00FF     # FF9900 = Orange
lis r18,0x9f5f
ori r18,r18,0x00FF    # 9F5F00 = Dark Orange
b STORE_COLORS
RED:
lis r17,0xFF00
ori r17,r17,0x00FF     # FF0000 = Red
lis r18,0x9000
ori r18,r18,0x00FF    # 900000 = Dark Red
STORE_COLORS:
stw r17,0xAC4(r16)
stw r18,0xAF0(r16)
stw r17,0xB90(r16)
stw r17,0xCE0(r16)
stw r17,0xD18(r16)
END:
mr r3,r30

The code only takes effect in a multiplayer, 4-stock match.

Let me know if there are any issues.

EDIT: 12/3/15 code updated to make it easier for users to change colors if desired.
 
Last edited:

Aerros11

Smash Journeyman
Joined
Sep 5, 2009
Messages
284
Thank you so much for making this, Achilles1515 Achilles1515 !!!
^ ^

The small things sure can be a big deal and it makes such a nice pairing with the HUD disabled~



 
Last edited:
Top Bottom