Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 61

Thread: Allegro.pas

  1. #21
    Cool! Will you also add support for PNG? I know you'd need to rebuild Allegro's DLL with PNG support and link it with libpng and zlib, but IMO it would be worth it as 32bit PNG images are significantly smaller than 32Bit TGA images.

  2. #22
    Allegro.pas 5 alpha 1 can load PNG files out-of-the-box. Just add unit al5image to the USES clause and call "al5image.al_init_image_addon;" procedure after initialising Allegro. Of course, as you said, your Allegro intallation must include PNG support.

    I should complete the documentation, then Allegro.pas 5 should became the TRUNK and Allegro.pas 4 will became "legacy".
    Last edited by Ñuño Martínez; 29-05-2013 at 11:29 AM.
    No signature provided yet.

  3. #23
    Can you make for v5 allegro compiled with PNG and without, for convenience? Or with PNG if it isn't feasible to include both.

  4. #24
    Sorry for double post, but this is important bug report: When using al_masked_stretch_blit my game segfaults at stretch_masked_line32 (inside Allegro itself, I think, so I can't do anything about it), same with al_stretch_blit (inside stretch_line32).

    I have draw routine that gets executed every step of my program loop (update of controls and sprite positions, etc. is done via timer). Here it is:
    Code:
    procedure draw();
      begin
        //clearing buffer
        al_clear_to_color(buffer,al_makeacol_depth(al_desktop_color_depth,0,0,0,0));
        //drawing text
        al_textout_centre_ex(buffer,al_font,'Witaj w Allegro!',400,25,al_makeacol_depth(al_desktop_color_depth,255,0,0,255),al_makeacol_depth(al_desktop_color_depth,0,0,0,255));
        al_textout_centre_ex(buffer,al_font,'Nacisnij Q aby wyjsc',400,45,al_makeacol_depth(al_desktop_color_depth,255,0,0,255),al_makeacol_depth(al_desktop_color_depth,0,0,0,255));
        //drawing cats
        Kotek1.Draw(buffer);
        Kotek2.Draw(buffer);
        //drawing perlin noise
        al_masked_stretch_blit(perlin,buffer,0,0,300,200,100,100,200,200); //<=== here it is, but why does it happen?
        //showing collision indicator
        if Kotek1.IsColliding(Kotek2) then al_rectfill(buffer,0,0,64,32,al_makecol(0,255,0));
        //if pause, put indicator of it
        if pause then al_textout_centre_ex(buffer,al_font,'Pauza',400,580,al_makeacol_depth(al_desktop_color_depth,255,0,0,255),al_makeacol_depth(al_desktop_color_depth,0,0,0,255));
        al_blit(buffer,al_screen,0,0,0,0,800,600);
      end;

  5. #25
    You should open a new thread for that (may be at Programming/General).

    By the way, I can't see why it doesn't work. I used al_stretch_blit a lot and it work without problem. I need more information, for example what kind of bitmaps are you using (I mean how do you created them). I may need the whole context where "draw" is working.
    No signature provided yet.

  6. #26
    Will zip up sources and send to you via PM. Also since it is Allegro-related problem I've thought this is best place to post it.

  7. #27
    I realize that it's not part of standard allegro, but could you consider for next version adding some functions to make color from HSV (Hue, Saturation, Value, known sometimes also as HSL) values? Also values for getting hue, saturation and value from color integer. The reason I'm asking is because with HSV model it is easy to do things like lighting (for 2d games), cool gradients or some of advanced AI (I've seen AI designs based on following objects with certain Hue).

  8. #28
    Don't force smartlinking in allegro.cfg if you don't have a very specific reason to do it; it causes compilation errors with external assemblers.

  9. #29
    Quote Originally Posted by Darkhog View Post
    I realize that it's not part of standard allegro, but could you consider for next version adding some functions to make color from HSV (Hue, Saturation, Value, known sometimes also as HSL) values? Also values for getting hue, saturation and value from color integer. The reason I'm asking is because with HSV model it is easy to do things like lighting (for 2d games), cool gradients or some of advanced AI (I've seen AI designs based on following objects with certain Hue).
    al_hsv_to_rgb
    al_rgb_to_hsv


    Unless you're talking about Allegro.pas 5.0 beta. If you are, then may be I can translate those functions from C to Pascal.
    No signature provided yet.

  10. #30
    How can I check if allegro sample is stopped? I need that because some of music I'm going to use has "intro" part, then actual looping one.

    //edit: It turns out... I can't . There is Allegro's library function which would help with that... but isn't implemented for one reason or another. Damn.
    Last edited by Darkhog; 30-06-2013 at 11:58 PM.

Page 3 of 7 FirstFirst 12345 ... 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
  •