Mercurial > repos > tabletprog
diff modules/sdl.tp @ 287:b01d7c1b4edd
Add binding for simple form of SDL_RenderCopyEx
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 22 Jul 2014 18:39:00 -0700 |
parents | bb1539decd62 |
children | 38bbbf74b735 |
line wrap: on
line diff
--- a/modules/sdl.tp Tue Jul 22 18:31:31 2014 -0700 +++ b/modules/sdl.tp Tue Jul 22 18:39:00 2014 -0700 @@ -167,6 +167,20 @@ intret } + llMessage: copyTo:rotated withVars: { + dst <- object ptr + angle <- object ptr + dstOpaque <- cpointer ptr + anglef <- obj_float32 ptr + intret <- obj_int32 ptr + } andCode: :dst :angle { + anglef <- (mcall: f32 1 angle) castTo: (obj_float32 ptr) + dstOpaque <- (mcall: _rectPointer 1 dst) castTo: (cpointer ptr) + intret <- make_object: (addr_of: obj_int32_meta) NULL 0 + intret num!: (SDL_RenderCopyEx: renderer texture NULL (dstOpaque val) (anglef num) NULL SDL_FLIP_NONE) + intret + } + llMessage: destroy withVars: {} andCode: { SDL_DestroyTexture: texture true