I have made a few corrections here and implemented cdecl support for both bind and unprototyped declarations - so you now have a choice, Peter. I used your sdl.inc here
I found Google was the best way to get information about SDL. The online documentation is very good.
extern cdecl lib "sdl.dll"
include "sdl.inc"
end extern
SDL_Init SDL_INIT_EVERYTHING
SDL_SURFACE *image
SDL_SURFACE *screen
SDL_Event Event
sys hfile 'rwops pointer treated as a handle
@screen=SDL_SetVideoMode 320,240,32,SDL_DOUBLEBUF | SDL_SWSURFACE
hfile=SDL_RWFromFile "bmp\alienmoon.bmp","rb"
@Image=SDL_LoadBMP_RW hfile,1
SDL_UpperBlit @image, 0, @screen, 0
SDL_FreeSurface @image
SDL_Flip @screen
do
e=SDL_PollEvent(@Event)
if e
'print event.type
if Event.type=SDL_xQUIT
SDL_Quit
end if
end if
Sdl_Delay(10)
end do
Charles
Oxygen reposter later