Phillip Stephens
77b61b0e68
Fix saves sending you to incorrect rooms, fix triggers
2019-11-05 09:18:14 -08:00
Phillip Stephens
1a5179feb2
Fix CSpacePirate activating too early
2019-11-05 02:22:14 -08:00
Phillip Stephens
b87f94802d
Merge pull request #120 from lioncash/collision
...
CCollisionResponseData: Minor changes
2019-10-30 01:13:40 -07:00
Phillip Stephens
ec7f6804cb
Merge pull request #119 from lioncash/constexpr
...
CollisionPrimitive: Make collision primitive types constexpr capable
2019-10-30 01:13:31 -07:00
Lioncash
fff7b90c85
CCollisionResponseData: In-class initialize primitives
...
Avoids needing to give them their own entry within the constructor
initializer list.
2019-10-29 19:43:23 -04:00
Lioncash
156c0e8cd0
CCollisionResponseData: Name parameters in function declarations
...
Allows IDEs and other introspection tools to be more useful when
indicating parameters in function calls.
2019-10-29 19:41:53 -04:00
Lioncash
9c391f90e3
CCollisionResponseData: Join vector initializations into constructor initializer list
...
Generally provides marginally better code generation.
We can also fill x10_sfx with the invalid SFX constant at the same time
instead of performing a resize and then filling it again.
2019-10-29 19:41:53 -04:00
Lioncash
3d67088697
CCollisionResponseData: Make use of std::array where applicable
...
Allows us to replace some heap allocating file-scope std::vector
instances with constexpr std::arrays, eliminating quite a few static
constructors.
2019-10-29 19:41:48 -04:00
Lioncash
c1beec5bb0
CCollisionResponseData: Organize cpp inclusions
...
Organizes them alphabetically to make for better human reading.
2019-10-29 19:27:21 -04:00
Lioncash
d7dd256d38
CollisionPrimitive: Make use of constexpr types where applicable
...
We can now mark some usages of these types as constexpr and also make
them fully internal to the translation unit.
2019-10-29 18:36:26 -04:00
Lioncash
5c7bb9e7d7
CollisionPrimitive: Make collisition primitive types and comparisons constexpr capable
...
Allows them to be used within constexpr contexts.
2019-10-29 18:36:21 -04:00
Phillip Stephens
e5c8592d5a
Merge pull request #118 from lioncash/seg
...
CSegId: Minor changes
2019-10-26 19:51:08 -07:00
Lioncash
660d092cad
CSegId: Add member functions for querying validity
...
Allows querying validity of segment IDs without hardcoding the magic
value that signifies an invalid ID.
2019-10-26 22:43:11 -04:00
Phillip Stephens
118fb22ce0
Merge pull request #117 from lioncash/layout
...
CCharLayoutInfo: Minor changes
2019-10-26 18:37:59 -07:00
Lioncash
30af6f0bfb
CSegId: Make constexpr capable
...
Allows the class to be used within constexpr contexts, given it's such a
small class.
2019-10-26 21:36:30 -04:00
Lioncash
69831b4a13
CCharLayoutInfo: Make constructors explicit
...
Makes constructions of the types visibly explicit, given they aren't
conversion constructors.
2019-10-26 21:27:03 -04:00
Lioncash
bb9da96870
CCharLayoutInfo: Invert conditional within GetFromParentUnrotated()
...
Inverts the conditional to be in terms of the true case, making it a
little nicer to read.
2019-10-26 21:24:10 -04:00
Lioncash
9193f4c4d7
CCharLayoutInfo: Make use of const where applicable
...
Makes trivial variables const to make it explicit that they aren't
modified.
2019-10-26 21:21:57 -04:00
Lioncash
293d19cf13
CCharLayoutInfo: std::move std::string instance in CCharLayoutInfo constructor
...
Avoids performing a copy (and by extension also avoids redundant
allocations).
2019-10-26 21:19:57 -04:00
Lioncash
e7b0470f55
CCharLayoutInfo: Use heterogenous lookup with std::map
...
Allows using std::string_view with std::map without the need to
construct a completely new std::string instance. Making the lookups via
GetSegIdFromString() completely non-allocating.
Notably, this also allows it to properly function with
non-null-terminated string_view instances.
2019-10-26 21:17:49 -04:00
Phillip Stephens
0042e44521
Merge pull request #116 from lioncash/name
...
CParticleGenInfo: Use slightly more full names for parameters where applicable
2019-10-26 17:51:57 -07:00
Phillip Stephens
83c0ad1e72
Merge pull request #114 from lioncash/model
...
CModel: Implement CModelFlags' operator!= in terms of operator==
2019-10-26 17:51:40 -07:00
Phillip Stephens
5865552d7f
Merge pull request #113 from lioncash/artifact
...
CArtifactDoll: Minor changes
2019-10-26 17:51:30 -07:00
Lioncash
bbdfe3d962
CParticleGenInfo: Provide slightly more full names for parameters where applicable
...
Makes Intellisense and any function highlighting systems a little more
informative.
2019-10-26 20:37:35 -04:00
Lioncash
a82dd4f11f
CParticleGenInfo: Name bool parameter for SetParticleEmission
...
Allows the parameter name to be visible in code completion and
highlighting.
2019-10-26 20:32:44 -04:00
Lioncash
8f28786048
CModel: Implement CModelFlags' operator!= in terms of operator==
...
Same behavior, less code.
2019-10-26 14:58:38 -04:00
Lioncash
c4ad797953
CArtifactDoll: Collapse loop into std::all_of
...
Same thing, but directly stores to a variable.
2019-10-26 14:57:21 -04:00
Lioncash
7a8edc8d5e
CArtifactDoll: Make use of std::array where applicable
2019-10-26 14:57:21 -04:00
Lioncash
26b24d604a
CArtifactDoll: Make use of an anonymous namespace
...
Provides a unified section to place internally linked data.
2019-10-26 14:57:21 -04:00
Lioncash
bea9c5bb74
CArtifactDoll: Organize cpp includes
2019-10-26 14:57:17 -04:00
Phillip Stephens
5efd827e99
Merge pull request #115 from lioncash/const
...
CAnimData: Remove usage of const_cast within Touch()
2019-10-24 22:47:14 -07:00
Phillip Stephens
246e233dce
Cleanup CPathFindArea
2019-10-24 22:44:37 -07:00
Lioncash
eae1a1d06d
CAnimData: Remove usage of const_cast within Touch()
...
We can just call the function normally without the need for a
const_cast.
2019-10-23 20:44:19 -04:00
Phillip Stephens
18382e5bb6
Merge pull request #112 from lioncash/emplace
...
rstl: Return reference to emplaced element in emplace_back()
2019-10-20 18:33:06 -07:00
Lioncash
18f64dac8d
rstl: Amend unrelated clang-format discrepancies
...
Avoids others being hit by these if any changes in the header ever need
to be made in the future.
2019-10-19 02:06:33 -04:00
Lioncash
15e856404d
rstl: Return reference to emplaced element in emplace_back()
...
Follows the behavior of the C++17 variant of emplace_back, which returns
a reference to the emplaced element.
This allows eliminating cases like:
container.emplace_back(some, things, arguments);
container.back().blah();
... // subsequent modifications to the element
given we can just retrieve the reference from the emplace_back call.
2019-10-19 02:05:09 -04:00
Lioncash
26a9ceab60
CGunWeapon: Eliminate const_cast usages in DrawMuzzleFx()
...
We can just make the temporary variable non-const to eliminate the need
for const_casts.
2019-10-19 01:11:19 -04:00
Lioncash
271ee6d8c3
CGunWeapon: Make use of algorithms where applicable
...
We can leverage these to also eliminate some hardcoded sizes.
2019-10-19 01:11:05 -04:00
Lioncash
c228baf5f7
CGunWeapon: Make use of std::array where applicable
...
Makes the arrays strongly typed and also allows us to dehardcode some
loop boundary constants.
2019-10-19 01:07:01 -04:00
Lioncash
c36e6a85b9
CGunWeapon: Organize cpp includes
...
Makes the source file consistent with the header.
2019-10-19 00:03:38 -04:00
Phillip Stephens
6a3eba0091
Merge pull request #103 from lioncash/unique
...
CParticleDataFactory: Use unique_ptr where applicable
2019-10-18 01:01:40 -07:00
Phillip Stephens
c63ee167da
Merge pull request #110 from lioncash/override
...
MkCastTo: Use override where applicable
2019-10-18 01:00:31 -07:00
Lioncash
853df176ed
MkCastTo: Use override where applicable
...
Generates the derived classes with the override specifier to prevent
warnings.
2019-10-17 22:15:25 -04:00
Lioncash
3a0daa3ab9
CLogBookScreen: Use forward declarations where applicable
...
Allows for avoiding the over exposing of types through the header when
included in other translation units or headers.
2019-10-15 10:25:43 -04:00
Lioncash
5b8f3f6693
CLogBookScreen: Organize cpp includes
...
Tidies them up to be consistent with its header.
2019-10-15 10:13:30 -04:00
Lioncash
4db0e49851
CLogBookScreen: Invert conditional within UpdateBodyText()
...
Allows unindenting the contained code by one level.
2019-10-15 10:05:53 -04:00
Lioncash
b93f7a4ceb
CLogBookScreen: Use std::u16string's append() member instead of operator+
...
Appends to the existing buffer instead of constructing a superfluous
temporary.
2019-10-15 10:03:54 -04:00
Lioncash
d64824d3e5
CLogBookScreen: Make use of std::any_of within IsScanCategoryReady()
...
Same thing but collapses into a single return.
2019-10-15 10:00:15 -04:00
Lioncash
251a2a7723
CLogBookScreen: Make use of structured bindings where applicable
...
Allows decomposing long pair names into their constituent elements
2019-10-15 09:57:24 -04:00
Lioncash
f21ee0786a
CLogBookScreen: Make signed/unsigned/FP conversions explicit
...
Silences warnings relating to signed/unsigned comparisons and
conversions to floating-point types.
2019-10-15 09:36:10 -04:00