Page 1 of 2 12 LastLast
Results 1 to 10 of 64

Thread: SDL 2.0 Headers for [Object] Pascal?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Quote Originally Posted by Murmandamus View Post
    Well, conditional compilation won't help those functions; they depend on operations and core functions in the C library which simply don't have analogues in FPC.
    Well I figured as much. Probably not possible to make use of them without adding some kind of extra functionality into FPC it's self.

    Quote Originally Posted by Murmandamus View Post
    It is possible, presuming they have an up-to-date set of OpenGL headers.
    I'm sure you'll find them to be the best ones for the job. I recall Sascha Willems practically scolding Embarcadero on theirs and suggesting the use and inclusion of the DGL headers in future releases of Delphi instead.

    Though I understand why you want to get into the mud and learn everything.

    OpenGL is a bit of a monster though and I think it would be more of a benefit to let someone else fight that battle. Especially when it's already been fought. It might be a good idea to take on one API/framework at a time anyhow.

    Now if the DGL community starts dropping the ball then that's a whole new bag of worms and I'd say go for it.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2
    There are pascal headers for development version of SDL in HedgeWars and TURBU, not sure how recent they are, but they may be helpful.

    Edit: Turbu header is probably just delphi only, I got into quite a few issues when trying to use it in FPC. There also seem to be some sort of SDL2 pascal headers on github, but the repository is messy and the files are full of syntactic errors; probably some h2p translation that wasn't cleaned up.
    The headers from Hedgewars look nice, I added some minor stuff and got a basic Display class up and running. Going to play with events now
    Last edited by imcold; 16-06-2013 at 02:37 PM.

  3. #3
    Quote Originally Posted by imcold View Post
    There are pascal headers for development version of SDL in HedgeWars and TURBU
    Hedgewars were written with FPC? Interesting...

    Anyway, I hope you'll get it working. While I don't like SDL for reasons stated on this site many times, others like it and more choices is always welcomed!

  4. #4
    Quote Originally Posted by Darkhog View Post
    Hedgewars were written with FPC? Interesting...
    They are (with a tiny commit by yours truly); it's my favourite fpc game. Except the GUI, that's C++ and Qt, and server, that was Haskell iirc.

  5. #5
    @Murmandamus You make headers only for FPC or you make it compatible with DelphiXE4 ?
    I'm change my Delphi DirectX games to SDL1.2 and I like port it to SDL2.0 with DelphiXE4


    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

  6. #6
    Here my also-SDL20-staticlink-capable SDL 2.0 (and SDL 1.2 hybrid per IFDEF) headers, which I've made in early 2012 for my c64 emulator Micro64 ( http://www.micro64.de ) on base of the old SDL 1.2 headers: http://rootserver.rosseaux.net/stuff/sdl.pas
    Last edited by BeRo; 17-07-2013 at 08:42 PM.

  7. #7
    Quote Originally Posted by BeRo View Post
    Here my also-SDL20-staticlink-capable SDL 2.0 (and SDL 1.2 hybrid per IFDEF) headers, which I've made in early 2012 for my c64 emulator Micro64 ( http://www.micro64.de ) on base of the old SDL 1.2 headers: http://rootserver.rosseaux.net/stuff/sdl.pas
    Hey thanks, but why is SDL_BLITSURFACE commented out? There seems also no SDL_LOADBMP in SDL2.0? Is this not available anymore or just missing in your header?
    Best regards,
    Cybermonkey

  8. #8
    Quote Originally Posted by Cybermonkey View Post
    Hey thanks, but why is SDL_BLITSURFACE commented out? There seems also no SDL_LOADBMP in SDL2.0? Is this not available anymore or just missing in your header?
    SDL_BLITSURFACE = SDL_UPPERBLIT;

    But SDL_LOADBMP is there. (I have translated it in my header)

  9. #9
    Quote Originally Posted by kotai View Post
    @Murmandamus You make headers only for FPC or you make it compatible with DelphiXE4 ?
    I'm change my Delphi DirectX games to SDL1.2 and I like port it to SDL2.0 with DelphiXE4


    Unfortunately, I don't have Delphi, and I am using a few FPC-specific extensions, though I am considering adding a "standard" version with conditionals during the cleanup phase that will probably be Delphi-compatible; I just have no way to test it. Once I publish it all, if someone wants to do that testing and any additional cleanup for Delphi, I'll be happy to merge those changes, or they can fork it and maintain a Delphi-compatible version, either way.

  10. #10
    @End I use your headers and work OK in DelphiXE4 (I add it to sdl.inc) with WIN32 and WIN64 but not with OSX ("uses windows" error).
    I change:
    Code:
    {$IFDEF Delphi}
         {$DEFINE Windows}
        ........
    for:

    Code:
    {$IFDEF Delphi}
      {$IFDEF MSWINDOWS}
         {$DEFINE Windows}
      {$ENDIF} 
        ........
    but is not enough for compile sdl.pas in OSX.
    You plan to make it compatible with DelphiXE4 and OSX ?

    I use last SDL2.dll download from libsdl.org (I change in sdl.pas SDL_LibName = 'SDL2.dll') and work fine. Not need use SDL2_x86.dll and SDL2_x86_x64.dll

    You plan to make headers for SDL2_mixer ?
    I convert SDL2_image, SDL2_net and SDL2_ttf from jedi-sdl and work OK, but SDL2_mixer not work .
    SDL2_mixer generate an access violation in function Mix_LoadWAV_RW of SDL2_mixer.dll (same function in SDL_mixer.dll of SDL1.2 work ok)

    In SDL2 not exist SDL_CreateThread and SDL_KillThread ? My games use SDL_Thread and I need to upgrade to SDL2

    Kotai.
    www.kotai.es
    www.remakesonline.com -> Nemesis Online & Bubble Bobble Online & Castlevania Online & Penguin Adventure Online
    www.miniracingonline.com

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •