diff --git a/desmume/src/rasterize.cpp b/desmume/src/rasterize.cpp index c74948f14..aa0583952 100644 --- a/desmume/src/rasterize.cpp +++ b/desmume/src/rasterize.cpp @@ -287,10 +287,11 @@ static FORCEINLINE void alphaBlend(FragmentColor & dst, const FragmentColor & sr { if(gfx3d.renderState.enableAlphaBlending) { - if(src.a == 0 || dst.a == 0) + if(src.a == 31 || dst.a == 0) { dst = src; } + //else if(src.a == 0) { } //this is not necessary since it was handled earlier else { u8 alpha = src.a+1; @@ -1416,6 +1417,15 @@ void SoftRasterizerEngine::framebufferProcess() destFragmentColor.a = ((128-fog)*destFragmentColor.a + a*fog)>>7; } } + + ////debug alpha channel framebuffer contents + //for(int i=0;i<256*192;i++) + //{ + // FragmentColor &destFragmentColor = screenColor[i]; + // destFragmentColor.r = destFragmentColor.a; + // destFragmentColor.g = destFragmentColor.a; + // destFragmentColor.b = destFragmentColor.a; + //} } void SoftRasterizerEngine::performClipping(bool hirez) diff --git a/desmume/src/utils/vfat.cpp b/desmume/src/utils/vfat.cpp index 76f517628..8eaed0bf5 100644 --- a/desmume/src/utils/vfat.cpp +++ b/desmume/src/utils/vfat.cpp @@ -142,11 +142,12 @@ void build_ListCallback(FsEntry* fs, EListCallbackArg arg) fclose(inf); std::string path = currVirtPath + "/" + fname; + printf("adding path %s for libfat\n",path.c_str()); bool ok = LIBFAT::WriteFile(path.c_str(),buf,len); if(!ok) - printf("ERROR adding file %s via libfat\n",path.c_str()); + printf("ERROR adding file to fat\n"); delete[] buf; - } else printf("ERROR opening file %s for add via libfat\n",path.c_str()); + } else printf("ERROR opening file for fat\n"); } }