Stat Level Up
This page lists an extract of code from SADX, which has been annotated with descriptions. This particular piece of code is executed when a chao’s stat levels up.
00731C50 - mov cl,[ebx+esi] - #1: Load bar value.
00731C53 - cmp cl,63 - Compare bar to 99.
00731C56 - jna 00731c80 - Jump to #4 if not above 99.
00731C58 - mov al,[esi+ebp+30] - #2: Load the level value.
00731C5C - cmp al,63 - Compare level to 99.
00731C5E - jae 00731c7c - Jump to #3 if above or equal to 99.
00731C60 - sub cl,64 - Subtract 100 from bar.
00731C63 - inc al - Increment level.
00731C65 - push esi
00731C66 - push ebp
00731C67 - mov [ebx+esi],cl - Save new bar value.
00731C6A - mov [esi+ebp+30],al - Save new level value.
00731C6E - call 00730780 - Call code to check grade and write new points value.
00731C73 - add esp,08
00731C76 - mov [esp+esi*4+10],edi
00731C7A - jmp 00731c80 - Jump to #4.
00731C7C - mov byte ptr [ebx+esi],63 - #3: Reset level to 99.
00731C80 - inc esi - #4: Move on to the next stat.
00731C81 - cmp esi,08 - Compare the current stat to 8.
00731C84 - jnge 00731c50 - Jump to #1 if not greater than or equal to 8.