Skip to content

Instantly share code, notes, and snippets.

@sp1187 sp1187/kazewall.asm Secret
Created Mar 27, 2018

Embed
What would you like to do?
//original code by Kaze
//walls on no triangle grounded 80255b9c
//walls on invis wall grounded 80255c44
//251708 writes new values for speed and rotation
//8026b5f4
//80256b24 returns 2 for invis walls and 0 if its fine?
//802560ac stores 2 on sü+0x18 which gets returned above, modfy this?
//8025634c decides that v0 is dead
//80380e8c seems to move mario, somehow resets his pos if hes above a ceiling
//802563d8 actually moves mario
//80256278 needs to be changed to branch if its a false alarm
.headersize 0x80245000
//(make ceilings push mario outwards)
.org 0x802562a0
jal second //adds RA by AC if no ceiling available
nop
lw t0, 0x0050 (sp)
mtc1 r0, f18
lwc1 f16, 0x004c (t0)
c.le.s f18, f16
nop
bc1f 0x80256308
nop
swc1 f18, 0x004c (t0)
.org 0x8029bf64
second:
lui t0, 0x8034
lw t1, 0xb1d4 (t0)
beq t1, r0, @@yes
nop
lh t2, 0x0008 (t1)
sll t2, t2, 0x2 //only needed with extended boundaries?
mtc1 t2, f4
cvt.s.w f4, f4
lwc1 f14, 0xb1b0 (t0)
c.lt.s f4, f14
nop
bc1t @@yes
nop
li at, 200.0
mtc1 at, f0
add.s f14, f14, f0
lh t2, 0x0006 (t1)
sll t2, t2, 0x2 //only needed with extended boundaries?
mtc1 t2, f4
cvt.s.w f4, f4
c.lt.s f14, f4
nop
bc1f @@end
nop
@@yes:
addiu ra, ra, 0x00ac
jr ra
nop
@@end:
lui t0, 0x8034
lw t1, 0xb1d4 (t0)
li at, 50.0
mtc1 at, f6
lwc1 f2, 0x001c (t1)
mul.s f2, f2, f6
lwc1 f4, 0x0024 (t1)
mul.s f4, f4, f6
lwc1 f0, 0xb1ac (t0)
add.s f0, f0, f2
swc1 f0, 0xb1ac (t0)
lwc1 f0, 0xb1b4 (t0)
add.s f0, f0, f4
swc1 f0, 0xb1b4 (t0)
//add some push here
jr ra
nop
.org 0x80255c44
jal groundedwalls
li v0, 0
.org 0x8029c030
groundedwalls:
addiu ra, ra, 0x0000
jr ra
nop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.