Tuesday, September 30, 2008

Canned Effects

[build 0062] Having got to the end of Text I found that Sprites, Gradients, Buttons and TimeLines fell out in a few hours. In some ways this is strange because progress has been pretty hard fought for with text. In getting the text to work I had to replace a font scalar, plumb in CoreText - none of this is small beer. The Sprites, Gradients etc are little more than getting the files to compile - registering them with object factory and testing, Later, when it comes to writing UI the shoe will be on the other foot.

The next step for Cello is getting the various canned effects to work. The canned effects are animation effects that are applied to an object in a single hit and just "work". The effects come in different classes. Logically I should probably have attacked the text effects first as they would mesh into the text and probably would lift out any remaining bugs in the area. However having done two months of text I have decided to start with some of the other effects first. My thought was it would be well, just nice, to appear to make a little progress. So I have started the effects in alphabetical order.

The first effect is an effect that takes a shape and maps it onto all four sides of a spinning cube. Getting the files to compile (there were nine new files) took two or so hours - and afterwards it well almost worked - just objects are wrongly positioned and spin, well, strangely.

The reason made me smile. I had to add an implementation of CenterPoint to my MFC CRect class. The function was so trivial that I did not write a unit test. I was lucky to spot the error when I did a brief code review before checking my changes into CVS.

No comments: