Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Prometheus - A first working demo

  1. #11
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Quote Originally Posted by WILL View Post
    So does Prometheus support Mac too?
    Of course. There are no windows specific things to the best of my knowledge. The only thing is that you will have to change the paths from resources\ to resources/ as there is a / in linux and mac unlike a \ on windows. It should compile on fpc 2.2.4 with -MDelphi switch, on just about any platform with sdl units available. So to answer your question, unless you have a 1984 McIntosch Apple I and have OS X I see no problems.

    Correct me if I'm wrong here Stoney, I only used a mac twice in my life...

    cheers,
    code_glitch
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  2. #12
    Quote Originally Posted by code_glitch View Post
    Of course. There are no windows specific things to the best of my knowledge. The only thing is that you will have to change the paths from resources\ to resources/ as there is a / in linux and mac unlike a \ on windows. It should compile on fpc 2.2.4 with -MDelphi switch, on just about any platform with sdl units available. So to answer your question, unless you have a 1984 McIntosch Apple I and have OS X I see no problems.

    Correct me if I'm wrong here Stoney, I only used a mac twice in my life...

    cheers,
    code_glitch
    I would suggest just changing all "\" to "/" then. Windows doesn't care what type of slashes you use; you can even have a path like this: c:\myJuNk/currentprojects\coolstuff/unfinished_game

  3. #13
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    287
    Or you could use the DirectorySeparator constant.
    e.g.
    Code:
    LoadImage('resources'+DirectorySeparator+'visual'+DirectorySeparator+'Ring.png');
    Sure, the constants identifier is a bit long, but it makes paths portable accross any platform.
    Last edited by de_jean_7777; 05-10-2010 at 07:09 PM. Reason: Error in code.
    Existence is pain

  4. #14
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Now that you mention it, I believe that dazappa made a very valid point that would work across OSes by default... Time for an updated version 1.0 perhaps?
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  5. #15
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Quote Originally Posted by de_jean_7777 View Post
    Or you could use the DirectorySeparator constant.
    e.g.
    Code:
    LoadImage('resources'+DirectorySeparator+'visual'+DirectorySeparator+'Ring.png');
    Sure, the constants identifier is a bit long, but it makes paths portable accross any platform.
    this can sort of be compensated by just making your own local variable...
    Code:
    var
      dslash : String = DirectorySeparator;
    I'm sure you can't assign values from variables inside a const statement. And if this form of assignment doesn't work, which I think I remember it can, only if it's a global variable not a local variable inside a function of procedure.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #16
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    287
    Quote Originally Posted by WILL View Post
    Code:
    var
      dslash : String = DirectorySeparator;
    I'm sure you can't assign values from variables inside a const statement.
    You cannot, but this works as DirectorySeparator is an untyped constant. dsslash should also be kept an untyped constant, as it never changes throughout the program.
    Existence is pain

  7. #17
    Quote Originally Posted by code_glitch View Post
    Of course. There are no windows specific things to the best of my knowledge. The only thing is that you will have to change the paths from resources\ to resources/ as there is a / in linux and mac unlike a \ on windows. It should compile on fpc 2.2.4 with -MDelphi switch, on just about any platform with sdl units available. So to answer your question, unless you have a 1984 McIntosch Apple I and have OS X I see no problems.

    Correct me if I'm wrong here Stoney, I only used a mac twice in my life...

    cheers,
    code_glitch
    Actually, FPC/Lazarus takes care of proper slash direction for you. In all my projects I use / and let the compiler handle the rest. I found this out on accident when I was working on JumpStart and wanted it to work in MAC, Linux, and Windows.

    - Jeremy

Page 2 of 2 FirstFirst 12

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
  •