예제 #1
0
파일: Video.cs 프로젝트: beginor/mame.net
        private static void igs011_palette(int offset, ushort data)
        {
            int rgb;

            paletteram16[offset] = data;
            rgb = (paletteram16[offset & 0x7ff] & 0xff) | ((paletteram16[offset | 0x800] & 0xff) << 8);
            Palette.palette_entry_set_color(offset & 0x7ff, (uint)((Palette.pal5bit((byte)(rgb >> 0)) << 16) | (Palette.pal5bit((byte)(rgb >> 5)) << 8) | Palette.pal5bit((byte)(rgb >> 10))));
        }
예제 #2
0
파일: Video.cs 프로젝트: beginor/mame.net
        private static void igs011_palette(int offset, byte data)
        {
            int rgb;

            if ((offset & 1) == 0)
            {
                paletteram16[offset / 2] = (ushort)((data << 8) | (paletteram16[offset / 2] & 0xff));
            }
            else if ((offset & 1) == 1)
            {
                paletteram16[offset / 2] = (ushort)((paletteram16[offset / 2] & 0xff00) | data);
            }
            rgb = (paletteram16[(offset / 2) & 0x7ff] & 0xff) | ((paletteram16[(offset / 2) | 0x800] & 0xff) << 8);
            Palette.palette_entry_set_color((offset / 2) & 0x7ff, (uint)((Palette.pal5bit((byte)(rgb >> 0)) << 16) | (Palette.pal5bit((byte)(rgb >> 5)) << 8) | Palette.pal5bit((byte)(rgb >> 10))));
        }
예제 #3
0
 public static void changecolor(int color, int r, int g, int b)
 {
     Palette.palette_entry_set_color(color, Palette.make_rgb(Palette.pal5bit((byte)r), Palette.pal5bit((byte)g), Palette.pal5bit((byte)b)));
 }
예제 #4
0
 public static void set_color_555(int color, int rshift, int gshift, int bshift, ushort data)
 {
     Palette.palette_entry_set_color2(color, Palette.make_rgb(Palette.pal5bit((byte)(data >> rshift)), Palette.pal5bit((byte)(data >> gshift)), (int)Palette.pal5bit((byte)(data >> bshift))));
 }