movebx,dwordptrss:[ebp-0x14]moveax,dwordptrss:[eax+0x20]movsxecx,byteptrds:[eax+0x2]movsxedx,byteptrds:[eax+0x3]leaebx,[ecx*4+ecx]leaebx,[ebx*2+edx]; insert breakpoint here
Alignment
Spell card alignment (menu)
(spell_align_menu)
Description
106 bytes removed from the original function, awesome! And yes, I insist on shipping 104 (+2) NOPs, because large-scale code destruction is both satisfying and clarifying for other hackers. ☺
movedx,dwordptrss:[ebp+0C]moveax,dwordptrds:[edx+244]flddwordptrds:[eax+34]fmuldwordptrds:[eax+38]fdivdwordptrds:[th095.495338]fadddwordptrds:[eax+8]pushdwordptrds:[th095.4c44b0]; spell fontpushdwordptrss:[ebp+18]call[GetTextExtentForFont]shreax,1; center alignmentpusheaxfilddwordptrss:[esp]popeaxjmpshort+0x68nop(*0x68)
Spell card alignment (in-game)
(spell_align)
Description
The massive code destruction continues, this time with a whopping 159 bytes removed from the original function.
Three breakpoints, one for track number, line number and string each, are just too much. So let's rewrite this to have all of these values in registers at one place.
Address
Code
89c1
c1e1 09
8d940a 00200000
8b4d dc
c1e1 06
01ca
8b4d dc
52
90 90 90 90 90 90 90
movecx,eax; We start out with the track number in EAXshlecx,9leaedx,[ecx+edx+2000]; EAX = track string buffermovecx,dwordptrss:[ebp-0x24]; ECX = line numbershlecx,6addedx,ecx; EDX += line string offsetmovecx,dwordptrss:[ebp-0x24]; ECX = line number (again, for breakpoint)pushedx; insert breakpoint herenop(*7)
Compatibility
Reset English patch small font size
(unpatch_font_small)
Address
Code
6a 00
6a 1e
push0push1e
Reset English patch spell scaling thingy
(unpatch_spell_scale)
Description
The English patch does something to make spell titles look bad.