diff --git a/source/gfx/actor.cpp b/source/gfx/actor.cpp index 2c736012e..825df62a7 100644 --- a/source/gfx/actor.cpp +++ b/source/gfx/actor.cpp @@ -44,9 +44,10 @@ int CActorCache::GetSizeType(int Size) // if (Size<= 64) return(64); // if (Size<=128) return(128); // if (Size<=256) return(256); + return((Size+15)&-16); // Size>>=4; // Size<<=4; - return(Size); +// return(Size); ASSERT(!"SPRITE SIZE NOT SUPPORTED"); return(-1); @@ -170,7 +171,10 @@ void CActorCache::AllocCache() int TPW=CACHE_W/SlotCount; int MaxW=0; int MaxH=0; - + +/* if (TPW<1) */TPW=1; + ASSERT(SlotCountTexY=TexY; List->U=U&255; List->V=V&255; - List->TPage=getTPage(0,0,TexX,TexX); + List->TPage=getTPage(0,0,TexX,TexY); AddNode(List,&ThisSlot->NodeList); List++; } @@ -242,7 +246,7 @@ void CActorCache::Reset() SlotCount=0; // Clear VRam -RECT R={512,256,512,250}; +RECT R={CACHE_X,CACHE_Y,TPAGE_W*CACHE_W,TPAGE_H*CACHE_H}; ClearImage(&R,0,255,0); } diff --git a/source/gfx/actor.h b/source/gfx/actor.h index a729737bd..3923e0e83 100644 --- a/source/gfx/actor.h +++ b/source/gfx/actor.h @@ -60,12 +60,18 @@ public: TPAGE_W =256, TPAGE_H =256-4, + CACHE_X =512, + CACHE_Y =256, + CACHE_W =8, + CACHE_H =1, +/* CACHE_X =512+256, CACHE_Y =256, CACHE_W =4, CACHE_H =1, - CACHE_PALX =CACHE_X, +*/ + CACHE_PALX =CACHE_X+64, CACHE_PALY =511, CACHE_PALW =64, CACHE_PALH =1,