Exemplo n.º 1
0
        public bool Lookup(string skinfilename, out cTextureInfo ptextureinfo)
        {
            bool success;
            int  skinfileKey = _skinFilenamePool.lookupKey(skinfilename);

            ptextureinfo = (cTextureInfo)this[skinfileKey];
            if (ptextureinfo != null) //We've already read in and saved the _pdata before.
            {
                return(true);
            }
            //Otherwise create and register a new cTextureInfo* object that's loaded with the skinfile.
            ptextureinfo = new cTextureInfo();
            success      = ptextureinfo.LoadPCXTexture(skinfilename);
            if (success) //Save the ptextureinfo
            {
                this[skinfileKey] = ptextureinfo;
            }

            return(success);
        }