Commit Graph

3868 Commits

Author SHA1 Message Date
Luke Street 56cebfbacd
Merge pull request #308 from AxioDL/fmtlib-update
Update fmtlib
2020-04-12 03:06:46 -04:00
Luke Street 9f8064b4a1
Merge pull request #307 from lioncash/constexpr7
CModel: Mark CModelFlag instances as constexpr where applicable
2020-04-12 03:06:12 -04:00
Lioncash 1fff540102 CAnimPlaybackParms: Make class constexpr constructible
Allows for removal of some trivial runtime initializers.
2020-04-11 20:55:46 -04:00
Lioncash fef6711ce8 CMorphBall: Make use of constexpr on file-scope arrays
Same behavior, but allows elision of runtime initializers.
2020-04-11 20:41:52 -04:00
Lioncash 1b42bda711 CParticleDataFactory: Make operator bool() instances explicit
Gets rid of implicit error-prone conversions to bool
2020-04-11 20:33:02 -04:00
Lioncash d6f2e27d8a CParticleGlobals: Make use of std::array where applicable 2020-04-11 20:29:36 -04:00
Lioncash 7d42b2d763 CParticleGlobals: Initialize all data members
Provides a deterministic initial state.
2020-04-11 20:23:40 -04:00
Lioncash 9d6b9142bb CParticleSwoosh: Make use of std::array where applicable
Same behavior, no implicit array to pointer decay.
2020-04-11 20:20:47 -04:00
Lioncash 76e226f831 CWorldTransManager: Convert one missed array over to std::array 2020-04-11 19:55:23 -04:00
Lioncash 58fdb64ab5 CWorldTransManager: Initialize all members on construction
Provides a deterministic initial state upon construction, making
debugging easier.
2020-04-11 19:53:30 -04:00
Lioncash e72507b20c CWorldTransManager: Make use of std::array where applicable
Provides stronger typing, and eliminates any potential implicit array to
pointer decay.
2020-04-11 19:50:49 -04:00
Lioncash 54dededb9b CNewFlameThrower: Make constructor take a std::array by reference
Same behavior, but enforces the size requirement instead of accepting
any arbitrary const CAssetId* pointer.
2020-04-11 19:37:42 -04:00
Lioncash fa0dcf5b12 WeaponCommon: Use string_view with get_asset_id_from_name()
Internal functions expect a std::string_view, so we can just make the
parameter a string_view as well to push the responsibility outwards into
the caller.
2020-04-11 19:33:00 -04:00
Lioncash ff6c1fdd3d IOStreams: Make constructors for CBitStreamReader and CZipInputStream explicit
Same behavior minus the error prone implicit constructions.
2020-04-11 19:23:28 -04:00
Jack Andersen 5b4441ac36 Update fmtlib 2020-04-11 12:51:39 -10:00
Lioncash 75c07677ed CModel: Mark CModelFlag instances as constexpr where applicable
Allows more runtime initializes to potentially be elided.
2020-04-11 16:56:13 -04:00
Luke Street 7055b6983f
Merge pull request #306 from lioncash/random
CRandom16: Make constructor explicit
2020-04-11 16:36:51 -04:00
Luke Street 038e2f3172
Merge pull request #305 from lioncash/constexpr3
CModel: Make CModelFlags constexpr.
2020-04-11 16:36:42 -04:00
Lioncash 4bdcc5efdb CModel: Make CModelFlags constexpr constructible.
Allows initializers to be elided where applicable.

While we're at it, we can make the conditional flag tests more explicit
and eliminate implicit truncation in the case of the second flag test.
2020-04-11 16:16:19 -04:00
Lioncash 75d8988ee8 CRandom16: Make constructor explicit
Same behavior, minus the implicit conversions upon construction.
2020-04-11 16:15:05 -04:00
Luke Street 7e8ca5e808 Add -DLLVM_ROOT_DIR to appveyor 2020-04-11 16:07:05 -04:00
Lioncash 01bb0f3840 CWorld: Separate enum definition from declaration
Allows more flexibility if anything ever gets moved around and is
arguably nicer to read.
2020-04-11 15:29:01 -04:00
Lioncash 515103aa92 CWeaponDescription: Make operator bool() explicit
Eliminates potential error-prone implicit conversions.
2020-04-11 15:04:55 -04:00
Lioncash 886d951736 CCameraShakeData: Make use of boolean literals where applicable in LoadCameraShakeData
Same behavior, minus the implicit conversions to bool.
2020-04-11 14:33:27 -04:00
Phillip Stephens 9375514868
Fix CRipper 2020-04-11 07:29:06 -07:00
Phillip Stephens 30bcdb2b2f
Add TextureCache support to MP2 and 3 2020-04-11 00:53:04 -07:00
Luke Street 416fec2367
Update README.md 2020-04-11 03:45:45 -04:00
Luke Street 072ac0df16 Runtime: Wrap printf calls in #ifndef NDEBUG 2020-04-11 02:35:55 -04:00
Luke Street e23c3d3705 Runtime: Wrap fmt::print calls in #ifndef NDEBUG 2020-04-11 02:25:41 -04:00
Luke Street 11d948943d Merge remote-tracking branch 'origin/c++20' 2020-04-11 02:13:43 -04:00
Luke Street 0fc53c91dc
Merge pull request #303 from lioncash/size
IAnimReader: Make use of size_t for capacity and iterators
2020-04-11 02:12:41 -04:00
Luke Street 304340bd35
Merge pull request #304 from AxioDL/remove-union-bitfields
Runtime: Replace bitfield unions with explicit initializers
2020-04-11 02:12:21 -04:00
Luke Street 22ac7d8099 CScriptCoverPoint: Fix GetAttackDirection return value 2020-04-11 02:09:58 -04:00
Luke Street 0339c16e20 CScriptCoverPoint: Fix GetAttackDirection 2020-04-11 02:02:28 -04:00
Luke Street bb7e94f304 Runtime/World: Replace bitfield unions with constructor initializers 2020-04-11 01:50:10 -04:00
Jack Andersen 3dd485e0eb Fix MP3 PASS extract with null textures 2020-04-10 19:42:14 -10:00
Jack Andersen 330103d936 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde into c++20 2020-04-10 19:07:55 -10:00
Jack Andersen 26f272735d Set compiler flags for building with C++20 2020-04-10 19:05:55 -10:00
Luke Street 22880abb7e Runtime/Weapon: Replace bitfield unions with constructor initializers 2020-04-11 00:49:02 -04:00
Luke Street c7ca8dc3a7 Runtime/Particle: Replace bitfield unions with constructor initializers 2020-04-11 00:39:49 -04:00
Lioncash 0414235e76 CTransitionDatabaseGame: Tidy up GetMetaTrans()
We can leverage auto here to make the lambda functions significantly
less verbose.
2020-04-10 23:51:18 -04:00
Lioncash 72370910ad IAnimReader: Make use of size_t for capacity and iterators
Allows using container sizes and capacities without needing to cast
them, allowing for dehardcoding of array sizes in some scenarios.
2020-04-10 23:24:52 -04:00
Luke Street f483f5c1e6 CPersistentOptions: Initialize bitfields in default constructor 2020-04-10 15:47:36 -04:00
Luke Street 153004faee Runtime/MP1/World: Replace bitfield unions with constructor initializers 2020-04-10 15:33:05 -04:00
Luke Street 402e45ecb5 Runtime/MP1: Replace bitfield unions with constructor initializers 2020-04-10 15:25:40 -04:00
Luke Street d23e76db54 Runtime/Input: Replace bitfield unions with constructor initializers 2020-04-10 15:12:46 -04:00
Luke Street e38a7f97bd Runtime/GuiSys: Replace bitfield unions with constructor initializers 2020-04-10 15:11:10 -04:00
Luke Street 232823ae69 Runtime/Graphics: Replace bitfield unions with constructor initializers 2020-04-10 15:03:31 -04:00
Luke Street f83b970e75 Runtime/Collision: Replace bitfield unions with constructor initializers 2020-04-10 15:03:24 -04:00
Luke Street 4a3ce8453f Runtime/Graphics: Replace bitfield unions with constructor initializers 2020-04-10 15:03:15 -04:00