Commit Graph

638 Commits

Author SHA1 Message Date
Phillip Stephens f2c207b85e
Fix regression 2019-11-06 10:12:20 -08:00
Phillip Stephens 297513c8d4
Fix Impact Crater causing an infinite loop for simply not having a skybox 2019-11-06 09:33:45 -08:00
Phillip Stephens 77b61b0e68
Fix saves sending you to incorrect rooms, fix triggers 2019-11-05 09:18:14 -08: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 246e233dce
Cleanup CPathFindArea 2019-10-24 22:44:37 -07:00
Jack Andersen e1d46755a3 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde 2019-09-30 21:41:42 -10:00
Jack Andersen 16ca0d24c2 Explicit Asset ID refactor 2019-09-30 21:38:03 -10:00
Lioncash 36d04456dd General: Normalize RuntimeCommonB include paths
Finishes the normalizing of all of includes within the RuntimeCommonB target's headers.
2019-09-23 17:22:37 -04:00
Lioncash 06789d1860 General: Normalize several headers' include paths
Normalizes the include paths and makes them consistent. Also adds any
missing includes relevant to the interface.
2019-09-22 20:36:33 -04:00
Lioncash adf9610138 CBurstFire: Tidy up includes
Includes all necessary headers and uses a forward declaration where
applicable. Ensures inclusion changes in other headers don't break the compilation
of these headers and source files.
2019-09-22 09:45:01 -04:00
Phillip Stephens 68e2fad74f
Fix TCastTo.hpp inclusions, add comment to warn against modifying include path 2019-09-21 06:07:13 -07:00
Lioncash 019ee29a0c CPlayer: Make file-scope CMaterialFilter instances constexpr
Now that the interface is constexpr, we can mark these as constexpr.
2019-09-19 15:18:44 -04:00
Lioncash 6ec903f9ac CPlayer: Use std::array where applicable
Makes the arrays strongly-typed and impervious to implicit
array->pointer decay. We can also eliminate a few hardcoded magic
values.
2019-09-18 12:28:44 -04:00
Lioncash 70fb763180 CPlayer: Enclose translation-unit-local data within an anonymous namespace
Keeps all local data within one spot and prevents any potential ODR
violations related to them from occurring.
2019-09-18 12:27:15 -04:00
Lioncash 33f10e2552 CPlayer: Organize includes 2019-09-18 11:50:26 -04:00
Lioncash 45cdc38ac0 CPlayer: Use size_t with SfxIdFromMaterial
Allows passing in sizes without potential truncation from size_t,
allowing nicer use of std::size() to dehardcode some magic values.
2019-09-17 14:52:42 -04:00
Lioncash 96f035f24b CMorphBall: Use std::array where applicable
Makes the arrays strongly-typed and impervious to implicit
array->pointer decay.

This also uncovered an out of bounds memory read within UpdateEffects
cause by said array->pointer decay.
2019-09-16 21:11:30 -04:00
Lioncash e4b22ea9d8 CMorphBall: Place internally linked data within an anonymous namespace
Keeps all internal data within one place and also prevents any potential
ODR violations from occurring in relation to any of these.
2019-09-16 14:53:52 -04:00
Lioncash 8c59ace5fe CMorphBall: Clean up includes 2019-09-16 14:43:33 -04:00
Lioncash 0281029015 CEntityInfo: std::move vector in constructor
Allows calling code to potentially avoid copies altogether by moving
into the constructor.
2019-09-15 16:22:35 -04:00
Lioncash 0d2b2f45a8 CStringExtras: Prevent potential out of bounds reads with CompareCaseInsensitive
The strcasecmp and _stricmp functions expect the passed in strings to
be null-terminated, however we we're also exposing a std::string_view
overload for that function. std::string_view instances aren't required
to be null-terminated, so this makes the interface a little unsafe.

We can use std::lexicographical_compare() to provide the same behavior
and also properly handle the case of non-null-terminated strings.
2019-09-14 16:43:04 -04:00
Lioncash f9079f0215 Runtime: Make use of std::make_unique where applicable
Makes use of the C++14 make_unique allocation function to allocate class
instances where applicable instead of a reset with a new operator within
it.

