Thread: I just got Black Art of 3D Programming in C, and i want to know????

  1. #1
    Registered User
    Join Date
    Aug 2001

    I just got Black Art of 3D Programming in C, and i want to know????

    Which compiler should i use to compile the older code, and did the book help you?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    All of the latest compilers should properly compile old C code without errors, maybe a slew of warnings, but it should work just fine. And I've never read that book, maybe someone else has.


  3. #3
    I never had any luck getting the old code to compile with the copy of borland I was using (5.02 if I remember right) now I am trying to work my way through using djgpp and allegro but so far no success...please post if it works for you =)

  4. #4
    If you want to compile the example-code as is the book advices you to use BorlandC4.5 and Tasm4.0 (as you may have read), but you also can use any, older, 16/32 bit compiler. I tried some examples with Symantec and TurboCx.x which you can download for free at e.g.: link from where I got it died a long time ago).
    But a better alternative would be to use WatcomC/C++ and modify the code so that it works without the 'near' and 'far'-stuff.
    The code will get a lot easier to read and understand...

    'byte far* vga = (byte far*)0xa0000000'
    'far byte* vga = (far byte*)0xa0000000'

    'byte* vga = (byte*)0xa0000'

    When using an older compiler you have to check out if the order is 'data_type far*' or 'far data_type*'.

    DJGPP give you two possibilities to interact with Dos-memory...
    with functions declared in 'sys/farptr.h' like '_farpokeb()' etc...
    take a look at the include files
    including 'sys/nearptr' using the nearptr ?trick? which doesn't work on NT-OS.
    short* mono;

    if (__djgpp_nearptr_enable() > 0)
    mono = (short*)(0xb8000 + __djgpp_conventional_base);

    //some stuff
    mono[80 * 3 + 40] = 0x7 << 8 | 'Q';

    //a grey 'Q' should appear in the center of the 4th screen row


    Hope it helps (!!!errors are possible!!!)

  5. #5
    Registered User
    Join Date
    Aug 2001
    Well the source from the book works on Borland 3.1 and you can get borland 3.1 from

  6. #6
    Join Date
    Aug 2001
    mming, Game DevelopmentCSR >&<>&2Minimization of boolean functions, PROM,PLA design >&0>&WA, USA guitar, dogsCommercial Aviation >&>>&USAProgramming
    I have this book. It is not a new book and therefore it's value is not so much related to its code. No new compiler will run that obsolete code, yet the book is worthwhile because it describes how game programming is different than business programs. There are not many game programming books out there using the new technology. I think a lot of it has to do with trade secrets.
    I compile code with:
    Visual Studio.NET beta2

Popular pages Recent additions subscribe to a feed