Originally Posted by
phibermon
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?
Originally Posted by
User137
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).
Bookmarks