Hi.
At moment i test my first Interface with the SDL Lib. But i had some unexplainable(for me) problems with Correctly Structur Import.
Let´s begin :
The SDL_Surface Structure http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fSurface
My Test Code
The Problem :
This Code works without Errors.
But the ScreenSurface Data are wrong. Prints :
w: 600
h: 3200
I Think the Data is in disorder. But i dont know what i can do. Please help me a bit.
Mfg Suco
At moment i test my first Interface with the SDL Lib. But i had some unexplainable(for me) problems with Correctly Structur Import.
Let´s begin :
The SDL_Surface Structure http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fSurface
My Test Code
Import "-lsdl.dll" extern "C" type SDL_Surface field flags:int field format:byte ptr field w:int,h:int field pitch:short field pixels:byte ptr field clip_rect:byte ptr field refcount:int end type Function SDL_Init(Flags:Int) Function SDL_SetVideoMode:SDL_Surface(Width:Int, Height:Int, Depth:Int, Flags:Int) Function SDL_Flip(Screen:SDL_Surface) Function SDL_FillRect(dst:SDL_Surface, dstrect:byte ptr, color:Int) end extern Const SDL_INIT_VIDEO = $00000020 Const SDL_HWSURFACE = $00000001 Const SDL_DOUBLEBUF = $40000000 Const SDL_FULLSCREEN = $80000000 if SDL_Init(SDL_INIT_VIDEO)=-1 end endif local ScreenSurface:SDL_Surface = SDL_SetVideoMode(800,600,32,SDL_HWSURFACE|SDL_DOUBLEBUF) print ScreenSurface.w print ScreenSurface.h Repeat SDL_FillRect(ScreenSurface,null,$FFFFFF) SDL_Flip(ScreenSurface) FlushMem() Until KeyHit(KEY_ESCAPE)
The Problem :
This Code works without Errors.
But the ScreenSurface Data are wrong. Prints :
w: 600
h: 3200
I Think the Data is in disorder. But i dont know what i can do. Please help me a bit.
Mfg Suco