func LoadBMP(_file string) *Surface { cfile := C.CString(_file) defer C.free(unsafe.Pointer(cfile)) cparams := C.CString("rb") defer C.free(unsafe.Pointer(cparams)) return (*Surface)(C.SDL_LoadBMP_RW(C.SDL_RWFromFile(cfile, cparams), C.int(1))) }
// LoadBMP_RW (https://wiki.libsdl.org/SDL_LoadBMP_RW) func LoadBMP_RW(src *RWops, freeSrc int) (*Surface, error) { surface := (*Surface)(unsafe.Pointer(C.SDL_LoadBMP_RW(src.cptr(), C.int(freeSrc)))) if surface == nil { return nil, GetError() } return surface, nil }
func LoadBMP_RW(rw *RWops, free bool) (*Surface, error) { var cfree C.int if free { cfree = 1 } s := C.SDL_LoadBMP_RW(rw.c, cfree) if s == nil { return nil, getError() } return (*Surface)(unsafe.Pointer(s)), nil }
func LoadBMP_RW(src *RWops, freeSrc int) *Surface { _surface := C.SDL_LoadBMP_RW(src.cptr(), C.int(freeSrc)) return (*Surface)(unsafe.Pointer(_surface)) }
func LoadBMP_RW(src *RWops, freesrc int) *Surface { _src := (*C.SDL_RWops)(unsafe.Pointer(src)) _freesrc := (C.int)(freesrc) _surface := C.SDL_LoadBMP_RW(_src, _freesrc) return (*Surface)(unsafe.Pointer(_surface)) }