Im currently putting together some of the systems described in GCC3 and I noticed that my #include's were getting hard to keep track of.
I read somewhere online that the use of a global header file is a good idea (like having 1 headerfile like global.h and including it to everything)
// global.h
#include <windows.h>
#include <windowsx.h>
#include <d3d9.h>
#include <d3dx9.h>
#include "gamewindow.h"
#pragma comment (lib, "d3d9.lib")
#pragma comment (lib, "d3dx9.lib")
// prototypes
// WinMain.cpp
LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
void DisplayWindow(GAMEWINDOW* gw, HINSTANCE hInstance, int nCmdShow);
bool HandleMessages();
// Loop.cpp
void MainLoop();
// Direct3D.cpp
void InitDirect3D(GAMEWINDOW* gw);
void CloseDirect3D();
Is this the right kind of idea? and if so how is the propper way to implement it with the GCC architecture?
I read somewhere online that the use of a global header file is a good idea (like having 1 headerfile like global.h and including it to everything)
// global.h
#include <windows.h>
#include <windowsx.h>
#include <d3d9.h>
#include <d3dx9.h>
#include "gamewindow.h"
#pragma comment (lib, "d3d9.lib")
#pragma comment (lib, "d3dx9.lib")
// prototypes
// WinMain.cpp
LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
void DisplayWindow(GAMEWINDOW* gw, HINSTANCE hInstance, int nCmdShow);
bool HandleMessages();
// Loop.cpp
void MainLoop();
// Direct3D.cpp
void InitDirect3D(GAMEWINDOW* gw);
void CloseDirect3D();
Is this the right kind of idea? and if so how is the propper way to implement it with the GCC architecture?