Results 1 to 10 of 30

Thread: Yet another segfault (a.k.a. Darkhog is a total noob)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #14
    Quote Originally Posted by phibermon View Post
    User137 is correct, you don't have 'Create' defined in the TAnimatedSprite interface but you do have it in the implementation section. As a result you're not calling that 'Create' in your Gameobject creation, instead it'll be calling whatever 'Create()' it next finds, probably TObject.
    Is he?

    Quote Originally Posted by User137 View Post
    Had another quick look on the github. Are you calling right constructor for TAnimatedSprite?
    Code:
    constructor TGameObject.Create(mode: TObjectMode);
    begin
      if mode=omAnim then Animations:=TAnimatedSpriteList.create;
    the .Create is TObject.Create, it seems. The .Create without parameters is not written to either TAnimatedSprite or TSprite.
    Let's repeat code part, shall we?
    Code:
    constructor TGameObject.Create(mode: TObjectMode);
    begin
      if mode=omAnim then Animations:=TAnimatedSpriteList.create;
    Yup, just as I thought. I'm not creating TAnimatedSprite, but TAnimatedSpriteList. Slight difference, you know? And guess what, it does have parameter-less constructor.

    Also where did you get that BAADF00D from? It doesn't appear anywhere during compilation, debugging or in my posts...

    And thanks for optimization tip, I've just turned it off.

    //edit: Sorry that I might sound a bit rude, but I have today my birthday. No one gave me wishes except some automatic from websites and I didn't even get a cake. And yes, I can also exclude "surprise birthday party" as day is almost ending (23:22 or 11:22PM).
    Last edited by Darkhog; 27-07-2013 at 09:23 PM.

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
  •