Ejemplo n.º 1
0
        public unsafe void SetPalette(int start, int finish, AGSColor[] arg2)
        {
            if (arg2.Length != 256)
            {
                throw new ArgumentException("arg2");
            }

            fixed (AGSColor* ptr = arg2)
            {
                NativeMethods.IAGSEngine_SetPalette(this.handle, start, finish, new IntPtr(ptr));
            }
        }
Ejemplo n.º 2
0
        public unsafe AGSColor[] GetPalette()
        {
            IntPtr cPtr = NativeMethods.IAGSEngine_GetPalette(this.handle);
            var color = (AGSColor*)cPtr;
            var ret = new AGSColor[256];
            for (int i = 0; i < 256; i++)
            {
                ret[i] = *color;
                color++;
            }

            return ret;
        }