Results 1 to 3 of 3

Thread: Patch : load method for CL_CollisionOutline

  1. #1
    Peasant
    Join Date
    Sep 2008
    Posts
    8

    Default Patch : load method for CL_CollisionOutline

    Hi!

    Made a small patch for the current HEAD version to make it possible to load (replace) outline data from a file AFTER the CL_CollisionOutline object is created.

    I have not yet tested this, but should work - the change is so trivial.

    (Could upload .diff files so the extensions are txt).
    Attached Files Attached Files

  2. #2
    Squire
    Join Date
    Jun 2007
    Posts
    27

    Default

    I committed a slightly modified version of this patch, as it did end up with a rather subtle bug. If you replace the impl, then data sharing between objects breaks, as it relies on all the handle objects (CL_CollisionOutline) having a shared impl pointer.

    Code:
    CL_Something A;
    CL_Something B = A;
    B.load(...);
    The way most ClanLib objects behave is that after B.load(...), A will internally have the same data as B, and thus the impl pointer itself can't be changed when loading without breaking that.

    In the version I committed the same impl is used, but a new file outline provider is created and the contours are replaced.

    Anyway, thanks for the patch

  3. #3
    Peasant
    Join Date
    Sep 2008
    Posts
    8

    Default

    Ah ok thanks.

    Good to know if I make other patches as well

Similar Threads

  1. ClanLib 0.8.1 desktop depth check method?
    By alexv1 in forum Official ClanLib SDK Forums
    Replies: 9
    Last Post: 05-26-2009, 12:09 PM
  2. CL 0.8 Canvas patch, get-rid-of-warnings patch
    By Trigve in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 09-30-2007, 11:08 PM
  3. How to use gui without .run() blocking method ?
    By hubadu in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 05-16-2007, 07:48 PM
  4. Can't load Dinkedit
    By cathadink in forum Dink Smallwood HD
    Replies: 2
    Last Post: 12-10-2006, 02:19 AM
  5. Question about CL_CollisionOutline
    By n-palmer in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 09-20-2006, 02:38 PM

Bookmarks

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
  •