Exemplo n.º 1
0
        /* IntPtr refers to a Mix_Chunk* */
        /* This is an RWops macro in the C header. */
        public static IntPtr Mix_LoadWAV(string file)
        {
#if NETSTANDARD1_4
            IntPtr filePtr = LPUtf8StrMarshaler.GetInstance(null).MarshalManagedToNative(file);
            IntPtr rbPtr   = LPUtf8StrMarshaler.GetInstance(null).MarshalManagedToNative("rb");
            IntPtr rwops   = SDL.INTERNAL_SDL_RWFromFile(filePtr, rbPtr);
            Marshal.FreeHGlobal(rbPtr);
            Marshal.FreeHGlobal(filePtr);
#else
            IntPtr rwops = SDL.INTERNAL_SDL_RWFromFile(file, "rb");
#endif
            return(Mix_LoadWAV_RW(rwops, 1));
        }
Exemplo n.º 2
0
        /* IntPtr refers to a Mix_Chunk* */
        /* This is an RWops macro in the C header. */
        public static IntPtr Mix_LoadWAV(string file)
        {
            IntPtr rwops = SDL.INTERNAL_SDL_RWFromFile(file, "rb");

            return(Mix_LoadWAV_RW(rwops, 1));
        }
Exemplo n.º 3
0
 public static int SDL_SavePNG(IntPtr surface, string filename)
 {
     return(SDL_SavePNG_RW(surface, SDL.INTERNAL_SDL_RWFromFile(filename, "wb"), true));
 }
Exemplo n.º 4
0
 public static IntPtr SDL_LoadPNG(string filename)
 {
     return(SDL_LoadPNG_RW(SDL.INTERNAL_SDL_RWFromFile(filename, "rb"), true));
 }