From c1cb9f37dcb0f20507192cada1e34519e68444c4 Mon Sep 17 00:00:00 2001 From: Daveo Date: Sat, 5 May 2001 18:38:24 +0000 Subject: [PATCH] --- source/gfx/actor.cpp | 51 ++++++++++++++++++++++++++++++++++++++------ source/gfx/actor.h | 1 + 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/source/gfx/actor.cpp b/source/gfx/actor.cpp index 0710c6726..20dc96b0e 100644 --- a/source/gfx/actor.cpp +++ b/source/gfx/actor.cpp @@ -54,6 +54,43 @@ int CActorCache::GetSizeType(int Size) return(-1); } +/*****************************************************************************/ +int CActorCache::ReAllocSlot(int W,int H) +{ +int i; +int Slot=-1; +int SlotW=+32000,SlotH=+32000; + +// Find best slot which fits in + +// ASSERT(!"ReAlloc"); + for (i=0;i=CACHE_TYPE_MAX) + { // No free slots, grab an existing one, and alter size to fit + Slot=ReAllocSlot(W,H); + } + else + { Slot=SlotCount; SlotList[Slot].Width=W; SlotList[Slot].Height=H; - - printf("Get Slot %i Slots\n",SlotCount); - -/*bodge*/ //if (SlotCount