Yet another DDraw Question

Sharky Forums


Results 1 to 15 of 16

Thread: Yet another DDraw Question

Threaded View

  1. #8
    Goldfish DarkAvenger's Avatar
    Join Date
    Dec 2001
    Location
    India --> Australia
    Posts
    72
    Well, it is good to break up your project into multiple files, especially in large projects, because it becomes easy to manage and compile. Just put the function prototypes in 'graphics.h' and type out their declarations in 'graphics.cpp' (or whatever filename).

    Think of it this way: you change one line in a function, and the function is in the main file. That means you'll have to recompile the *whole* main file, which contains all your other functions as well. Do this a few times and you'll get irritated. But if you've got it in a separate file, then your compiler will recompile only that file, and leave the other files alone; naturally, this is quite a timesaver.

    Granted, in such a case it wouldn't be *that* bad to have the pixel plotting functions in the main file, assuming that's all the program has, but I think it's good to get into the habit of splitting up your files.
    Last edited by DarkAvenger; 04-14-2002 at 02:06 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •