DirectX question

Started by
12 comments, last by bosjoh 24 years, 6 months ago
I really recommend you get a book, since DirectDraw isn't near as easy as just plain DOS IMHO. That said, DirectDraw isn't hard to learn -- its just a bit different .

Anyway, I'll send you the source to my DirectDraw graphics library if you want it. I personally think its pretty nice myself (I use it in all my projects), but theres plenty of room for improvement.

--TheGoop

Advertisement
Oh yeah, one more thing. It only works with 16bit color -- not palletized mode.
--TheGoop
Thanx for the reply,
but where did you send the sources to?
To bosjoh@fcmail.com? Because I didn't find it there.
Hey. I just wanted to say the "Windows Game Programming for Dummies" is a really good book. It taught me all about game programming in general, and about DirectDraw, DirectSound, and DirectInput.
Good luck,
Qoy
I've read a tutorial that explains how to use directdraw and has sources. Try to ran those sources and of course: They wouldn't run (ARGH!).
The compiler keeps moaning about: 'unreferenced external symbol _main'.
This only happens when I include 'ddraw.h'.
If I understand it well, I must start my program with WinMain, but that's impossible with main declared (writes to MS-DOS prompt).
When I try to run the source from main I will get a invalid operation error when it tries to create the primary surface. It didn't tried to access 640x480x256 either.
Before I was only asking if you wanted the sources, thats why I didn't send them -- I wasn't sure if you wanted them or not (Do you want them?). If your using VisualC++ you have to create a Win32 Application, not a Win32 console app (I don't know what you have to do with Borland).

In a windows program you should never use main, only WinMain(). Although you can create a window from a console app its not good style -- and from what your saying it doesn't sound like it works all the time.

--TheGoop

Sorry for the misunderstanding,
of course I want the sources.
And the compiler I use is VC++ 6.0. For some reason you can't write a windows app. I don't know which option I should set that it can use WinMain (and stop bugging me with main).
When you start VC++ click the File | New menu items, make sure the Projects tab is selected on the dialog that comes up and select the Win32 Application project. The Win32 Console Application is what you're probably selecting.

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

Well, if you just want to run your DOS program in a console window, then just create a new WIN32 Console Application project and #include & in your program and it should fire up. I don't know about your proggie being able to request 800x600 8-Bit in a console window though.

And I do agree with an earlier post about getting "Windows Game Programming for Dummies". Don't let the "Dummies" fool ya as Andre Lamothe does quite well in explaining DirectX components DirectDraw,Sound,Input as well as Windows GDI. No Direct3D but he covers that in some of his other books (I think).

Wesley Liu

Currently Network Engineer but soon to be full-time Game Developer!!
OOps, some of my post got dropped.. should read:

"just create a new WIN32 Console Application project, insert your dos code (using main()), #include windows.h & windowsx.h and it should fire right up."

Wesley Liu

------------------
~~~~~~~~~~~~~~~~~~~~~~~~
Currently Network Engineer but soon to be full-time Game Developer!!

Currently Network Engineer but soon to be full-time Game Developer!!

This topic is closed to new replies.

Advertisement