@@ -943,14 +943,12 @@ static void __declspec(naked) main_death_scene_hook() {
943943}
944944
945945static void __declspec (naked) display_body_hook() {
946- static const DWORD display_body_hook_Ret = 0x47098D ;
947946 __asm {
948947 mov ebx, [esp + 0x60 - 0x28 + 8 ];
949948 cmp ebx, 1 ; // check mode 0 or 1
950949 jbe fix;
951- add esp, 8 ;
952- mov dword ptr [esp + 0x60 - 0x40 ], 0 ; // frm_ptr
953- jmp display_body_hook_Ret;
950+ xor ebx, ebx;
951+ jmp fo::funcoffs::art_id_;
954952fix:
955953 dec edx; // USE.FRM
956954 mov ecx, 48 ; // INVBOX.FRM
@@ -989,15 +987,15 @@ void Interface::init() {
989987 if (hrpIsEnabled == false || hrpVersionValid) SafeWrite8 (0x481345 , 4 ); // main_death_scene_
990988 if (hrpVersionValid) SafeWrite8 (HRPAddress (0x10011738 ), 10 );
991989
992- // Cosmetic fix for the background image of the character portrait on the inventory and character screens
990+ // Cosmetic fix for the background image of the character portrait for the player's inventory screen
993991 HookCall (0x47093C , display_body_hook);
994992 BYTE code[11 ] = {
995993 0x8B , 0xD3 , // mov edx, ebx
996994 0x66 , 0x8B , 0x58 , 0xF4 , // mov bx, [eax - 12] [sizeof(frame)]
997995 0x0F , 0xAF , 0xD3 , // imul edx, ebx (y * frame width)
998996 0x53 , 0x90 // push ebx (frame width)
999997 };
1000- SafeWriteBytes (0x470971 , code, 11 );
998+ SafeWriteBytes (0x470971 , code, 11 ); // calculates the offset in the pixel array for x/y coordinates
1001999}
10021000
10031001void Interface::exit () {
0 commit comments