CLASS: CSmiley
AUTHOR: Thomas Bleeker
DATE: Sept. 20, 2001
DESCRIPTION: This is the CSmiley Object class. It will INHERIT all the properties and methods from the CSprite class, thus CSprite.asm must be included into the project.

CSmiley will then extend this basis by providing extra methods to work on the inherited properties, they are enableSteps() and setStepsDC(). As well since new features are added to the base class (via inheritance), this class will also provide a "polymorphic" draw method. This means that when a CSmiley object is told to do its "draw" method, this new method function will be called upon, however, if a CSprite class is called to do its "draw" method, the origional "draw" will be called upon (This is the essence of Polymorphism).

METHOD: CONSTRUCTOR (NONE)
DESCRIPTION: Basic constructor setup as well as inheriting from CSprite and providing polymorphism for the "draw" method. As well the constructor will set each instance up with a DC to hold footprints and load the graphic into it. This is the basic purpose demostrated by inheriting the base CSprite class and appending extra freatures to it (foot prints in this case).
RETURN: Nothing.

METHOD: destructor (NONE)
DESCRIPTION: Will delete the object extra footprint bitmap and the extra DC created for this object. As well it will then call the SUPER class (CSprite) which this class is inherited from and call its DESTRUCTOR method to do all the extra clean up it provides for its base properties.
RETURN: Nothing.

METHOD: draw (VOID)
DESCRIPTION: This is the polymorphic draw method specific to CSmiley object instnaces. It re-uses the inherited "draw" code form the base class it inherits from (CSprite), and then does some "extra" functionality to draw footprints as well, provided that that Steps has been enabled for the CSmiley objects instance.
RETURN: Nothing.

METHOD: setStepsDC (hDC)
DESCRIPTION: Used to set the DC for the footprint graphics for this object.
hDC The DC the footprint graphics are to be saved to.
RETURN: Nothing.

METHOD: enableSteps (flag)
DESCRIPTION: Used to set each instance to show or not show footprints when drawn with the polymorphic draw method (by calling draw upon a CSmiley class instance).
flag True, the footprints are drawn, FLASE, they are not.
RETURN: Nothing.



MASM Object To HTML Creator V1.0
Copyright ©2001 NaN Software.
NAN32ASM.CJB.NET