예제 #1
0
        private void GetCharacterData()
        {
            _tileViewOptions.Format   = (TileFormat)_state.CharacterData.ColorMode;
            _tileViewOptions.Width    = 16;
            _tileViewOptions.PageSize = 0x10000;
            var source  = SnesDebugApi.GetMemoryState(SnesMemoryType.VideoRam);
            var address = 0;
            var size    = Math.Min(source.Length - address, _tileViewOptions.PageSize);

            Array.Copy(source, address, _tileSource, 0, size);
            _state.CharacterData.Width  = 128;
            _state.CharacterData.Height = GetChrHeight(_tileViewOptions, _state.CharacterData.ColorMode);
            SnesDebugApi.GetTileView(_tileViewOptions, _tileSource, _tileSource.Length, _state.Memory.CgRam, _state.CharacterData.PixelData[0]);
        }