NScumm.Sword1.ResMan.ResClose C# (CSharp) Метод

ResClose() публичный Метод

public ResClose ( uint id ) : void
id uint
Результат void
        public void ResClose(uint id)
        {
            MemHandle handle = ResHandle(id);
            if (handle == null)
                return;
            if (handle.refCount == 0)
            {
                // TODO: warning("Resource Manager fail: unlocking object with refCount 0. Id: %d", id);
            }
            else
            {
                handle.refCount--;
                if (handle.refCount == 0)
                {
                    _memMan.SetCondition(handle, MemMan.MEM_CAN_FREE);
                }
            }
        }

Usage Example

Пример #1
0
 public void CloseSection(uint screen)
 {
     if (_liveList[screen] == 0)  // close the section that PLAYER has just left, if it's empty now
     {
         _resMan.ResClose(_objectList[screen]);
     }
 }
All Usage Examples Of NScumm.Sword1.ResMan::ResClose