This doesn't touch cases where buffers are allocated, given make_unique
would zero-initialize them.
2019-09-12 04:09:48 -04:00
Lioncash 5baf3206f4 CActorModelParticles: Make DGRP array constexpr
Technically this array wasn't readonly and contained a sequence of
modifiable elements. We can make this constexpr so that the compiler can
definitively place it into the read-only segment.
2019-09-09 20:44:23 -04:00
Lioncash c9271809a7 CAiFuncMap: Remove unused static std::vector
This isn't used, so we can remove it and get rid of a static
constructor.
2019-09-08 18:08:10 -04:00
Lioncash 20a0585cc5 CAiFuncMap: Convert typedefs into type aliases
Same thing, but reads a little nicer.
2019-09-08 18:08:10 -04:00
Lioncash 2f06fcba0a CAiFuncMap: Avoid redundant map lookups in getters
We can just use the result of the find operation instead of rehashing
into the map to retrieve the entry.

This also allows us to make the getter const qualified.
2019-09-08 18:08:10 -04:00
Lioncash 1cfe83d8d1 CAiFuncMap: Replace map indexing with emplace in the constructor
Provides the same behavior, but without default initializing a map entry
that immediately gets overridden in the assignment.
2019-09-08 18:08:10 -04:00
Lioncash 2c6aed7033 World/CScript*: Pass by reference over by value
Based off the use of the const, it's likely that these were intended to
be references, rather than be copied by value
2019-09-06 10:49:54 -04:00
Phillip Stephens 256994c199
Initial CEnergyBall, update submodules, various fixes 2019-08-31 02:02:21 -07:00
Lioncash fa608acb06 CPatterned: Correct use of bool in bitfield
This is incremented within PathFind(), however, because the type within
this bitfield is a bool, this can trigger compilation warnings (rightly
so). So we can make it a uint32_t to make it obvious that the
incrementing behavior is intended.
2019-08-23 22:26:07 -04:00
Phillip Stephens 9866bac443 Update jbus, initial CEnergyBall stub 2019-08-23 01:32:48 -07:00
Phillip Stephens fa7785d024 Fix GetAreaFog 2019-08-14 12:56:46 -07:00
Lioncash afab3e0327 Runtime: Make const/non-const getters have the same name
Makes for a more consistent interface, as getters won't have different
names to remember based off whether or not they're const qualified.
2019-08-14 12:45:57 -04:00
Lioncash d3d629d405 RuntimeCommon: Use const on member functions where applicable
Adds missing const qualifiers on class member functions that don't
modify instance state.
2019-08-14 09:25:39 -04:00
Phillip Stephens ad5e395a51 Fixes for `override` modernization 2019-08-10 17:49:41 -07:00
Phillip Stephens 1d3e5cdb70 Implement Oculus loader 2019-08-09 14:55:59 -07:00
Lioncash 2059535b55 RuntimeCommonB: Use the override specifier where applicable
Applies the override keyword where applicable to indicate visually where
member function overriding is occurring. This only targets
the RuntimeCommonB target as a starting point, which resolves around
900+ cases where the keyword could be used.
2019-08-09 09:13:26 -04:00
Jack Andersen 5acf9ecbcf Graphics debug groups and bug fixes 2019-07-20 22:42:52 -10:00
Jack Andersen b4fe474de3 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde 2019-07-19 18:29:06 -10:00
Jack Andersen 7a3da1f7a6 Massive fmtlib refactor 2019-07-19 18:27:21 -10:00
Phillip Stephens 1a9ca77603 Update ScriptObject DNAs to match known values 2019-07-19 01:30:11 -07:00
Phillip Stephens cdf9545de4 Fix MemoryRelay handling in DataSpec 2019-07-16 19:10:57 -07:00
Phillip Stephens 328749d1ba More CFlaahgra imps, initial CTryclops imps 2019-07-16 08:54:07 -07:00
Jack Andersen e38a3ece89 More CBabygoth fixes 2019-07-06 22:22:35 -10:00
Jack Andersen 003146f614 Work on CBabygoth 2019-06-29 21:29:49 -10:00
Phillip Stephens 44cae7bdb9 More CFlaahgra imps 2019-06-26 18:06:03 -07:00
Jack Andersen 77af3f0ebd CPuddleToadGamma and animation system fixes 2019-06-20 20:02:56 -10:00
Jack Andersen 9ccc4227cb Initial support for asynchronous shader compilation 2019-06-15 20:25:29 -10:00
Jack Andersen 37307e1cf6 Various CActorContraption fixes 2019-06-14 14:39:20 -10:00