32 lines
694 B
Go
32 lines
694 B
Go
package allegro5
|
|
|
|
// #include <allegro5/allegro.h>
|
|
import "C"
|
|
|
|
type NewBitmapFlag int
|
|
|
|
const (
|
|
NewBitmapFlagMemoryBitmap = NewBitmapFlag(C.ALLEGRO_MEMORY_BITMAP)
|
|
NewBitmapFlagVideoBitmap = NewBitmapFlag(C.ALLEGRO_VIDEO_BITMAP)
|
|
NewBitmapFlagMinLinear = NewBitmapFlag(C.ALLEGRO_MIN_LINEAR)
|
|
)
|
|
|
|
type NewBitmapFlagsCapture struct {
|
|
cap C.int
|
|
}
|
|
|
|
func CaptureNewBitmapFlags() *NewBitmapFlagsCapture {
|
|
var cap = C.al_get_new_bitmap_flags()
|
|
return &NewBitmapFlagsCapture{cap}
|
|
}
|
|
|
|
func (c *NewBitmapFlagsCapture) Mutate(mut func(FlagMutation)) {
|
|
var m = &flagMut{c.cap}
|
|
mut(m)
|
|
C.al_set_new_bitmap_flags(m.flg)
|
|
}
|
|
|
|
func (c *NewBitmapFlagsCapture) Revert() {
|
|
C.al_set_new_bitmap_flags(c.cap)
|
|
}
|