MDX
- Mike's DirectX Wrapper
New
This project was Mike Matczynski's original library before Zingtech
was ever in existance. Zingtech has decided to kepp this page to provide
the source code so others may learn from his work. A Zingtech upgrade
of it is a future project.
The first alpha version of MDX is available to download.
The functions that are implemented seem to be working without any problems
and are stable.
What
It Is
MDX is a specialized
DirectX wrapper. I am writing it so I can use it to create the games
I want easily and as painlessly as possible. However, I am creating
it general enough to allow other people to use it to create their own
games. It is a wrapper for DirectDraw, DirectSound, and DirectInput.
Direct3D will not be included because D3D is
much more complicated and I don't have the experience to do d3d yet.
Readme.txt
From MDX010299.ZIP Download Archive
//****MMM**********MMM**DDDDDDD*****XXX**XXX****//
//****MMMMM******MMMMM**DDD****DDD***XXXXXX*****//
//****MMM*MMM**MMM*MMM**DDD****DDD****XXX*******//
//****MMM**MMMMM***MMM**DDD****DDD****XXXX******//
//****MMM**********MMM**DDD****DDD***XXXXXX*****//
//****MMM**********MMM**DDDDDDD*****XXX**XXX****//
//Copyright (C) Michael Matczynski, 1998, 1999
//http://members.lsol.net/michaelm/
MDX Alpha Release 010299
Revision Date: January 2, 1999
--=======Intro=======--
Mike's DirectX Library (MDX) is a library of functions written in C
that make the DirectX components easier to use. This library was
started in the fall of 1998. Currently it has most of the
DirectDraw and DirectSound functions implemented, but there still
will be some additions and changes. MDX only supports 16-bit color
as of now. Once the functions set is implemented I will be
optimizing the functions further. Have fun! :)
To demonstrate some of MDX's features I have put together a Pong-
clone game. This simple game will show you how to use many of MDX's
functions. To play it run Pong.exe.
The MDX library consists of 2 main source code files: mdx.cpp and
mdx.h. The other source code file included in this ZIP archive,
main.cpp, shows how to use the functions in MDX to create a simple
Pong-clone game.
Until next time,
Mike
--=======File Archive=======--
bg.bmp
DramaticTheme.wav
main.cpp
mdx.cpp
mdx.h
Mike16.bmp
pong.bmp
Pong.exe
readme.txt
--=======Directions=======--
As of now, I have written no documentation about how the various
functions work. You will just have to look at the code and try to
figure it out on your own. Right now I am concentrating most of my
time coding the actual library. Once the library gets further
along I will start describing how the various functions work.
Hopefully with the Pong-clone game as a guide, you will be able to
figure out how to use many of the functions on your own. One of the
reasons I have chosen to release this alpha version of the library is
because I want to get user feedback. I need to be made aware of
bugs and other errors in my library.
To compile and build the library and Pong-clone game I used
Microsoft Visual C++ 5.0 Professional. Other compilers may work,
but I am making no guarantees because I do not have access to
any other compilers to test on.
Send me ANY suggestions, corrections, additions, errors,
etc... to me!!!!
Contact me at:
+-----------------------------------+
| Michael Matczynski |
| michaelm@lsol.net |
| http://members.lsol.net/michaelm/ |
| "Knowledge is good" - anonymous |
+-----------------------------------+
--=======Currently Implemented Functions=======--
int MDXDDInit(int width, int height, int bpp);
int MDXShutdown(void);
--DirectDraw Functions--
int MDXClearToColor(LPDIRECTDRAWSURFACE lpdds, int color);
LPDIRECTDRAWSURFACE MDXCreateSurface(int width, int height,
int mem_flags, int colorkey);
int MDXVsync(void);
LPDIRECTDRAWCLIPPER MDXAttachClipper(LPDIRECTDRAWSURFACE lpdds,
int num_rects,
LPRECT clip_list);
int MDXLoadBitmap(BITMAP_FILE_PTR bitmap, char *filename);
int MDXUnloadBitmap(BITMAP_FILE_PTR bitmap);
int MDXFlipBitmap(UCHAR *image, int bytes_per_line, int height);
int MDXFlip(void);
LPDIRECTDRAWSURFACE MDXCreateSurface(int width, int height, int mem_flags);
int MDXLoadImageBitmap(LPDIRECTDRAWSURFACE surface, // surface to put data
BITMAP_FILE_PTR bitmap, // bitmap to scan image data from
int cx,int cy, // cell or absolute pos. to scan image from
int mode); // if 0 then cx,cy is cell position, else
// cx,cy are absolute coords
--Error File Functions--
int MDXOpenErrorFile(char *filename);
int MDXCloseErrorFile(void);
int MDXWriteError(char *string, ...);
--DirectSound Functions--
int MDXLoadVOC(char *filename);
int MDXLoadWAV(char *filename, int control_flags = DSBCAPS_CTRLDEFAULT);
int MDXReplicateSound(int source_id);
int MDXPlaySound(int id, int flags=0,int volume=0, int rate=0, int pan=0);
int MDXStopSound(int id);
int MDXStopAllSounds(void);
int MDXDSInit(void);
int MDXDSShutdown(void);
int MDXDeleteSound(int id);
int MDXDeleteAllSounds(void);
int MDXStatusSound(int id);
int MDXSetSoundVolume(int id,int vol);
int MDXSetSoundFreq(int id,int freq);
int MDXSetSoundPan(int id,int pan);
Download
Now Available
The first MDX alpha
version has been released on January 2, 1999 (MDX010299.ZIP). The functions
that are implemented are quite stable and work on my computer. Please
try out and test the library and give me feedback on how you like it.
Give me any suggestions, additions, corrections, etc... that you may
have. The success of this library depends greatly on user feedback.
-488k
User Feedback
Questions? Comments? Share your thoughts on the Discussion Forums...
if ($google) {
echo $googlerectangle;
}
else {
echo $yahoorectangle;
}
?>
|
if ($google) {
echo $googleskyscraper;
}
else {
echo $yahooskyscraper;
}
?>
|