Originally Posted by
amadmonk
Any reversing hints on CInputControl? I'm looking for a face routine that's better than CTM (although I have to admit that using the Face action on CTM is sexy since it apparently *keeps facing* the mob without interaction). Does this method require the "you must click once" thing?
So far my foray into reversing CInput involved debugging into some of the LUA-exposed functions (MoveForwardStart). This produced a lot of surprising info (CTM pathing looks like a lot of little hardware events?? the LUA MoveXXXXStart/Stop methods cancel or act weird when you lose focus??), but not a whole lot of insight into who the overall system functions.
EDIT: actually I think I was already 2/3 of the way there with CInputControl; I saw the call with 0x100 as a param in TurnLeftStart, which if I understand correctly is the call to set the "turn left" flag. Still gotta look into it to understand where it checks for window focus. Also, I have to figure out a good LUA entry for the CGCamera stuff -- MouseLookStart/MouseLookStop, maybe?
Code:
/// <summary>
/// The direction of movement in WoW as per the CGInputControl_ToggleControlBit function.
/// These are actually the flags that are set/unset!
/// </summary>
[Flags]
public enum MovementDirection : uint
{
None = 0,
RMouse = (1 << 0), // 0x1,
LMouse = (1 << 1), // 0x2,
// 2 and 3 not used apparently. Possibly for flag masking?
Forward = (1 << 4), // 0x10,
Backward = (1 << 5), // 0x20,
StrafeLeft = (1 << 6), // 0x40,
StrafeRight = (1 << 7), // 0x80,
TurnLeft = (1 << 8), // 0x100,
TurnRight = (1 << 9), // 0x200,
PitchUp = (1 << 10), // 0x400, For flying/swimming
PitchDown = (1 << 11), // 0x800, For flying/swimming
AutoRun = (1 << 12), // 0x1000,
JumpAscend = (1 << 13), // 0x2000, For flying/swimming
Descend = (1 << 14), // 0x4000, For flying/swimming
ClickToMove = (1 << 22), // 0x400000, Note: Only turns the CTM flag on or off. Has no effect on movement!
// 25 used somewhere. Can't figure out what for. Checked in Lua_IsMouseTurning. Possible camera turn?
// Or mouse input flag? (Flag used: 0x2000001)
}
There are other things you may want as well. Just ask