Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .ps2
- .loadelf "SLPM_657.97"
- .org 0x233608
- jal Vwf_drop_blank
- move a0, v0
- nop
- .org 0x233850
- jal Vwf_add_width
- .org 0x3CCEB0
- .area 96
- Vwf_drop_blank: ; move current x to the left
- sh a0, @backup
- la v0, width_table ; get spacing on the left
- addu v0, a0
- lbu v0, -0x20(v0)
- nop
- andi v0, 0xf
- mtc1 v0, $f0
- nop
- cvt.s.w $f0, $f0 ; convert int to float value
- mul.s $f0, $f28 ; apply scaling
- neg.s $f0, $f0 ; make negative
- add.s $f27, $f0 ; subtract to current x
- la v0, 0x334F40 ; **old code
- jr ra
- sll v1, a0, 1 ; **old code
- @backup:
- .dw 0
- .endarea
- .org 0x3CCFA4
- .area 134
- Vwf_add_width: ; increment current x with character width
- lhu a0, @backup
- la v0, width_table ; get width
- addu v0, a0
- lbu v0, -0x20(v0)
- nop
- andi v1, v0, 0xf ; left padding
- sra v0, 4 ; width
- addu v0, v1
- mtc1 v0, $f0
- nop
- cvt.s.w $f0, $f0 ; convert int to float value
- mul.s $f0, $f28 ; apply scaling
- jr ra
- add.s $f27, $f0 ; current x += scaled width
- .endarea
- .org 0x3CCF14
- .macro ch,left,width
- .db left | (width << 4)
- .endmacro
- width_table:
- .include "wtbl.s"
- .close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement