examples/lib use the new wrappers
This commit is contained in:
parent
ddb7185482
commit
b559285b78
133 changed files with 17038 additions and 151734 deletions
|
|
@ -4,23 +4,23 @@ import
|
|||
SDL
|
||||
|
||||
var
|
||||
screen, greeting: PSDL_Surface
|
||||
r: TSDL_Rect
|
||||
screen, greeting: PSurface
|
||||
r: TRect
|
||||
|
||||
if SDL_Init(SDL_INIT_VIDEO) == 0:
|
||||
screen = SDL_SetVideoMode(640, 480, 16, SDL_SWSURFACE or SDL_ANYFORMAT)
|
||||
if Init(INIT_VIDEO) == 0:
|
||||
screen = SetVideoMode(640, 480, 16, SWSURFACE or ANYFORMAT)
|
||||
if screen == nil:
|
||||
write(stdout, "screen is nil!\n")
|
||||
else:
|
||||
greeting = SDL_LoadBmp("backgrnd.bmp")
|
||||
greeting = LoadBmp("backgrnd.bmp")
|
||||
if greeting == nil:
|
||||
write(stdout, "greeting is nil!")
|
||||
r.x = 0'i16
|
||||
r.y = 0'i16
|
||||
discard SDL_blitSurface(greeting, nil, screen, addr(r))
|
||||
discard SDL_flip(screen)
|
||||
SDL_Delay(3000)
|
||||
discard blitSurface(greeting, nil, screen, addr(r))
|
||||
discard flip(screen)
|
||||
Delay(3000)
|
||||
else:
|
||||
write(stdout, "SDL_Init failed!\n")
|
||||
|
||||
SDL_Quit()
|
||||
sdl.Quit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue