Today, 03:35 AM
(Today, 01:45 AM)matfawcett Wrote: Mate this is absolutely spot on!! Golden doesn't matter, but bullet bill isn't working. Also can the items mapped to the plus sign and home buttons be remapped to C and Z if possible, they work but obviously bring up Wii menus when pushed.
I didn't edit the buttons, I'll let you edit the code since I'm not entirely sure what buttons you want. To edit the buttons and items, either edit the source or compiled code, you'll see that the table is XXXXYYYY, where XXXX is the button and YYYY is the item for that button, example, 04040008 = B and Down for Lightning
C278ED0C 0000001C
A01D000C 819D0000
818C0004 818C0014
718C0002 418200C4
3D80809C 818C8F70
818C0028 2C0C0002
408200B0 48000039
4004000A 40080006
80000003 0010000D
00010009 00020001
0004000B 0008000F
04010002 04040008
04080007 1000000C
00000000 7D8802A6
3D608034 A16B1462
A14C0000 2C0A0000
41820058 A08C0002
7D435839 7C0A5800
4182000C 398C0004
4BFFFFD8 899D00B2
2C0C0000 4082003C
7C9E2378 387D0088
38A00000 3D80807A
618CDEE0 7D8903A6
4E800421 2C1E000A
41820008 38002000
39800001 48000008
39800000 999D00B2
60000000 00000000
Code:
8078ED0C
isMaster:
lhz r0, 0xC (r29)
lwz r12, 0 (r29)
lwz r12, 4 (r12)
lwz r12, 0x14 (r12)
andi. r12, r12, 2
beq end
isRaceState:
lis r12, -0x7F64
lwz r12, -0x7090 (r12)
lwz r12, 0x28 (r12)
cmpwi r12, 2
bne end
bl table
.long 0x4004000A
.long 0x40080006
.long 0x80000003
.long 0x0010000D
.long 0x00010009
.long 0x00020001
.long 0x0004000B
.long 0x0008000F
.long 0x04010002
.long 0x04040008
.long 0x04080007
.long 0x1000000C
.long 0
table:
mflr r12
loop:
lis r11, 0x8034
lhz r11, 0x1462 (r11)
lhz r10, 0 (r12)
cmpwi r10, 0
beq setNotPressed
wasItemButtonPressed:
lhz r4, 2 (r12)
and. r3, r10, r11
cmpw r10, r11
beq isPressed
addi r12, r12, 4
b loop
isPressed:
lbz r12, 0xB2 (r29)
cmpwi r12, 0
bne end
callItem:
mr r30, r4
addi r3, r29, 0x88
li r5, 0
lis r12, 0x807A
ori r12, r12, 0xDEE0
mtctr r12
bctrl
isGolden:
cmpwi r30, 0xA
beq setPressed
forceUseItem:
li r0, 0x2000
setPressed:
li r12, 1
b storePressState
setNotPressed:
li r12, 0
storePressState:
stb r12, 0xB2 (r29)
end: