diff --git a/src/FxEngine/zbuffer.c b/src/FxEngine/zbuffer.c index 21c75bc..cfed696 100644 --- a/src/FxEngine/zbuffer.c +++ b/src/FxEngine/zbuffer.c @@ -34,7 +34,7 @@ static const uint32_t size_blocks = size_char/32; * addresse du zbuffer **/ static int32_t* address=0; - +static int32_t* clearval=0; static const int32_t clearval[8]={3000,3000,3000,3000,3000,3000,3000,3000}; #define ALIGN 32 @@ -56,8 +56,9 @@ void FE_zbuffer_clear() if (address==0) { address = buffer_malloc(size_char); - - if (address==0) // cas de figure où il n'y a plus assez de RAM + clearval= buffer_malloc(32); + + if (address==0||clearval==0) // cas de figure où il n'y a plus assez de RAM { dclear(C_WHITE); dtext(1, 1, "Not enough RAM...", C_BLACK, C_NONE); @@ -65,6 +66,7 @@ void FE_zbuffer_clear() while (1==1) getkey(); } + clearval[0]=3000; clearval[1]=3000; clearval[2]=3000; clearval[3]=3000; clearval[4]=3000; clearval[5]=3000; clearval[6]=3000; clearval[7]=3000; clearval[0]=3000; } // TODO déterminer le type d'effacement if (isSH3())