Well, I was working in this new API Chebmaster suggested and I must say I like it. It isn't as classic as I initially intended (pure Pascal, nothing classy) but it looks nice and is easy to read and maintain.
There are some quirks. For example, IMO this looks a bit odd:
Code:
var
AnimationInfo: TmngAnimationInfo; { A record. }
Animation: TmngAnimation; { Another record. }
begin
...
{ Gets animation information. }
mngAnimation.Assign (Animation, AnimationInfo)
...
end;
So it forces me to add methods to the records:
Code:
var
AnimationInfo: TmngAnimationInfo; { A record. }
Animation: TmngAnimation; { Another record. }
begin
...
{ Gets animation information. }
Animation.Assign (AnimationInfo)
...
end;
I think I can live with it, specially because the disk access (including an IFF implementation) is done by thread classes.
I'm also wondering if type declarations should be inside the static classes like:
Code:
var
AnimationInfo: mngAnimation.TAnimationInfo; { A record. }
Animation: mngAnimation.TAnimation; { Another record. }
begin
...
{ Gets animation information. }
Animation.Assign (AnimationInfo)
...
end;
Anyway there are a few functions and procedures I'll keep outside the static classes (for example, the mngInitialize function that initializes the engine).
Bookmarks