CLASS: | CSprite
AUTHOR: | Thomas Bleeker
DATE: | Sept. 20, 2001
DESCRIPTION: | This is the Sprite Object class. It defines the basic attributes each sprite object will have, and provides opperator methods to modify these attributes in run time. This class has setup methods to get each sprite "orientated" to the drawing DC (setScreenSize, setBitmap, setDrawingDC) and opperator methods to change the attributes (move, setSpeed) and lastly a method to work with how windows does GDI graphics (draw).

METHOD: | CONSTRUCTOR (NONE)
DESCRIPTION: | Basic constructor setup, no extra procedures are included.
| RETURN: | Nothing.

METHOD: | destructor (NONE)
DESCRIPTION: | Will delete the object bimpate handle (if one is stored to this object), as well as delete the given DC (if one was stored to this object).
| RETURN: | Nothing.

METHOD: | setBitmap (hBitMap)
DESCRIPTION: | Creates a DC for this object and selects the passes hBitmap into it.
| hBitmap | The handle of the bitmap to be used with this object.
| RETURN: | Nothing.

METHOD: | move (VOID)
DESCRIPTION: | Randomly moves this sprite object's x-y location, at a random speed. NOTE: The spite's location variable are only ajusted, and not redrawn.
| RETURN: | Nothing.

METHOD: | draw (VOID)
DESCRIPTION: | Draws the sprite object onto the displayed DC according to its x-y location.
| RETURN: | Nothing.

METHOD: | setSpeed (dwSpeed)
DESCRIPTION: | Used to adjust the sprinte objects speed of movement.
| dwSpeed | The value to set the new speed to.
| RETURN: | Nothing.

METHOD: | setScreenSize (dwWidth, dwHeight)
DESCRIPTION: | Used to specify the drawing area's sreen size.
| dwWidth | The screen width (DWORD).
| dwHeight | The screen heigth (DWORD).
| RETURN: | Nothing.

METHOD: | setDrawingDC (hDC)
DESCRIPTION: | Used to set the global DC that is to be displayed with the GUI. Each sprite needs this information such it can draw itself onto the same DC and thus be shown.
| hDC | A non volitile DC that this sprite can be drawn onto.
| RETURN: | Nothing.

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

2ASM.CJB.NET