Example #1
0
        private void SetPalette(SnesColors.ColorType pal)
        {
            CurrPalette = pal;
            int[] tmp = SnesColors.GetLUT(pal);

            fixed(int *p = &tmp[0])
            Api.QUERY_set_color_lut((IntPtr)p);
        }
 public SNESGraphicsDecoder(LibsnesApi api, SnesColors.ColorType pal)
 {
     this.api = api;
     colortable = SnesColors.GetLUT(pal);
     IntPtr block = (IntPtr)api.QUERY_get_memory_data(LibsnesApi.SNES_MEMORY.VRAM);
     vram = (byte*)block;
     vram16 = (ushort*)block;
     block = (IntPtr)api.QUERY_get_memory_data(LibsnesApi.SNES_MEMORY.CGRAM);
     cgram = (ushort*)block;
     block = (IntPtr)api.QUERY_get_memory_data(LibsnesApi.SNES_MEMORY.OAM);
     oam = (byte*)block;
 }
        public SNESGraphicsDecoder(LibsnesApi api, SnesColors.ColorType pal)
        {
            this.api   = api;
            colortable = SnesColors.GetLUT(pal);
            IntPtr block = (IntPtr)api.QUERY_get_memory_data(LibsnesApi.SNES_MEMORY.VRAM);

            vram   = (byte *)block;
            vram16 = (ushort *)block;
            block  = (IntPtr)api.QUERY_get_memory_data(LibsnesApi.SNES_MEMORY.CGRAM);
            cgram  = (ushort *)block;
            block  = (IntPtr)api.QUERY_get_memory_data(LibsnesApi.SNES_MEMORY.OAM);
            oam    = (byte *)block;
        }
Example #4
0
		public void SetPalette(SnesColors.ColorType pal)
		{
			CurrPalette = pal;
			int[] tmp = SnesColors.GetLUT(pal);
			fixed (int* p = &tmp[0])
				api.QUERY_set_color_lut((IntPtr)p);
		}