Minor changes to color conversion, Color16bit() takes a const reference now.
Update for LaserDrawClass.
Extracted CurrentFrame into a new Fundamentals header.

This resolves a circular reference for other basic headers.
Also, the CurrentFrame has been made a const reference.
Updated TimerStruct

* Implemented all functions instead of calling ingame methods. This should help the compiler to inline more efficiently.

* Added constructors for completeness sake, and a IsTicking() helper method.

* Renamed StartIfEmpty() to Resume()
TimerStruct update 2

* Renamed Ignorable() to Expired(), added comments. Expired means that a delay is either not in progress or it has ended.

* Added InProgress(), which is the opposite of the delay (inactive *or* counted down) as well as of the timer (active *and* counted down) semantic.

* Added a protected helper method that gives a name to a common check.
TimerStruct update 3

* IsDone() renamed to Completed()

* Added comments that hopefully help to distinguish between two possible views on a timer.
CameoDataStruct reworked

The method jumped to by Clear() is actually the default constructor, which only initializes the ProgressTimer. The updated implementation clears all the data itself and does not call a game function any longer. Another constructor has been added that takes item type and index directly.

The operator == used all members for comparison, though the game identifies items by type and index alone. This has been made consistent. The operator is const now.

operator != was added for needless symmetry reasons.

operator < has been added, and calls SortsBefore.

Clear() and ClearFully() have been removed. Items can be cleared by assigning a default constructed object.
Added a type trait that is a boolean constant representing whether an array of type T requires calling the destructor on each element when deleting.

Also removed a commented out include.
Array classes reworked

* Removed unused includes, reordered methods, made stuff more consistent.

* IsEqual() converted to operator ==, which seems more appropriate. Added operator !=, calling operator ==.

* Support for move semantics. Vectors can be moved and swapped now. Items are tried to be moved when adding or resizing.

* Removed Load() and Save() methods. They will not work like this anyhow.

* Added the missing methods to CounterClass, made some of them const for read-only access.

* Added a static_assert for types that will not work as fast as they should because of alignment. If an int is preceding the actual block of memory for types requiring 8 byte alignment or higher, they will be shifted by 4 bytes. If that happens, better support for this has to be added.

* Removed some checks from begin() and end(), because they should only fire when the vector has not been constructed yet (in which case there's a worse problem somewhere), or when the vector is iterated while being resized, which generally is a bad idea.

Destructors:
As the VectorClass destructor is virtual, it is invoked for all derived classes on destruction. When this happens, calling Clear() calls VectorClass::Clear() (opposed to a overridden Clear()) because the vtable is reset when entering the base destructor. Thus, derived classes do not need to manually call the base class Clear().

Ideas for later:
operator == could use std::equal, which would take care of length and item comparison. Likewise, std::find and std::copy_n could be used in various places, and maybe std::rotate when removing an item.

When available, methods should be marked as nothrow. The original implementation would never throw an exception.
SHP update

SHPStructs are either the headers of raw file data, or a handle to a cached file in the global SHP cache. With some helper methods SHPStructs can be cast to the specific type.
Line endings
Added overloads for GetFacing() and GetRealFacing().
DirStruct replaced with a huge structure for a lesser purpose.
A better FacingStruct implementation

Fully implemented instead of jumping to game methods, which should help the compiler to optimize a few calls. All (?) missing functions are implemented.

No more pointer in pointer out functions, which most likely was the result of returning user defined types in the original source.

No more hidden features like the undiscoverable cast to int meaning map to 0..7.

The entire thing is encapsulated, which is a nice design though the rest of the code still pokes everything it needs.

Notes on the implementation:
ROT is still saved in a DirStruct, which might not be what the original code does. Maybe there is a common underlying struct, like a fixed point decimal value.
Worked on a few loose ends.
Implemented the Checksummer, removed calls of game methods

This implementation has no out of bounds writes beyond the class bounds. See the added check in the Fill method for ByteIndex == Size.

Several functions are split into a public method and an internal inline function. This is to prevent lots of function calls in methods that are called thousands of times potentially.

The Checksummer now accepts all values without casting. There is a function template that takes care of all types, and calls a single processing function, so not every type gets its own instantiation of the big function.

The current value can be retrieved using GetValue(), which fills the current buffer and also considers its value. Immediate() returns the raw value not considering the current buffer. Commit() fills the current buffer, processes and then clears it. Calling GetValue() before Commit() returns the same value as Immediate() after Commit(). GetValue() doesn't change the internal state, but it is not bitwise const as it fills the buffer.
Added a SafeChecksummer that has some extra padding to work around the original game bug that the Checksummer writes beyond array (and class) memory bounds when adding the last byte that fills the buffer.
Updated the CalculateChecksum method.

It takes the Checksummer as non-const reference as this parameter cannot be null. The method is now const everywhere.
MapClass::PickInfantrySublocation()
Two helper function to move to Tiberium or weed.