#1. Does your compiler make use of #pragma compiler directives? Specifically 'once'. This sure beats encolsing #ifndef blah, #define blah #endif. I believe most compilers do, and one should get in the habbit of using this rather then the old style.
#2. I was curious if your up to bringing this more into standards by making use of namespaces?
#3 since we are building for different platforms I was wondering if we could make use a pch file, perhaps stdafx.h as is standards, it sure cuts down on compile time rebuilds, as well could we define a standard that would need changed for each platform so that at compile time it could do different operands then current. I suggest we define somethting like TA3D_PLATFORM_ARCH_LINUX or TA3D_PLATFORM_ARCH_WINDOWS, or TA3D_PLATFORM_ARCH_MAC, or TA3D_PLATFORM_ARCH_OTHER. I realize that we can already use different defines by platform specific includes already but this is something that we can use and don't need to worry about something somewhere messing with it. We could place this in our stdafx.h file within TA3D namespace.
#4 can we setup in our pch file a set of 'typedefs' that we can define as byte specific size in both unsigned and signed. I realize that it will require a number of changes throughout the code but that can be done over time, and would make things ALOT easier when we really start shuffeling data around through sockets and what not.
Something like this, though we might wana add floating, double to it as well.
Code: Select all
#ifdef TA3D_PLATFORM_ARCH_WINDOWS
// 64-bit ints, guaranteed to be 8 bytes in size
typedef unsigned __int64 uint64;
typedef signed __int64 sint64;
// 32-bit ints, guaranteed to be 4 bytes in size
typedef unsigned __int32 uint32;
typedef signed __int32 sint32;
// 16-bit ints, guaranteed to be 2 bytes in size
typedef unsigned __int16 uint16;
typedef signed __int16 sint16;
// 8-bit ints, guaranteed to be 1 byte in size
typedef unsigned __int8 uint8;
typedef signed __int8 sint8;
#...
Anyhow thats a few suggestions, i'am currently working on getting this to recompile under vs 2005, since i tossed the changes i had last time. I hope to be able to submit to you modifications so that I don't need to keep doing this each time you release an updated verision.
++Cire.