Clamp text X values

This commit is contained in:
jeffman 2019-09-29 12:43:08 -04:00
parent 75e4876478
commit 4cca5277a1
2 changed files with 21 additions and 0 deletions

View File

@ -1595,6 +1595,9 @@ nop
.org 0x80117D4 :: dw title_sequence_0D
.org 0x80117D8 :: dw title_sequence_0D
// Clamp initial X values for text
.org 0x80116F0 :: bl title_setup_clamp
// Commit hacks:
// Commit all things on every sequence

View File

@ -11,6 +11,24 @@ pop {r1}
ldr r0,=0x80113F4
mov pc,r0 // Run the existing routine
//---------------------------------------------------------
title_setup_clamp:
mov r1,250
cmp r0,r1
bgt @@clamp
neg r1,r1
cmp r0,r1
blt @@clamp
b @@clamp_end
@@clamp:
mov r0,r1
@@clamp_end:
str r0,[r5,4]
mov r1,r8 // clobbered code
bx lr
//---------------------------------------------------------
// r3 has 2028008
// [r3+14] has 2028028