Started to code a SDL2 wrapper :)

Advanced game related topics
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Started to code a SDL2 wrapper :)

Post by Mijikai »

I started to code a wrapper (sort of) for SDL2 8)
If someone wants to help me that would be great :D

How it looks so far:
Image

No issues yet (i already can rotate/flip/transform/blend sprites~) :)
However im a bit worried about some datatypes like -> UInt32...
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Started to code a SDL2 wrapper :)

Post by Lunasole »

Oh good luck with that. I was trying somehow to code SDL wrapper but dropped it on 50% due to large size of library itself.
But well that was secondary reason, just except it I've realized that I can do what I need with built-in PB stuff.

> However im a bit worried about some datatypes like -> UInt32...
You can code for those unsigned types few simple functions in C, and embed them directly into SDL lib/dll. There was even topic on forum where it's already done, just add and export it: http://www.purebasic.fr/english/viewtop ... 12&t=66217
Also somewhere was ASM stuff to deal with those types directly in PB.
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
Fig
Enthusiast
Enthusiast
Posts: 351
Joined: Thu Apr 30, 2009 5:23 pm
Location: Côtes d'Azur, France

Re: Started to code a SDL2 wrapper :)

Post by Fig »

I wish it will work.
Hopefully, we will get rid of Pb's bugged sprite library that way... :?:
There are 2 methods to program bugless.
But only the third works fine.

Win10, Pb x64 5.71 LTS
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: Started to code a SDL2 wrapper :)

Post by Mijikai »

Lunasole wrote:Oh good luck with that. I was trying somehow to code SDL wrapper but dropped it on 50% due to large size of library itself.
...

...
You can code for those unsigned types few simple functions in C, and embed them directly into SDL lib/dll. There was even topic on forum where it's already done, just add and export it: http://www.purebasic.fr/english/viewtop ... 12&t=66217
Also somewhere was ASM stuff to deal with those types directly in PB.
Thx, those links are helpful im @15% so it could take a while... its a shame that we even have to work around datatypes...
Last edited by Mijikai on Wed Oct 25, 2017 10:16 pm, edited 1 time in total.
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: Started to code a SDL2 wrapper :)

Post by Mijikai »

Fig wrote:I wish it will work.
Hopefully, we will get rid of Pb's bugged sprite library that way... :?:
I hope so...
There are pretty much no games (im not talking about card or board games) out there made with/in PB.
And its pretty obvious why...

Im not going to start a full rant...
however PB supports SDL... so pls at least give us direct access...
User avatar
IceSoft
Addict
Addict
Posts: 1616
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Started to code a SDL2 wrapper :)

Post by IceSoft »

Maybe you can have a look on the SDL (v1.2.11) wrapper developed by Progi1984 found on http://www.purearea.net:


RWSDL
v0.1 (Wrapper)
17.07.2007
Progi1984
Wrapper für die v1.2.11 der 'SDL' (Simple DirectMedia Layer) DLL.


http://www.purearea.net/pb/download/dll ... 1.2.11.zip
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
IceSoft
Addict
Addict
Posts: 1616
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Started to code a SDL2 wrapper :)

Post by IceSoft »

any news?
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: Started to code a SDL2 wrapper :)

Post by Poshu »

Still no news I guess?

Anyway, I tried Progi1984's wrapper and...
Image

WOW 2007!
User avatar
IceSoft
Addict
Addict
Posts: 1616
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: Started to code a SDL2 wrapper :)

Post by IceSoft »

Account "Mijikai" seems to be no longer exsisting.
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: Started to code a SDL2 wrapper :)

Post by Mijikai »

IceSoft wrote:Account "Mijikai" seems to be no longer exsisting.
Im still here but this is no longer on my priority list.
Post Reply