Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SDLVideo BI declearation problem i think ...
#1
after spending 10 minets trying to get SDL_MapRGB to work and getting error from FBC everytime i tryed to do it i decide to look over the sdlvedio.bi and compare it to SDL_video.h this was sparked by victors post saying the SLDunlock alias was wrong so i though mybe my problems where in the .bi file again so. this is what i found

extern DECLSPEC Uint32 SDLCALL SDL_MapRGB
(SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b);

C/C++ header decluration

declare function SDL_MapRGB cdecl alias "SDL_MapRGB" ( byref format as SDL_PixelFormat, byval r as ubyte, byval g as ubyte, byval b as ubyte ) as uinteger

See any problems ? format as SDL_Pixelformat isn't declared as a pointer.

( i haven't test this so i might be jumping the gun here and got this all screwed up. oh ya SDLMapRGBA is decleared the same way)
Reply
#2
ByRef takes care of the pointer business... it passes the address of the var, rather than the value (ByVal does that)
Reply
#3
i'm responsible for the sdl headers, as you can imagine i don't have the time to test all functions that are in there, beside it''s not finished yet approx. 80% done, 20% tested. so report everything you can find.

on that SDL_MapRGB, well the declaration seems valid to me. i'm afraid i don't have the time here but

dim pf as SDL_PixelFormat
dim r as ubyte
dim g as ubyte
dim b as ubyte
SDL_MapRGB pf, r, g, b

should work just fine. maybe the PixelFormat Structure is not finished yet, will have a look at this tomorrow.
quote="NecrosIhsan"]
[Image: yagl1.png]
[/quote]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)