> Hi. > > Yes, exactly, the AVP1 game is using p8 textures and color keys on some of > them > for transparency. > > The thing is, the "index_in_alpha" hack DOES get enabled on its P8 3D > textures, > and that's the problem I'm trying to fix. I don't see the "primary render > target > is p8" check in the code, instead it looks like it checks that > render_targets[0] > is a render target.
Try to see if the attached patch fixes the problem. It seems that at some point I didn't check whether the target is P8 in this function while I check for it in other places. I have checked it using all my p8 testcases and it seems to work fine but I don't have AVP. If it works I'll submit it. Roderick -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
>From c3f4b6a927e40756a7e34f889111f85e6fb9d556 Mon Sep 17 00:00:00 2001 From: Roderick Colenbrander <[EMAIL PROTECTED]> Date: Sat, 22 Dec 2007 18:25:57 +0100 Subject: [PATCH] Make sure the format of the primary render target is P8 before storing the index in the alpha component. --- dlls/wined3d/surface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 30d6507..3e34286 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1931,7 +1931,7 @@ static void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4] if (device->render_targets && device->render_targets[0]) { IWineD3DSurfaceImpl* render_target = (IWineD3DSurfaceImpl*)device->render_targets[0]; - if(render_target->resource.usage & WINED3DUSAGE_RENDERTARGET) + if((render_target->resource.usage & WINED3DUSAGE_RENDERTARGET) && (render_target->resource.format == WINED3DFMT_P8)) index_in_alpha = TRUE; } -- 1.5.3.4