Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38

Thread: PNG library that works on Win32, Linux and MacOS X...

  1. #31

    PNG library that works on Win32, Linux and MacOS X...

    If you or anyone else has the chance to test it on OSes other than Win32 the file with source can be downloaded from - http://jedi-sdl.pascalgamedevelopmen...SDLPoxDemo.zip.

    The code is extremely untidy and hacked together, but it serves as a proof of concept for now. I've included a Win32 exe for those who just want to have a look at it.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  2. #32

    PNG library that works on Win32, Linux and MacOS X...

    I'll try it out tomorrow; I spent today reinstalling and configuring a new version of my Linux distribution, and it takes a while to get it just how I want it.
    [size=10px]&quot;In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it&#39;s the exact opposite.&quot; -- Paul Dirac[/size]

  3. #33

    PNG library that works on Win32, Linux and MacOS X...

    I tested it. It reached this point:

    Code:
    Compiling PNGImage.pas
    Fatal&#58; Can't find unit Windows
    I don't think you can use the Windows unit in Linux. I notice also that you use the unit Graphics, which I don't think even exists in FPC.
    [size=10px]&quot;In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it&#39;s the exact opposite.&quot; -- Paul Dirac[/size]

  4. #34

    PNG library that works on Win32, Linux and MacOS X...

    Ah Damn, I'll see if I can trim it down so that it is not so dependent on Windows and Graphics.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  5. #35

    PNG library that works on Win32, Linux and MacOS X...

    Hi Cragwolf, I've just uploaded a new version of that demo with loads of non-relevant stuff IFDEFed out. This works under Windows so I'm hoping this will be enough for it work under Linux.

    Thanks.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  6. #36

    PNG library that works on Win32, Linux and MacOS X...

    It works, but you need to make the following simple changes. In PNGImage.pas, the procedures ReadData, WriteData, FlushData, and IOCallback, should have cdecl calling conventions instead of stdcall calling conventions. So I guess all you need is the appropriate ifdef's for that. After you do that, it seems to work: I see a man and a dog, animated, and you can cast a spell on the dog, revive the dog, and remove hair, pants, and breastplate (?) from the man.

    There are some warnings as well, here they are:

    Code:
    Compiling SDLPoxDemo.dpr
    Compiling sdl.pas
    Compiling sdl_image.pas
    Compiling SoAoSSprite.pas
    SoAoSSprite.pas&#40;143,23&#41; Warning&#58; Function result does not seem to be set
    SoAoSSprite.pas&#40;150,27&#41; Warning&#58; Function result does not seem to be set
    SoAoSSprite.pas&#40;79,5&#41; Note&#58; Private field "TSoAoSSprite.Flags" is never used
    SoAoSSprite.pas&#40;80,5&#41; Note&#58; Private field "TSoAoSSprite.isDead" is never used
    Compiling sdlcolor.pas
    Compiling stringini.pas
    Compiling PNGImage.pas
    Compiling libpng.pas
    libpng.pas&#40;1630,30&#41; Warning&#58; Mixing signed expressions and longwords gives a 64bit result
    libpng.pas&#40;1636,44&#41; Warning&#58; Mixing signed expressions and longwords gives a 64bit result
    libpng.pas&#40;1643,30&#41; Warning&#58; Mixing signed expressions and longwords gives a 64bit result
    libpng.pas&#40;1649,47&#41; Warning&#58; Mixing signed expressions and longwords gives a 64bit result
    PNGImage.pas&#40;828,9&#41; Warning&#58; Symbol "png_set_gray_1_2_4_to_8" is deprecated
    SDLPoxDemo.dpr&#40;89,3&#41; Note&#58; Local variable "MouseX" is assigned but never used
    SDLPoxDemo.dpr&#40;90,3&#41; Note&#58; Local variable "MouseY" is assigned but never used
    SDLPoxDemo.dpr&#40;93,3&#41; Note&#58; Local variable "Header" not used
    SDLPoxDemo.dpr&#40;95,3&#41; Note&#58; Local variable "ChunkName" not used
    SDLPoxDemo.dpr&#40;96,3&#41; Note&#58; Local variable "IHDRData" not used
    SDLPoxDemo.dpr&#40;97,3&#41; Note&#58; Local variable "DataPointer" not used
    SDLPoxDemo.dpr&#40;98,3&#41; Note&#58; Local variable "CheckCRC" not used
    SDLPoxDemo.dpr&#40;45,3&#41; Note&#58; Local variable "FrameWidth" is assigned but never used
    SDLPoxDemo.dpr&#40;45,15&#41; Note&#58; Local variable "FrameHeight" is assigned but never used
    Compiling resource SDLPoxDemo.res
    Linking SDLPoxDemo
    9489 Lines compiled, 0.7 sec
    [size=10px]&quot;In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it&#39;s the exact opposite.&quot; -- Paul Dirac[/size]

  7. #37

    PNG library that works on Win32, Linux and MacOS X...

    Quote Originally Posted by cragwolf
    It works, but you need to make the following simple changes. In PNGImage.pas, the procedures ReadData, WriteData, FlushData, and IOCallback, should have cdecl calling conventions instead of stdcall calling conventions. So I guess all you need is the appropriate ifdef's for that. After you do that, it seems to work: I see a man and a dog, animated, and you can cast a spell on the dog, revive the dog, and remove hair, pants, and breastplate (?) from the man.
    Hey this is great! There are bound to be warnings, as I said this is probably the worst code I have cobbled together. It literally was a case of hacking everything together to just get something up and running. So for that I am happy. The removing stuff is just to test the SoAoS layering system to make sure it all works and is part of the looting part of the original game. You could literally pilfer the shirt off an adversaries back .

    Could you post a screen shot of the animation running as I'd like to add it to the SoAoS website as progress on the project. I will also clean up the demo code before making it public.

    Thanks again for taking the time to test it all out.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  8. #38

    PNG library that works on Win32, Linux and MacOS X...

    Here is a screenshot of my desktop with SDLPoxDemo running:

    [size=10px]&quot;In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it&#39;s the exact opposite.&quot; -- Paul Dirac[/size]

Page 4 of 4 FirstFirst ... 234

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
  •