I'm working on some direct draw code to get Carmageddon working.
I think I have found my issue in IWineD3DPaletteImpl_SetEntries
Carmageddon runs in 8 bit mode, my x windows is set at 24bit.
If I drop xorg to 8bit, wine refuses to load. If i set it to 16bit, the Carmageddon menus are still bad, but noticeably better then running in 24bit.
In SetEntries there is a bit of code idef'd out:
#if 0 /* Now, if we are in 'depth conversion mode', update the screen palette */ /* FIXME: we need to update the image or we won't get palette fading. */ if (This->ddraw->d->palette_convert != NULL) This->ddraw->d->palette_convert(palent,This->screen_palents,start,count); #endif
Uncommenting the above only leads to compile errors. Dredging through the wine archives, I see that the palette convert functions haven't been there since 2000.
Can anyone give me an idea on why they were removed & what might be the best way to reimplement some form of palette conversion? (Even just in a hacky way right now, so i can test my assumptions)
Use this patch which I made a while ago. I still need to fix some things in it but it handles the conversion using fragment shaders. You need to set the DirectDrawRenderer to opengl and RenderTargetLockMode to readtex. I hope to clean it up soon.
Roderick
I'm working on some direct draw code to get Carmageddon working.
I think I have found my issue in IWineD3DPaletteImpl_SetEntries
Carmageddon runs in 8 bit mode, my x windows is set at 24bit.
If I drop xorg to 8bit, wine refuses to load. If i set it to 16bit, the Carmageddon menus are still bad, but noticeably better then running in 24bit.
In SetEntries there is a bit of code idef'd out:
#if 0 /* Now, if we are in 'depth conversion mode', update the screen palette */ /* FIXME: we need to update the image or we won't get palette fading. */ if (This->ddraw->d->palette_convert != NULL)
This->ddraw->d->palette_convert(palent,This->screen_palents,start,count); #endif
Uncommenting the above only leads to compile errors. Dredging through the wine archives, I see that the palette convert functions haven't been there since 2000.
Can anyone give me an idea on why they were removed & what might be the best way to reimplement some form of palette conversion? (Even just in a hacky way right now, so i can test my assumptions)
-- Nathan
Am Donnerstag 15 Februar 2007 08:52 schrieb Roderick Colenbrander:
Use this patch which I made a while ago. I still need to fix some things in it but it handles the conversion using fragment shaders. You need to set the DirectDrawRenderer to opengl and RenderTargetLockMode to readtex. I hope to clean it up soon.
Forgot the patch?
Google to the rescue! (I googled Roderick's name, i was lead right to the patches!) http://www.kernel-traffic.org/wine/wn20051211_301.html#2
I believe this is the patch he was talking about, I'll give it a try in the morning & see how it goes.
On 2/15/07, Stefan Dösinger stefan@codeweavers.com wrote:
Am Donnerstag 15 Februar 2007 08:52 schrieb Roderick Colenbrander:
Use this patch which I made a while ago. I still need to fix some things in it but it handles the conversion using fragment shaders. You need to set the DirectDrawRenderer to opengl and RenderTargetLockMode to readtex. I hope to clean it up soon.
Forgot the patch?
On 15/02/07, Nathan Williams nathan.andrew.williams@gmail.com wrote:
Google to the rescue! (I googled Roderick's name, i was lead right to the patches!) http://www.kernel-traffic.org/wine/wn20051211_301.html#2
I believe this is the patch he was talking about, I'll give it a try in the morning & see how it goes.
I think there was a more recent version of those patches, I'm not sure if the ones linked there still apply.