Archived

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

heavymetalman

Header files for Tricks of the game programming gurus

Recommended Posts

I have had the Tricks of the game programming gurus book for a long time and it has just been sitting on my shelf because I lack some header files it needs and for some reason they did not include them with the cd. I am missing graph.h and also a lot of the header files graph.h needs. I am using microsoft visual c++ 6.0 enterprise edition. If anyone knows where I can get all of the header files I need please tell me. I have seached the internet a few times and i found graph.h then it needed a different file so I went and got it then that file needed a file... so a collection of all of the header files would be great.

Share this post


Link to post
Share on other sites
Check the site. A problem occured with OpenGL Game programming where sometimes the source code was jsut a bunch of empty folders. Sometimes they do make mistakes.

Scott Simontis
e-mail:ageofscott@comcast.net
AIM:ssimontis

Share this post


Link to post
Share on other sites
Thanks but I checked the site but this book is old and is not even on the site. I think it was published in 1994 so it is really old. Im going to buy the newest version of the book, soon anyway but this book is still good for some basic stuff like input devices etc. And I wanted to make some old style games anyway.

Share this post


Link to post
Share on other sites
The book states that it uses Microsoft C compiler. The Worst compiler I have ever used. When I used the book I used Borland C++ 5.1 (Not Borland Builder V5). you have to do the following:

- chapters 3 and 4 uses the graph.h header so you could use the built in line and lineto functions. if you really want to compile, you have to change the code of these functions into their equivilant in the Borland Compiler that are located in the graphics.h header.

- Skip to Chapter 5 and you will see that the examples will not use the line and lineto functions. they will use a custom header instead that contains code from the book. so you will only need graph.h to switch the 320x200x265 graphics mode (13h mode). just change the code that does that with the following:

// Code that switches to 13h mode
asm mov ah,0
asm mov al,0x13
asm int 0x10

(I think you need to put ';' after each statement but I forgot if it is necessary. the asm{ } or _asm{ ) wont work)

// Code that switches back to text mode
asm mov ah,0
asm mov al,0x3
asm int 0x10

The reason why the examples wont work with VC++ is that it does not allow direct memory manipulation because it runs on protected mode. so your stuck with the borland C++ choice. You can edit your code on VC++ and compile on BC++. Oh yes one more thing, you have to change some other things like the inp and outp functions and some far declerations. If you wish I can send you a dummy program that contains the changes. I spent a lot of time to find the best changes.

you will enjoy the book, it is one of the best to learn the basics of Game programming.




[edited by - Master Mofo on September 3, 2003 4:55:42 AM]

Share this post


Link to post
Share on other sites