Ich bastel an einer JnR-Basis, die nach einem halben Jahr in Ruhe lassen und nochmal durchschauen
auch halbwegs funktioniert (bis auf das regelmäßige Steckenbleiben in Decken bei Sprüngen), die aber
noch Shoot'n'Run-tauglich werden soll. Und das mit einem möglichst umfangreichen "Buffer" für Zeug,
das durch die Gegend geschossen wird, es sind noch nichtmal Gegner derzeit einbezogen.
--
Solange es hier falschzitierende Ärsche gibt, dulde ich keinerlei Zitatboxen, die von mir sein sollen.
In dem Revolution-Previewpatch in dem ATB rausgenommen wurde, sind die Anzeigen für HP und MP um ein Stück nach unten verlegt.
Ich würde dies gerne auch in meinem CortiCombatVisu-Plugin möglich machen, daher hätzte ich gerne die Adressen, der Y-Position von Helden-HP/MP/ATB, Leisten und Zahlen.
Oder das, was da noch dahinter steht?
Direkte Vergabe von x|y-Positionen.
Und kleinere Fehler, die mir vielleicht noch vor dem Posten auffallen sollten.
Irgendwas ist immer...
Edit:
Der DynLoader will irgendwie nicht wie er soll/kann. Ist die Zeichenkette zu lang?
Edit²
Die Set#4Byte-Funktion scheint Probleme zu haben, wenn die zu überschreibenden Bytes 2-4 ungleich 00 sind. (Dyn v0.20) Edit³
Es überschreibt die Bytes 2-4 gar nicht, wenn der Wert über 256 hinausgeht.
Zu den QuickPatches und den bunten Farben:
Für % ist die maximal zulässige Zahl = 127. (Alles, was sich in dem Bereich befindet, schiebt die anderen Partymitglieder sowieso aus dem Bild)Für die x-Position der HP|MP-Zahlen wird in der RPG_RT zwischen 1|2|3|4-stelligen Zahlen unterschieden. Deswegen sollte man den 8 Pixel-Abstand einhalten (%40, %48, %56, %64).
x-Positionen im horizontalen Interface orientieren sich anhand des vordersten Heldens in der Party. (Wird im vertikalen Gauge umgedreht auf y-Positionen)
"NoShift" ignoriert das Hin- und Herscrollen, wenn man das Ding, was durch NoAutoBattle beseitigt wird, auf/zu macht.
Das %60 beim vertikalen Interface ist der y-Abstand zwischen den Helden.
Edit:
Das Problem mit den Farben der HP/MP/ATB-Leisten wieder beheben:
Zitat von DynRPG.ini
Bar(w)ColorFix=489D1E,%24
...
Angabe in Breite -1 (Und ja: man muss dafür HPB/MPB/ATB auf der selben Breite eingestellt haben)
Und noch das Problem mit überlangen HP/MP/ATB-Leisten beheben:
Zitat von DynRPG.ini
Bar(w)WidthFix=489CBD,%25
...
Verzerrt die 16x16 Pixel großen Grafiksegmente in System2 (mittlerer Grafikabschnitt, x-Pos = 16) auf die eingestellte Breite.
http://share.cherrytree.at/showfile-12644/dynloader.dll << gefixter 0.20-Loader - der ist aber jetzt nicht mit dem alten Patch kompatibel, und das ist jetzt zu umständlich da zu fixen; es gibt sowieso bald 0.20 (in der Testversion gabs ja noch Probleme)
--
Mir war nichtmal bewusst dass ich nominiert wurde, aber: Cool! Hälfte des Lobes muss aber unbedingt an Archeia!
Also: Deine VertiGauge.ips baut die Anzeige um auf die vertikale Ausrichtung. Wenn man das getan hat, kann man die Quickpatch-Zeilen benutzen um sie zu konfigurieren. Right?
Und was tut VisuGauge.ips? Den Quickpatch-Zeilen nach ist die Ausrichtung noch immer wie sie war.
Wenn man das getan hat, kann man die Quickpatch-Zeilen benutzen um sie zu konfigurieren. Right?
...
Richtig. Ist nur so ein Experiment, weil: man kann sowas machen... verdeckt nur leider zu viel vom Kampfgeschehen. (die Platzierung aller Battler ist sowieso seltsam)
Zitat von Corti
Und was tut VisuGauge ?
...
Ausrichtung in der Horizontalen, mit etwas mehr Flexibilität im vertikalen Strecken/Stauchen. Ist auch unabhängig vom (unsichtbaren (noch weiter drunter ist übrigens das Fenster mit der Zielwahl...)) Party-Fenster unten. Also könnte man das HUD an den oberen Bildschirmrand packen.
Edit:
Wegen den Fenstern am oberen Bildschirmrand:
Ich bin kein Hacker wie Cherry. Frag mal im Programm-Wunschthread, bugmenot traue ich das zu.
...
@bugmenot:
Dann frage ich mal bei dir an, wie aufwändig es wäre, die Menüpunkte Row & Aktiv-Passiv in Switches zu verwandeln. Wenn es zeitlich grad nicht passt machts auch nix, dann frag ich wie von Cherry vorgeschlagen den Pepsi-Otaku
--
Elektra Kingdom v.4.12 Vollversion in der Mache, Zeitlimit bis zum 31.12.2024 *click Offizieller Blog zum Spiel News, Links, Screenshots, etc. *click Tanalin Integer Scaler Fullscreen Tool für RPG Maker 2000 / 2003 Spiele*click VirtualMIDISynth Fix für kaputte MIDI Musik*click Windows Photo Viewer Fix für unscharfe Windows Fotoanzeige *click RPG Maker Ultimate (rpg2009) von Cherry: 1 Million Switches/Variablen, 125 Kästchen für BattleAnimationen, beliebige Picture-Größen importieren *click für DL & *click für 100.000 Pictures RPG Maker 2000 / 2003 (Steam) Korrektes Vollbild , Performance+ & Ultimate *click
Elektra Kingdom v.4.12 Vollversion in der Mache, Zeitlimit bis zum 31.12.2024 *click Offizieller Blog zum Spiel News, Links, Screenshots, etc. *click Tanalin Integer Scaler Fullscreen Tool für RPG Maker 2000 / 2003 Spiele*click VirtualMIDISynth Fix für kaputte MIDI Musik*click Windows Photo Viewer Fix für unscharfe Windows Fotoanzeige *click RPG Maker Ultimate (rpg2009) von Cherry: 1 Million Switches/Variablen, 125 Kästchen für BattleAnimationen, beliebige Picture-Größen importieren *click für DL & *click für 100.000 Pictures RPG Maker 2000 / 2003 (Steam) Korrektes Vollbild , Performance+ & Ultimate *click
Und Trippelpost. (Weil ich das Zeichenlimit zweimal überschritten habe)
47AF90 <>SkillMenuNavigation (2k3: 4A2BA0)
47AF91 mov ebx,eax get MenuParamPtr
47AF93 mov eax,[ebx+24] get Ptr on SkillWindow
47AF98 call update Cursor (allow CursorNavigation)
47AF9B off_49AA04 = KeyPtr
47AFA2 test Was a DecisionKey pressed?
47AFA9 jz jump to loc_47B024 if not
47AFAB mov eax,[ebx+18] get Ptr on PartyWindow (back at the MainMenu)
47AFAE mov edx,[eax+44] get selected PartySlot
47AFB1 off_49AA9C = InventoryDataPtr
47AFB8 call sub_47CE60 call GetBattlerData(Hero)
47AFBD push eax memorize Ptr on BattlerData
47AFBE mov eax,[ebx+24] get Ptr on SkillWindow
47AFC1 call sub_496490 call GetSkill
47AFC6 mov edx,eax get Skill_ID
47AFC8 pop eax get Ptr on BattlerData
47AFCB call check if the Hero can use this Skill
47AFD1 test al,al Can the Hero use this Skill? (MP and SkillType included)
47AFD3 jz jump to loc_47B008 if not
47AFD5 xor eax,eax EAX = 0
47AFD7 mov [ebx+44],eax reset selected PartySlot to Slot#1
47AFDA mov eax,[ebx+24] get Ptr on SkillWindow
47AFDD call sub_496490 call GetSkill
47AFE2 mov [ebx+48],eax memorize Skill_ID
47AFE5 off_49ABA4 = MainPtr
47AFEC call sub_46A4A0 get DecisionSound
47AFFA call sub_46A0A8 call PlaySound
47AFFF mov eax,ebx get MenuParamPtr
47B001 call sub_47B060 call HandleSkillTypes
47B008 off_49ABA4 = MainPtr
47B00F call sub_46A670 get BuzzerSound
47B01D call sub_46A0A8 call PlaySound
47B024 off_49AA04 = KeyPtr
47B02B test Was a CancelKey pressed?
47B032 jz jump to function's end if not
47B034 off_49ABA4 = MainPtr
47B03B call sub_46A588 get CancelSound
47B049 call sub_46A0A8 call PlaySound
47B04E mov eax,[ebx+24] get Ptr on SkillWindow
47B053 call update SkillWindow(?)
47B056 mov eax,ebx get MenuParamPtr
47B058 call sub_479C80 call CloseSubMenu
47B060 <>HandleSkillTypes (2k3: 4A2C70)
47B062 mov ebx,eax memorize MenuParamPtr
47B064 off_49AAF4 = SkillParamPtr
47B06B mov edx,[ebx+48] get Skill_ID
47B06E call sub_46390C call GetSkillParam
47B073 mov al,[eax+1C] get the SkillType
47B078 jb jump to loc_47B08D on SkillType = Normal
4A2C97 jmp jump to loc_4A2F70 on SubsetSkills and SkillType = Normal
47B07A jz jump to loc_47B097 on SkillType = Teleport
47B07E jz jump to loc_47B0A1 on SkillType = Escape
47B082 jz jump to loc_47B16B on SkillType = Switch
47B088 jmp jump to function's end on invalid input
47B08D mov eax,ebx get MenuParamPtr
47B08F call sub_47A39C open SkillUseMenu
47B097 mov eax,ebx get MenuParamPtr
47B099 call sub_47A984 open TeleportMenu
47B0A1 off_49AAF4 = SkillParamPtr
47B0A8 mov edx,[ebx+48] get Skill_ID
47B0AB call sub_46390C call GetSkillParam
47B0B0 mov edx,[eax+30] get assigned SoundEffect
47B0B3 off_49ABA4 = MainPtr
47B0BA call sub_46A0A8 call PlaySound
47B0BF mov eax,[ebx+44] get Item_ID (if a SkillScroll was used, else: EAX = 0)
47B0C2 test eax,eax Was an Item_ID assigned?
47B0C4 jnz jump to loc_47B123 if there was
47B0C6 mov eax,[ebx+18] get Ptr on PartyWindow (back at the MainMenu)
47B0C9 mov edx,[eax+44] get PartySlot (of the Hero using this Skill)
47B0CC off_49AA9C = InventoryDataPtr
47B0D3 call sub_47CE60 call GetBattlerData(Hero)
47B0D8 mov esi,eax memorize Ptr on BattlerData
47B0DA mov eax,esi get Ptr on BattlerData
47B0DE call get halvedMPCost_flag
47B0E1 test al,al Is the MP Cost halved?
47B0E3 jz jump to loc_47B108 if not
4A2CF0 off_4CDBC4 = SkillParamPtr
4A2CF7 mov edx,[ebx+48] get Skill_ID
4A2CFA call sub_47F0EC call GetSkillParam
4A2CFF cmp [eax+68],0 Does this Skill use MP(units)?
4A2D03 jnz jump to loc_4A2D2B if it uses MP(%)
47B0E5 off_49AAF4 = SkillParamPtr
47B0EC mov edx,[ebx+48] get Skill_ID
47B0EF call sub_46390C call GetSkillParam
47B0F4 mov edx,[eax+20] get MP Cost
47B0F8 sar edx,1 divide MP Cost by 2
47B0FF mov eax,esi get Ptr on BattlerData
47B101 call sub_481608 call DecreaseMP
47B106 jmp jump to loc_47B131
4A2D2B mov eax,esi get Ptr on BattlerData
4A2D2F call get Hero's max.MP
4A2D32 mov edi,eax memorize max.MP
4A2D34 off_4CDBC4 = SkillParamPtr
4A2D3B mov edx,[ebx+48] get Skill_ID
4A2D3E call sub_47F0EC call GetSkillParam
4A2D43 imul edi,[eax+6C] multiply max.MP by MP Cost(%)
4A2D4F idiv ecx divide result by 100
4A2D53 sar edx,1 divide MP Cost by 2
4A2D5A mov eax,esi get Ptr on BattlerData
4A2D5C call sub_4BF9E8 call DecreaseMP
4A2D61 jmp continues in 47B131 (2k code)
47B108 off_49AAF4 = SkillParamPtr
4A2D6A mov edx,[ebx+48] get Skill_ID
4A2D6D call sub_47F0EC call GetSkillParam
4A2D72 cmp [eax+68],0 Does this Skill use MP(units)?
4A2D76 jnz jump to loc_4A2D93 if it uses MP(%)
4A2D78 off_4CDBC4 = SkillParamPtr
47B10F mov edx,[ebx+48] get Skill_ID
47B112 call sub_46390C call GetSkillParam
47B117 mov edx,[eax+20] get MP Cost
47B11A mov eax,esi get Ptr on BattlerData
47B11C call sub_481608 call DecreaseMP
47B121 jmp jump to loc_47B131
4A2D93 mov eax,esi get Ptr on BattlerData
4A2D97 call get Hero's max.MP
4A2D9A mov edi,eax memorize max.MP
4A2D9C off_4CDBC4 = SkillParamPtr
4A2DA3 mov edx,[ebx+48] get Skill_ID
4A2DA6 call sub_47F0EC call GetSkillParam
4A2DAB imul edi,[eax+6C] multiply max.MP by MP Cost(%)
4A2DB7 idiv ecx divide result by 100
4A2DB9 mov edx,eax get MP Cost into EDX
4A2DBB mov eax,esi get Ptr on BattlerData
4A2DBD call sub_4BF9E8 call DecreaseMP
4A2DC2 jump continues in 47B131 (2k code)
47B123 off_49AA9C = InventoryDataPtr
47B12B xchg eax,edx get Item_ID into EDX
47B12C call sub_47D208 call DecItemUses
47B131 mov eax,ebx get MenuParamPtr
47B133 call sub_479C40 call CloseMenu(slow)
47B137 off_49AA74 = TeleportLocationPtr
47B13F call sub_47C9A4 get EscapeLocation
47B144 call sub_47C864 call DoTeleport
47B149 off_49AB50 = MapParamPtr
47B150 call sub_47B6A8 update Map(?)
47B155 duration of the ScreenTransition
47B15C off_49AB50 = MapParamPtr
47B163 call sub_46B4C0 call FadeInScreen
47B16B off_49AAF4 = SkillParamPtr
47B172 mov edx,[ebx+48] get Skill_ID
47B175 call sub_46390C call GetSkillParam
47B17A mov edx,[eax+30] get assigned SoundEffect
47B17D off_49ABA4 = MainPtr
47B184 call sub_46A0A8 call PlaySound
47B189 mov eax,[ebx+44] get Item_ID (if a SkillScroll was used, else: EAX = 0)
47B18C test eax,eax Was an Item_ID assigned?
47B18E jnz jump to loc_47B1ED if it was
47B190 mov eax,[ebx+18] get Ptr on PartyWindow (back at the MainMenu)
47B193 mov edx,[eax+44] get PartySlot (of the Hero using this Skill)
47B196 off_49AA9C = InventoryDataPtr
47B19D call sub_47CE60 call GetBattlerData(Hero)
47B1A2 mov esi,eax memorize Ptr on BattlerData
47B1A4 mov eax,esi get Ptr on BattlerData
47B1A8 call get halvedMPCost_flag
47B1AB test al,al Is the halvedMPCost_flag = true?
47B1AD jz jump to loc_47B1D2 if MP Cost is not halved
4A2E56 off_4CDBC4 = SkillParamPtr
4A2E5D mov edx,[ebx+48] get Skill_ID
4A2E60 call sub_47F0EC call GetSkillParam
4A2E65 cmp [eax+68],0 Does this Skill use MP(units)?
4A2E69 jnz jump to loc_4A2E91 if it uses MP(%)
47B1AF off_49AAF4 = SkillParamPtr
47B1B6 mov edx,[ebx+48] get Skill_ID
47B1B9 call sub_46390C call GetSkillParam
47B1BE mov edx,[eax+20] get MP Cost
47B1C2 sar edx,1 divide MP Cost by 2
47B1C9 mov eax,esi get Ptr on BattlerData
47B1CB call sub_481608 call DecreaseMP
47B1D0 jmp jump to loc_47B1FB
4A2E91 mov eax,esi get Ptr on BattlerData
4A2E95 call get max.MP
4A2EA1 mov edx,[ebx+48] get Skill_ID
4A2EA4 call sub_47F0EC call GetSkillParam
4A2EA9 imul edi,[eax+6C] multiply max.MP by MP Cost(%)
4A2EB5 idiv ecx divide result by 100
4A2EB9 sar edx,1 divide MP Cost by 2
4A2EC0 mov eax,esi get Ptr on BattlerData
4A2EC2 call sub_4BF9E8 call DecreaseMP
4A2EC7 jmp continues in 47B1FB (2k code)
47B1D2 off_49AAF4 = SkillParamPtr
4A2ED0 mov edx,[ebx+48] get Skill_ID
4A2ED3 call sub_47F0EC call GetSkillParam
4A2ED8 cmp [eax+68],0 Does this Skill use MP(units)?
4A2EDC jnz jump to loc_4A2EF9 if it uses MP(%)
4A2EDE off_4CDBC4 = SkillParamPtr
47B1D9 mov edx,[ebx+48] get Skill_ID
47B1DC call sub_46390C call GetSkillParam
47B1E1 mov edx,[eax+20] get MP Cost
47B1E4 mov eax,esi get Ptr on BattlerData
47B1E6 call sub_481608 call DecreaseMP
47B1EB jmp jump to loc_47B1FB
4A2EF9 mov eax,esi get Ptr on BattlerData
4A2EFD call get max.MP
4A2F09 mov edx,[ebx+48] get Skill_ID
4A2F0C call sub_47F0EC call GetSkillParam
4A2F11 imul edi,[eax+6C] multiply max.MP by MP Cost(%)
4A2F1D idiv ecx divide result by 100
4A2F1F mov edx,eax get MP Cost into EDX
4A2F21 mov eax,esi get Ptr on BattlerData
4A2F23 call sub_4BF9E8 call DecreaseMP
4A2F28 jmp continues in 47B1FB (2k code)
47B1ED off_49AA9C = InventoryDataPtr
47B1F5 xchg eax,edx get Item_ID into EDX
47B1F6 call sub_47D208 call DecItemUses
47B1FB off_49AAF4 = SkillParamPtr
47B202 mov edx,[ebx+48] get Skill_ID
47B205 call sub_46390C call GetSkillParam
47B20A mov edx,[eax+28] get Switch_ID
47B20D off_49ABA4 = MainPtr
47B214 mov cl,1 ECX = 1 (Switch ON)
47B216 call sub_469E84 call SetSwitch
47B21B off_49AC98 = EventDataPtr
47B225 call sub_48C648 update Events
47B22A mov eax,ebx get MenuParamPtr
47B22C call sub_479C00 call CloseMenu(fast)
4A2F70 mov eax,ebx get MenuParamPtr
4A2F72 call sub_4A18A4 open SkillUseMenu
47B234 <>SkillUseNavigation (2k3: 4A2F7C)
47B235 mov ebx,eax memorize MenuParamPtr
47B237 mov eax,[ebx+1C] get Ptr on PartyWindow(ItemSkillUse)
47B23C call update Cursor (allows CursorNavigation)
47B23F off_49AA04 = KeyPtr
47B246 test Was a DecisionKey pressed?
47B24D jz jump to loc_47B258 if not
47B24F mov eax,ebx get MenuParamPtr
47B251 call sub_47A560 call SkillUse
47B258 off_49AA04 = KeyPtr
47B25F test Was a CancelKey pressed?
47B266 jz jump to loc_47B289 if not
47B268 off_49ABA4 = MainPtr
47B26F call sub_46A588 get CancelSound
47B27D call sub_46A0A8 call PlaySound
47B282 mov eax,ebx get MenuParamPtr
47B284 call sub_47A914 call CloseSkillUseMenus
47B28C <>TeleportNavigation (2k3: 4A2FD4)
47B28E mov ebx,eax memorize MenuParamPtr
47B290 mov eax,[ebx+28] get Ptr on TeleportWindow
47B295 call update Cursor (allows CursorNavigation)
47B298 off_49AA04 = KeyPtr
47B29F test Was a DecisionKey pressed?
47B2A6 jz jump to loc_47B37D if not
47B2AC off_49AAF4 = SkillParamPtr
47B2B3 mov edx,[ebx+48] get Skill_ID
47B2B6 call sub_46390C call GetItemParam
47B2BB mov edx,[eax+30] get assigned SoundEffect
47B2BE off_49ABA4 = MainPtr
47B2C5 call sub_46A0A8 call PlaySound
47B2CA mov eax,[ebx+44] get Item_ID (in case a SkillScroll was used)
47B2CD test eax,eax Was an Item_ID assigned? (Was a SkillScroll Item used?)
47B2CF jnz jump to loc_47B32E if not
47B2D1 mov eax,[ebx+18] get Ptr on PartyWindow (back at the MainMenu)
47B2D4 mov edx,[eax+44] get PartySlot (of the Hero using this Skill)
47B2D7 off_49AA9C = InventoryDataPtr
47B2DE call sub_47CE60 call GetBattlerData(Hero)
47B2E3 mov esi,eax memorize Ptr on BattlerData
47B2E5 mov eax,esi get Ptr BattlerData
47B2E9 call get halvedMPCost_flag
47B2EC test al,al Is the halvedMPCost_flag = true?
47B2EE jz jump to loc_47B313 if MP Cost is not halved
4A303D off_4CDB4C = SkillParamPtr
4A3044 mov edx,[ebx+48] get Skill_ID
4A3047 call sub_47F0EC call GetSkillParam
4A304C cmp [eax+68],0 Does this Skill use MP(units)?
4A3050 jnz jump to loc_4A3078 if it uses MP(%)
47B2F0 off_49AAF4 = SkillParamPtr
47B2F7 mov edx,[ebx+48] get Skill_ID
47B2FA call sub_46390C call GetItemParam
47B2FF mov edx,[eax+20] get MP Cost
47B303 sar edx,1 divide MP Cost by 2
47B30A mov eax,esi get Ptr on BattlerData
47B30C call sub_481608 call DecreaseMP
47B311 jmp jump to loc_47B33C
4A3078 mov eax,esi get Ptr on BattlerData
4A307C call get Hero's max.MP
4A307F mov edi,eax memorize max.MP
4A3081 off_4CDBC4 = SkillParamPtr
4A3088 mov edx,[ebx+48] get Skill_ID
4A308B call sub_47F0EC call GetSkillParam
4A3090 imul edi,[eax+6C] multiply max.MP by MP Cost(%)
4A3094 mov eax,edi get the result into EAX
4A309C idiv ecx divide the result by 100
4A309E mov edx,eax get the MP Cost for the Skill
4A30A0 sar edx,1 divide MP Cost by 2
4A30A7 mov eax,esi get Ptr on BattlerData
4A30A9 call sub_4BF9E8 call DecreaseMP
4A30AE jmp continues in 47B33C (2k code)
47B313 off_49AAF4 = SkillParamPtr
4A30B7 mov edx,[ebx+48] get Skill_ID
4A30BA call sub_47F0EC call GetSkillParam
4A30BF cmp [eax+68],0 Does this Skill use MP(units)?
4A30C3 jnz jump to loc_4A30E0 if it uses MP(%)
4A30C5 off_4CDBC4 = SkillParamPtr
47B31A mov edx,[ebx+48] get Skill_ID
47B31D call sub_46390C call GetSkillParam
47B322 mov edx,[eax+20] get MP Cost
47B325 mov eax,esi get Ptr on BattlerData
47B327 call sub_481608 call DecreaseMP
4A30DE jmp continues in 47B33C (2k code)
4A30E0 mov eax,esi get Ptr on BattlerData
4A30E4 call get Hero's max.MP
4A30E7 mov edi,eax memorize max.MP
4A30E9 off_4CDBC4 = SkillParamPtr
4A30F0 mov edx,[ebx+48] get Skill_ID
4A30F3 call sub_47F0EC call GetSkillParam
4A30F8 imul edi,[eax+6C] multiply max.MP by MP Cost(%)
4A3104 idiv ecx divide result by 100
4A3106 mov edx,eax get the MP Cost for the Skill
4A3108 mov eax,esi get Ptr on BattlerData
4A310A call sub_4BF9E8 call DecreaseMP
47B32C jmp jump to loc_47B33C
47B32E off_49AA9C = InventoryDataPtr
47B336 xchg eax,edx get Item_ID into EDX
47B337 call sub_47D208 call DecItemUses
47B33C mov eax,ebx get MenuParamPtr
47B33E call sub_479C40 call CloseMenu(slow)
47B343 mov eax,[ebx+28] get Ptr on TeleportWindow
47B346 mov edx,[eax+44] get selected TeleportChoice
47B349 inc edx get Location_ID (of all memorized Locations)
47B34A off_49AA74 = TeleportLocationPtr
47B351 call sub_47C9AC get TeleportLocation
47B356 call sub_47C864 call DoTeleport
47B35B off_49AB50 = MapParamPtr
47B362 call sub_47B6A8 update Map(?)
47B367 duration of the ScreenTransition
47B36E off_49AB50 = MapParamPtr
47B375 call sub_46B4C0 call FadeInScreen
47B37D off_49AA04 = KeyPtr
47B384 test Was a CancelKey pressed?
47B38B jz jump to function's end if not
47B38D off_49ABA4 = MainPtr
47B394 call sub_46A588 get CancelSound
47B3A2 call sub_46A0A8 call PlaySound
47B3A7 mov eax,[ebx+28] get Ptr on TeleportWindow
47B3AC call ??
47B3AF cmp [ebx+44],0 Was an Item_ID assigned?
47B3B3 jnz jump to loc_47B3BE if a SkillScroll was used
47B3B5 mov eax,ebx get MenuParamPtr
47B3B7 call sub_47A914 call CloseSkillUseMenus (return to SkillMenu)
47B3BC jmp jump to function's end
47B3BE mov eax,ebx get MenuParamPtr
47B3C0 call sub_47A2F4 call CloseItemUseMenu (return to ItemMenu)
47B3C8 <>UpdateEquipMenu (2k3: 4A31AC)
47B3C9 mov ebx,eax memorize MenuParamPtr
47B3CB mov eax,[ebx+2C] get Ptr on EquipWindow
47B3D0 call update Cursor(?)
47B3D3 mov eax,[ebx+2C] get Ptr on EquipWindow
47B3D6 call sub_493E80 call IsWindowOpen
47B3DB test al,al Has the Window fully slid open?
47B3DD jnz jump to function's end if it has
47B3DF mov eax,ebx get MenuParamPtr
47B3E1 call sub_479C80 call CloseSubMenu
47B3E8 <>QuitMenuNavigation (2k3: 4A31CC)
47B3E9 mov ebx,eax memorize MenuParamPtr
47B3EB mov eax,[ebx+30] get Ptr on QuitWindow
47B3F0 call update Cursor (allow CursorNavigation)
47B3F3 off_49AA04 ) KeyPtr
47B3FA test Was a DecisionKey pressed?
47B401 jz jump to loc_47B46F if not
47B403 mov eax,[ebx+30] get Ptr on QuitWindow
47B406 cmp [eax+44],0 Was the selected Choice = "Yes"?
47B40A jnz jump to loc_47B44C if "No" was selected
47B40C off_49ABA4 = MainPtr
47B413 call sub_46A4A0 get DecisionSound
47B421 call sub_46A0A8 call PlaySound
47B42D mov edx,190 duration of the FadeOut
47B432 call sub_46A048 call StopMusic
47B437 mov eax,ebx get MenuParamPtr
47B439 call sub_479C40 call CloseMenu(slow)
47B43E off_49AA48 = ScreenPtr
47B445 call sub_455E44 call GoToTitle
47B44C off_49ABA4 = MainPtr
47B453 call sub_46A4A0 get DecisionSound
47B461 call sub_46A0A8 call PlaySound
47B466 mov eax,ebx get MenuParamPtr
47B468 call sub_479C80 call CloseSubMenu
47B46D jmp jump to function's end
47B46F off_49AA04 = KeyPtr
47B476 test Was a CancelKey pressed?
47B47D jz jump to function's end if not
47B47F off_49ABA4 = MainPtr
47B486 call sub_46A588 get CancelSound
47B494 call sub_46A0A8 call PlaySound
47B499 mov eax,ebx get MenuParamPtr
47B49B call sub_479C80 call CloseSubMenu
4A3288 <>StatusMenuNavigation
4A3289 mov ebx,eax memorize MenuParamPtr
4A328B mov eax,[ebx+4C] get Ptr on StatusWindow
4A3290 call update Cursor(?)
4A3293 off_4CDAEC = KeyPtr
4A329A test Was a CancelKey pressed?
4A32A1 jz jump to function's end if not
4A32A3 off_4CDC7C = MainPtr
4A32AA call sub_48BA04 get CancelSound
4A32B8 call sub_48B538 call PlaySound
4A32BD mov eax,[ebx+4C] get Ptr on StatusWindow
4A32C2 call terminate Window
4A32C5 = GoldWindow_Width (MainMenu)
4A32C7 = GoldWindow_Height[/color]
4A32C9 = hide (0|1 = no|yes)
4A32CB = y-Pos[/color]
4A32D0 = x-Pos default = 0
4A32D2 mov eax,[ebx+14] get Ptr on GoldWindow
4A32D5 call sub_4C6FDC draw GoldWindow
4A32DA mov eax,ebx get MenuParamPtr
4A32DC call sub_4A10D4 call CloseSubMenu
4A32E4 <>UpdateOrderMenu
4A32E5 mov ebx,eax memorize MenuParamPtr
4A32E7 mov eax,[ebx+50] get Ptr on OrderWindow (with the new PartyOrder)
4A32EC call update Cursor (allow CursorNavigation)
4A32EF mov eax,[ebx+50] get Ptr on OrderWindow
4A32F2 cmp [eax+80],0 Was the Party reorganized or the OrderMenu closed?
4A32F9 jz jump to function's end if OrderMenu is still active
4A32FB mov eax,[ebx+18] get Ptr on PartyWindow
4A3300 call terminate Window
4A3303 mov eax,[ebx+50] get Ptr on OrderWindow
4A3308 call terminate Window
4A330B mov eax,ebx get MenuParamPtr
4A330D call sub_4A10D4 call CloseSubMenu
47B4A4 <>RefreshMenu (2k3: 4A3314)
47B4A8 mov esi,eax memorize MenuParamPtr
47B4AA cmp [esi+D],0 Is the MenuInitialized_flag = false?
47B4AE jz jump to function's end if not
47B4B4 = MenuBackground_Height (for clearing previously shown Menu pages)
47B4B9 lea eax,[esp+4] get MenuBG_Height
47B4BD push eax memorize MenuBG_Height
47B4BE = MenuBackground_Width
47B4C3 = y-Pos
47B4C5 = x-Pos
47B4C7 call sub_40ECD0 set size and position of the background graphic(?)
47B4CC push esp memorize MenuBG's position + size
47B4CD off_49ABA4 = MainPtr
47B4D4 mov eax,[eax+18] get Ptr on SystemGraphic
47B4D7 call sub_467B90 call GetMenuBG (get assigned color)
47B4DC mov ecx,eax get MenuBG's color
47B4DE off_49AA48 = ScreenPtr
47B4E5 mov eax,[eax+34] ??
47B4E8 pop edx get MenuBG's position + size
47B4E9 call sub_452530 fill the MenuBG with the assigned color (1 pixel)
47B4EE xor eax,eax reset EAX to zero
47B4F0 mov al,[esi+C] write MenuSubScene into EAX
47B4F6 ja jump to loc_47B565 on invalid input
47B4F8 jmp branch
EAX = 0 jmp loc_47B565 -> Main
EAX = 1 jmp loc_47B51F -> ItemMenu
EAX = 2 jmp loc_47B529 -> UseItem
EAX = 3 jmp loc_47B533 -> SkillMenu
EAX = 4 jmp loc_47B53D -> UseSkill
EAX = 5 jmp loc_47B547 -> UseTeleport
EAX = 6 jmp loc_47B551 -> EquipMenu
EAX = 7 jmp loc_47B55B -> QuitGame
EAX = 8 jmp loc_4A33E1 -> StatusMenu
EAX = 9 jmp loc_4A33F3 -> OrderMenu
47B51F mov eax,[esi+20] get Ptr on ItemWindow
47B524 call draw MenuSubScene
47B529 mov eax,[esi+1C] get Ptr on ItemSkillUse-Window
47B52E call draw MenuSubScene
47B533 mov eax,[esi+24] get Ptr on SkillWindow
47B538 call draw MenuSubScene
47B53D mov eax,[esi+1C] get Ptr on ItemSkillUse-Window
47B542 call draw MenuSubScene
47B547 mov eax,[esi+28] get Ptr on TeleportWindow
47B54C call draw MenuSubScene
47B551 mov eax,[esi+2C] get Ptr on EquipWindow
47B556 call draw MenuSubScene
47B55B mov eax,[esi+40] get Ptr on QuitWindow
47B560 call draw MenuSubScene
4A33E1 mov eax,[esi+4C] get Ptr on StatusWindow
4A33E6 call draw MenuSubScene
4A33E9 mov eax,[esi+14] get Ptr on GoldWindow
4A33EE call draw GoldWindow
4A33F3 mov eax,[esi+50] [get Ptr on OrderWindow
4A33F8 call draw MenuSubScene
47B565 mov eax,[esi+10] get Ptr on OptionsWindow
47B56A call draw OptionsWindow
47B56D mov eax,[esi+14] get Ptr on GoldWindow
47B572 call draw GoldWindow
47B575 mov eax,[esi+18] get Ptr on PartyWindow
47B57A call draw PartyWindow
48371C <>GetListedSkill (2k3: 4B7868)
48371C test edx,edx Was a valid ArrayPos assigned?
48371E jl jump to loc_483733 if negative
483720 cmp edx,[eax+84] Does the ArrayPos exceed the SkillArraySize?
483726 jge jump to loc_483733 if SkillArraySize is too small
483728 mov eax,[eax+88] get Ptr on SkillArray
48372E mov output Skill_ID from the SkillArray
483733 xor eax,eax return zero
483738 <>LearnSkill (2k3: 4B7884)
48373C mov memorize new Skill_ID
48373F mov ebx,eax memorize Ptr on HeroData
483741 mov get Skill_ID
483744 mov eax,ebx get Ptr on HeroData
483746 call sub_483840 call IsSkillKnown
48374B test al,al Is the SkillKnown_flag = true?
48374D jnz jump to function's end if the Skill was already learnt
483753 inc [ebx+84] SkillArraySize +1
483759 mov edx,[ebx+84] get new SkillArraySize
48375F add edx,edx ArraySize = number of learned Skills x2
483761 lea [ebx+88] load address of the Skill_Array
483767 call sub_402730 call CreateArray
48376C mov eax,[ebx+88] get Ptr on Skill_Array
483772 mov edx,[ebx+84] get SkillArraySize
483778 mov get memorized Skill_ID (of the new Skill)
48377C mov memorize Skill_ID at the end of the Skill_Array
483781 mov eax,[ebx+84] get SkillArraySize
483788 test eax,eax Does the Array have a valid size?
48378A jl jump to function's end on invalid ArraySize
48378D xor esi,esi initialize ArrayPosPtr
__________SortSkillsLoop__________
48378F ->mov edx,[ebx+88] get Ptr on Skill_Array
483795 | mov get Skill_ID at current ArrayPos
483799 | cmp Is the Skill_ID at the ArrayPos below the new Skill_ID?
48379C | jl jump to loc_4837D0 if it is (don't insert new Skill)
48379E | mov eax,[ebx+84] get SkillArraySize
4837A4 | dec eax SkillArraySize -1 (= ArrayPos in front of the new Skill)
4837A5 | lea edx,[esi+1] memorize ArrayPos +1
4837A8 | sub edx,eax amount of Skills to be relocated (negative value)
4837AA | jg jump to loc_4837C0 if ArrayPos is at the end of the Array
4837AC | dec edx ArrayPos -1 (Ptr on the previous Skills)
4837AD >>mov ecx,[ebx+88] get Ptr on Skill_Array
4837B3 | mov get Skill_ID
4837B8 | mov relocate Skill_ID (one position to the right)
4837BC | dec eax SkillArraySize -1 (insert Skills starting from the end)
4837BD | inc edx amount of Skills to be relocated +1
4837BE <<jnz relocate all previously learned Skills
4837C0 | mov eax,[ebx+88] get Ptr on Skill_Array
4837C6 | mov get memorized Skill_ID (of the newly learned Skill)
4837CA | mov insert Skill_ID at current Array_Pos
4837CE | jmp break loop
4837D0 | inc esi ArrayPosPtr +1
4837D1 | dec eax SkillArraySize -1
4837D2 --jnz jump until the new Skill is memorized
__________________________________
4837DC <>ForgetSkill (2k3: 4B7928)
4837DE mov esi,[eax+84] get Hero's SkillArraySize
4837E5 test esi,esi Does the Hero know any Skills?
4837E7 jl jump to function's end if not
4837EA xor ecx,ecx initialize ArrayPosPtr
__________DeleteSkillLoop__________
4837EC ->mov ebx,[eax+88] get Ptr on Skill_Array
4837F2 | mov get Skill_ID in current ArrayPos
4837F6 | cmp edx,ebx Does the Skill_ID (to forget) match with a learned Skill?
4837F8 | jnz jump to loc_483837 if not
4837FA | lea edx,[ecx+1] get ArrayPos +1
4837FD | mov ecx,[eax+84] get SkillArray_Size
483803 | dec ecx SkillArray_Size -1
483804 | sub ecx,edx amount of Skills to be relocated
483806 | jl 48381C jump if the Skill was stored at the end of the SkillArray
483809 >>mov ebx,[eax+88] get Ptr on Skill_Array
48380F | mov get the Skill_ID at the ArrayPos
483813 | mov relocate Skill_ID (to where the forgotten Skill was)
483818 | inc edx next ArrayPos / next Skill
483819 | dec ecx amount of Skills to be relocated -1
48381A <<jnz shift all Skills left to fill the removed Skill's ArrayPos
48381C | dec [eax+84] SkillArray_Size -1
483822 | mov edx,[eax+84] get new SkillArray_Size
483828 | add edx,edx size of the new Array (2 bytes for each Skill)
48382A | add eax,88 get address of the Skill_Array
48382F | c.sub_402730 call CreateArray
483837 | inc ecx ArrayPosPtr +1
483838 | dec esi SkillArraySize -1
483839 --jnz jump to check the entire Skill_Array for the Skill
___________________________________
483840 <>IsSkillKnown (2k3: 4B798C)
483843 mov edi,edx memorize Skill_ID
483845 xor edx,edx (default) SkillKnown_flag = false
483847 mov ecx,[eax+84] get SkillArraySize
48384E test ecx,ecx Does the Array have a valid size?
483850 jl jump to function's end if no Skills were learned before
483853 xor esi,esi initialize ArrayPosPtr
__________CheckForSkillLoop__________
483855 ->mov ebx,[eax+88] get Ptr on Skill_Array
48385B | mov get Skill_ID at current ArrayPos
48385F | cmp edi,ebx Does the Skill_ID match with the memorized Skill_ID?
483861 <<jnz jump if not
483863 | mov dl,1 SkillKnown_flag = true
483865 >>inc esi ArrayPosPtr +1
483866 | dec ecx SkillArraySize -1
483867 --jnz check the whole Skill_Array
_____________________________________
483869 mov eax,edx return SkillKnown_flag
483870 <>GetEquippedItem (2k3: 4B79BC)
483870 test edx,edx Is the EquipSlot negative?
483872 jl jump on invalid EquipSlot //return zero
483874 cmp edx,4 Is the EquipSlot above Slot#5?
483877 jg jump on invalid EquipSlot //return zero
483879 mov get Item_ID stored in the EquipSlot
483882 xor eax,eax return zero
483888 <>CheckEquippedItem (2k3: 4B79D4)
48388C mov esi,ecx memorize Item_ID
48388E mov ebp,edx memorize EquipSlot
483890 mov edi,eax memorize Ptr on ActorData
483892 test esi,esi Is the Item_ID 1 or above?
483894 jnz jump to loc_48389D on valid Item_ID's
483896 mov bl,1 set ValidEquip_flag = true
483898 jmp jump to loc_483933
48389D xor ebx,ebx (default) ValidEquip_flag = false
48389F off_49AA34 = ItemParamPtr
4838A6 call sub_45A8E4 get amount of Items in the database
4838AB cmp esi,eax Is the memorized Item_ID not listed in the database
4838AD jg jump to loc_483933 on invalid Item_ID's
4838B3 off_49AA34 = ItemParamPtr
4838BA mov edx,esi get Item_ID
4838BC call sub_4631D0 call GetItemParam
4838C1 mov esi,eax memorize Ptr on ItemData
4838C3 mov edx,[edi+4] get Hero_ID
4838C6 mov eax,esi get Ptr on ItemData
4838C8 call sub_463054 call CanHeroUSeItem
4838CD test al,al Is the CanHeroUseItem_flag = true?
4838CF jz jump to loc_483933 if false
4838D1 off_49AC7C = HeroParamPtr
4838D8 mov edx,[edi+4] get Hero_ID
4838DB call sub_4643E4 call GetHeroParam
**HeroData:
04 = Hero_ID
08 = Hero_Name
0C = Hero_Title
10 = CharSet (FilePtr)
14 = CharSet (selected WalkGraphic 0..7)
18 = Transparancy_flag
1C = initial Level
20 = max.Level
24 = Crit_flag
28 = Crit Rate
2C = FaceSet (FilePtr)
30 = FaceSet (selected FaceGraphic 0..15)
34 = Hero Options (flags can be combined)
.. .. .. 01 = Two Weapon Style
.. .. 01 .. = Equipment locked
.. 01 .. .. = AI-controlled
01 .. .. .. = Strong Guard
38 ?
...
80 ?
...
290 ? Exp.Curve Param 1
294 ? Exp.Curve Param 2
298 ? Exp.Curve Param 3
...
2A8 ? unarmed Animation
2AC ? SkillLearnList
2B0 = SkillSlotName_flag
2B4 = SkillSlot_Name
4838E0 cmp [eax+34],0 Is "Two Weapon Style" unchecked?
4838E4 jz jump to loc_4838EA if unchecked
4838E6 mov al,1 TwoWeaponStyle (Weapon in EquipSlot#2 expected)
4838E8 jmp
4838EA mov al,2 no TwoWeaponStyle (Shield in EquipSlot#2 expected)
4838EC cmp ebp,4 Is the EquipSlot #5 or below?
4838EF ja jump to loc_483931 on invalid EquipSlots
4838F1 jmp branch
EBP = 0 jump loc_48390C -> EquipSlot#1
EBP = 1 jump loc_483914 -> EquipSlot#2
EBP = 2 jump loc_48391B -> EquipSlot#3
EBP = 3 jump loc_483923 -> EquipSlot#4
EBP = 4 jump loc_48392B -> EquipSlot#5
48390C cmp [esi+10],1 Is the ItemType = Weapon?
483910 jnz jump to loc_483933 if not //send ValidEquip_flag = false
483912 jmp jump to loc_483931
483914 cmp al,[esi+10] Is the ItemType = Weapon/Shield?
483917 jnz jump to loc_483933 if not //send ValidEquip_flag = false
483919 jmp jump to loc_483931
48391B cmp [esi+10],3 Is the ItemType = Armor?
48391F jnz jump to loc_483933 if not //send ValidEquip_flag = false
483921 jmp jump to loc_483931
483923 cmp [esi+10],4 Is the ItemType = Helm?
483927 jnz jump to loc_483933 if not //send ValidEquip_flag = false
483929 jmp jump to loc_483931
48392B cmp [esi+10],4 Is the ItemType = Other?
48392F jnz jump to loc_483933 if not //send ValidEquip_flag = false
483931 mov bl,1 set ValidEquip_flag = true
483933 mov eax,ebx output ValidEquip_flag
48393C <>IsItemEquipped (2k3: 4B7B10)
483940 mov edi,edx memorize Item_ID
483942 mov esi,eax memorize Ptr on ActorData
483944 xor ebx,ebx (default) Equipped_flag = false
483946 xor ebp,ebp initialize ÊquipSlotPtr
__________CompareEquipmentLoop__________
483948 ->mov edx,ebp get EquipSlot
48394A | mov eax,esi get Ptr on ActorData
48394C | c.sub_483870 call GetEquippedItem
483951 | cmp edi,eax Does the memorized Item_ID match the Item in the EquipSlot?
483953 <<jnz jump if another Item is in this EquipSlot
483955 | mov bl,1 set Equipped_flag = true
483957 >>inc ebp ÊquipSlot +1
483958 | cmp ebp,5 Were all EquipSlots tested?
48395B --jnz
________________________________________
48395D mov eax,ebx output Equipped_flag
483964 <>UnequipTwoHanded (2k3: 4B7B38)
483966 mov esi,edx memorize EquipSlot
483968 mov ebx,eax memorize Ptr on ActorData
48396A mov get Item_ID of the previously equipped Item
483972 cmp [ebx+8C],0 Is EquipSlot#1 empty?
48397A jbe jump to function's end if it is empty
48397C cmp [enx+8E],0 Is EquipSlot#2 empty?
483984 jbe jump to function's end if it is empty
483986 mov edx,[ebx+8C] get Item_ID in EquipSlot#1
48398D off_49AA34 = ItemParamPtr
483994 call sub_4631D0 call GetItemParam
483999 call sub_463178 call GetTwoHandedWeaponFlag
48399E test al,al Is the TwoHandedWeapon_flag = true
4839A0 jnz jump to loc_4839BE if true
4839A2 mov edx,[ebx+8E] get Item_ID in EquipSlot#2
4839A9 off_49AA34 = ItemParamPtr
4839B0 call sub_4631D0 call GetItemParam
4839B5 call sub_463178 call GetTwoHandedWeaponFlag
4839BA test al,al Is the TwoHandedWeapon_flag = true
4839BC jz jump to function's end if false
4839BE test esi,esi Was EquipSlot#1 re-equipped?
4839C0 jnz jump to loc_4839CB if not
4839C2 mov [ebx+8E],0 empty EquipSlot#2
4839CB dec esi Was EquipSlot#2 re-equipped?
4839CC jnz jump to function's end if not
4839CE mov [ebx+8C],0 empty EquipSlot#1
4B7C20 <>AddItem(Battle)
4B7C26 mov memorize ItemAmount
4B7C29 mov edi,edx memorize Item_ID
4B7C2B mov ebx,eax memorize Ptr on ActorData
4B7C2D test edi,edi Was any Item_ID assigned?
4B7C2F jz jump to function's end if not
4B7C35 cmp Was any ItemAmount assigend?
4B7C39 jle jump to function's end if not
4B7C3F mov eax,[ebx+33C] get InventorySize(Battle)
4B7C45 mov memorize InventorySize(Battle)
4B7C4A test eax,eax Is the InventorySize(Battle) above zero?
4B7C4C jl jump to loc_4B7C9D on invalid input
4B7C4F xor esi,esi initialize ArrayPosPtr
__________AddToInventoryLoop__________
4B7C51 ->mov get Ptr on ItemList(Battle)
4B7C57 | mov get Item_ID at ArrayPos from the ItemList(Battle)
4B7C5B | cmp edi,edx Does the Item_ID match with the memorized Item_ID?
4B7C5D <<jnz jump to loc_4B7C85 if not
4B7C5F | mov eax,[ebx+344] get Ptr on ItemAmountList(Battle)
4B7C65 | xor edx,edx reset EDX zo zero
4B7C67 | mov dl,[eax+esi] get ItemAmount (memorized Item_ID)
4B7C6A | add ItemAmount(BattleInventory) + ItemAmount(regular Inventory)
4B7C6D | mov eax,63 EAX = 63 (ItemCap)
4B7C72 | c.sub_42A248 call SwapValue (EAX = 99 if ItemAmount exceeds the cap)
4B7C77 | mov get Ptr on ItemAmountList(Battle)
4B7C7D | mov [edx+esi],al memorize ItemAmount(Battle)
4B7C80 | jmp jump to function's end
4B7C85 >>mov get Ptr on ItemList(Battle)
4B7C8B | mov get Item_ID at ArrayPos from the ItemList(Battle)
4B7C8F | cmp edi,edx Is the Item's ID below the Item_ID at the ArrayPos?
4B7C91 < jge loc_4B7C99 jump if not
4B7C93 | mov memorize Position in the ItemList(Battle)
4B7C97 | jmp break loop
4B7C99 > inc esi ArrayPos +1
4B7C9A | dec eax InventorySize(Battle) -1
4B7C9B --jnz
______________________________________
4B7C9D inc InventorySize(Battle) +1
4B7CA3 mov edx,[ebx+33C] get InventorySize(Battle)+1
4B7CA9 add edx,edx ArraySize = 2x InventorySize(Battle)+1
4B7CAB lea eax,[ebx+340] get address of the ItemList(Battle)
4B7CB1 call sub_4027AC call CreateArray
4B7CB6 mov edx,[ebx+33C] get InventorySize(Battle)+1
4B7CBC lea eax,[ebx+344] get address of the ItemAmountList(Battle)
4B7CC2 call sub_4027AC call CreateArray
4B7CC7 mov esi,[ebx+33C] get InventorySize(Battle)+1
4B7CCD dec esi InventorySize(Battle)+1 -1
4B7CCE mov get InventoryPos(Battle) of the new Item
4B7CD2 inc eax InventoryPos +1
4B7CD3 sub eax,esi subtract InventoryPos by InventorySize (negative result)
4B7CD5 jg loc_4B7CF8 jump if the Item will be added at the end of the ItemList
4B7CD7 dec eax amount of Items that have to be reorganized -1
__________SortItemsLoop__________
4B7CD8 ->mov get Ptr on ItemList(Battle)
4B7CDE | mov get Item_ID before the current InventoryPos
4B7CE3 | mov shift the Item_ID one Position towards the end of the Array
4B7CE7 | mov get Ptr on ItemAmountList(Battle)
4B7CED | mov get ItemAmount
4B7CF1 | mov move ItemAmount by one position
4B7CF4 | dec esi InventorySize(Battle) -1
4B7CF5 | inc eax loop until all Items have been reorganized
4B7CF6 --jnz
_________________________________
4B7CF8 mov eax,[ebx+340] get Ptr on ItemList(Battle)
4B7CFE mov get InventoryPos of the new Item
4B7D02 mov write the Item_ID of the new Item into the ItemList(Battle)
4B7D06 mov get ItemAmount of the new Item
4B7D09 mov eax,63 EAX = 99 (ItemCap)
4B7D0E call sub_42A248 call SwapValue (EAX = 99 if ItemAmount exceeds the cap)
4B7D13 mov edx,[ebx+344] get Ptr on ItemAmountList(Battle)
4B7D19 mov get InventoryPos of the new Item
4B7D1D mov [edx+ecx],al write the ItemAmount into the ItemAmountList(Battle)
4B7D28 <>CreateBattleInventory
4B7D2C mov esi,eax memorize Ptr on ActorData
4B7D2E off_4CDB74 = InventoryDataPtr
4B7D34 xor eax,eax EAX = 0
4B7D36 mov [esi+33C],eax reset InventorySize(Battle)
4B7D3C mov eax,[ebp] get Ptr on InventoryData
4B7D3F mov edi,[eax+C] get InventorySize
4B7D43 test edi,edi Is there any Item in the Inventory?
4B7D45 jl jump to loc_4B7D6D if empty
4B7D48 xor ebx,ebx initialize ArrayPosPtr
__________ResetBattleInventoryLoop__________
4B7D4A ->mov eax,[ebp] get Ptr on InventoryData
4B7D4D | mov edx,ebx get ArrayPos (position in the Inventory)
4B7D4F | c.sub_4A61F8 call GetItemAmount
4B7D54 | push eax memorize ItemAmount
4B7D55 | mov eax,[ebp] get Ptr on InventoryData
4B7D58 | mov edx,ebx get ArrayPos
4B7D5A | c.sub_4A61E4 call GetListedItem
4B7D5F | mov edx,eax get Item_ID
4B7D61 | mov eax,esi get Ptr on ActorData
4B7D63 | pop ecx get memorized ItemAmount
4B7D64 | c.sub_4B7C20 call AddItem(Battle)
4B7D69 | inc ebx ArrayPos +1
4B7D6A | dec edi InventorySize -1
4B7D6B --jnz
____________________________________________
4B7D6D xor ebx,ebx initialize EquipSlotPtr
__________CheckSkillEquipmentLoop__________
4B7D6F ->mov get Item_ID of the Item in the EquipSlot
4B7D77 | test di,di Is an Item equipped in this EquipSlot?
4B7D7A <<jz jump to loc_4B7DA8 if the EquipSlot is empty
4B7D7C | mov edx,di get Item_ID
4B7D7F | off_4CDB14 = ItemParamPtr
4B7D86 | c.sub_47E8E8 call GetItemParam
4B7D8B | cmp [eax+AC],0 Is the InvokeSkill_flag = false?
4B7D92 <<jz jump to loc_4B7DA8 if false
4B7D94 | mov get Item_ID of the Item in the EquipSlot
4B7D9C | mov ecx,1 ECX = 1 (ItemAmount = 1)
4B7DA1 | mov eax,esi get Ptr on ActorData
4B7DA3 | c.sub_4B7C20 call AddItem(Battle)
4B7DA8 >>inc ebx EquipSlot +1
4B7DA9 | cmp ebx,5 Were all EquipSlots tested?
4B7DAC --jnz
___________________________________________
4839DC <>EquipItem (2k3: 4B7DB4)
4839DF mov edi,ecx memorize Item_ID (0=unequip | >1 = equip)
4839E1 mov esi,edx memorize EquipSlot (0=Slot#1 | 1=Slot#2 | ...)
4839E3 mov ebx,eax memorize Ptr on ActorData
4839E5 test esi,esi Is the EquipSlot below Slot#1?
4839E7 jl jump to loc_483A3D on invalid EquipSlot(?)
4839E9 cmp esi,4 Is the EquipSlot higher than Slot#5?
4839EC jg jump to loc_483A3D on invalid EquipSlot
4839EE mov ecx,edi get Item_ID
4839F0 mov edx,esi get EquipSlot
4839F2 mov eax,ebx get Ptr on ActorData
4839F4 call sub_483888 call CheckEquippedItem
4839F9 test al,al Does the Item go into the selected EquipSlot?
4839FB jz jump to loc_483A3D if the Item was invalid
4839FD mov get Item_ID of previously equipped Item (0 if none)
483A05 cmp edi,eax Is new Item the same as the previously equipped Item?
483A07 jz jump to loc_483A3D if the same Item was equipped
4B7DF5 test esi,esi Is the EquipSlot = Slot#1?
4B7DF7 jnz jump to loc_4B7E3F if not
4B7DF9 cmp [ebx+11E],0 Is there no Item in EquipSlot#2?
4B7E01 jbe jump to loc_4B7E3F if the EquipSlot is empty
4B7E03 mov edx,[ebx+11E] get Item_ID from EquipSlot#2
4B7E0A off_4CDB14 = ItemParamPtr
4B7E11 call sub_47E8E8 call GetItemParam
4B7E16 call sub 47E890 get TwoHandedWeapon_flag
4B7E1B test al,al Is the (already) equipped Item two-handed?
4B7E1D jz jump to loc_4B7E3F if not
4B7E1F mov edx,[ebx+11E] get Item_ID from EquipSlot#2
4B7E26 off_4CDB14 = ItemParamPtr
4B7E2D call sub_47E8E8 call GetItemParam
4B7E32 cmp [eax+B8],0 Is the ItemCursed_flag = false?
4B7E39 jnz jump to function's end if cursed (Slot#1 can't be equipped)
4B7E3F cmp esi,1 Is the EquipSlot = Slot#2?
4B7E42 jnz continues in 483A09 (2k code) if not
4B7E44 cmp [ebx+11C],0 Is there no Item in EquipSlot#1?
4B7E4C jbe continues in 483A09 (2k code) if not
4B7E4E mov edx,[ebx+11C] get Item_ID from EquipSlot#1
4B7E55 off_4CDB14 = ItemParamPtr
4B7E5C call sub_47E8E8 call GetItemParam
4B7E61 call sub 47E890 get TwoHandedWeapon_flag
4B7E66 test al,al Is the (already) equipped Item two-handed?
4B7E68 jz continues in 483A09 (2k code) if not
4B7E6A mov edx,[ebx+11C] get Item_ID from EquipSlot#1
4B7E71 off_4CDB14 = ItemParamPtr
4B7E78 call sub_47E8E8 call GetItemParam
4B7E7D cmp [eax+B8],0 Is the ItemCursed_flag = false?
4B7E84 jnz jump to function's end if cursed (Slot#2 can't be equipped)
4B7E8A mov get Item_ID of the previously equipped Item
4B7E92 mov memorize Item_ID
483A09 mov get Item_ID of the previously equipped Item
483A11 off_49AA9C = InventoryDataPtr
483A18 mov ecx,1 ECX = 1 (add 1 Item to inventory)
483A1D call sub_47D058 call AddItem (Item_ID in EDX)
483A22 mov memorize newly equipped Item in the ActorData
483A2A off_49AA9C = InventoryDataPtr
483A31 mov ecx,1 ECX = 1 (subtract 1 Item from inventory)
483A36 mov edx,edi get Item_ID of the newly equipped Item into EDX
483A38 call sub_47D154 call RemoveItem (Item_ID in EDX)
4B7EC4 cmp Was an Item_ID memorized?
4B7EC8 jle jump to loc_4B7F3D if not
4B7ECA off_4CDB14 = ItemParamPtr
4B7ED1 mov get memorized Item_ID
4B7ED4 call sub_47E8E8 call GetItemParam
4B7ED9 cmp [eax+BC],1 Is the ConditionInfliction_flag = true?
4B7EE0 jnz jump to loc_4B7F3D if not
4B7EE2 off_4CDB14 = ItemParamPtr
4B7EE9 mov get memorized Item_ID
4B7EEC call sub_47E8E8 call GetItemParam
4B7EF1 mov al,[eax+10] get ItemType
4B7EF4 add al,FE ItemType -2
4B7EF6 sub al,4 ItemType -4
4B7EF8 jnb jump to loc_4B7F3D if the Item is not a piece of Equipment
4B7EFA off_4CDE84 = ConditionParamPtr
4B7F01 call sub_475714 get the amount of Conditions in the database
4B7F06 test eax,eax Are there any Conditions?
4B7F08 jle jump to loc_4B7F3D if not
4B7F0A mov memorize ConditionAmount
4B7F0E mov ebp,1 initialize Condition_ID-Ptr
__________CureConditionsLoop__________
4B7F13 -> off_4CDB14 = ItemParamPtr
4B7F1A | mov get memorized Item_ID
4B7F1D | c.sub_47E8E8 call GetItemParam
4B7F22 | mov edx,ebp get current Condition_ID
4B7F24 | c.sub_47E7C0 get ConditionChecked_flag
4B7F29 | test al,al s Condition (by Condition_ID) affected by this Item?
4B7F2B <<jz loc_4B7F36 jump if not
4B7F2D | mov edx,ebp get Condition_ID
4B7F2F | mov eax,ebx get Ptr on ActorData
4B7F31 | c.sub_4C019C call RemoveCondition
4B7F36 >>inc ebp Condition_ID +1
4B7F37 | dec ConditionAmount -1
4B7F3B --jnz loop until all checked Conditions are removed
______________________________________
4B7F3D test edi,edi Was a newly equipped Item_ID given?
4B7F3F jle continues in 483A3D (2k code) if not
4B7F45 off_4CDB14 = ItemParamPtr
4B7F4C mov edx,edi get Item_ID
4B7F4E call sub_47E8E8 call GetItemParam
4B7F53 cmp [eax+BC],1 Is the ConditionInfliction_flag = true?
4B7F5A jnz continues in 483A3D (2k code) if not
4B7F60 off_4CDB14 = ItemParamPtr
4B7F67 mov edx,edi get Item_ID
4B7F69 call sub_47E8E8 call GetItemParam
4B7F6E mov al,[eax+10] get ItemType
4B7F71 add al,FE ItemType -2
4B7F73 sub al,4 ItemType -1
4B7F75 jnb continues in 483A3D (2k code) if not a piece of Equipment
4B7F77 off_4CDE84 = ConditionParamPtr
4B7F7E call sub_475714 get ConditionAmount
4B7F83 test eax,eax Are there any Conditions in the database?
4B7F85 jle continues in 483A3D (2k code) if not
4B7F87 mov memorize ConditionAmount
4B7F8B mov ebp,1 initialize Condition_ID-Ptr
__________InflictConditionsLoop__________
4B7F90 -> off_4CDB14 = ItemParamPtr
4B7F97 | mov edx,edi get Item_ID (newly equipped Item)
4B7F99 | c.sub_47E8E8 call GetItemParam
4B7F9E | mov edx,ebp get Condition_ID
4B7FA0 | c.sub_47E7C0 get ConditionChecked_flag
4B7FA5 | test al,al Is the Condition affected by this Item?
4B7FA7 <<jz loc_4B7FDE jump if not
4B7FA9 | off_4CDE84 = ConditionParamPtr
4B7FB0 | mov edx,ebp get Item_ID
4B7FB2 | c.sub_47BDBC call GetConditionParam
4B7FB7 | cmp [eax+C],1 Is the Persistance = PersistAfterBattle?
4B7FBB < jnz loc_4B7FC8 jump if not
4B7FBD | mov edx,ebp get Condition_ID
4B7FBF | mov eax,ebx get Ptr on ActorData
4B7FC1 | c.sub_4C001C call InflictCondition
4B7FC6 <<jmp loc_4B7FDE
4B7FC8 > off_4CDC7C = MainPtr
4B7FCF | cmp [eax+4],2 Is the Scene = Battle?
4B7FD3 <<jnz loc_4B7FDE jump if not
4B7FD5 | mov edx,ebp get Item_ID
4B7FD7 | mov eax,ebx get Ptr on ActorData
4B7FD9 | c.sub_4C001C call InflictCondition
4B7FDE | inc ebp Condition_ID +1
4B7FDF | dec ConditionAmount -1
4B7FE3 --jnz
_________________________________________
483A3D cmp [ebx+8C],0 Is there an Item equipped in Slot#1?
483A45 jbe jump to function's end if there isn't
483A47 cmp [ebx+8E],0 Is there an Item equipped in Slot#2?
483A4F jbe jump to function's end if there isn't
483A51 mov get Item_ID of the Item in Slot#1
483A58 off_49AA34 = ItemParamPtr
483A5F call sub_4631D0 call GetItemParam
483A64 call sub_463178 call GetTwoHandedWeaponFlag
| sub_463178 <>GetTwoHandedWeaponFlag
| 463179 mov ebx,eax memorize Ptr on ItemData
| 46317B mov eax,ebx get Ptr on ItemData
| 46317D call sub_463160 call CheckIfWeapon
| 463182 test al,al Is the Item a Weapon?
| 463184 jz jump if the Item is a Shield
| 463186 cmp [ebx+2C],1 Is the weapon two-handed?
| 46318A jz jump if it is
| 46318C xor eax,eax return TwoHandedWeapon_flag = false
| 463190 mov al,1 return TwoHandedWeapon_flag = true
483A69 test al,al Is the TwoHandedWeapon_flag = true?
483A6B jnz jump to loc_483A89 if it is
483A6D mov get Item_ID of the Item in Slot#2
483A74 off_49AA34 = ItemParamPtr
483A7B call sub_4631D0 call GetItemParam
483A80 call sub_463178 call GetTwoHandedWeaponFlag
483A85 test al,al Is the TwoHandedWeapon_flag = true?
483A87 jz jump to function's end if it isn't
483A89 test esi,esi Is the EquipSlot = Slot#1?
483A8B jnz jump to lov_483A99 if Slot#2
483A8D mov edx,1 EDX = 1 (to remove the Item from Slot#2)
483A92 mov eax,ebx get Ptr on ActorData
483A94 call sub_483AAC call UnequipItem
483A99 dec esi result is 0 if the EquipSlot was Slot#2
483A9A jnz jump to function's end if not Slot#2
483A9C xor ebx,ebx EDX = 0 (to remove the Item from Slot#1)
483A9E mov eax,ebx get Ptr on ActorData
483AA0 call sub_483AAC call UnequipItem
483AAC <>UnequipItem (2k3: 4B8054)
483AAC xor ecx,ecx Item_ID = 0 (for unequipping Items)
483AAE call sub_4839DC call EquipItem
483AB4 <>GetEquipPoolSize (2k3: 4B805C)
483ABB mov memorize current EquipSlot
483ABE mov ebp,eax memorize Ptr on ActorData
483AC0 cmp Is the current EquipSlot = Slot#2?
483AC4 jnz jump to loc_483AE0 if not
483AC6 mov edx,[ebp+4] get Hero_ID
483AC9 off_49AC7C = HeroParamPtr
483AD0 call sub_4643E4 call GetHeroParam
483AD5 cmp [eax+34],0 Is "Two Weapon Style" unchecked?
483AD9 jz jump to loc_483AE0 if unchecked
483ADB xor eax,eax EAX = 0 (0 = EquipSlot#1)
483ADD mov memorize EquipSlot#1 instead of EquipSlot#2
483AE0 mov (default) ListSize = 1
483AE8 49AA9C = InventoryDataPtr
483AEF mov esi,[eax+C] get InventorySize (amount of different Items in Inventory)
483AF3 test esi,esi Are there any Items in the Inventory?
483AF5 jl jump to loc_483B95 if the Inventory is empty
483AFC xor edi,edi initialize ListPosPtr
__________EquipPoolSizeLoop__________
483AFE -> off_49AA9C = InventoryDataPtr
483B05 | mov edx,edi get current ListPosition
483B07 | c.sub_47D030 call GetListedItem
483B0C | mov edx,eax get Item_ID
483B15 | c.sub_4631D0 call GetItemParam
483B1A | mov ebx,eax memorize Ptr on ItemData
483B1C | mov edx,[ebp+4] get Hero_ID
4B80B8 | off_4CDC0C = DatabaseSystemPtr
4B80BF | cmp [eax+C0],0 Does this Item's usability depend on JobClasses?
4B80C6 | jnz jump to loc_4B8163 if it does
483B1F | mov eax,ebx get Ptr on ItemData
483B21 | c.sub_463054 call CanHeroUSeItem
483B26 | test al,al Can the Hero equip this Item?
483B28 | jz jump to loc_483B8D if not
483B2A | xor eax,eax reset EAX to zero
483B2C | mov al,[ebx+10] write ItemType into EAX
483B2F | cmp eax,5 Is the ItemType a piece of equipment?
483B32 | ja jump to loc_483B8D if not
483B34 | jmp branch
EAX = 0 jmp loc_483B8D -> Common Item
EAX = 1 jmp loc_483B53 -> Weapon
EAX = 2 jmp loc_483B5F -> Shield
EAX = 3 jmp loc_483B6B -> Armor
EAX = 4 jmp loc_483B77 -> Helm
EAX = 5 jmp loc_483B83 -> Other
483B53 >>cmp Is the current EquipSlot = Slot#1?
483B57 | jnz jump to loc_483B8D if not
483B59 | inc EquipPoolSize +1
483B5D | jmp jump to loc_483B8D
483B5F >>cmp Is the current EquipSlot = Slot#2?
...
483B6B >>cmp Is the current EquipSlot = Slot#3?
...
483B77 >>cmp Is the current EquipSlot = Slot#4?
...
483B83 >>cmp Is the current EquipSlot = Slot#5?
...
4B8163 | mov eax,ebp get Ptr on ActorData
4B8165 | c.sub_4BF440 call GetJobClass
4B816A | mov edx,eax get Hero's JobClass
4B816C | inc edx get JobClass_ID
4B816D | mov eax,ebx get Ptr on ItemData
4B816F | c.sub_47E76C call CanJobClassUseItem
4B8174 | test al,al Can the Hero use/equip this Item?
4B8176 | jz continues in 483B8D (2k code) if not
4B8178 | xor eax,eax reset EAX to zero
4B817A | mov al,[ebx+10] get ItemType
4B817D | cmp eax,5 Is the ItemType a piece of Equipment?
4B8180 | ja continues in 483B8D (2k code) if not
4B8182 | jmp branch
4B8189 < jmp continues in 483B8D (2k code) if Common Item
EAX = 1 jmp loc_4B81A1 -> Weapon
EAX = 2 jmp loc_4B81AD -> Shield
EAX = 3 jmp loc_4B81B9 -> Armor
EAX = 4 jmp loc_4B81C5 -> Helm
EAX = 5 jmp loc_4B81D1 -> Other
4B81A1 >>cmp Is the current EquipSlot = Slot#1?
...
4B81A7 | inc EquipPoolSize +1
...
4B81AD >>cmp Is the current EquipSlot = Slot#2?
...
4B81B9 >>cmp Is the current EquipSlot = Slot#3?
...
4B81C5 >>cmp Is the current EquipSlot = Slot#4?
...
4B81D1 >>cmp Is the current EquipSlot = Slot#5?
...
483B8D > inc edi ListPos +1 (next Item in the Inventory)
483B8E | dec esi InventorySize -1
483B8F --jnz check the whole Inventory for matching Equipment
_____________________________________
483B95 mov output EquipPoolSize
483BA0 <>GetEquipPoolItem (2k3: 4B81F0)
483BA7 mov memorize ListPosition
483BAB mov memorize EquipSlot
483BAE mov ebp,eax memorize Ptr on ActorData
483BB0 cmp Is the EquipSlot = Slot#2?
483BB4 jnz jump to loc_483BD0 if not
483BB6 mov edx,[ebp+4] get Hero_ID
483BB9 off_49AC7C = HeroParamPtr
483BC0 call sub_4643E4 call GetHeroParam
483BC5 cmp [eax+34],0 Is "Two Weapon Style" unchecked?
483BC9 jz jump to loc_483BD0 if unchecked
483BCB xor eax,eax EAX = 0 (0 = EquipSlot#1)
483BCD mov memorize EquipSlot#1 instead of EquipSlot#2
483BD0 mov (default) PoolPosition = -1
483BD8 off_49AA9C = InventoryDataPtr
483BDF mov edi,[eax+C] get InventorySize
483BE3 test edi,edi Are there any Items in the Inventory?
483BE5 jl jump to loc_483C9F if the Inventory is empty
483BEC xor ebx,ebx initialize ArrayPosPtr
__________EquipPoolItemLoop__________
483BEE -> off_49AA9C = InventoryDataPtr
483BF5 | mov edx,ebx et ArrayPosition
483BF7 | c.sub_47D030 call GetListedItem
483BFC | mov edx,eax get Item_ID
483BFE | off_49AA34 = InventoryDataPtr
483C05 | c.sub_4631D0 call GetItemParam
483C0A | mov esi,eax memorize Ptr on ItemData
4B8250 | off_4CDC0C = DatabaseSystemPtr
4B8255 | cmp [eax+C0],0 Does this Item's usability depend on JobClasses?
4B8257 | jnz jump to loc_4B82FB if it does
483C0C | mov edx,[ebp+4] get Hero_ID
483C0F | mov eax,esi get Ptr on ItemData
483C11 | c.sub_463054 call CanHeroUSeItem
483C16 | test al,al an the Hero equip this Item?
483C18 | jz jump to loc_483C7D if not
483C1A | xor eax,eax reset EAX to zero
483C1C | mov al,[esi+10] get ItemType
483C1F | cmp eax,5 Is the ItemType a piece of equipment?
483C22 | ja jump to loc_483B8D if not
483C24 | jmp branch
EAX = 0 jmp loc_483C7D -> Common Item
EAX = 1 jmp loc_483C43 -> Weapon
EAX = 2 jmp loc_483C4F -> Shield
EAX = 3 jmp loc_483C5B -> Armor
EAX = 4 jmp loc_483C67 -> Helm
EAX = 5 jmp loc_483C73 -> Other
483C43 >>cmp Is the current EquipSlot = Slot#1?
483C47 | jnz jump to loc_483C7D if not
483C49 | inc PoolPosition +1
...
483C4F >>cmp Is the current EquipSlot = Slot#2?
...
483C5B >>cmp Is the current EquipSlot = Slot#3?
...
483C67 >>cmp Is the current EquipSlot = Slot#4?
...
483C73 >>cmp Is the current EquipSlot = Slot#5?
...
4B82FB | mov eax,ebp get Ptr on ActorData
4B82FD | c.sub_4BF440 call GetJobClass
4B8302 | mov edx,eax get Hero's JobClass
4B8304 | inc edx get JobClass_ID
4B8305 | mov eax,ebx get Ptr on ItemData
4B8307 | c.sub_47E76C call CanJobClassUseItem
4B830C | test al,al can the Hero use/equip this Item?
4B830E | jz continues in 483C7D (2k code) if not
4B8310 | xor eax,eax reset EAX to zero
4B8312 | mov al,[ebx+10] get ItemType
4B8315 | cmp eax,5 Is the ItemType a piece of Equipment?
4B8318 | ja continues in 483C7D (2k code) if not
4B831A | jmp branch
4B8321 <<jmp continues in 483C7D (2k code) if ItemType = Common Item
EAX = 1 jmp loc_4B8339 -> Weapon
EAX = 2 jmp loc_4B8345 -> Shield
EAX = 3 jmp loc_4B8351 -> Armor
EAX = 4 jmp loc_4B835D -> Helm
EAX = 5 jmp loc_4B8369 -> Other
4B8339 >>cmp Is the current EquipSlot = Slot#1?
...
4B833F | inc PoolPosition +1
...
4B8345 >>cmp Is the current EquipSlot = Slot#2?
...
4B8351 >>cmp Is the current EquipSlot = Slot#3?
...
4B835D >>cmp Is the current EquipSlot = Slot#4?
...
4B8369 >>cmp Is the current EquipSlot = Slot#5?
...
483C7D >>mov get PoolPosition
483C81 | cmp Is this the Item that is selected with the Cursor?
483C85 < jnz jump to loc_483C97 if not
483C87 | off_49AA9C = InventoryDataPtr
483C8E | mov edx,ebx get ArrayPos (in the regular Inventory)
483C90 | c.sub_47D030 GetListedItem
483C95 | jmp break loop //output Item_ID
483C97 > inc ebx ArrayPos +1
483C98 | dec edi InventorySize -1
483C99 --jnz
_____________________________________
483C9F xor eax,eax outputs no Item_ID
495B68 <>?? (2k3: 4C86EC)
495B7C <>InfoText (2k3: 4C8700)
495B7D mov ebx,eax memorize Ptr on InfoWindow
495B7F mov eax,ebx get Ptr on InfoWindow
495B81 call sub_493D80 call RefreshWindow (clear window's content)
495B86 mov eax,[ebx+64] get displayed text in the InfoWindow(?)
495B8A = InfoText_Color
495B8C = show (0|1 = no|yes)
495B8E = y-Pos
495B93 = x-Pos
495B98 mov eax,ebx get Ptr on InfoWindow
495B9C call PrintString(?)
495BA4 <>UpdateInfoWindow (2k3: 4C8728)
495BAC mov esi,edx memorize Ptr on String/VocabString
495BAE mov edi,eax memorize Ptr on InfoWindow
495BC1 mov edx,esi get Ptr on String/VocabString
495BC3 call sub_403B64 load String(?)
495BC8 mov ebx,ebx (default) Length(?)
495BCA jmp loc_495BFA
...
495BF9 inc ebx Length +1(?)
495BFA mov eax,esi get Ptr on String/VocabString
495BFC call sub_403D4C get StringLength
495C01 cmp ebx,eax Still within StringLength?
495C0B call sub_403E5C ??
495C18 call sub_403B20 load String
495C1D mov eax,edi get Ptr on InfoWindow
495C21 call PrintString(?)
495C48 <>?? (2k3: 4C87CC)
495C8C <>?? (2k3: 4C8810)
495CBC <>DrawItemMenu (2k3: 4C8840)
495CBD mov ebx,eax get Ptr on ItemWindow
495CBF mov [ebx+64],edx memorize Hero_ID (0 if on field)
495CC2 mov [ebx+4],2 set to 2 columns of Items
495CC9 = InfoWindow_Width
495CCE = InfoWindow_Height
495CD0 = hide (0|1 = no|yes)
495CD2 = y-Pos default = 0 //set manually: [B9 .. .. .. ..] needed
495CD4 = x-Pos default = 0 //set manually: [B2 ..]
495CD6 mov eax,[ebx+68] get Ptr on InfoWindow
495CD9 call sub_493C30 call CreateWindow
495CDE off_49ABA4 = MainPtr
495CE5 cmp [eax+4],1 Is the Scene = Menu?
495CE9 jnz jump to loc_495D07 if in battle
495CEB = ItemWindow_Width
495CF0 = ItemWindow_Height
495CF5 = slide open (0|1 = no|yes)
495CF7 = y-Pos
495CFC = x-Pos default = 0
495CFE mov ebx,eax get Ptr on ItemWindow
495D00 call sub_493C30 call CreateWindow
4C888A off_4CDB74 = InventoryDataPtr
4C8891 mov eax,[eax+C] get InventorySize
4C8894 mov [ebx+40],eax memorize InventorySize
4C8897 mov [ebx+80],eax memorize InventorySize
495D05 jmp jump to loc_495D1E
4C889F mov eax,A0 default y-Pos
4C88A4 off_4CDD60 = BattleLayoutPtr
4C88AC cmp [edx+8],2 Is the LayoutType = Gauge?
4C88B0 jnz jump to loc_4C88B7 if not
4C88B2 = y-Pos (ItemWindow, Gauge)
4C88B7 off_4CDD60 = BattleLayoutPtr
4C88BF cmp [edx+10],0 Is the WindowSize = large?
4C88C3 jnz jump to loc_4C88DB if small
4C88C5 = ItemWindow_Width
4C88CA = ItemWindow_Height (large)
4C88CC = slide open (0|1 = no|yes)
4C88CE = y-Pos
4C88D0 = x-Pos default = 0 //set manually: [BA .. .. .. ..] needed
4C88D2 mov eax,ebx get Ptr on ItemWindow
4C88D4 call sub_4C63DC call CreateWindow
4C88D9 jmp jump to loc_4C88F0
4C88DB = ItemWindow_Width
4C88E0 = ItemWindow_Height (small)
4C88E2 = slide open (0|1 = no|yes)
4C88E4 lea ecx,[eax+C] add 12 pixel to y-Pos
4C88E7 = x-Pos default = 0
4C88E9 mov eax,ebx get Ptr on ItemWindow
4C88EB call sub_4C63DC call CreateWindow
4C88F0 off_4CDDC8 = ActorDataPtr
4C88F7 mov edx,[ebx+78] get Hero_ID
4C88FA call sub_4B4870 call GetActor
4C88FF mov esi,[eax+33C] get Hero's InventorySize(Battle) (including Equipment)
4C8905 mov [ebx+40],esi memorize InventorySize
4C8908 mov [ebx+80],esi memorize InventorySize
...
continues in 495D2B (2k code)
495D07 = ItemWindow_Width
495D0C = ItemWindow_Height (in battle)
495D0E = slide open (0|1 = no|yes)
495D10 = y-Pos
495D15 = x-Pos default = 0
495D17 mov ebx,eax get Ptr on ItemWindow
495D19 call sub_493C30 call CreateWindow
495D1E off_49AA9C = InventoryDataPtr
495D25 mov eax,[eax+C] get InventorySize
495D28 mov [ebx+40],eax memorize InventorySize
495D2B mov dl,1 show Cursor = true
495D2D mov eax,ebx get Ptr on ItemWindow
495D2F call sub_4946DC call CreateCursor
495D34 mov eax,ebx get Ptr on ItemWindow
495D38 call print Items
495D3B mov eax,ebx get Ptr on ItemWindow
495D3D call sub_495D58 call GetItemExplanation
495D44 <>ResetItemWindows (2k3: 4C8928)
495D45 mov ebx,eax memorize Ptr on ItemWindow
495D47 mov eax,[ebx+68] get Ptr on InfoWindow
495D4C call terminate InfoWindow
495D4F mov eax,ebx get Ptr on InfoWindow
495D51 call sub_493E24 call TerminateWindow
495D58 <>GetItemExplanation (2k3: 4C893C)
495D59 mov ebx,eax memorize Ptr on ItemWindow
495D5B mov eax,[ebx+44] get current Choice (CursorPosition)
495D5E cmp eax,[ebx+40] Does the Cursor point at an Item?
495D61 jge jump to loc_495D90 if the ItemWindow is empty
495D63 mov eax,ebx et Ptr on ItemWindow
495D65 call sub_495EF0 call getItem
495D6A test eax,eax Is it a valid Item?(?)
495D6C jle jump to loc_495D90 on invalid Items
495D6E mov eax,ebx get Ptr on ItemWindow
495D70 call sub_495EF0 call getItem
495D75 mov edx,eax get Item_ID
495D77 off_49AA34 = ItemParamPtr
495D7E call sub_4631D0 call GetItemParam
495D83 mov edx,[eax+C] get Ptr on ItemExplanation
495D86 mov eax,[ebx+68] get Ptr on InfoWindow
495D89 call sub_495BA4 call UpdateInfoWindow
495D90 xor edx,edx EDX = 0 (blank explanation)
495D92 mov eax,[ebx+68] get Ptr on InfoWindow
495D95 call sub_495BA4 call UpdateInfoWindow
495D9C <>LoadShownItems (2k3: 4C8980)
495DB0 mov ebx,eax get Ptr on ItemWindow
495DB2 mov memorize current ListPos (Cursor Position)
495DCA mov edx,esi get current ListPos
495DCC call sub_47D030 call GetListedItem (in the Inventory)
495DD1 mov edi,eax memorize Item_ID
495DD3 off_49AA9C = InventoryDataPtr
495DDA mov edx,esi get current ListPos
495DDC call sub_47D044 call GetItemAmount
495DE1 mov memorize ItemAmount
495DE4 mov esi,[ebx+64] get Hero_ID (0 on the field)
495DE7 test esi,esi Is a Hero_ID available?
495DE9 jle jump to loc_495E12 if not in battle
495DEB off_49ACE8 = ActorDataPtr
495DF2 mov edx,esi get Hero_ID
495DF4 call sub_482A78 call GetActor
4C89C8 mov edx,esi get current ListPos
4C89CA call sub_4B5E48 call GetListedItem(Battle)
4C89CF mov edi,eax memorize Item_ID
4C89D1 off_4CDDC8 = ActorDataPtr
4C89D8 mov edx,[ebx+78] get Hero_ID
4C89DB call sub_4B4870 call GetActor
4C89E0 mov edx,esi get current ListPos
4C89E2 call sub_4B5E64 call GetItemAmount(Battle)
4C89E7 mov memorize ItemAmount
4C89EA off_4CDDC8 = ActorDataPtr
4C89F1 mov edx,[ebx+74] get Hero_ID
4C89F4 call sub_4B4870 call GetActor
495DF9 mov edx,edi get memorized Item_ID
495DFD call check if the Hero can use this Item
495D03 test al,al Can the Hero use this Item?
495D05 jz jump to loc_495E0B if not
495D07 xor esi,esi Item_Color = white (usable)
495D09 jmp jump to loc_495E2D
495E0B mov esi,3 Item_Color = gray (not usable)
495E10 jmp jump to loc_495E2D
4C8A12 off_4CDB74 = InventoryDataPtr
4C8A19 mov edx,esi get current ListPos
4C8A1B call sub_4A61E4 call GetListedItem (Inventory without Skill invoking Equip)
4C8A20 mov edi,eax memorize Item_ID
4C8A22 off_4CDB74 = InventoryDataPtr
4C8A29 mov edx,esi get current ListPos
4C8A2B call sub_4A61F8 call GetItemAmount
4C8A30 mov memorize ItemAmount
495E12 off_49AA9C = InventoryDataPtr
495E19 mov edx,edi get Item_ID
495E1B call sub_47D31C call CheckItemUsability
495E20 test al,al Is this type of Item usable?
495E22 jz jump to loc_495E28 if not
495E24 xor esi,esi Item_Color = white (usable)
495E26 jmp jump to loc_495E2D
495E28 mov esi,3 Item_Color = gray (not usable)
495E2D off_49AA34 = ItemParamPtr
495E34 mov edx,edi get Item_ID
495E36 call sub_4631D0 call GetItemParam
495E3B mov eax,[eax+8] get Item_Name
495E3F = ItemName_Color
495E42 = y-Pos
495E45 = x-Pos
495E48 mov eax,ebx get Ptr on ItemWindow
495E4C call PrintString(?)
495E53 mov get memorized ItemAmount
495E70 = color of ": amount"
495E73 mov get x-Pos of the Item
495E76 add edx,78 correct x-Pos to print ": amount" after the Item
495E79 mov get y-Pos of the Item
495E7C mov eax,ebx get Ptr on ItemWindow
495E80 call PrintString(?)
495EBC <>UpdateItemCursor (2k3: 4C8ADC)
495EB1 mov eax,ebx get Ptr on Window
495EC1 call sub_494340 call SlideOpenWindow
495EC6 mov eax,ebx get Ptr on Window
495EC8 call sub_493E90 call HasWindowSlidOpen
495ECD test al,al Has the Window fully slid open?
495ECF jz jump to function's end if not
495ED1 mov eax,ebx get Ptr on Window
495ED3 call sub_495D58 call GetItemExplanation
495EDC <>UpdateItemMenu (2k3: 4C8AFC)
495EDD mov ebx,eax memorize Ptr on ItemWindow
495EDF mov eax,ebx get Ptr on Window
495EE1 call sub_49444C draw ItemWindow
495EE6 mov eax,[ebx+68] get Ptr on InfoWindow
495EEB call draw InfoWindow
495EF0 <>GetItem (2k3: 4C8B10)
4C8B12 mov ebx,eax get Ptr on ItemWindow
4C8B14 mov esi,[ebx+78] memorize Hero_ID
4C8B17 cmp esi,1 Is a Hero_ID available?
4C8B1A jge jump to loc_4C8B2E if in battle (+ Skill invoking Equip)
495EF0 off_49AA9C = InventoryDataPtr
495EF8 mov eax,[eax+44] get current ListPos
495EFB xchg eax,edx get current ListPos into EDX
495EFC call sub_47D030 call GetListedItem
4C8B2E off_4CDDC8 = ActorDataPtr
4C8B35 mov edx,esi get Hero_ID
4C8B37 call sub_4B4870 call GetActor
4C8B3C mov edx,[ebx+44] get current ListPos
4C8B3F call sub_4B5E48 call GetListedItem(Battle)
495F04 <>?? (2k3: 4C8B60)
495F58 <>?? (2k3: 4C8BE4)
495F90 <>DrawSkillMenu (2k3: 4C8C34)
495FA2 mov esi,eax get Ptr on SkillWindow
495FB2 mov [esi+64],edx memorize Hero_ID
495FB5 mov [esi+4],2 set to 2 columns of Skills
495FBC = InfoWindow_Width
495FC1 = InfoWindow_Height
495FC3 = hide (0|1 = no|yes)
495FC5 = y-Pos default = 0
495FC7 = x-Pos default = 0
495FC9 mov,[esi+68] get Ptr on Window (InfoWindow)
495FCC call sub_493C30 call CreateWindow
4C8CA4 off_4CDD60 = BattleLayoutPtr
4C8CAB cmp [eax+8],0 Is the LayoutType = Traditional?
4C8CAF jnz jump if not //continues in 495FD1 (2k code)
4C8CB5 off_4CDDC8 = ActorDataPtr
4C8CBC mov edx,[esi+78] get Hero_ID
4C8CBF call sub_4B4870 call GetActor
4C8CC4 mov edi,eax memorize Ptr on ActorData
4C8CC6 off_4CDD60 = BattleLayoutPtr
4C8CCD cmp [eax+10],0 Is the WindowSize = large?
4C8CD1 jnz jump to loc_4C8D3B if not
4C8CD3 = MP-Window_Width (large)
4C8CD5 = MP-Window_Height
4C8CD7 = hide (0|1 = no|yes)
4C8CD9 = y-Pos
4C8CDE = x-Pos
4C8CE3 mov eax,[esi+90] get Ptr on Window (MP-Window)
4C8CE9 call sub_4C63DC call CreateWindow
4C8CF2 mov eax,[edi+18] get Hero_MP
4C8CFC mov eax,edi get Ptr on ActorData
4C8D00 call get Hero's max.MP
4C8D20 = MP/max.MP_Color
4C8D22 = show (0|1 = no|yes)
4C8D24 = y-Pos (numbers)
4C8D29 = x-Pos
4C8D2E mov eax,[esi+90] get Ptr on Window (MP-Window)
4C8D36 call PrintString(?)
4C8D39 jmp /continues in continues in 495FD1 (2k code)
4C8D3B = MP-Window_Width (small)
4C8D3D = MP-Window_Height
4C8D3F = hide (0|1 = no|yes)
4C8D41 = y-Pos
4C8D46 = x-Pos
4C8D4B mov eax,[esi+90] get Ptr on Window (MP-Window)
4C8D51 call sub_4C63DC call CreateWindow
4C8D5A mov eax,[edi+18] get Hero_MP
4C8D64 mov eax,edi get Ptr on ActorData
4C8D68 call get Hero's max.MP
4C8D88 = MP/max.MP_Color
4C8D8A = show (0|1 = no|yes)
4C8D8C = y-Pos (numbers)
4C8D91 = x-Pos
4C8D96 mov eax,[esi+90] get Ptr on Window (MP-Window)
4C8D9E call PtrinString(?)
495FD1 off_49ABA4 = MainPtr
495FD8 cmp [eax+4],1 Is the Scene = Menu?
495FDC jnz jump to loc_496214 if inside of battle
495FE2 = SubWindow_Width
495FE7 = SubWindow_Height
495FE9 = hide (0|1 = no|yes)
495FEB = y-Pos
495FF0 = x-Pos default = 0
495FF2 mov eax,[esi+6C] get Ptr on Window (SubWindow)
495FF5 call sub_493C30 call CreateWindow
495FFA = SkillWindow_Width
495FFF = SkillWindow_Height
496004 = slide open (0|1 = no|yes)
496006 = y-Pos
49600B = x-Pos default = 0
49600D mov eax,esi get Ptr on Window (SkillWindow)
49600F call sub_493C30 call CreateWindow
496014 mov ebx,[esi+6C] get Ptr on SubWindow
496017 off_49ACE8 = ActorDataPtr
49601E mov edx,[esi+64] get Hero_ID
496021 call sub_482A78 call GetActor
496026 mov memorize Ptr on ActorData
49602C mov get ActorData
496031 call get HeroName
496038 = HeroName_Color
49603A = show (0|1 = no|yes)
49603C = y-Pos
496041 = x-Pos
496046 mov eax,ebx get Ptr on SubWindow
49604A call PrintString(?)
49604D off_49ABDC = VocabStringPtr
496054 mov eax,[eax+100] get VocabString for Lv-Symbol
49605B = Lv-Symbol_Color
49605D = show (0|1 = no|yes)
49605F = y-Pos
496064 = x-Pos
496069 mov eax,ebx get Ptr on SubWindow
49606D call PrintString(?)
496074 mov get Ptr on ActorData
496077 call sub_4833D8 get Hero_Lv
496096 = Lv_Color
496098 = show (0|1 = no|yes)
49609A = y-Pos
49609F = x-Pos
4960A4 mov eax,ebx get Ptr on SubWindow
4960A8 call PrintString(?)
4960AE mov get Ptr on ActorData
4960B1 call sub_481D6C call GetCondition
4960BA mov get Ptr on ActorData
4960BD call sub_481DB8 call GetConditionColor
4960C2 = Condition_Color
4960C3 = show (0|1 = no|yes)
4960C5 = y-Pos
4960CA = x-Pos
4960CF mov eax,ebx get Ptr on SubWindow
4960D3 call PrintString(?)
4960D6 off_49ABDC = VocabStringPtr
4960DD mov eax,[eax+104] get VocabString for HP-Symbol
4960E4 = HP-Symbol_Color
4960E6 = show (0|1 = no|yes)
4960E8 = y-Pos
4960ED = x-Pos
4960F2 mov eax,ebx get Ptr on SubWindow
4960F6 call PrintString(?)
4960F9 off_49ABDC = VocabStringPtr
496100 mov eax,[eax+108] get VocabString for MP-Symbol
496107 = MP-Symbol_Color
496109 = show (0|1 = no|yes)
49610B = y-Pos
496110 = x-Pos
496115 mov eax,ebx get Ptr on SubWindow
496119 call PrintString(?)
496120 mov get Ptr on ActorData
496123 mov eax,[eax+14] get Hero_HP
496140 mov get Ptr on ActorData
496143 call sub_4814E8 call GetHPColor
496148 = HP_Color
496149 = show (0|1 = no|yes)
49614B = y-Pos
496150 = x-Pos
496155 mov eax,ebx get Ptr on SubWindow
496159 call PrintString(?)
496160 mov get Ptr on ActorData
496163 mov eax,[eax+18] get Hero_MP
496180 mov get Ptr on ActorData
496183 call sub_48151C call GetMPColor
496188 = MP_Color
496189 = show (0|1 = no|yes)
49618B = y-Pos
496190 = x-Pos
496195 mov eax,ebx get Ptr on SubWindow
496199 call PrintString(?)
4961A0 mov get Ptr on ActorData
4961A5 call get Hero's max.HP
4961C2 = "/max.HP"_Color
4961C4 = show (0|1 = no|yes)[/color]
4961C6 = y-Pos
4961CB = x-Pos
4961D0 mov eax,ebx get Ptr on SubWindow
4961D4 call PrintString(?)
4961DB mov get Ptr on ActorData
4961E0 call get Hero's max.MP
4961FD = "/max.MP"_Color
4961FF = show (0|1 = no|yes)
496201 = y-Pos
496206 = x-Pos
49620B mov eax,ebx get Ptr on SubWindow
49620F call PrintString(?)
496212 jmp jump to loc_49622B
496214 = SkillWindow_Width (in battle)
496219 = SkillWindow_Height
49621B = slide open (0|1 = no|yes)
49621D = y-Pos
496222 = x-Pos default = 0
496224 mov eax,esi get Ptr on Window (SkillWindow)
496226 call sub_493C30 call CreateWindow
4C8FE8 off_4CDDC8 = ActorDataPtr
4C8FEF mov edx,[esi+78] get Hero_ID
4C8FF2 call sub_4B4870 call GetActor
4C8FF7 mov eax,[eax+114] get amount of Skills
4C8FFD mov [esi+40],eax memorize SkillAmount
4C9000 jmp continues in 496243 (2k Code)
4C9005 = y-Pos (SkillWindow, default)
4C900A off_4CDD60 = BattleLayoutPtr
4C9012 cmp [edx+8],2 Is the LayoutType = Gauge?
4C9016 jnz jump if not
4C9018 = y-Pos (SkillWindow, Gauge)
4C901D off_4CDD60 = BattleLayoutPtr
4C9025 cmp [edx+10],0 Is the WindowSize = large?
4C9029 jnz jump to loc_4C9041 if small
4C902B = SkillWindow_Width (in battle)
4C9030 = SkillWindow_Height[/color]
4C9032 = slide open (0|1 = no|yes)
4C9034 = y-Pos
4C9036 = x-Pos default = 0
4C9038 mov eax,esi get Ptr on Window (SkillWindow)
4C903A call sub_4C63DC call CreateWindow
4C903F jmp continues in 49622B (2k code)
4C9041 = SkillWindow_Width (in battle)
4C9046 = SkillWindow_Height
4C9048 = slide open (0|1 = no|yes)
4C904A = y-Pos (additional 12 pixel, small Window)
4C904D = x-Pos
4C904F mov eax,esi get Ptr on Window (SkillWindow)
4C9051 call sub_4C63DC call CreateWindow
49622B off_49ACE8 = ActorDataPtr
496232 mov edx,[esi+64] get Hero_ID
496235 call sub_482A78 call GetActor
49623A mov eax,[eax+84] get amount of learned Skills
496240 mov [esi+40],eax memorize SkillAmount
4C906E off_4CDD60 = BattleLayoutPtr
4C9075 mov eax,[eax+18] get Ptr on BattleCommand_Array
4C9078 mov get BattleCommand_ID
4C907B call sub_47F7E0 call GetBattleCommandParam
4C9080 cmp [eax+C],2 Is the Archetype = SkillSubset?
4C9084 jnz continues in 496243 (2k Code) if not
4C908A mov [esi+8C],1 set SubsetSkill_flag = true
4C9091 mov set Subset_ID = -1 (default, no SubsetSkills)
4C9098 off_4CDD60 = BattleLayoutPtr
4C909F mov eax,[eax+18] get Ptr on BattleCommand_Array
4C90A2 call sub_475714 get amount of BattleCommands (in the Database)
4C90A7 mov edi,eax memorize BattleCommandAmount
4C90AA test edi,edi Are there any BattleCommands?
4C90AC jl jump to loc_4C90E8 if not
4C90AF xor ebx,ebx initialize BattleCommand_ID-Ptr
__________GetSubset_ID-Loop__________
4C90B1 -> off_4CDD60 = BattleLayoutPtr
4C90B8 | mov eax,[eax+18] get Ptr on BattleCommand_Array
4C90BB | mov edx,ebx get BattleCommand_ID
4C90BD | c.sub_47F760 get BattleCommandParam
4C90C2 | cmp [eax+C],2 Is the Archetype = SkillSubset?
4C90C6 <<jnz
4C90C8 | inc Subset_ID +1
4C90CB | off_4CDD60 = BattleLayoutPtr
4C90D2 | mov eax,[eax+18] get Ptr on BattleCommand_Array
4C90D5 | mov edx,ebx get BattleCommand_ID
4C90D7 | c.sub_47F760 get BattleCommandParam
4C90DC | mov eax,[eax+4] get BattleCommand's ID (in the Database)
4C90DF | cmp Did the selected BattleCommand have SubsetSkills assigned?
4C90E2 | jz break loop if it has(?)
4C90E4 >>inc ebx BattleCommand_ID +1
4C90E5 | dec edi BattleCommandAmount -1
4C90E6 --jnz
_____________________________________
4C90E8 cmp Are SubsetSkills available?
4C90EC jl jump to loc_4C9155 if not
4C90EE off_4CDDC8 = ActorDataPtr
4C90F5 mov edx,[esi+78] get Hero_ID
4C90F8 call sub_4B4870 call GetActor
4C90FD mov edi,[eax+114] memorize learned SkillAmount
4C9104 test edi,edi Were any Skills learned?
4C9106 jl jump to loc_4C9155 if not
4C9109 xor ebx,ebx initialize ArrayPosPtr (for the SkillArray)
__________GetSubsetSkillsLoop__________
4C910B -> off_4CDDC8 = ActorDataPtr
4C9112 | mov edx,[esi+78] get Hero_ID
4C9115 | c.sub_4B4870 call GetActor
4C911A | mov edx,ebx get ArrayPosPtr
4C911C | c.sub_4B7868 call GetListedSkill (from SkillArray by ArrayPos)
4C9121 | mov memorize Skill_ID at that ArrayPos
4C9124 | off_4CDBC4 = SkillParamPtr
4C912B | mov get memorized Skill_ID into EDX
4C912E | c.sub_47F0EC call GetSkillParam
4C9133 | mov get SkillType (Subsets have SkillType > 3)
4C9137 | sub eax,4 SkillType -4
4C913A | test eax,eax Is the Skill a SubsetSkill?
4C913C | jl jump to loc_4C9151 on SkillType = Normal|Tele|Esc|Switch
4C913E | cmp Does the SkillType match with the memorized Subset_ID?
4C9141 | jnz jump to loc_4C9151 if not
4C9143 | mov get memorized Skill_ID
4C9146 | mov eax,[esi+88] get Ptr on SkillList
4C914C | c.sub_4175DC load Skill into the SkillList
4C9151 | inc ebx ArrayPos +1
4C9152 | dec edi SkillAmount -1
4C9153 --jnz add all learned Skills of a certain Subset to the SkillList
_______________________________________
4C9155 mov eax,[esi+88] get Ptr on SkillList
4C915B mov eax,[eax+8] get the size of the SkillList (get SubsetSkillAmount)
4C915E mov [esi+40],eax memorize amount of Skills to choose
496243 mov dl,1 ShowCursor = true
496245 mov eax,esi get Ptr on SkillWindow
496247 call sub_4946DC call CreateCursor
49624C mov eax,esi get Ptr on SkillWindow
496250 call print Text into the Window
496253 mov eax,esi get Ptr on SkillWindow
496255 call sub_4962D4 call GetSkillExplanation
4962B8 <>ResetSkillWindows (2k3: 4C920C)
4962BB mov eax,[ebx+68] get Ptr on InfoWindow
4962C0 call terminate InfoWindow
4962C3 mov eax,[ebx+6C] get Ptr on SubWindow
4962C8 call terminate SubWindow
4C9222 mov eax,[ebx+90] get Ptr on MP-Window
4C922A call terminate MP-Window
4962CB mov eax,ebx get Ptr on SkillWindow
4962CD call sub_493E24 call TerminateWindow
4962D4 <>GetSkillExplanation (2k3: 4C9238)
4962D5 mov ebx,eax memorize Ptr on SkillWindow
4962D7 mov eax,[ebx+44] get current Choice (CursorPosition)
4962DA cmp eax,[ebx+40] Does the Cursor point at a Skill?
4962DD jge jump to loc_496301 if the SkillWindow is empty
4962DF mov eax,ebx get Ptr on SkillWindow
4962E1 call sub_496490 call GetSkill
4962E6 mov edx,eax get Skill_ID (Skill at current CursorPosition)
4962E8 off_49AAF4 = SkillParamPtr
4962EF call sub_46390C call GetSkillParam
4962F4 mov edx,[eax+C] get Ptr on SkillExplanation
4962F7 mov eax,[ebx+68] get Ptr on InfoWindow(?)
4962FA call sub_495BA4 call UpdateInfoWindow
496301 xor edx,edx EDX = 0 (blank explanation)
496303 mov eax,[ebx+68] get Ptr on InfoWindow(?)
496306 call sub_495BA4 call UpdateInfoWindow
496310 <>LoadShownSkills (2k3: 4C9274)
496323 mov ebx,eax get Ptr on SkillWindow
496333 off_49ACE8 = ActorDataPtr
49633A mov edx,[ebx+64] get Hero_ID
49633D call sub_482A78 call GetActor
496342 mov get current ListPos
496345 call sub_48371C call GetListedSkill
49634A mov esi,eax memorize Skill_ID
4C929B mov eax,ebx get Ptr on SkillWindow(?)
4C929D call sub_4C94B0 call GetSkill
4C92A2 mov esi,eax memorize Skill_ID
49634C off_49ACE8 = ActorDataPtr
496353 mov edx,[ebx+64] get Hero_ID
496356 call sub_482A78 call GetActor
49635D call get HalvedMPCost_flag
496360 test al,al Is the HalvedMPCost_flag = true?
496362 jz jump to loc_496382 if false
496364 off_49AAF4 = SkillParamPtr
49636B mov edx,esi get Skill_ID
49636D call sub_46390C call GetSkillParam
496372 mov eax,[eax+20] get MP Cost
496375 inc eax MP Cost +1 (to round up after halving)
496376 sar eax divide MP Cost by 2
49637D mov memorize MP Cost
496380 jmp jump to loc_496396
496382 off_49AAF4 = SkillParamPtr
496389 mov edx,esi get Skill_ID
49638B call sub_46390C call GetSkillParam
496390 mov eax,[eax+20] get MP Cost
496393 mov memorize MP Cost
4C92A4 off_4CDDC8 = ActorDataPtr
4C92AB mov edx,[ebx+78] get Hero_ID
4C92AE call sub_4B4870 call GetActor
4C92B5 call get HalvedMPCost_flag
4C92B8 test al,al Is the HalvedMPCost_flag = true?
4C92BA jz jump to loc_4C932F if false
4C92BC off_4CDBC4 = SkillParamPtr
4C92C3 mov edx,esi get Skill_ID
4C92C5 call sub_47F0EC call GetSkillParam
4C92CA cmp [eax+68],0 Does the Skill use MP(Units)?
4C92CE jnz jump to loc_4C92F1 if it uses MP(%)
4C92D0 off_4CDBC4 = SkillParamPtr
4C92D7 mov edx,esi get Skill_ID
4C92D9 call sub_48F0EC call GetSkillParam
4C92DE mov eax,[eax+20] get MP Cost
4C92E1 inc eax MP Cost +1
4C92E2 sar eax,1 divide MP Cost by 2
4C92E9 mov memorize MP Cost
4C92EC jmp continues in 496396 (2k code)
4C92F1 off_4CDDC8 = ActorDataPtr
4C92F8 mov edx,[ebx+78] get Hero_ID
4C92FB call sub_4B4870 call GetActor
4C9302 call get Hero's max.MP
4C9305 mov edi,eax memorize max.MP
4C9307 off_4CDBC4 = SkillParamPtr
4C930E mov edx,esi get Skill_ID
4C9310 call sub_47F0EC call GetSkillParam
4C9315 imul multiply max.MP by MP(%)
4C9319 mov eax,edi store result in EAX
4C931B mov ecx,64 ECX = 100
4C9320 cdq initialize EDX:EAX
4C9321 idiv ecx divide result by 100
4C9323 sar eax,1 divide MP Cost by 2
4C932A mov memorize MP Cost
4C932D jmp continues in 496396 (2k code)
4C932F off_4CDBC4 = SkillParamPtr
4C9336 mov edx,esi get Skill_ID
4C9338 call sub_47F0EC call GetSkillParam
4C933D cmp [eax+68],0 Does the Skill use MP(units)
4C9341 jnz jump to loc_4C9359 if it uses MP(%)
4C9343 off_4CDBC4 = SkillParamPtr
4C934A mov edx,esi get Skill_ID
4C934C call sub_47F0EC call GetSkillParam
4C9351 mov eax,[eax+20] get MP Cost
4C9354 mov memorize MP Cost
4C9357 jmp continues in 496396 (2k code)
4C9359 off_4CDDC8 = ActorDataPtr
4C9360 mov edx,[ebx,78] get Hero_ID
4C9363 call sub_4B4870 call GetActor
4C936A call get Hero's max.MP
4C936D mov edi,eax memorize max.MP
4C936F off_4CDBC4 = SkillParamPtr
4C9376 mov edx,esi get Skill_ID
4C9378 call sub_47F0EC call GetSkillParam
4C937D imul multiply multiply max.MP by MP(%)
4C9381 mov eax,edi store result in EAX
4C9383 mov ecx,64 ECX = 100
4C9388 cdq initialize EDX:EAX
4C9389 idiv ecx divide result by 100
4C938B mov memorize MP Cost
496396 off_49ACE8 = ActorDataPtr
49639D mov edx,[ebx+64] get Hero_ID
4963A0 call sub_482A78 call GetActor
4963A5 mov edx,esi get Skill_ID
4963A9 call test MP requirement and restrictions (field/battle)
4963AF test al,al Can the Skill be used?
4963B1 jz jump to loc_4963BA if not
4963B3 xor eax,eax Skill_Color = normal (Skill usable)
4963B5 mov memorize Skill_Color
4963B8 jmp
4963BA mov memorize Skill_Color = gray (Skill not usable)
4963C1 off_49AAF4 = SkillParamPtr
4963C8 mov edx,esi get Skill_ID
4963CA call sub_46390C call GetSkillParam
4963CF mov eax,[eax+8] get Skill_Name
4963D3 mov get memorized Skill_Color
4963D9 = y-Pos
4963DC = x-Pos
4963DF mov eax,ebx get Ptr on SkillWindow
4963E3 call PrintString(?)
4963EA mov get MP Cost
496407 mov get Skill_Color
49640D mov get x-Pos of the Skill
496410 add edx,78 correct x-Pos to print "- MP" after the Skill
496413 mov get y-Pos of the Skill
496416 mov eax,ebx get Ptr on SkillWindow
49641A call PrintString(?)
49644C [2D 25 33 64] = "- MP" after the SkillName
496454 <>UpdateSkillCursor (2k3: 4C944C)
496455 mov ebx,eax memorize Ptr on Window (SkillWindow)
496457 mov eax,ebx get Ptr on Window
496459 call sub_494340 call SlideOpenWindow
49645E mov eax,ebx get Ptr on Window
496460 call sub_493E9 call HasWindowSlidOpen
496465 test al,al Is the SkillWindow fully slid open?
496467 jz jump to function's end if not
496469 mov eax,ebx get Ptr on Window
49646B call sub_4962D4 call GetSkillExplanation
496474 <>UpdateSkillMenu (2k3: 4C946C)
496475 mov ebx,eax memorize Ptr on SkillWindow
496477 mov eax,ebx get Ptr on SkillWindow
496479 call sub_49444C draw SkillWindow
49647E mov eax,[ebx+68] get Ptr on InfoWindow
496483 call draw InfoWindow
496486 mov eax,[ebx+6C] get Ptr on SubWindow
49648B call draw SubWindow
4C9489 off_4CDC7C = MainPtr
4C9490 cmp [eax+4],2 Is the Scene = Battle?
4C9494 jnz jump to function's end if not
4C9496 off_4CDD60 = BattleLayoutPtr
4C949D cmp [eax+8],0 Is the LayoutType = Traditional?
4C94A1 jnz jump to function's end if not
4C94A3 mov eax,[ebx+90] get Ptr on MP-Window
4C94AB call draw MP-Window
496490 <>GetSkill (2k3: 4C94B0)
4C94B3 mov esi,edx memorize current Choice
496491 mov ebx,eax get Ptr on Window (SkillWindow)
4C94B7 cmp [ebx+8C] Is the SubsetSkill_flag = false?
4C94BE jz continues in 496493 (2k code) if false
4C94C0 mov edi,[ebx+88] get Ptr on SkillList (with the SubsetSkills)
4C94C6 cmp [edi+8],1 Are there any SubsetSkills in this SkillList?
4C94CA jge jump to loc_4C94D0 if there are
4C94CC xor eax,eax return zero
4C94CE jmp ump to function's end
4C94D0 mov edx,esi get current choice
4C94D2 mov eax,edi get Ptr on SkillList (with the SubsetSkills)
4C94D4 call sub_417738 call LoadFromList
4C94D9 jmp jump to function's end
496493 off_49ACE8 = ActorDataPtr
49649A mov edx,[ebx+64] get Hero_ID
49649D call sub_482A78 call GetActor
4964A2 mov edx,[ebx+44] get current Choice
4964A5 call sub_48371C call GetListedSkill (load from Hero's SkillArray)
4964AC <>MemoCursorPos(Skill) (2k3: 4C9504)
4964B0 mov ebp,edx memorize Skill_ID of the last Skill used by this Hero
4964B2 mov edi,eax get Ptr on SkillWindow
4964B4 mov edx,[edi+64] get Hero_ID
4964B7 off_49ACE8 = ActorDataPtr
4964BE call sub_482A78 call GetActor
4964C3 mov esi,[eax+84] get the amount of Skills the Hero has learned
4964CA test esi,esi Does the Hero know any Skills?
4964CC jl jump to loc_4964F8 if not
4964CF xor ebx,ebx initialize ArrayPosPtr
__________CursorOntoLastSkillLoop__________
4964D1 ->mov edx,[edi+64] get Hero_ID
4964D3 | off_49ACE8 = ActorDataPtr
4964DB | c.sub_482A78 call GetActor
4964E0 | mov edx,ebx get ArrayPos
4964E2 | c.sub_48371C call GetListedSkill
4964E7 | cmp ebp,eax Does the Skill_ID match with the memorized ID?
4964E9 <<jnz
4964EB | mov edx,ebx get ArrayPos/ListPos
4964ED | mov eax,edi get Ptr on SkillWindow
4964EF | c.sub_494640 call MoveCursor (onto the Position of the Skill)
4964F4 >>inc ebx ArrayPos +1
4964F5 | dec esi SkillAmount -1
4964F6 --jnz
___________________________________________
Wer mit diesen Informationen etwas anfangen will, kann seine RPG_RT (bitte vorher immer Backups anlegen) mit einem HexEditor öffnen und durch einen Disassembler jagen. (Wenn alles in kleinen Fenstern angezeigt wird: Rechtsklick -> "Text view")
Einfach die 4*****-Adressen kopieren -> im Disassembler G drücken -> Einfügen -> Enter. Unten im Fenster steht die Adresse für den HexEditor (generell 4***** - 400C00). Oder für den RM2k3 die 4*****-Adresse in die DynRPG.ini schieben. (Bitte vorher in das "Hex-View"Fenster schalten, um zu sehen was die genaue Adresse der zu verändernden Zahl ist.)
Für alle, die meinen: "Da stehen aber nicht durchgehend die ganzen blauen Adressen!" Öffnet eine 2k RPG_RT mit dem Disassembler und springt zu den jeweils angegebene Adressen am Kopfende der <>Funktionen. Von 2k zu 2k3 gab es eine Menge copy&paste, daher ist der Aufbau des Codes stellenweise gleich. Ein bisschen Scrollen und Vergleichen ist schon der ganze Trick an der Sache.
Wer sich wegen den Versionsnummern der RTs unsicher ist: betterAEP nutzt die 1.07/v1.08 (und DynRPG läuft auf der v1.08 )
Wer damit rumspielen will, kann die Werte, welche größer als #256 sind in hexadecimal umrechnen (Bsp: 288 = 20 01 00 00) und anstelle des #*** diesen Wert eintippen.
...
288Dez -> Hex ergibt bei mir 120 laut Taschenrechner, wie kommt man auf 20 01 00 00?