From 578f90b3cc49557bb70060ad033bb90b8cf8ac50 Mon Sep 17 00:00:00 2001 From: Snesrev Date: Mon, 17 Apr 2023 22:27:21 +0200 Subject: [PATCH] Oops I made a bug --- src/sm_85.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sm_85.c b/src/sm_85.c index c15acb0..bbdbb36 100644 --- a/src/sm_85.c +++ b/src/sm_85.c @@ -83,8 +83,8 @@ static uint16 WriteMessageTilemap(void) { // 0x8582B8 message_box_animation_y_radius = 0; for (int i = 0; i != 112; ++i) ram3000.pause_menu_map_tilemap[i] = 0; - uint16 r0 = *(VoidP *)((uint8 *)&kMessageBoxDefs[6 * (message_box_index - 1)].message_tilemap); - uint16 r9 = *(VoidP *)((uint8 *)&kMessageBoxDefs[6 * (message_box_index - 1) + 1].message_tilemap) - r0; + uint16 r0 = kMessageBoxDefs[message_box_index - 1].message_tilemap; + uint16 r9 = kMessageBoxDefs[message_box_index].message_tilemap - r0; int n = r9 >> 1; r9 += 128; message_box_das0l_value = r9;