Commit Graph

172 Commits

Author SHA1 Message Date
Phillip Stephens 44f9d6648a
CGraphics: Viewport fixes 2022-02-27 14:46:15 -08:00
Luke Street 832eb180bd Begin transitioning to new CModel/CCubeModel & friends 2022-02-25 02:45:25 -05:00
Luke Street e48435f11e Start wiring up wgpu+winit 2022-01-31 19:06:54 -05:00
Phillip Stephens a9bcb7a9ce
Reformat pass 2021-06-07 12:29:18 -07:00
Phillip Stephens 0b4f15341b
Use EntityList instead of `rstl::resverved_vector<TUniqueId, 1024>' directly 2021-06-06 17:07:45 -07:00
Phillip Stephens 5f1aed51cb
De-hardcode max entity count 2021-06-06 16:53:41 -07:00
Phillip Stephens 95f44be694
Rename CSavwWorld to CWorldSaveGameInfo 2021-06-04 22:30:23 -07:00
Luke Street 0841bd4ab2 Initial work on entity introspection 2021-05-29 18:45:07 -04:00
Phillip Stephens 9bae2f943e
Rename everything 2021-04-10 01:42:06 -07:00
Luke Street 76de1541f2 Runtime: Resolve -Wrange-loop-analysis warnings (part 2) 2020-09-18 17:04:50 -04:00
Luke Street c001985a79 CPlayer: Remove duplicated function call 2020-07-07 04:36:18 -04:00
Luke Street 73d6465095 CPlayer: Fix logic in ChooseTransitionToAnimation 2020-06-07 14:12:51 -04:00
Lioncash ec79a9de89 CPlayer: Resolve unused variable warnings 2020-05-09 22:35:56 -04:00
Lioncash 5d209c8dc8 General: Mark a handful of deduced const variables as const explicitly
Same behavior, but makes it explicit to the reader that these are const.

Prevents cases where the reader might assume that just because the
variable isn't const qualified that it must be mutable, when it actually
isn't.
2020-05-08 18:41:29 -04:00
Luke Street 8488dca336 CPlayer: Long fall anim/dmg fix 2020-04-21 20:43:34 -04:00
Lioncash 554893ef85 RuntimeCommonB: Make use of bitfield initializers where applicable
Given that we now target C++20, we can make use of bitfield initializers
where applicable.
2020-04-20 15:57:25 -04:00
Lioncash 2c3e5e205f MkCastTo: Make operator bool instances explicit
Prevents error prone implicit conversions.
2020-04-18 23:02:11 -04:00
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
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 bb7e94f304 Runtime/World: Replace bitfield unions with constructor initializers 2020-04-11 01:50:10 -04:00
Lioncash bfd17e4513 CActor: Make Render() a non-const function
A few implementations of Render() contain const-casts nested within its
their call hierarchy to get around the fact that this function is marked
const. We can just make the member function non-const to allow removal
of these casts in follow up changes.
2020-04-09 14:32:20 -04:00
Lioncash cabbfcc320 CActor: Make AddToRenderer() non-const
This member function alters instance state in a few implementations, so
it shouldn't be made const.

The state manager parameter also shouldn't be const. Retrieved data
from the post constructed instance is further modified in some
implementations. This removes the constness on this parameter in order
to fix more const_cast usages in a follow-up change.
2020-04-06 00:52:10 -04:00
Lioncash 333fee56e3 CPlayer: Const correctness and bracing consistency changes
Minor surface-level changes to make it nicer to see that certain
variables don't get modified within some operations.

Given some functions are quite large, this is generally nice to see.
2020-04-02 07:39:00 -04:00
Lioncash e7e73e8658 CPlayer: Make use of std::make_unique for x76c_cameraBob
Same behavior, but more consistent with other usages of
std::make_unique.
2020-04-02 03:48:31 -04:00
Lioncash 67f6666ea1 Runtime: Add more usages of explicit
Prevents error-prone implicit conversions where applicable.

This targets the regular RuntimeCommon target this time around.
2020-03-31 03:53:49 -04:00
Lioncash ef93a601eb CPlayerState: Rename HealthInfo() to GetHealthInfo()
Allows const overloading to function and prevents compilation errors
from occurring if constness changes through future changes of any sort.
2020-03-24 06:20:37 -04:00
Lioncash 70c51c3a86 CPlayer: Un-nest code within FinishNewScan()
Makes this function much nicer to read.
2020-03-23 02:44:44 -04:00
Phillip Stephens ce5ce35743
Merge pull request #210 from lioncash/bob
CPlayerCameraBob: Minor cleanup
2020-03-12 15:10:19 -07:00
Phillip Stephens 190c369aeb
Fix crashes with FusionSuit active 2020-03-11 06:48:30 -07:00
Lioncash 179d19412b CPlayerCameraBob: Make static non-const member variables private
Prevents accidental modification of the values from occurring in code
that makes use of them. Many of these constants aren't even used outside
of the class itself in the first place.
2020-03-09 20:55:12 -04:00
Lioncash 830e1c59d2 CPlayer: Make nearby variables const
Makes nearby variables from the previous change const to make their
immutability explicit.
2020-03-06 22:08:56 -05:00
Lioncash a2b6b4515d CPlayer: Make use of unused CCollidableAABox in ProcessInput()
GM8E v0 makes use of the temporary collidable AA box. This amends the
code to make use of it.
2020-03-06 22:06:44 -05:00
Phillip Stephens 2f9dd38bbe
Silence discard errors 2020-03-04 18:40:03 -08:00
Phillip Stephens 9f5f0abab4
More CThardus imps, add reference CTevPass imps 2020-02-29 17:11:41 -08:00
Lioncash 79c409c5e0 CPlayer: Add missing return within UpdateOrbitModeTimer()
Previously, any call to this function would always reset the timer to
0.0, rather than potentially decrement it.

GM8E v0 always returns within the conditional.
2020-02-25 02:17:22 -05:00
Lioncash 495ff19aad CDamageInfo: Make certain constructors constexpr
Allows eliminating potential runtime static constructors by allowing
file-scope instances to be declared constexpr.
2020-01-31 02:06:14 -05:00
Phillip Stephens 968c3394c6
Merge pull request #135 from lioncash/dash-elements
CPlayer: Add missing element to skDashStrafeDistances
2020-01-30 20:12:00 -08:00
Lioncash 29ca2b6062 CPlayer: Add missing element to skDashStrafeDistances
This was previously missing the initial element within the array,
causing all the elements in the table to be shifted to the left by one.
This corrects that.
2020-01-29 03:51:50 -05:00
Lioncash 264c897bb5 CPlayer: Fix function call mismatch within SidewaysDashAllowed()
This function actually calls GetPressInput() here, not
GetDigitalInput().
2020-01-29 03:18:36 -05:00
Phillip Stephens 697a100bca
Implement CScriptSpecialFunction::ThinkAreaDamage, and more CThardus 2019-11-24 07:32:45 -08: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 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