It looks like you have a fairly tight little community here, doing some fine work with the ctp2 source. FWIW here are some notes from an "outsider".
======================
A few years ago I wanted to play CTP2 in a virtual machine, but had problems with it. I tried again and found problems still; in particular (with the original ctp2, and with your "latest" playtest, and with the executable as I first built it from your svn code) on Microsoft Virtual PC:
1. the "regular" cursor (e.g. hourglass) never disappears, instead it floats over the ctp2 map and mimics the movement of the ctp2 pointer, though more slowly, and
2. the mouse is hyperactive, such that the smallest movement of the mouse sends the pointer all the way across the screen. with the windows mouse settings at the slowest possible, and ctp2 userprofile.txt setting MouseSpeed=0, it improves enough that it is just barely possible, with tiny movements of the mouse, to maneuver the pointer over the buttons etc (the smaller ones remain very difficult), but it is very painful to work with.
I had tried it previously on VMWare and as best I recall it had problem 2, but I think not problem 1.
I just wandered back into this forum yesterday and noticed that the ctp2 source code actually is available now (I guess from some posts I saw that I just happened to hit it a while back at a time when everything here was broken, though at that time nobody answered my inquiries about why the code download didn't work). So yesterday I pulled down the trunk from the svn repository to poke at a bit.
====================
About build, etc.
First let me say I am impressed by all the work you folks have done to get this to build and to improve the game. You may not have many people wandering in who are new-to-this anymore, and who might benefit from knowing about things that I ran into, but FWIW here are few things I noted.
I set up a new VM with VS .NET 2003 and the original DX SDK 9.0 (the one from before they moved parts into the platform). For some reason when I opened/converted your ctp2 VS6 workspace, most of the custom build step commands (all the lexes and all the cdb's, but not the yaccs) were slightly mangled, they came across with quotes misplaced so that I had to for example change
"D:\ctp2\bin"\flex -i -Pldl -o"d:\ctp2\ctp2_code\ctp\"..\ui\ldl\lex.ldl.c "d:\ctp2\ctp2_code\ui\ldl\ldl.l"
to
"D:\ctp2\bin"\flex -i -Pldl -o"d:\ctp2\ctp2_code\ctp\..\ui\ldl\lex.ldl.c" "d:\ctp2\ctp2_code\ui\ldl\ldl.l"
and
"$(ProjectDir)"..\gs\dbgen\ctpdb.exe "$(ProjectDir)"..\gs\newdb < "$(InputPath)"
to
"$(ProjectDir)..\gs\dbgen\ctpdb.exe" "$(ProjectDir)..\gs\newdb" < "$(InputPath)"
I don't know if anyone else has hit this, but it might be considered for mention in the Apolyton CTP2 Source Code_Readme.txt. I have two other suggestions for that file: it would have been helpful if it mentioned that the main project is in .\ctp2_code\ctp\civctp.dsw; and the wording "Place the ctp2_data directory from the game install directory at the same directory level as ctp2_code in this archive" etc. does not seem to be really correct, because you really need to merge the data files that are already in the adjacent ctp2_data directory that is in the archive, *over top of* the ctp2_data from the original install. FWIW, I decided instead to initially copy your ctp2_data over a running copy of the game, the merge the results of the build with a simple deploy.bat file:
copy *.exe C:\ctp2\ctp2_dev\ctp
copy *.txt C:\ctp2\ctp2_dev\ctp
copy *.dll C:\ctp2\ctp2_dev\ctp
xcopy /E dll C:\ctp2\ctp2_dev\ctp\dll
pause
Also, I tried a Debug build directly into said merged area, hoping to walk through the code a bit. The code kept excepting out, apparently from assertion failures, but I could not find any way to bring the VS debugger back to the surface of the desktop to see what had happened!, either on an exception or a breakpoint. Now I see the "nonexclusive" command line argument, I guess that should cure that difficulty? if so it seems worthy of mention.
BTW, if that already has been mentioned in some post - I can't find it...
========================
About this Forum
The search capability in this forum seems a bit problematic - search results are just the entire thread and not the one post (of maybe scores or hundreds) that has the search arg; and in most cases where I tried to hunt through the search result I found it to be spurious anyway - what I was searching for was not there at all. I think all your work and notes here would be a lot more accessible with a better search.
========================
To get past the hyper fast mouse I added to civ3_main a new global and command line argument:
BOOL g_hyperMouse = FALSE;
...
g_hyperMouse = (NULL != strstr(szCmdLine, "hypermouse"));
and used it in aui_mouse.cpp
extern BOOL g_hyperMouse;
...in aui_Mouse::InitCommon
if(g_theProfileDB) {
m_sensitivity = ((g_hyperMouse) ? 0.03125 : 0.25) * (1 + g_theProfileDB->GetMouseSpeed());
} else {
m_sensitivity = (g_hyperMouse) ? 0.1 : 1.0;
}
and similarly in gameplayoptions_mouseSlide it needed
sensitivity = ((g_hyperMouse) ? 0.03125 : 0.25) * (1 + g_theProfileDB->GetMouseSpeed());
These allow me to play the game in a virtual PC, though I find I am still using MouseSpeed=0
==========================
I'm still trying to disappear the hourglass. I did see that one is *supposed to* return TRUE, not call defwindowproc, if one handles the WM_SETCURSOR, in order to prevent the system from realizing the default cursor for the window class. So I tried this in the WndProc in civ3_main.cpp:
AUI_ERRCODE aec = g_c3ui->HandleWindowsMessage(hwnd, iMsg, wParam, lParam);
if (iMsg == WM_SETCURSOR && aec == AUI_ERRCODE_HANDLED)
return TRUE;
instead of (void) g_c3ui->HandleWindowsMessage(hwnd, iMsg, wParam, lParam);
But this seems to neither harm nor help. I'd like to hear if anyone has any other ideas on how to deal with this duplicate mouse pointer (cursor)?
FWIW, and THANKS!
-tom-
======================
A few years ago I wanted to play CTP2 in a virtual machine, but had problems with it. I tried again and found problems still; in particular (with the original ctp2, and with your "latest" playtest, and with the executable as I first built it from your svn code) on Microsoft Virtual PC:
1. the "regular" cursor (e.g. hourglass) never disappears, instead it floats over the ctp2 map and mimics the movement of the ctp2 pointer, though more slowly, and
2. the mouse is hyperactive, such that the smallest movement of the mouse sends the pointer all the way across the screen. with the windows mouse settings at the slowest possible, and ctp2 userprofile.txt setting MouseSpeed=0, it improves enough that it is just barely possible, with tiny movements of the mouse, to maneuver the pointer over the buttons etc (the smaller ones remain very difficult), but it is very painful to work with.
I had tried it previously on VMWare and as best I recall it had problem 2, but I think not problem 1.
I just wandered back into this forum yesterday and noticed that the ctp2 source code actually is available now (I guess from some posts I saw that I just happened to hit it a while back at a time when everything here was broken, though at that time nobody answered my inquiries about why the code download didn't work). So yesterday I pulled down the trunk from the svn repository to poke at a bit.
====================
About build, etc.
First let me say I am impressed by all the work you folks have done to get this to build and to improve the game. You may not have many people wandering in who are new-to-this anymore, and who might benefit from knowing about things that I ran into, but FWIW here are few things I noted.
I set up a new VM with VS .NET 2003 and the original DX SDK 9.0 (the one from before they moved parts into the platform). For some reason when I opened/converted your ctp2 VS6 workspace, most of the custom build step commands (all the lexes and all the cdb's, but not the yaccs) were slightly mangled, they came across with quotes misplaced so that I had to for example change
"D:\ctp2\bin"\flex -i -Pldl -o"d:\ctp2\ctp2_code\ctp\"..\ui\ldl\lex.ldl.c "d:\ctp2\ctp2_code\ui\ldl\ldl.l"
to
"D:\ctp2\bin"\flex -i -Pldl -o"d:\ctp2\ctp2_code\ctp\..\ui\ldl\lex.ldl.c" "d:\ctp2\ctp2_code\ui\ldl\ldl.l"
and
"$(ProjectDir)"..\gs\dbgen\ctpdb.exe "$(ProjectDir)"..\gs\newdb < "$(InputPath)"
to
"$(ProjectDir)..\gs\dbgen\ctpdb.exe" "$(ProjectDir)..\gs\newdb" < "$(InputPath)"
I don't know if anyone else has hit this, but it might be considered for mention in the Apolyton CTP2 Source Code_Readme.txt. I have two other suggestions for that file: it would have been helpful if it mentioned that the main project is in .\ctp2_code\ctp\civctp.dsw; and the wording "Place the ctp2_data directory from the game install directory at the same directory level as ctp2_code in this archive" etc. does not seem to be really correct, because you really need to merge the data files that are already in the adjacent ctp2_data directory that is in the archive, *over top of* the ctp2_data from the original install. FWIW, I decided instead to initially copy your ctp2_data over a running copy of the game, the merge the results of the build with a simple deploy.bat file:
copy *.exe C:\ctp2\ctp2_dev\ctp
copy *.txt C:\ctp2\ctp2_dev\ctp
copy *.dll C:\ctp2\ctp2_dev\ctp
xcopy /E dll C:\ctp2\ctp2_dev\ctp\dll
pause
Also, I tried a Debug build directly into said merged area, hoping to walk through the code a bit. The code kept excepting out, apparently from assertion failures, but I could not find any way to bring the VS debugger back to the surface of the desktop to see what had happened!, either on an exception or a breakpoint. Now I see the "nonexclusive" command line argument, I guess that should cure that difficulty? if so it seems worthy of mention.
BTW, if that already has been mentioned in some post - I can't find it...
========================
About this Forum
The search capability in this forum seems a bit problematic - search results are just the entire thread and not the one post (of maybe scores or hundreds) that has the search arg; and in most cases where I tried to hunt through the search result I found it to be spurious anyway - what I was searching for was not there at all. I think all your work and notes here would be a lot more accessible with a better search.
========================
To get past the hyper fast mouse I added to civ3_main a new global and command line argument:
BOOL g_hyperMouse = FALSE;
...
g_hyperMouse = (NULL != strstr(szCmdLine, "hypermouse"));
and used it in aui_mouse.cpp
extern BOOL g_hyperMouse;
...in aui_Mouse::InitCommon
if(g_theProfileDB) {
m_sensitivity = ((g_hyperMouse) ? 0.03125 : 0.25) * (1 + g_theProfileDB->GetMouseSpeed());
} else {
m_sensitivity = (g_hyperMouse) ? 0.1 : 1.0;
}
and similarly in gameplayoptions_mouseSlide it needed
sensitivity = ((g_hyperMouse) ? 0.03125 : 0.25) * (1 + g_theProfileDB->GetMouseSpeed());
These allow me to play the game in a virtual PC, though I find I am still using MouseSpeed=0
==========================
I'm still trying to disappear the hourglass. I did see that one is *supposed to* return TRUE, not call defwindowproc, if one handles the WM_SETCURSOR, in order to prevent the system from realizing the default cursor for the window class. So I tried this in the WndProc in civ3_main.cpp:
AUI_ERRCODE aec = g_c3ui->HandleWindowsMessage(hwnd, iMsg, wParam, lParam);
if (iMsg == WM_SETCURSOR && aec == AUI_ERRCODE_HANDLED)
return TRUE;
instead of (void) g_c3ui->HandleWindowsMessage(hwnd, iMsg, wParam, lParam);
But this seems to neither harm nor help. I'd like to hear if anyone has any other ideas on how to deal with this duplicate mouse pointer (cursor)?
FWIW, and THANKS!
-tom-
Comment