* Components: Make ComponentType inline
Prevents the next commits ODR violation
* Components: Add new components
* Entity: Add headers
inline script component ComponentType
* Components: Flip constructor argument order
Entity comes first always
* Entity: Add generic AddComponent
Allows for much easier adding of components and is error proof by not allowing the user to add more than 1 of a specific component type to an Entity.
* Entity: Migrate all component constructors
Move all to the new variadic templates AddComponent function to reduce clutter and ways the component map is modified.
The new function makes no assumptions. Component is assumed to not exist and is checked for with operator[]. This will construct a null component which will then be newed if the component didnt exist, or it will just get the current component if it does already exist. No new component will be allocated or constructed if the component already exists and the already existing pointer is returned instead.
* Entity: Add placement new
For the case where the component may already exist, use a placement new to construct the component again, it would be constructed again, but would not need to go through the allocator.
* Entity: Add comments on likely new code
* Tests: Fix tests
* Update Entity.cpp
* Update SGCannon.cpp
* Entity: call destructor when re-constructing
* Update Entity.cpp
Update Entity.cpp
---------
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
* Breakout rest of the enums from dcommonvars
so we don't have to deal with merge conflicts
ePlayerFlags is not a scoped enum, yet, due to it's complexity
* address feedback
* make player flag types consistent
* fix typo
* breakout the component types into a scoped enum
tested that things are the same as they were before
* fix missed rename
* fix brick-by-brick name to be crafting
because that's what it is
* Implement Precompiled Headers
* First volume of optimizations
* Scripts A-B
Gonna be doing this in alphabetical order now.
* C Scripts and remove unneeded includes from base cppscripts header
Remove the MissionComponent and Loot includes from all base scripts and place their needed includes in the respective scripts.
* D scripts
* F scripts
* F scripts 2
Finish up removing extraneous includes from scripts that start with the letter F
* G scripts
Removing extraneous includes from scripts that start with the letter G
* I scripts
Removing extraneous includes from scripts that start with the letter I
* M-Z scripts
Removing extraneous includes from scripts that start with the letter M-Z
* Revert "Implement Precompiled Headers"
This reverts commit d79d8d4991.
* Revert "Revert "Implement Precompiled Headers""
This reverts commit 0597faf308.
* Add back in PCH
Add back in PCH
* Fix CMake
Whitespace
Remove duplicate file glob
Remove newline