thanks for the bug-report!
i think that will be fixed soon.
Does not run on Vista!
Re:Does not run on Vista!
Any updates? I\'m getting the same error code on Vista.
I\'ve built the code and tried to debug, but the error seems to occur in D3DTools library. Is the code for this library downloadable? I saw GPL and was expecting this code to be available, but can\'t find it anywhere on this site. Is the code really under GPL?
I\'ve built the code and tried to debug, but the error seems to occur in D3DTools library. Is the code for this library downloadable? I saw GPL and was expecting this code to be available, but can\'t find it anywhere on this site. Is the code really under GPL?
Re:Does not run on Vista!
Hi,
Unfortunately i don\'t have a Vista installed. I got the DVD and i think i will set up a machine soon. Anyway the D3DTools is not on sourceforge because the source of this lib is not really clean yet. I\'m afraid that the error does not come from this lib. According to the error message it\'s rather a real D3D error but may be I\'m wrong. I wrote this lib 5 years ago !
You can get the source from here:
http://zelda38.free.fr/D3DTools.rar
A next release will come soon with Vista issue fixed (i hope) and a new AI player.
Let you informed...
Unfortunately i don\'t have a Vista installed. I got the DVD and i think i will set up a machine soon. Anyway the D3DTools is not on sourceforge because the source of this lib is not really clean yet. I\'m afraid that the error does not come from this lib. According to the error message it\'s rather a real D3D error but may be I\'m wrong. I wrote this lib 5 years ago !
You can get the source from here:
http://zelda38.free.fr/D3DTools.rar
A next release will come soon with Vista issue fixed (i hope) and a new AI player.
Let you informed...
Re:Does not run on Vista!
It\'s nice to have the code. Here is the fix, it was a simple typo.
In MenuGrid.cpp, line 190, you create the vertex buffer. I\'ve no idea what it is - never programmed 3d, but MSDN says the first parameter is the size of the buffer, you pass \"4 * sizeof(FACEVERTEX)\". Next line you lock this buffer, and pass lock range of size \"24 * sizeof(FACEVERTEX)\" which is beyond the buffer size - so Lock() fails.
I\'m not sure what is the right size, but it is clear the program uses more than 4 vertices. So I modified CreateVertexBuffer call to ask for 24 structures as well, and the game started successfully.
Apparently, Vista is more strict about parameter validation, and what could be a cause of random crashes later on under ealier OS, fails early now.<br><br>Post edited by: Michael, at: 2008/01/14 14:22
In MenuGrid.cpp, line 190, you create the vertex buffer. I\'ve no idea what it is - never programmed 3d, but MSDN says the first parameter is the size of the buffer, you pass \"4 * sizeof(FACEVERTEX)\". Next line you lock this buffer, and pass lock range of size \"24 * sizeof(FACEVERTEX)\" which is beyond the buffer size - so Lock() fails.
I\'m not sure what is the right size, but it is clear the program uses more than 4 vertices. So I modified CreateVertexBuffer call to ask for 24 structures as well, and the game started successfully.
Apparently, Vista is more strict about parameter validation, and what could be a cause of random crashes later on under ealier OS, fails early now.<br><br>Post edited by: Michael, at: 2008/01/14 14:22
Re:Does not run on Vista!
I\'ve also added the screen resolution that I use - 1600x1200, I can share the diff, although these changes are trivial.
Re:Does not run on Vista!
Great news, Hope we can fix the issue without i have to set up a Vista.
I see that there is other parameters in MenuGrid.cpp which are not correct. The correct parameters should be:
MenuGrid.cpp:189
MenuGrid.cpp:218
Could you try this and let me know if it works ?
I\'ll add also the 1600x1200 in the next release
Thanks for your effort :)<br><br>Post edited by: jlp_38, at: 2008/01/14 20:41
I see that there is other parameters in MenuGrid.cpp which are not correct. The correct parameters should be:
MenuGrid.cpp:189
Code: Select all
hr = pd3dDevice->CreateVertexBuffer(4 * sizeof(FACEVERTEX),
D3DUSAGE_DYNAMIC, FACEVERTEX_FORMAT, D3DPOOL_DEFAULT, &redVbf);
if(FAILED(hr)) return hr;
hr = redVbf->Lock(0, 4 * sizeof(FACEVERTEX), (BYTE **) &pVertices, 0);
if(FAILED(hr)) return hr;
Code: Select all
hr = pd3dDevice->CreateIndexBuffer(6 * sizeof(WORD), 0, D3DFMT_INDEX16,
D3DPOOL_DEFAULT, &redIdx);
if(FAILED(hr)) return hr;
hr = redIdx->Lock(0, 6 * sizeof(WORD), (BYTE**) &pIndices, 0);
if(FAILED(hr)) return hr;
I\'ll add also the 1600x1200 in the next release
Thanks for your effort :)<br><br>Post edited by: jlp_38, at: 2008/01/14 20:41
Re:Does not run on Vista!
Well, yes - it works, I did not realize that pVertices is modified in line 245 - you are correct, only 4 elements are needed. Works great!
Re:Does not run on Vista!
Thanks Michael for testing :)
Will be fixed in the next release...
Will be fixed in the next release...
Re:Does not run on Vista!
Hi,
I compiled a release that should work on Vista.
This to wait for the next release. You can download
this release from here.
Just replace the .exe file.
Let me know if you get new problem.
Have fun :)
I compiled a release that should work on Vista.
This to wait for the next release. You can download
this release from here.
Just replace the .exe file.
Let me know if you get new problem.
Have fun :)