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

public ResOpen ( uint id ) : void
id uint
Результат void
Пример #1
0
        public void Initialize()
        {
            _numObjs = 0;
            Logic.ScriptVars[(int)ScriptVariableNames.MOUSE_STATUS] = 0; // mouse off and unlocked
            _getOff        = 0;
            _inTopMenu     = false;
            _lastState     = 0;
            _mouseOverride = false;
            _currentPtrId  = _currentLuggageId = 0;

            for (byte cnt = 0; cnt < 17; cnt++)                      // force res manager to keep mouse
            {
                _resMan.ResOpen((uint)(SwordRes.MSE_POINTER + cnt)); // cursors in memory all the time
            }
            _system.GraphicsManager.IsCursorVisible = false;
            CreatePointer(0, 0);
        }
Пример #2
0
 public ControlButton(ushort x, ushort y, uint resId, ButtonIds id, byte flag, ResMan pResMan, byte[] screenBuf,
     ISystem system)
 {
     _x = x;
     _y = y;
     _id = id;
     _flag = flag;
     _resId = resId;
     _resMan = pResMan;
     _frameIdx = 0;
     _resMan.ResOpen(_resId);
     FrameHeader tmp = new FrameHeader(_resMan.FetchFrame(_resMan.FetchRes(_resId), 0));
     _width = _resMan.ReadUInt16(tmp.width);
     _width = (ushort)((_width > Screen.SCREEN_WIDTH) ? Screen.SCREEN_WIDTH : _width);
     _height = _resMan.ReadUInt16(tmp.height);
     if ((x == 0) && (y == 0))
     { // center the frame (used for panels);
         _x = (ushort)((((640 - _width) / 2) < 0) ? 0 : ((640 - _width) / 2));
         _y = (ushort)((((480 - _height) / 2) < 0) ? 0 : ((480 - _height) / 2));
     }
     _dstBuf = new ByteAccess(screenBuf, _y * Screen.SCREEN_WIDTH + _x);
     _system = system;
 }
Пример #3
0
        public ControlButton(ushort x, ushort y, uint resId, ButtonIds id, byte flag, ResMan pResMan, byte[] screenBuf,
                             ISystem system)
        {
            _x        = x;
            _y        = y;
            _id       = id;
            _flag     = flag;
            _resId    = resId;
            _resMan   = pResMan;
            _frameIdx = 0;
            _resMan.ResOpen(_resId);
            FrameHeader tmp = new FrameHeader(_resMan.FetchFrame(_resMan.FetchRes(_resId), 0));

            _width  = _resMan.ReadUInt16(tmp.width);
            _width  = (ushort)((_width > Screen.SCREEN_WIDTH) ? Screen.SCREEN_WIDTH : _width);
            _height = _resMan.ReadUInt16(tmp.height);
            if ((x == 0) && (y == 0))
            { // center the frame (used for panels);
                _x = (ushort)((((640 - _width) / 2) < 0) ? 0 : ((640 - _width) / 2));
                _y = (ushort)((((480 - _height) / 2) < 0) ? 0 : ((480 - _height) / 2));
            }
            _dstBuf = new ByteAccess(screenBuf, _y * Screen.SCREEN_WIDTH + _x);
            _system = system;
        }