Oct 15, 2009 at 5:11 AM
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 33
Pronouns: No homie
I have a question for you guys.
At 004168C0, there is a function which executes this code:
Now I have three questions:
This. Why does it test if the player is visible and when he is not it executes code for the player, like movement and so on, what the fuck? This makes no sense.
It should be the other way round, or did I just got something wrong?
Why is it moving a byte from memory into the edx and then tests edx with edx? Isn't this useless...?
Allright, this just confuses me :S What does it do there anyway?
At 004168C0, there is a function which executes this code:
Code:
push ebp
mov ebp,esp
push ecx
movzx eax,byte ptr [PlayerFlags]
and eax,00000080
jne A
jmp B
A: cmp dword ptr [LvBarFlashesLeft],00
je C
mov ecx,[LvBarFlashesLeft]
sub ecx,01
mov [LvBarFlashesLeft],ecx
C: movzx edx,byte ptr [0049E6C8]
test edx,edx
je D
mov ax,[0049E6C8]
sub al,01
mov byte ptr [0049E6C8],al
jmp E
D: cmp dword ptr [ExpToGained],00
je E
mov ecx,[ExpToGained]
push ecx
push PlayerYPosition
push PlayerXPosition
call 00425BF0
add esp,0C
mov [ExpToGained],00000000
E: mov edx,[InFishBattle]
mov [ebp-0004],edx
cmp dword ptr [ebp-0004],00
je F
cmp dword ptr [ebp-0004],01
je G
jmp J
F: mov eax,[GameState]
and eax,04
jne K
cmp dword ptr [ebp+0008],00
je K
call 00416990
K: mov ecx,[ebp+0008]
push ecx
call 004156C0
add esp,04
jmp J
G: mov edx,[ebp+0008]
push edx
call 00416470
add esp,04
J: movzx eax,byte ptr [PlayerFlags]
and eax,DF
mov byte ptr [PlayerFlags],al
B: mov esp,ebp
pop ebp
ret
Now I have three questions:
Code:
movzx eax,byte ptr [PlayerFlags]
and eax,00000080
jne A
jmp B
This. Why does it test if the player is visible and when he is not it executes code for the player, like movement and so on, what the fuck? This makes no sense.
It should be the other way round, or did I just got something wrong?
Code:
movzx edx,byte ptr [0049E6C8]
test edx,edx
je D
Why is it moving a byte from memory into the edx and then tests edx with edx? Isn't this useless...?
Code:
J: movzx eax,byte ptr [PlayerFlags]
and eax,DF
mov byte ptr [PlayerFlags],al
Allright, this just confuses me :S What does it do there anyway?