Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

bosjoh

DirectX question

This topic is 6950 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Thanx for the reply,
but where did you send the sources to?
To bosjoh@fcmail.com? Because I didn't find it there.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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!!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!