D
DLPB_
Guest
I'm not really sure if I need to preserve edi,ebx,esi here. Didn't check.
Still this nifty replacement I've made for the Enemy Skill mask ensures that, from now on, the enemy skills MISSING from the total are what count, not the ones that are PRESENT. See, originally, if one of your characters had a full enemy skill set, it would then stop all other enemy skills from learning all abilities. And if one of the materias had, say, Frog Song, then none of the others without it would gain it either.
Code: [Select]
Not rigorously tested yet, but seems to work.
Still this nifty replacement I've made for the Enemy Skill mask ensures that, from now on, the enemy skills MISSING from the total are what count, not the ones that are PRESENT. See, originally, if one of your characters had a full enemy skill set, it would then stop all other enemy skills from learning all abilities. And if one of the materias had, say, Frog Song, then none of the others without it would gain it either.
Code: [Select]
Code:
Procedure CreateEnemySkillMask5CFB93; stdcall;Beginasmpush ebxpush esipush edixor edi,edimov esi,$00FFFFFFmov ecx,[esp+$10] //Starting address of character materia@START:xor ebx,ebx@LABEL1:cmp ebx,8je @Label5test edi,edijne @Label3 mov eax,[ecx+ebx*4+$40] // Retrieve Materia ID and AP in Weapon slot. jmp @Label4@Label3: mov eax,[ecx+ebx*4+$60] // Retrieve Materia ID and AP in Armour slot.@Label4:cmp al,$FF //If no materia in slot, then jump to next slot.je @Label2xor edx,edxmov dl,alimul edx,edx,$14mov dl,[edx+$DBDF6D] //retrieve formula ID for materiaand dl,$Fcmp dl,7 //materia is Enemy Skilljne @Label2shr eax,8and esi,eaxor esi,$80000000@LABEL2:inc ebxjmp @Label1 @LABEL5: test edi,edi jne @End inc edi jmp @START@END:mov eax,esipop edipop esipop ebxend;End;
Not rigorously tested yet, but seems to work.