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

Thread: New FPC/JEDI-SDL tutorials

  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    New FPC/JEDI-SDL tutorials

    Hey just wondering if anyone has seen this site yet. If not then here ya go: http://userpage.fu-berlin.de/~molski/fpsdl/

    Have at 'em. It looks like he has recently (just last month) started converting all his tutorials for JEDI-SDL. For those that were looking for these before, have fun.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2

    New FPC/JEDI-SDL tutorials

    The independend address is http://www.fp.sdl.de.vu though.

  3. #3

    New FPC/JEDI-SDL tutorials

    is there anybody that would be willing to convert this tut to normal object pascal since it looks like FPC uses some diff SDL functions and actions im using delphi 2007 and couldnt get any of the code working propally

    statements like

    USES crt

    if screen=nil then HALT; <-- wtf is HALT :s

    and CLRSCR;

  4. #4

    New FPC/JEDI-SDL tutorials

    Quote Originally Posted by IchimaruGin
    is there anybody that would be willing to convert this tut to normal object pascal since it looks like FPC uses some diff SDL functions and actions im using delphi 2007 and couldnt get any of the code working propally

    statements like

    USES crt

    if screen=nil then HALT; <-- wtf is HALT :s

    and CLRSCR;
    crt is a unit with more functions to work with the console window {not sure}

    Halt is a function that tells the program to shutdown completely like the "return 0" on C++ main function;

    CLRSCR is a function that clears the console window
    From brazil (:

    Pascal pownz!

  5. #5

    New FPC/JEDI-SDL tutorials

    Quote Originally Posted by arthurprs
    Quote Originally Posted by IchimaruGin
    is there anybody that would be willing to convert this tut to normal object pascal since it looks like FPC uses some diff SDL functions and actions im using delphi 2007 and couldnt get any of the code working propally

    statements like

    USES crt

    if screen=nil then HALT; <-- wtf is HALT :s

    and CLRSCR;
    crt is a unit with more functions to work with the console window {not sure}

    Halt is a function that tells the program to shutdown completely like the "return 0" on C++ main function;

    CLRSCR is a function that clears the console window
    well these are the functions/actions i get errors with when following the tutorial in this thread i was thinking it might be something to do with FPC compiling maybe but im not sure does anyone not know how to fix the code?

  6. #6

    New FPC/JEDI-SDL tutorials

    Quote Originally Posted by IchimaruGin
    Quote Originally Posted by arthurprs
    Quote Originally Posted by IchimaruGin
    is there anybody that would be willing to convert this tut to normal object pascal since it looks like FPC uses some diff SDL functions and actions im using delphi 2007 and couldnt get any of the code working propally

    statements like

    USES crt

    if screen=nil then HALT; <-- wtf is HALT :s

    and CLRSCR;
    crt is a unit with more functions to work with the console window {not sure}

    Halt is a function that tells the program to shutdown completely like the "return 0" on C++ main function;

    CLRSCR is a function that clears the console window
    well these are the functions/actions i get errors with when following the tutorial in this thread i was thinking it might be something to do with FPC compiling maybe but im not sure does anyone not know how to fix the code?
    What errors ?
    From brazil (:

    Pascal pownz!

  7. #7

    New FPC/JEDI-SDL tutorials

    follow the tutorial on the pages they do not compile i dont know why

  8. #8

    New FPC/JEDI-SDL tutorials

    Post the error, i can't help if i don't know what is going on...
    From brazil (:

    Pascal pownz!

  9. #9

    New FPC/JEDI-SDL tutorials

    I found some syntax errors in your text example (last code block). I also noticed when I tried to compile it with free pascal that it did compile as a much smaller file than yours (29k vs 134 or something) and it seemed to get stuck when It tried to do something with the true type font but when I used yours it seemed to work fine. I would like to convert the library I have released http://dexrow.blogspot.com/2007/10/w...-extended.html this is what I have come up with..

    Code:
    PROGRAM chap5;
    USES SDL, SDL_TTF;
    
    VAR
    screen,fontface&#58;pSDL_SURFACE;
    loaded_font&#58;pointer;
    colour_font, colour_font2&#58;pSDL_COLOR;
    
    BEGIN
    SDL_INIT&#40;SDL_INIT_VIDEO&#41;;
    screen&#58;=SDL_SETVIDEOMODE&#40;400,200,32,SDL_SWSURFACE&#41;;
    IF screen=NIL THEN HALT;
    
    if TTF_INIT=-1 THEN HALT;
    loaded_font&#58;=TTF_OPENFONT&#40;'C&#58;\WINDOWS\fonts\Ariel.ttf',40&#41;;
    
    NEW&#40;colour_font&#41;;
    NEW&#40;colour_font2&#41;;
    colour_font^.r&#58;=255; colour_font^.g&#58;=0; colour_font^.b&#58;=0;
    colour_font2^.r&#58;=255; colour_font2^.g&#58;=0; colour_font2^.b&#58;=0;
    
    fontface&#58;=TTF_RENDERTEXT_SHADED&#40;loaded_font,'HELLO WORLD!',colour_font^, colour_font2^&#41;;
    
    SDL_BLITSURFACE&#40;fontface,NIL,screen,NIL&#41;;
    SDL_FLIP&#40;screen&#41;;
    
    readln;
    DISPOSE&#40;colour_font&#41;;
    DISPOSE&#40;colour_font2&#41;;
    SDL_FREESURFACE&#40;screen&#41;;
    SDL_FREESURFACE&#40;fontface&#41;;
    TTF_CLOSEFONT&#40;loaded_font&#41;;
    TTF_QUIT;
    SDL_QUIT;
    END.
    http://dexrow.blogspot.com/2007/09/land-of-cigo-roguelike-w-source.html

  10. #10

    New FPC/JEDI-SDL tutorials

    Quote Originally Posted by edexter
    I found some syntax errors in your text example (last code block). I also noticed when I tried to compile it with free pascal that it did compile as a much smaller file than yours (29k vs 134 or something) and it seemed to get stuck when It tried to do something with the true type font but when I used yours it seemed to work fine. I would like to convert the library I have released http://dexrow.blogspot.com/2007/10/w...-extended.html this is what I have come up with..

    Code:
    ..

    try "arial.ttf" instead of "ariel.ttf"
    From brazil (:

    Pascal pownz!

Page 1 of 2 12 LastLast

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
  •