Hello all. I’m on to the next step. This is what I have so far.
FYI, i’v posted messages on winehq with no responses. So, I’ll need help here.
I wrote a POL script with help. I have it running, but the mouse doesn’t work right. It takes huge mouse movements to get the mouse to move small amounts.
Run POL script and install with wine 1.3.36
#wget http://sourceforge.net/projects/wine/files/Source/wine-1.3.36.tar.bz2
#tar xjvf wine-1.3.36.tar.bz2
cd wine-1.3.36
./configure
#make depend doesn't work
make
#To install wine (optional if you plan on running Wine from the build directory)
#sudo make install skipped
I download and unzip using the above. I make these changes:
That dll is only code being changed. So, I overwrite the dll with the patched dll. I start POL and launch “empire earth”. It doesn’t work. No surprise there. So, where is the problem?
I’v seen this code before. I can’t fix what I don’t understand. "-> " are referencing pointer variables. A double equals in one line and =+ makes no sense to me. Can someone break it down into simpler code?
How do I print the mouse variables to the command line?
//mouse patch
pt.x = hook->pt.x - pt.x; // this makes pt.x a relative movement.
This->m_state.lX=This->m_state.lX + (pt.x * 5000000);// add relative movement to your structure
pt.y = hook->pt.y - pt.y; // this makes pt.y a relative movement.
This->m_state.lY=This->m_state.lY + (pt.y * 5000000);// add relative movement to your structure
//end
I was wrong about distance multiplier. Also, I noticed on the multi-player screen the mouse worked normally.
Move the mouse left to right 10" slow, no movement. Move the mouse fast and you get movement. I’v been raising the values, even this results in the same movement amount.
The mouse button will click with my hand off the buttons at random moments.
Hi, no, not really.
I’m sorry, I don’t know wine so I don’t know where else this might go wrong.
I don’t need help with wine. Just how the mouse code works. Wine takes the mouse values from linux and translates it. I understand some of it. There’s almost no commenting. I’m baffled. First, what does each function do in plain terms. Can you take a look at the mouse code? Knowing what’s their purpose will help. One step at time.
Where is the line where a mouse xy is send back to Empire Earth?
However, I’d play around with the multiplier a bit, try to take it from 10 to 10000 in small steps, 500000 seems just too much.
I did that in testing to see what would happen. You saw the results: 20, 100, 1000, 10000, 5000000 No effect.
Also, I noticed on the multi-player screen the mouse worked normally.
Even with the multiplier? This would seem to indicate that the mouse movement is read somewhere else?
I thought about that. This is the mouse code for wine. So, it has to be here. I need to print values from the console.
I PRESUME that this works like printf - please look up printf and the parameter substitutions.
In short, this will print a text (probably “fixme”) followed by the string between the double quotes where, however, each of the parameters introduced with % is replaced by the corresponding parameter given at the end of the command :the first parameter in parenthesis (%p). This will be replaced by the value of the pointer" iface", tge seond %p will take the value of lpdiaf etc…
case WM_MOUSEMOVE:
{
POINT pt, pt1;
if (This->clipped) pt = This->mapped_center;
else GetCursorPos(&pt);
FIXME("Mousexy: %d %d
",pt.x, pt.y);
//mouse patch
pt.x = hook->pt.x - pt.x; // this makes pt.x a relative movement.
This->m_state.lX=This->m_state.lX + (pt.x * 1);// add relative movement to your structure
pt.y = hook->pt.y - pt.y; // this makes pt.y a relative movement.
This->m_state.lY=This->m_state.lY + (pt.y * 1);// add relative movement to your structure
//end
This doesn’t print anything. I’m baffled. Unless someone can figure out where empire earth is getting it’s mouse data, i’m stuck. I need to see what empire earth is sending to empire earth. I’m out of ideas.
That’s it. Until I find out where empire earth is getting it’s mouse data, it’s game over. Pardon the pun. I’ll post on here again if I make any progress.
switch(wparam) {
case WM_MOUSEMOVE:
{
POINT pt, pt1;
if (This->clipped) pt = This->mapped_center;
else GetCursorPos(&pt);
//mouse patch
pt.x = hook->pt.x - pt.x; // this makes pt.x a relative movement.
This->m_state.lX=This->m_state.lX + (pt.x * 100);// add relative movement to your structure
pt.y = hook->pt.y - pt.y; // this makes pt.y a relative movement.
This->m_state.lY=This->m_state.lY + (pt.y * 100);// add relative movement to your structure
That dll is only code being changed. So, I overwrite the dll with the patched dll. I start POL and launch “empire earth”. This doesn’t work. Will this setup allow me to alter the mouse code? No changes are having any effect. Is the logic sound?
All POL script options have no effect. MSWIN does work. So, the emulation is wrong(clearly). I don’t know enough find the problem.