Check this out: https://github.com/SeekyCt/mkw-structure...yer.h#L235
Although this is a single bit, so you're gonna have to clear all the other ones to check. Here's a sample ASM (feel free to change the registers)
Although this is a single bit, so you're gonna have to clear all the other ones to check. Here's a sample ASM (feel free to change the registers)
Code:
# NTSC-U Addresses
.set PlayerHolder, 0x809BD110
.set Racedata, 0x809B8F68
# Change this to whatever Exception Vector address you want
.set IsPlayerOnGround, 0x80001500
# Check gamemode == TT
lis r3, Racedata@ha
lwz r3, Racedata@l(r3)
lwz r3, 0xB70(r3)
cmpwi r3, 2
bne+ end
# Get PlayerHolder->players->player[0]->playerSub1c->bitfield0
lis r3, PlayerHolder@ha
lwz r3, PlayerHolder@l(r3)
lwz r3, 0x20(r3)
lwz r3, 0(r3)
lwz r3, 0x20(r3)
lwz r3, 0x4(r3)
# Get bit
rlwinm r3, r3, 14, 31, 31
# Store it
lis r4, IsPlayerOnGround@ha
stb r3, IsPlayerOnGround@l(r4)
# Return
end: