Re: [wininet] More wininet tests InternetQueryOption and InternetSetOption - 2

2006-03-04 Thread Vijay Kiran Kamuju
Hi Detlef,

I almost cleanup every thing according to the review.
If i couldnt get anything, i want to talk to u on irc personally or
thru mail personally.
As i put that patch in 15mins after seeing thru ur mail.
I really couldnt find a test app which tests that option.
So i wrote a sample program, which i incorporated in the tests.

Thanks,
Vijay
PS:
-
I want to talk 2 u personally reg this patch on irc.
Yes, i am a very bad programmer.

On 3/4/06, Detlef Riekenberg [EMAIL PROTECTED] wrote:
 Am Freitag, den 03.03.2006, 20:50 +0530 schrieb Vijay Kiran Kamuju:

   Changes made according to some suggestions Detlef, waiting for more

 - It took me a really long time to write the review, but you ignored
   almost everything

 I suggest, that you do what i did before sending patches to wine:

 Write a small Windows-App that call the Function, what you want to test
 and learn, how it works. I'm still using PellesC 3.0 in wine for this.


   Add More tests for InternetQueryOption
   Add Tests for InternetSetOption

 Make the Patch as small as possible, so please test only one function.

 When you compile, there must be no warnings from the compiler!
 (exception atm.: -fPIC on make crosstest in wine)

 Hope, that helps

 --
 By By ...
   ... Detlef






Re: DirectDraw - WineD3D patch

2006-03-04 Thread Stefan Dösinger
Hi,
 from IWineD3DDeviceImpl_CreatePalette:
 +memset(palVersion, 0, sizeof(LOGPALETTE));
 +object-hpal = CreatePalette(palVersion);
 +memcpy(object-palVersion, palVersion, sizeof(LOGPALETTE));
 +/* FIXME Using the palVersion member from IWineD3DPaletteImpl for
 CreatePalette + * directly causes a heap corruption. Why? In original
 ddraw this was a WORD, + * which failed too. Confused ...
 + */
 +object-palNumEntries = IWineD3DPaletteImpl_Size(Flags);

 That can't really work. This only creates a palette with zero entries.
 You need to set palNumEntries before calling CreatePalette.
 Attached patch( applies on top of yours ) should fix it( i.e. do it the
 same way it is done in the current implementation).
 But the text colors in AoE are still lacking :/.
 Needs some more investigation ...
I'll look at this, the whole palette code is a bit messy. My suspicion is that 
IDirectDrawPaletteImpl_SetEntries / IWineD3DPaletteImpl_SetEntries doesn't 
update all surfaces that use a palette. I also have to take 
IWineD3DDevice::SetCurrentTexturePalette, 
IWineD3DDevice::GetCurrentTexturePalette as well as 
IWineD3DDevice::SetPaletteEntries and GetPaletteEntries in account.


pgp6mJk8g7LRl.pgp
Description: PGP signature



Re: ddraw/specular lighting

2006-03-04 Thread Stefan Dösinger
Am Freitag, 3. März 2006 13:58 schrieb david.adam:
 Hello,

 A lot of ddraw games recquires specular lighting to work (Syberia I,
 Settlers IV, etc...). Unfortunately, specular lighting is not implemented
 in ddraw. Does the change ddraw/direct 7 WINED3D resolve this problem?
 Otherwise, does somebody forsee to work on that?
 The implmentation of specular lighting would improve considerably the
 numbers of working games under wine
I didn't spend a lot of attention to the lights, I just forward the SetLight / 
GetLight calls to WineD3D, which supports D3DLIGHT_POINT, 
D3DLIGHT_DIRECTIONAL and D3DLIGHT_SPOT. So ATM there's no specular light 
support, but I'm sure that this can be added.


pgpIgpFteVJVD.pgp
Description: PGP signature



Re: Question about copyright lines

2006-03-04 Thread Stefan Dösinger
 Just to add to that, you should never delete existing copyright lines,
 unless you rewrite the entire file from scratch.
I copied all copyright lines from a file if I took code from it to a new file. 
The only file exception is dlls/ddraw/direct3d.c in my new ddraw 
implementation, as I've re-written that file.

If I accidentally dropped someone's copyright line, just send me a note and 
I'll correct it. (Marcus, Lionel, Transgaming). But I'll try to get them 
right.

My first plan was to check the authors of every function / code segment took 
over(There's not really much, except of thunks and old 
IDirect3DLight/Material/Viewport interfaces, where the whole files were 
copied), but that's almost impossible as ddraw was mainly coded in 1998-2000, 
and Wine-CVS starts in 2001.


pgpBDOIuz3AE8.pgp
Description: PGP signature



[d3d8] regression between 0.9.8 and 0.9.9 in Age of Mythology

2006-03-04 Thread Aric Cyr
It seems that during the porting of d3d8 to use wined3d some of there
was some breakage.  Age of Mythology was working fine, but now all
vertex data is totally messed up (2D is menus and stuff is fine).  It
has been this way in CVS for the past few days, when I first noticed
it.  I thought it might be my local changes so I didn't report it, but
testing with the new 0.9.9 it had the same behavior (i.e. not my fault
:)

After debugging things for a while it seems that problem lies in
vertex data with RHW set.  It seems that AoM is using all pre-lit and
pre-transformed vertex data and this is not being processes properly. 
I think the problem is with drawprim.c:drawStridedSlow() but I haven't
been able to figure out exactly where yet.  If anyone has any ideas
(or patches!) I'd be glad to help debug.

Regards,
  Aric

--
Aric Cyr Aric.Cyr at gmail dot com(http://acyr.net)




Re: WRT: winetest-latest is outdated

2006-03-04 Thread Saulius Krasuckas
* On Fri, 3 Mar 2006, Detlef Riekenberg wrote:
 
 Winetest (ELF) compiled again recently
 ( http://www.astro.gla.ac.uk/users/paulm/WRT/wrt.php ),

This is done by issuing make test, IIRC.

 but the crossbuilds are still missing.

And that is done by issuing make crosstest, which currently fails on my 
box using most recent RPMs provided by Hans Leidekker.

 Is there anything that we can do for help?

I started asking Hans about this in my previous letter. :)




Re: [d3d8] regression between 0.9.8 and 0.9.9 in Age of Mythology

2006-03-04 Thread Roderick Colenbrander
 It seems that during the porting of d3d8 to use wined3d some of there
 was some breakage.  Age of Mythology was working fine, but now all
 vertex data is totally messed up (2D is menus and stuff is fine).  It
 has been this way in CVS for the past few days, when I first noticed
 it.  I thought it might be my local changes so I didn't report it, but
 testing with the new 0.9.9 it had the same behavior (i.e. not my fault
 :)
 
 After debugging things for a while it seems that problem lies in
 vertex data with RHW set.  It seems that AoM is using all pre-lit and
 pre-transformed vertex data and this is not being processes properly. 
 I think the problem is with drawprim.c:drawStridedSlow() but I haven't
 been able to figure out exactly where yet.  If anyone has any ideas
 (or patches!) I'd be glad to help debug.
 
 Regards,
   Aric

Right now d3d8's SetVertexShader is disabled because d3d8 shaders don't work
using wined3d yet. Last week I experimented a bit with it and I managed to
get some simple vertex shader examples working (for instance
http://www.codesampler.com/source/dx8_vs11_shader_simple.zip and the dolphin
sample from sdk although with small issues). If I run bigger apps like
3dmark2001 and others there are huge drawing issues. I'm not very familiar
with the shader/drawing code (and vertex shaders in general) so it is very
difficult for me to debug. You can try the patch attached to this email but
it is far from complete. If you or someone else with enough experience can
look at it, you're welcome as my time is limited.

Regards,
Roderick

-- 
Feel free mit GMX FreeMail!
Monat für Monat 10 FreeSMS inklusive! http://www.gmx.netIndex: dlls/d3d8/device.c
===
RCS file: /home/wine/wine/dlls/d3d8/device.c,v
retrieving revision 1.145
diff -u -r1.145 device.c
--- dlls/d3d8/device.c	28 Feb 2006 12:10:27 -	1.145
+++ dlls/d3d8/device.c	4 Mar 2006 13:33:37 -
@@ -1090,8 +1090,8 @@
 FIXME((%p) : Number of shaders exceeds the maximum number of possible shaders\n, This);
 hrc = D3DERR_INVALIDCALL;
 } else {
-/* IDirect3DVertexShader8Impl *shader = This-vShaders[pShader - (VS_HIGHESTFIXEDFXF + 1)]; */
-/* hrc =  IWineD3DDevice_SetVertexShader(This-WineD3DDevice, 0 == shader ? NULL : shader-wineD3DVertexShader); */
+IDirect3DVertexShader8Impl *shader = This-vShaders[pShader - (VS_HIGHESTFIXEDFXF + 1)];
+hrc =  IWineD3DDevice_SetVertexShader(This-WineD3DDevice, 0 == shader ? NULL : shader-wineD3DVertexShader);
 }
 }
 TRACE((%p) : returning hr(%lu)\n, This, hrc);
Index: dlls/wined3d/device.c
===
RCS file: /home/wine/wine/dlls/wined3d/device.c,v
retrieving revision 1.139
diff -u -r1.139 device.c
--- dlls/wined3d/device.c	2 Mar 2006 17:12:33 -	1.139
+++ dlls/wined3d/device.c	4 Mar 2006 13:33:43 -
@@ -1622,6 +1622,23 @@
 D3DCREATEOBJECTINSTANCE(object, VertexShader)
 
 TRACE((%p) : Created Vertex shader %p\n, This, *ppVertexShader);
+
+/* If a vertex declaration has been passed, save it to the vertex shader, this affects d3d8 only.
+*  Further set the declaration before calling SetFunction as it needs the declaration.
+*/
+if (pDeclaration != NULL) {
+IWineD3DVertexDeclaration *vertexDeclaration;
+hr = IWineD3DDevice_CreateVertexDeclaration(iface, pDeclaration, vertexDeclaration ,NULL);
+if (D3D_OK == hr) {
+TRACE((%p) : Setting vertex declaration to %p\n, This, vertexDeclaration);
+object-vertexDeclaration = vertexDeclaration;
+} else {
+FIXME((%p) : Failed to set the declaration, returning D3DERR_INVALIDCALL\n, iface);
+IWineD3DVertexShader_Release(*ppVertexShader);
+return D3DERR_INVALIDCALL;
+}
+}
+
 hr = IWineD3DVertexShader_SetFunction(*ppVertexShader, pFunction);
 
 if (D3D_OK != hr) {
@@ -1639,21 +1656,6 @@
 
 #endif
 
-
-/* If a vertex declaration has been passed, save it to the vertex shader, this affects d3d8 only. */
-if (pDeclaration != NULL) {
-IWineD3DVertexDeclaration *vertexDeclaration;
-hr = IWineD3DDevice_CreateVertexDeclaration(iface, pDeclaration, vertexDeclaration ,NULL);
-if (D3D_OK == hr) {
-TRACE((%p) : Setting vertex declaration to %p\n, This, vertexDeclaration);
-object-vertexDeclaration = vertexDeclaration;
-} else {
-FIXME((%p) : Failed to set the declaration, returning D3DERR_INVALIDCALL\n, iface);
-IWineD3DVertexShader_Release(*ppVertexShader);
-return D3DERR_INVALIDCALL;
-}
-}
-
 return D3D_OK;
 }
 
Index: dlls/wined3d/vertexshader.c
===
RCS file: /home/wine/wine/dlls/wined3d/vertexshader.c,v
retrieving revision 1.23
diff -u -r1.23 

Re: [d3d8] regression between 0.9.8 and 0.9.9 in Age of Mythology

2006-03-04 Thread Aric Cyr
On 3/4/06, Roderick Colenbrander [EMAIL PROTECTED] wrote:
 Right now d3d8's SetVertexShader is disabled because d3d8 shaders don't work
 using wined3d yet. Last week I experimented a bit with it and I managed to
 get some simple vertex shader examples working (for instance
 http://www.codesampler.com/source/dx8_vs11_shader_simple.zip and the dolphin
 sample from sdk although with small issues). If I run bigger apps like
 3dmark2001 and others there are huge drawing issues. I'm not very familiar
 with the shader/drawing code (and vertex shaders in general) so it is very
 difficult for me to debug. You can try the patch attached to this email but
 it is far from complete. If you or someone else with enough experience can
 look at it, you're welcome as my time is limited.

Thanks for the patch and info Roderick.

I'll take a look and see if I can get things working a bit better. 
Using your patch and the old d3d8 code I hope to whip something
together.

Regards,
  Aric

--
Aric Cyr Aric.Cyr at gmail dot com(http://acyr.net)




Re: DirectDraw - WineD3D patch and Wine-0.9.9

2006-03-04 Thread Dimitry Naldayev
Stefan Dösinger [EMAIL PROTECTED] writes:

 Hi,
 I've brought my DirectDraw over WineD3D patch in a form where I want to show 
 it to the public for review. I've uploaded it to 
 http://stud4.tuwien.ac.at/~e0526822/, where it is described in detail(below 
 the game list).

 If there are no fundamental objections against it, I'll start sending patches 
 for WineD3D. The changes I'll make in small patches :) are:

 - Header fixes, that wined3d_interface.h can be included with d3d.h
 - Adding methods to WineD3D for DirectDraw rendering
 - Adding the 2D only surface implementation to WineD3D

 When WineD3D is ready, I'll send a patch for dlls/ddraw to wine-devel and 
 wine-user for a broad regression testing, and when the regressions are out, 
 the ddraw can be replaced(From my POV, AJ has the last word of course ;) )

Is this patch included in Wine-0.9.9 ?
The summary for Wine-0.9.9 say + Direct3D 8 and 9 now use the same code
or this is separate thing from yours patch ?

--
Dimitry






Re: PIF execution

2006-03-04 Thread paul

Stephan Linz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

is there or will be there any solution to execute .bat programs over PIF files 
and avoid the error below?


fixme:winevdm:pif_cmd .bat programs in pif files are not supported.

The fixme message occurs when I try to run external programs within the 
famous simulator/IDE VMLAB (http://www.amctools.com/download.htm).


I believe AMC Tools knows about the problem (http://www.amctools.com/wine.htm) 
but he has no solution til now. Please, understand my Email as a feature 
request too.




Stephan Linz
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFEA1K+fWyCKlmj7ZARArSoAJ9sM35b/6S1LIn1yuuafVr1Vb6u6gCfeg7Z
IyWcXpTXL1gNtZH9s79rdvU=
=ya9M
-END PGP SIGNATURE-



I filed this bug http://bugs.winehq.org/show_bug.cgi?id=3638 a while 
back and just modified the subject. But since qemu with the kernel mod 
now runs a virtual PC at near native speeds it may be easier to install 
windows and your application in that.

My application is a FPGA ide from Atmel.
Paul R.





Re: WRT: winetest-latest is outdated

2006-03-04 Thread Hans Leidekker
On Saturday 04 March 2006 12:34, Saulius Krasuckas wrote:

 And that is done by issuing make crosstest, which currently fails on my
 box using most recent RPMs provided by Hans Leidekker.

I've created an updated set of RPMs that allow me to cross build all Wine
tests again. Find them here:

  http://mirzam.it.vu.nl/mingw/

 -Hans




Re: shell32: Unicode'ify ISFHelper interface

2006-03-04 Thread Vitaliy Margolen
Saturday, March 4, 2006, 10:35:54 AM, Michael Jung wrote:
 ChangeLog:
 Unicode'ify shell32 internal ISFHelper interface and it's implementors.

  dlls/shell32/shellfolder.h   |4 ++-
  dlls/shell32/shfldr_fs.c |   55
  +- dlls/shell32/shfldr_unixfs.c |
  32 ++--
  dlls/shell32/shv_bg_cmenu.c  |6 ++---
  4 files changed, 51 insertions(+), 46 deletions(-)

Few questions:
 -if (uLen  strlen (szNewFolder) + 4)
 +if (uLen  lstrlenW (wszNewFolder) + 4)
Probably should use sizeof(wszNewFolder)/sizeof(WCHAR) + 4. A bit awkward
but compiled into single number. And it looks like that's what you used
in shfldr_unixfs.c g.

 -_ILSimpleGetText (pidl, szText, MAX_PATH);
 -if (0 == strcasecmp (szText, lpName)) {
 -sprintf (lpName, %s %d, szNewFolder, i++);
 +_ILSimpleGetTextW (pidl, wszText, MAX_PATH);
 +if (0 == lstrcmpiW (wszText, pwszName)) {
 +sprintfW (pwszName, wszFormat, wszNewFolder, i++);
To be safe probably should use snprintfW instead.

 +if (This-sPathTarget)
 +lstrcpyW(wszNewDir, This-sPathTarget);
Kind of the same thing.

Here
 +++ b/dlls/shell32/shfldr_fs.c
 +if (uLen  lstrlenW (wszNewFolder) + 4)
and here
 +++ b/dlls/shell32/shfldr_unixfs.c
 +if (uLen  sizeof(wszNewFolder)/sizeof(WCHAR)+3)
Why 4 in one place and 3 in the other?

Vitaliy Margolen






Re: [d3d8] regression between 0.9.8 and 0.9.9 in Age of Mythology

2006-03-04 Thread Roderick Colenbrander
 On 3/4/06, Roderick Colenbrander [EMAIL PROTECTED] wrote:
  Right now d3d8's SetVertexShader is disabled because d3d8 shaders don't
 work
  using wined3d yet. Last week I experimented a bit with it and I managed
 to
  get some simple vertex shader examples working (for instance
  http://www.codesampler.com/source/dx8_vs11_shader_simple.zip and the
 dolphin
  sample from sdk although with small issues). If I run bigger apps like
  3dmark2001 and others there are huge drawing issues. I'm not very
 familiar
  with the shader/drawing code (and vertex shaders in general) so it is
 very
  difficult for me to debug. You can try the patch attached to this email
 but
  it is far from complete. If you or someone else with enough experience
 can
  look at it, you're welcome as my time is limited.
 
 Thanks for the patch and info Roderick.
 
 I'll take a look and see if I can get things working a bit better. 
 Using your patch and the old d3d8 code I hope to whip something
 together.

I installed AOM (trial) here and I think the issue is related to the FVF.
The function initializeFVF is only partially implemented and in case of the 
new code with my patch I see values '0x1c4 / 0x2' while using the old code I
see other values too (0x112, 0x2d2, 0x212, 0x152). So I think we should look
there and check what the old code did. (the code is quite differently)

Roderick

-- 
Feel free mit GMX FreeMail!
Monat für Monat 10 FreeSMS inklusive! http://www.gmx.net




Re: wined3d: Implemented fallback for separate stencil operation in WINED3DRS_CCW_STENCIL*

2006-03-04 Thread H. Verbeet
On 04/03/06, Vitaly Budovski [EMAIL PROTECTED] wrote:
 +glGetIntegerv(GL_STENCIL_BACK_FAIL, stencilFail);
 +glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_FAIL, depthFail);
 +glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_PASS, stencilPass);

device.c: In function `IWineD3DDeviceImpl_SetRenderState':
device.c:3776: error: `GL_STENCIL_BACK_FAIL' undeclared (first use in
this function)
device.c:3776: error: (Each undeclared identifier is reported only once
device.c:3776: error: for each function it appears in.)
device.c:3777: error: `GL_STENCIL_BACK_PASS_DEPTH_FAIL' undeclared
(first use in this function)
device.c:3778: error: `GL_STENCIL_BACK_PASS_DEPTH_PASS' undeclared
(first use in this function)




Re: [d3d8] regression between 0.9.8 and 0.9.9 in Age of Mythology

2006-03-04 Thread Aric Cyr
On 3/5/06, Roderick Colenbrander [EMAIL PROTECTED] wrote:
  On 3/4/06, Roderick Colenbrander [EMAIL PROTECTED] wrote:
 I installed AOM (trial) here and I think the issue is related to the FVF.
 The function initializeFVF is only partially implemented and in case of the
 new code with my patch I see values '0x1c4 / 0x2' while using the old code I
 see other values too (0x112, 0x2d2, 0x212, 0x152). So I think we should look
 there and check what the old code did. (the code is quite differently)

Yes I noticed that the new code was always 1c4 as well, but hadn't
gone back to see what the old code was doing.  But 1c4 definitely
seems wrong since the vertex coordinates are all messed up and invalid
according to MSDN.  For example z is supposed to be [0,1] but I get
large values, and rhw is also supposed to be between [0,1/MaxVertexW]
but I was getting negative values.  I'll look into the FVF code more.

Regards,
  Aric

--
Aric Cyr Aric.Cyr at gmail dot com(http://acyr.net)




Re: DirectDraw - WineD3D patch

2006-03-04 Thread Peter Beutner
Hi
 I'll look at this, the whole palette code is a bit messy. My suspicion is 
 that 
 IDirectDrawPaletteImpl_SetEntries / IWineD3DPaletteImpl_SetEntries doesn't 
 update all surfaces that use a palette. 
That's indeed the reason. Simple fix is to set the rendertarget usage also for 
ddraw offscreen surfaces.Not sure if there are any possible sideeffects of 
this, 
but until now i haven't seen any.
f005d3af1e8f4cacf1211c6fc3952acbd4766332
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 34d91da..4b44035 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -1788,8 +1788,8 @@ IDirectDrawImpl_CreateNewSurface(IDirect
 PixelFormat_WineD3DtoDD(pDDSD-ddpfPixelFormat, Mode.Format);
 Format = Mode.Format;
 
-/* If it's a off-screen D3D device, set the rendertarget usage */
-if(pDDSD-ddsCaps.dwCaps  DDSCAPS_3DDEVICE)
+/* If it's a off-screen D3D/DDraw device, set the rendertarget 
usage */
+if(pDDSD-ddsCaps.dwCaps  ( DDSCAPS_3DDEVICE | 
DDSCAPS_OFFSCREENPLAIN) )
 Usage |= WINED3DUSAGE_RENDERTARGET;
 }
 }



Wine 0.9.9 and instalation of AutoCAD 2000

2006-03-04 Thread Dimitry Naldayev
Hi all, 
When I try to install AutoCAD 2000 on Wine 0.9.9 (hmm... it is cvs checkout
about 04 march 2006 21:00 GMT+0500 PERM. I do not remember precise time)
I get error in console:
err:module:map_image Section .rsrc too large (f000+e000/1c000)
and installation programm draw error box with message
Cannot load c:\windows\temp\_ISTMP0.DIR\iutil.dll
but the file is present...

Any ideas where to dig?

---
Dimitry





Re: Wine 0.9.9 and instalation of AutoCAD 2000

2006-03-04 Thread Vitaliy Margolen
Saturday, March 4, 2006, 11:11:35 PM, Dimitry Naldayev wrote:
 Hi all, 
 When I try to install AutoCAD 2000 on Wine 0.9.9 (hmm... it is cvs checkout
 about 04 march 2006 21:00 GMT+0500 PERM. I do not remember precise time)
 I get error in console:
 err:module:map_image Section .rsrc too large (f000+e000/1c000)
 and installation programm draw error box with message
 Cannot load c:\windows\temp\_ISTMP0.DIR\iutil.dll
 but the file is present...

Please submit bug reports to http://bugs.winehq.org/ instead of sending
e-mails here.

Thank you.

Vitaliy.