I'd like to use the op_active_hand function from the ddraw c++ code itself. The problem is that the function implemented as an inline asm as follows:
doesn't return anything (void) while the original vanilla script active_hand function returns just 0 for the left and 1 for the right hand.
My question is why doesn't the c++ op_active_hand function doesn't return the expected value: 0 or 1 (like the active_hand does) and what can i do to make the op_active_hand to return the active hand value. There is an commented out retn instruction as one can see. Can i just comment out that return statement and i get the expected boolean value like in the active_hand form vanilla?
Code:
void __declspec(naked) op_active_hand() {
__asm {
mov edx, dword ptr ds:[FO_VAR_itemCurrentItem];
_J_RET_VAL_TYPE(VAR_TYPE_INT);
// retn;
}
}
My question is why doesn't the c++ op_active_hand function doesn't return the expected value: 0 or 1 (like the active_hand does) and what can i do to make the op_active_hand to return the active hand value. There is an commented out retn instruction as one can see. Can i just comment out that return statement and i get the expected boolean value like in the active_hand form vanilla?