ceiling invis walls fix
//walls on no trianlge 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
//(make ceilings push mario outwards)
.org 0x112a0
!test:
jal $29BF64 //adds RA by AC if no ceiling available
nop
lw t0, $0050 (SP)
mtc1 r0, f18
lwc1 f16, $004c (T0)
c.le.s f18, f16
nop
bc1f $11308
nop
swc1 f18, $004c (T0)
.org 0x56f64
!second:
lui t0, $8034
lw t1, $b1d4 (T0)
beq t1, r0, !yes
nop
lh t2, $0008 (T1)
sll t2, t2, $2 //only needed with extended boundaries?
mtc1 t2, f4
cvt.s.w f4, f4
lwc1 f14, $b1b0 (T0)
c.lt.s f4, f14
nop
bc1t !yes
nop
lui at, $4348
mtc1 at, f0
add.s f14, f14, f0
lh t2, $0006 (T1)
sll t2, t2, $2 //only needed with extended boundaries?
mtc1 t2, f4
cvt.s.w f4, f4
c.lt.s f14, f4
nop
bc1f !end
nop
//j $4
!yes:
addiu ra, ra, $00ac
jr ra
nop
!end:
lui t0, $8034
lw t1, $b1d4 (T0)
lui at, $4248
mtc1 at, f6
lwc1 f2, $001c (T1)
mul.s f2, f2, f6
lwc1 f4, $0024 (T1)
mul.s f4, f4, f6
lwc1 f0, $b1ac (T0)
add.s f0, f0, f2
swc1 f0, $b1ac (T0)
lwc1 f0, $b1b4 (T0)
add.s f0, f0, f4
swc1 f0, $b1b4 (T0)
//add some push here
!yesend:
jr ra
nop
.org 0x10c44
!grounded:
jal $29c030
addiu v0, r0, $0
.org 0x57030
!groundedwalls:
addiu ra, ra, $0000
jr ra
nop
scale the game down/up (can be used to make giant levels without looking very off)
.org 0x861c0
!main:
addiu sp, sp, $ffe8
sw ra, $14 (SP)
lui t0, $8037
lui at, $3e00
mtc1 at, f6
lui t3, $3e80
mtc1 t3, f0
sw at, $fffc (T0)
lui t1, $800F
sw at, $0890 (T1)
div.s f10, f6, f0
lui at, $42c8
mtc1 at, f12
mul.s f12, f12, f10
cvt.w.s f12, f12
mfc1 t5, f12
sh t5, $0874 (T1)
lui t0, $8036
lw t0, $1158 (T0)
lui at, $4214
mtc1 at, f2
mul.s f2, f2, f10
swc1 f2, $01f8 (T0)
lui at, $4320
mtc1 at, f2
mul.s f2, f2, f10
swc1 f2, $01fc (T0)
!end:
lw ra, $14(SP)
jr ra
addiu sp, sp, $0018
.org 0x11b3c
!main2:
jal $2ca6d0
.org 0x11cb8
!main3:
nop
lw v0, $0018 (SP)
jal $2ca7d0
.org 0x10ea4
!main4:
nop
lw v0, $0028 (SP)
jal $2ca7d0
.org 0x10d90
!main5:
jal $2ca8d4
.org 0x856d0
!set:
sw r0, $0060 (t6)
lui t6, $8037
lwc1 f0, $fffc (T6)
lui at, $3e80
mtc1 at, f10
div.s f0, f0, f10
lwc1 f2, $0048 (A0)
swc1 f2, $fff0 (t6)
mul.s f2, f2, f0
swc1 f2, $0048 (A0)
lwc1 f4, $004c (A0)
swc1 f4, $fff4 (t6)
mul.s f4, f4, f0
swc1 f4, $004c (A0)
lwc1 f6, $0050 (A0)
swc1 f6, $fff8 (t6)
mul.s f6, f6, f0
swc1 f6, $0050 (A0)
jr ra
nop
.org 0x857d0
!set2:
lw a0, $0030 (SP)
lui t6, $8037
lwc1 f0, $fffc (T6)
lui at, $3e80
mtc1 at, f10
div.s f0, f10, f0
lwc1 f2, $0048 (A0)
swc1 f2, $fff0 (t6)
mul.s f2, f2, f0
swc1 f2, $0048 (A0)
lwc1 f4, $004c (A0)
swc1 f4, $fff4 (t6)
mul.s f4, f4, f0
swc1 f4, $004c (A0)
lwc1 f6, $0050 (A0)
swc1 f6, $fff8 (t6)
mul.s f6, f6, f0
swc1 f6, $0050 (A0)
jr ra
nop
.org 0x858d4
!set:
sw a0, $0030 (SP)
lui t6, $8037
lwc1 f0, $fffc (T6)
lui at, $3e80
mtc1 at, f10
div.s f0, f0, f10
lwc1 f2, $0048 (A0)
swc1 f2, $fff0 (t6)
mul.s f2, f2, f0
swc1 f2, $0048 (A0)
lwc1 f4, $004c (A0)
swc1 f4, $fff4 (t6)
mul.s f4, f4, f0
swc1 f4, $004c (A0)
lwc1 f6, $0050 (A0)
swc1 f6, $fff8 (t6)
mul.s f6, f6, f0
jr ra
swc1 f6, $0050 (A0)
.org 0x44384
!movecamtoriginal:
jal $2ca820
.org 0x44394
!movecamtonew:
jal $2ca720
.org 0x85820
!main17:
lui t6, $8037
lwc1 f0, $fffc (T6)
lui at, $3e80
mtc1 at, f10
div.s f0, f10, f0
addiu a1, r0, $0003
lui t0, $8034
!loop1:
lwc1 f2, $c6a4 (t0)
lwc1 f12, $b1ac (T0)
sub.s f2, f2, f12
mul.s f2, f2, f0
add.s f2, f2, f12
swc1 f2, $c6a4 (T0)
addiu a1, a1, $ffff
bne a1, r0, !loop1
addiu t0, t0, $4
lw a1, $001c (SP)
jr ra
lw a0, $0018 (SP)
.org 0x85720
!main18:
lw a0, $0018 (SP)
lui t6, $8037
lwc1 f0, $fffc (T6)
lui at, $3e80
mtc1 at, f10
div.s f0, f0, f10
addiu a1, r0, $0003
lui t0, $8034
!loop2:
lwc1 f2, $c6a4 (t0)
lwc1 f12, $b1ac (T0)
sub.s f2, f2, f12
mul.s f2, f2, f0
add.s f2, f2, f12
swc1 f2, $c6a4 (T0)
addiu a1, a1, $ffff
bne a1, r0, !loop2
addiu t0, t0, $4
addiu ra, ra, $000c
jr ra
nop
.org 0x1199c
!assf:
jal $2ca790
lui at, $4080
.org 0x1194c
!assfss:
jal $2ca790
lui at, $4080
.org 0x85790
!main19:
addiu sp, sp, $fffc
sw t0, $0000 (SP)
lui t0, $8037
lwc1 f0, $fffc (T0)
lui t0, $3e80
mtc1 t0, f10
div.s f0, f0, f10
mtc1 at, f6
mul.s f6, f6, f0
mtc1 at, f8
mul.s f8, f8, f0
mtc1 at, f10
mul.s f10, f10, f0
lw t0, $0000 (SP)
jr ra
addiu sp, sp, $0004
.org 0x11914
!assfss:
jal $2ca790
lui at, $4000
.org 0x11844
!assfss:
jal $2ca790
lui at, $4080
.org 0x1170c
!assfss:
jal $2ca790
lui at, $4000
.org 0x11688
!assfss:
jal $2ca790
lui at, $3f80
.org 0xf320
!safiuasbufiui:
jal $2ca86c
.org 0x8586c
!safiuasuif:
lui t0, $8034
lwc1 f2, $c528 (T0)
lui at, $3e80
mtc1 at, f14
lui t1, $8037
lwc1 f4, $fffc (T1)
sub.s f14, f14, f4
lui at, $c3c0
mtc1 at, f6
mul.s f14, f14, f6
add.s f2, f2, f14
jr ra
swc1 f2, $c528 (T0)
.org 0xf2bc
!safuiasbfzu:
jal $2ca8a0
sw a0, $0018 (SP)
lw t7, $000c (a0)
lw t8, $0098 (a0)
sw t7, $0000 (T8)
.org 0x858a0
!asfuaszuf:
lui t0, $8034
lwc1 f2, $c528 (T0)
lui at, $3e80
mtc1 at, f14
lui t1, $8037
lwc1 f4, $fffc (T1)
sub.s f14, f14, f4
lui at, $43c0
mtc1 at, f6
mul.s f14, f14, f6
add.s f2, f2, f14
jr ra
swc1 f2, $c528 (T0)