.text:00439353 mov eax, PlayerClass .text:00439358 mov edi, pcBarbarian .text:0043935D cmp eax, edi ; Compare Two Operands .text:0043935F jnz short loc_439365 ; Jump if Not Zero (ZF=0) .text:00439361 push 2 .text:00439363 jmp short loc_439367 ; Jump .text:00439365 ; --------------------------------------------------------------------------- .text:00439365 .text:00439365 loc_439365: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+13Fj .text:00439365 push 8 ; Max .text:00439367 .text:00439367 loc_439367: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+143j .text:00439367 call Random ; Call Procedure .text:0043936C mov ParentDescriptNum, eax ; 0-7 For Barb., 0-1 For Rest .text:00439371 mov esi, eax .text:00439373 mov eax, PlayerClass .text:00439378 add esp, 4 ; Add .text:0043937B cmp eax, edi ; Compare Two Operands .text:0043937D jnz short loc_439388 ; Jump if Not Zero (ZF=0) .text:0043937F mov eax, BarbParentDescript[esi*4] .text:00439386 jmp short loc_43938F ; Jump .text:00439388 ; --------------------------------------------------------------------------- .text:00439388 .text:00439388 loc_439388: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+15Dj .text:00439388 mov eax, ParentsDescription[esi*4] .text:0043938F .text:0043938F loc_43938F: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+166j .text:0043938F push eax .text:00439390 push offset a___S ; "___%s" .text:00439395 call DisplaySpecialScreen? ; Call Procedure .text:0043939A add esp, 8 ; Add .text:0043939D cmp esi, 7 ; switch 8 cases .text:004393A0 ja loc_439553 ; default .text:004393A6 jmp ds:off_439558[esi*4] ; switch jump .text:004393AD .text:004393AD loc_4393AD: ; DATA XREF: .text:00439558o .text:004393AD cmp PlayerClass, edi ; case 0x0 .text:004393B3 jnz short loc_4393F1 ; Jump if Not Zero (ZF=0) .text:004393B5 push 2 ; StatDelta .text:004393B7 push sStrength ; StatNr .text:004393B9 call IncStat ; Modify sStrength .text:004393BE push 1 ; StatDelta .text:004393C0 push sDexterity ; StatNr .text:004393C2 call IncStat ; Modify sDexterity .text:004393C7 push 1 ; StatDelta .text:004393C9 push sToughness ; StatNr .text:004393CB call IncStat ; Modify sToughness .text:004393D0 push 1 ; StatDelta .text:004393D2 push sPerception ; StatNr .text:004393D4 call IncStat ; Modify sPerception .text:004393D9 push -1 ; StatDelta .text:004393DB push sLearning ; StatNr .text:004393DD call IncStat ; Modify sLearning .text:004393E2 push -1 ; StatDelta .text:004393E4 push sCharisma ; StatNr .text:004393E6 call IncStat ; Modify sCharisma .text:004393EB add esp, 30h ; Add .text:004393EE pop edi .text:004393EF pop esi .text:004393F0 retn ; Return Near from Procedure .text:004393F1 ; --------------------------------------------------------------------------- .text:004393F1 .text:004393F1 loc_4393F1: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+193j .text:004393F1 push -1 ; StatDelta .text:004393F3 push sStrength ; StatNr .text:004393F5 call IncStat ; Modify sStrength .text:004393FA push 1 ; StatDelta .text:004393FC push sToughness ; StatNr .text:004393FE call IncStat ; Modify sToughness .text:00439403 push -1 ; StatDelta .text:00439405 push sLearning ; StatNr .text:00439407 call IncStat ; Modify sLearning .text:0043940C push -1 ; StatDelta .text:0043940E push sAppearance ; StatNr .text:00439410 call IncStat ; Modify sAppearance .text:00439415 add esp, 20h ; Add .text:00439418 mov dword_4FE1AC, 3 .text:00439422 mov dword_4FE1B0, 0 .text:0043942C pop edi .text:0043942D pop esi .text:0043942E retn ; Return Near from Procedure .text:0043942F ; --------------------------------------------------------------------------- .text:0043942F .text:0043942F loc_43942F: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+186j .text:0043942F ; DATA XREF: .text:00439558o .text:0043942F cmp PlayerClass, edi ; case 0x1 .text:00439435 jnz short loc_439461 ; Jump if Not Zero (ZF=0) .text:00439437 push -1 ; StatDelta .text:00439439 push sStrength ; StatNr .text:0043943B call IncStat ; Modify sStrength .text:00439440 push 2 ; StatDelta .text:00439442 push sLearning ; StatNr .text:00439444 call IncStat ; Modify sLearning .text:00439449 push -1 ; StatDelta .text:0043944B push sCharisma ; StatNr .text:0043944D call IncStat ; Modify sCharisma .text:00439452 push 1 ; StatDelta .text:00439454 push sWillpower ; StatNr .text:00439456 call IncStat ; Modify sWillpower .text:0043945B add esp, 20h ; Add .text:0043945E pop edi .text:0043945F pop esi .text:00439460 retn ; Return Near from Procedure .text:00439461 ; --------------------------------------------------------------------------- .text:00439461 .text:00439461 loc_439461: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+215j .text:00439461 push 1 ; StatDelta .text:00439463 push sStrength ; StatNr .text:00439465 call IncStat ; Modify sStrength .text:0043946A push 1 ; StatDelta .text:0043946C push sToughness ; StatNr .text:0043946E call IncStat ; Modify sToughness .text:00439473 push -2 ; StatDelta .text:00439475 push sLearning ; StatNr .text:00439477 call IncStat ; Modify sLearning .text:0043947C push 1 ; StatDelta .text:0043947E push sMana ; StatNr .text:00439480 call IncStat ; Modify sMana .text:00439485 add esp, 20h ; Add .text:00439488 mov dword_4FE1AC, 3 .text:00439492 pop edi .text:00439493 pop esi .text:00439494 retn ; Return Near from Procedure .text:00439495 ; --------------------------------------------------------------------------- .text:00439495 .text:00439495 loc_439495: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+186j .text:00439495 ; DATA XREF: .text:00439558o .text:00439495 xor esi, esi ; case 0x3 .text:00439497 .text:00439497 loc_439497: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+28Cj .text:00439497 push 2 ; Max .text:00439499 call Random ; Call Procedure .text:0043949E push eax ; StatDelta .text:0043949F push esi ; StatNr .text:004394A0 call IncStat ; All .text:004394A5 add esp, 0Ch ; *This section loops through all stats, raises them 0 to 1 .text:004394A8 inc esi ; Increment by 1 .text:004394A9 cmp esi, 9 ; Compare Two Operands .text:004394AC jl short loc_439497 ; Jump if Less (SF!=OF) .text:004394AE pop edi .text:004394AF pop esi .text:004394B0 retn ; Return Near from Procedure .text:004394B1 ; --------------------------------------------------------------------------- .text:004394B1 .text:004394B1 loc_4394B1: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+186j .text:004394B1 ; DATA XREF: .text:00439558o .text:004394B1 push 1 ; case 0x5 .text:004394B3 push sStrength ; StatNr .text:004394B5 call IncStat ; Modify sStrength .text:004394BA push 1 ; StatDelta .text:004394BC push sDexterity ; StatNr .text:004394BE call IncStat ; Modify sDexterity .text:004394C3 push 1 ; StatDelta .text:004394C5 push sLearning ; StatNr .text:004394C7 call IncStat ; Modify sLearning .text:004394CC push -2 ; StatDelta .text:004394CE push sCharisma ; StatNr .text:004394D0 call IncStat ; Modify sCharisma .text:004394D5 push -2 ; StatDelta .text:004394D7 push sAppearance ; StatNr .text:004394D9 call IncStat ; Modify sAppearance .text:004394DE add esp, 28h ; Add .text:004394E1 pop edi .text:004394E2 pop esi .text:004394E3 retn ; Return Near from Procedure .text:004394E4 ; --------------------------------------------------------------------------- .text:004394E4 .text:004394E4 loc_4394E4: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+186j .text:004394E4 ; DATA XREF: .text:00439558o .text:004394E4 push 2 ; case 0x6 .text:004394E6 push sDexterity ; StatNr .text:004394E8 call IncStat ; Modify sDexterity .text:004394ED push 2 ; StatDelta .text:004394EF push sLearning ; StatNr .text:004394F1 call IncStat ; Modify sLearning .text:004394F6 push -1 ; StatDelta .text:004394F8 push sToughness ; StatNr .text:004394FA call IncStat ; Modify sToughness .text:004394FF push -2 ; StatDelta .text:00439501 push sMana ; StatNr .text:00439503 call IncStat ; Modify sMana .text:00439508 add esp, 20h ; Add .text:0043950B pop edi .text:0043950C pop esi .text:0043950D retn ; Return Near from Procedure .text:0043950E ; --------------------------------------------------------------------------- .text:0043950E .text:0043950E loc_43950E: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+186j .text:0043950E ; DATA XREF: .text:00439558o .text:0043950E push 2 ; case 0x7 .text:00439510 call Random ; Call Procedure .text:00439515 add esp, 4 ; Add .text:00439518 test eax, eax ; Logical Compare .text:0043951A jz short loc_439520 ; Jump if Zero (ZF=1) .text:0043951C push -2 .text:0043951E jmp short loc_439522 ; Jump .text:00439520 ; --------------------------------------------------------------------------- .text:00439520 .text:00439520 loc_439520: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+2FAj .text:00439520 push 2 ; StatDelta .text:00439522 .text:00439522 loc_439522: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+2FEj .text:00439522 push sCharisma ; StatNr .text:00439524 call IncStat ; Modify sCharisma .text:00439529 add esp, 8 ; Add .text:0043952C push 3 ; StatDelta .text:0043952E push sMana ; StatNr .text:00439530 call IncStat ; Modify sMana .text:00439535 push -2 ; StatDelta .text:00439537 push sStrength ; StatNr .text:00439539 call IncStat ; Modify sStrength .text:0043953E push -1 ; StatDelta .text:00439540 push sToughness ; StatNr .text:00439542 call IncStat ; Modify sToughness .text:00439547 push 1 ; StatDelta .text:00439549 push sLearning ; StatNr .text:0043954B call IncStat ; Modify sLearning .text:00439550 add esp, 20h ; Add .text:00439553 .text:00439553 loc_439553: ; CODE XREF: AdjustStartingStatsByParentDescript_Plus+180j .text:00439553 ; AdjustStartingStatsByParentDescript_Plus+186j .text:00439553 ; DATA XREF: ... .text:00439553 pop edi ; default .text:00439554 pop esi .text:00439555 retn ; Return Near from Procedure .text:00439555 AdjustStartingStatsByParentDescript_Plus endp .text:00439555 .text:00439555 ; --------------------------------------------------------------------------- .text:00439556 db 8Bh, 0FFh .text:00439558 off_439558 dd offset loc_4393AD, offset loc_43942F, offset loc_439553, 2 dup(offset loc_439495) .text:00439558 ; DATA XREF: AdjustStartingStatsByParentDescript_Plus+186r .text:00439558 dd offset loc_4394B1, offset loc_4394E4, offset loc_43950E ; jump table for switch statement .text:00439578 db 8 dup(90h) .data:004FD3C4 ParentsDescription dd 4FFA3Ch ; DATA XREF: AdjustStartingStatsByParentDescript_Plus+168r .data:004FD3C4 ; SetParentDescript+1Cr .data:004FD3C4 ; "Your parents were poor people. They lov"... .data:004FD3C8 dd offset aYourParentsBelongT ; "Your parents belong to the lower class."... .data:004FD3CC dd offset aYourParentsBelon_0 ; "Your parents belong to the middle class"... .data:004FD3D0 dd offset aYourParentsBelon_1 ; "Your parents belong to the nobility. Th"... .data:004FD3D4 dd offset aYourParentsAreTrav ; "Your parents are travelling adventurers"... .data:004FD3D8 dd offset aYourParentsAreTr_0 ; "Your parents are travelling adventurers"... .data:004FD3DC dd offset aYourFatherIsAGuild ; "Your father is a guildmaster. Your fami"... .data:004FD3E0 dd offset aYourMotherIsAMight ; "Your mother is a mighty enchantress. Sh"... .data:004FD3E4 BarbParentDescript dd 4FF668h ; DATA XREF: AdjustStartingStatsByParentDescript_Plus+15Fr .data:004FD3E4 ; SetParentDescript+Er .data:004FD3E4 ; "Your father was an accomplished hunter "... .data:004FD3E8 dd offset aYourMotherWasAWise ; "Your mother was a wise shaman and heale"...