Media Classes |
mBitmap. . . . . . bitmap class mAudio . . . . . . audio class mImage . . . . . . image/video class mDirector. . . . . director class mRenderer. . . . . renderer class     mRenderSolid . . . solid fill renderer mSprite. . . . . . sprite class     mSpriteGDI . . . . sprite GDI class     mSpriteGroup . . . sprite group class     mSpriteImage . . . sprite image class
mBitmap(). . . . . . . . . construct an empty bitmap mBitmap(). . . . . . . . . construct and allocate a bitmap mBitmap(). . . . . . . . . construct and allocate a bitmap with Device Context mBitmap(). . . . . . . . . copy constructor mBitmap(). . . . . . . . . assignment operator Build(). . . . . . . . . . allocate or re-allocate a bitmap BuildDC(). . . . . . . . . allocate or re-allocate a bitmap with Device Context AttachDIB(). . . . . . . . attach a user defined Device Independent Bitmap (DIB) SetColors(). . . . . . . . copy a new color table to the bitmap's color table MapColors(). . . . . . . . copy new color table and re-map pixel colors GetDefaultColortable() . . return a copy of the default color table SetTransparentColor(). . . define the transparent color SetTransparent() . . . . . enable/disable color translation SetTranslate() . . . . . . enable/disable transparency ComputeTranslate() . . . . compute color translation table CreatePalette(). . . . . . create a logical palette CreateIdentityPalette(). . create a logical identity palette FindClosestRGB() . . . . . return index of closest matching RGB color SetTopdown() . . . . . . . convert to bitmap to top-down or bottom-up Fill() . . . . . . . . . . fill with solid color BlitDC() . . . . . . . . . blit bitmap image to a Device Context Blit() . . . . . . . . . . generic bitmap to bitmap blit BlitS(). . . . . . . . . . low level solid blit BlitX(). . . . . . . . . . low level transparent blit BlitTS() . . . . . . . . . low level translated solid blit BlitTX() . . . . . . . . . low level translated transparent blit ~mBitmap() . . . . . . . . destructor
mAudio(). . . . . . . . . constructor ~mAudio() . . . . . . . . destructor ReadAudioHeader() . . . . read track header info SeekAudio() . . . . . . . seek to selected track position PlayAudio() . . . . . . . begin audio output PauseAudio(). . . . . . . pause audio output StopAudio() . . . . . . . stop audio output SetVolume() . . . . . . . set audio output loudness ReadAudio() . . . . . . . read audio data to buffer SetTrack(). . . . . . . . select audio track SetTimebase() . . . . . . set units for positions and durations TimeToSamples() . . . . . convert audio time duration to sample count TimeToBytes() . . . . . . convert audio time duration to byte count SamplesToMilliseconds() . convert sample count to time duration SamplesToBytes(). . . . . convert sample count to byte count BytesToMilliseconds() . . convert audio byte count to time duration BytesToSamples(). . . . . convert audio byte count to sample count AudioToBytes(). . . . . . convert units in the current time base to byte count BytesToAudio(). . . . . . convert bytes to units in the current time base
Media!Lab includes support for the following mAudio derived codecs:
mAudioAIFF . . . Mac AIFF audio class mAudioAU . . . . Sun/Unix AU audio class mAudioMIDI . . . MIDI audio class mAudioWAV. . . . WAV audio class
mImage(). . . . . . . . . constructor ~mImage() . . . . . . . . destructor ReadHeader(). . . . . . . read the image header ReadFrame() . . . . . . . read next image frame to the bitmap SeekFrame() . . . . . . . seek to selected image frame ColorChange() . . . . . . handle bitmap color table change BuildBitmap() . . . . . . construct a bitmap from the current frame SetBitmap() . . . . . . . assign a bitmap for reading/writing frames SetFrameAdvance() . . . . enable/disable frame advance SetTransparent(). . . . . enable/disable color transparency SetTransparentColor() . . set transparent color and enable transparency SetTranslate(). . . . . . enable/disable color translation PlayImageAudio(). . . . . begin audio output PauseImageAudio() . . . . pause audio output StopImageAudio(). . . . . end audio output
Media!Lab includes support for the following mImage derived codecs:
mImageAVI. . . . AVI video image class mImageBitmap . . memory bitmap image class mImageBMP. . . . BMP image class mImageFlic . . . FLC/FLI video image class mImageGIF. . . . GIF image class mImageJPEG . . . JPEG image class mImagePCX. . . . PCX/DCX image class
The mDirector class includes the following function methods:
mDirector() . . . . . constructor ~mDirector(). . . . . destructor DefWindowProc() . . . handle messages to the Director window Resize(). . . . . . . resize the Director window SetColors() . . . . . create a color table and palette for the Director window Paint() . . . . . . . repaint the screen window from the Director window Display() . . . . . . sychronize the screen window from the Director window Invalidate(). . . . . invalidate rectangle(s) of the Director window Add() . . . . . . . . add a renderer to the Director window Remove(). . . . . . . remove a renderer from the Director ChangeZ() . . . . . . change the Z order of a renderer Cycle() . . . . . . . advance content of all renderers of this Director Draw(). . . . . . . . make all renderers draw to the Director window HitCheck(). . . . . . check hit area of all renderers Frame() . . . . . . . call Cycle(), HitCheck(), Draw(), and Display() Pick(). . . . . . . . locate top renderer intersecting specified X,Y point DirtyRectSize() . . . resize the dirty rectangle list GetDC() . . . . . . . return the Device Context for this Director window GetPalette(). . . . . return handle of logical identity palette InformColorChange() . notify renderers of color table change
Renderer class methods are called by the Director to perform drawing and sound operations at required time intervals. mRenderer acts as an abstract class supporting derived type-specific renderers such as sprites, FLC/FLI video, BMP/DCX/PCX imaging, tiled bitmaps, sound and special effects. In C++ you can also write your own renderers to implement additional custom animation types and capabilities. The mRenderer class includes the following functions:
mRenderer() . . . . constructor ~mRenderer(). . . . destructor Added() . . . . . . do initializations when added to a Director Removed() . . . . . do close operations when about to be removed Draw(). . . . . . . draw a rectangle to the director window Cycle() . . . . . . do things necessary to prepare for next frame Hit() . . . . . . . perform operations when hitting another renderer ColorChange() . . . do things necessary when the director color table change SetZLevel() . . . . set Z position SetHitDepth() . . . set the Z position hit depth
mRenderer() . . . . constructor ~mRenderer(). . . . destructor Added() . . . . . . do initializations when added to a Director Removed() . . . . . do close operations when about to be removed Draw(). . . . . . . draw a rectangle to the director window Cycle() . . . . . . do things necessary to prepare for next frame Hit() . . . . . . . perform operations when hitting another renderer ColorChange() . . . do things necessary when the director color table change SetZLevel() . . . . set Z position SetHitDepth() . . . set the Z position hit depth
mSprite() . . . . . . constructor ~mSprite(). . . . . . destructor Move(). . . . . . . . set the current position of the sprite MoveRel() . . . . . . move the sprite relative to its last position SetOrigin() . . . . . set the sprite's origin position Hide(). . . . . . . . make invisible (decrement display level) Show(). . . . . . . . make visible (if display level goes positive) Scroll(). . . . . . . set the scroll offset of the sprite - absolute ScrollRel() . . . . . set the scroll offset of the sprite - relative AutoScroll(). . . . . set the auto-scroll offset and frame rate ViewSize(). . . . . . set the sprite's viewable size LoadFromScript(). . . load script commands from file Play(). . . . . . . . play sprite script Pause() . . . . . . . pause script play Resume(). . . . . . . resume script play Speed() . . . . . . . set script speed factor DropFrames(). . . . . enable/disable dropping frames Loop(). . . . . . . . set the looping flag AddSound(). . . . . . add an audio element to the sprite's list PlaySound() . . . . . play an audio element GetPosition() . . . . return current sprite position GetCurrentFrame() . . return current sprite frame number Added() . . . . . . . perform initializations when added to a Director Cycle() . . . . . . . process to advance to the next frame Hit() . . . . . . . . perform operations when hitting another sprite
mSpriteGroup() . . . constructor mSpriteGroup() . . . construct from script file mSpriteGroup() . . . copy constructor mSpriteGroup& =(). . assignment operator ~mSpriteGroup(). . . destructor AddSprite(). . . . . add a sprite to the group RemoveSprite() . . . remove a sprite from the group Move() . . . . . . . set the current position of the sprite group Hide() . . . . . . . make all elements in the group invisible Show() . . . . . . . make all elements in the group visible Play() . . . . . . . play all elements in the group Pause(). . . . . . . pause script play of all elements in the group Resume() . . . . . . resume script play for all elements in the group Speed(). . . . . . . set script speed factor for all elements in the group DropFrames() . . . . enable/disable frame dropping for all elements in the group Loop() . . . . . . . enable/disable frame looping for all elements in the group Added(). . . . . . . add all elements in the group to the Director Removed(). . . . . . removed all elements in the group from the Director
mSpriteImage() . . . constructor mSpriteImage() . . . construct as memory bitmap(s) from image or load-script file mSpriteImage() . . . copy constructor mSpriteImage& =(). . assignment operator ~mSpriteImage(). . . destructor Added(). . . . . . . perform initializations when added to a Director Removed(). . . . . . perform close when removed from a Director ColorChange(). . . . process Director color table changes Draw() . . . . . . . draw rectangle on the Director bitmap Cycle(). . . . . . . process to advance to the next frame Move() . . . . . . . set the current sprite position Play() . . . . . . . execute sprite script Pause(). . . . . . . pause script play Resume() . . . . . . resume script play LoadFromScript() . . load sprite and image script commands from file ScrollRel(). . . . . set pan offset relative to the previous offset SetImage() . . . . . set the current frame source UseFrameOrigins(). . enable use of frame origins SetTransparent() . . enable/disable image color transparency SetTranslate() . . . enable/disable image color translation