From d53b4d543698b404d9fe03b6d37e0a970ae6c011 Mon Sep 17 00:00:00 2001 From: jeffman Date: Fri, 27 Mar 2015 01:23:40 -0400 Subject: [PATCH] Fixed dirty flags for PSI help text --- m2-hack.asm | 7 +++++++ m2-vwf.asm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/m2-hack.asm b/m2-hack.asm index d1771a9..808f936 100644 --- a/m2-hack.asm +++ b/m2-hack.asm @@ -117,6 +117,7 @@ org $80B8B56; bl m2_vwf.ppcost_once org $80B8B98; bl m2_vwf.ppcost_once2 // VWFs for printing character names +org $80D2EF0; ldrb r0,[r6,#0] // allows for 5 letters! org $80D2F24 mov r1,r6 mov r2,r7 @@ -124,6 +125,8 @@ mov r0,r4 bl m2_vwf.weld_entry b $80D2F52 +org $80D2F5A; nop + //============================================================================== // Formatting hacks //============================================================================== @@ -173,6 +176,10 @@ org $80BE764; bl m2_vwf.cursor_dirty1 // PSI help -- set clean/dirty flags org $80BADCE; bl m2_vwf.psi_help_clear1 org $80BADD4; bl m2_vwf.psi_help_clean1 +org $80C476A; bl m2_vwf.psi_help_dirty1 +org $80C48B4; bl m2_vwf.psi_help_dirty1 +org $80C4644; bl m2_vwf.psi_help_dirty2 +org $80C4582; bl m2_vwf.psi_help_dirty2 // PSI target strings org $80B8B12; mov r0,#0x14 diff --git a/m2-vwf.asm b/m2-vwf.asm index 75e41de..55ddb72 100644 --- a/m2-vwf.asm +++ b/m2-vwf.asm @@ -2125,6 +2125,54 @@ pop {pc} pop {r0-r1,pc} +//============================================================================== +// void psi_help_dirty1() +//============================================================================== + +.psi_help_dirty1: +print "m2vwf.psi_help_dirty1: $",pc + +push {r1-r2,lr} +mov r2,r0 + +// Set the dirty flag +ldr r1,=#0x3005258 +ldr r0,[r1,#0] +mov r1,#0 +bl .set_dirty_flag + +// Clobbered code +mov r0,r2 +strh r0,[r5,#0x34] +lsl r0,r0,#0x10 + +pop {r1-r2,pc} + + +//============================================================================== +// void psi_help_dirty2() +//============================================================================== + +.psi_help_dirty2: +print "m2vwf.psi_help_dirty2: $",pc + +push {r1-r2,lr} +mov r2,r0 + +// Set the dirty flag +ldr r1,=#0x3005258 +ldr r0,[r1,#0] +mov r1,#0 +bl .set_dirty_flag + +// Clobbered code +mov r0,r2 +strh r0,[r5,#0x36] +lsl r0,r0,#0x10 + +pop {r1-r2,pc} + + //============================================================================== // void cursor_dirty1() //==============================================================================