Commit Graph

3716 Commits

Author SHA1 Message Date
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
Lioncash 89e2e65100 CCameraManager: Eliminate variable shadowing
We can get rid of shadowing in an inner scope.
2020-04-10 13:43:55 -04:00
Lioncash 8e263ff11b CMapWorldInfo: Name all function prototype parameters
Same thing but is more consistent and allows IDEs to do better parameter
introspection.
2020-04-10 13:25:47 -04:00
Lioncash f74c2d446f CEnvFxManager: Remove mutable keywords where applicable
We can just make the relevant functions non-const to remove the use of
mutable here.
2020-04-10 13:22:22 -04:00
Phillip Stephens e13aa34509
Merge branch 'master' of ssh+git://git.axiodl.com:6431/AxioDL/urde 2020-04-09 23:26:44 -07:00
Phillip Stephens 5f2ce02b05
Fix extracting RS5FE.pak 2020-04-09 23:26:27 -07:00
Lioncash 1e6b6622fe CGuiFrame: Remove unnecessary mutable specifiers
We can just drop the const qualifier on ProcessMouseInput() to make the
mutable specifier unnecessary.
2020-04-10 02:17:50 -04:00
Phillip Stephens 0085f0b16f
Merge branch 'mp2-fixes' 2020-04-09 20:27:22 -07:00
Jack Andersen 9a87a24439 Remove redundant condition from MP2's GetNoShare 2020-04-09 17:21:05 -10:00
Jack Andersen ad411a940b Merge branch 'mp2-fixes' of ssh://git.axiodl.com:6431/AxioDL/urde into mp2-fixes 2020-04-09 17:20:48 -10:00
Jack Andersen 380cc13abb Fixes for MP3 2020-04-09 17:20:20 -10:00
Luke Street 859d5e9068 DNAMP2: Mark FrontEnd as non-shared 2020-04-09 22:46:09 -04:00
Lioncash e0a4dc37a4 CPathFindSearch: Remove use of mutable on m_viz
We can just drop the const qualifier on DebugDraw() to get rid of the
need to specify this.
2020-04-09 21:50:01 -04:00
Lioncash 549f58d835 CScriptDamageableTrigger: Remove mutable specifier on x254_fluidPlane
This is no longer necessary now that Render() is non-const.
2020-04-09 21:46:57 -04:00
Lioncash 124356b4e7 CSimpleShadow: Remove mutable specifier on m_filter
This is no longer necessary now that we can remove the const qualifier
on Render().
2020-04-09 21:44:49 -04:00
Lioncash cd0a3780c0 CRainSplashGenerator: Remove mutable specifier from m_renderer
We can just drop the const specifiers on relevant member functions to
get rid of the need for this.
2020-04-09 21:40:48 -04:00
Lioncash 2fadaf544d CCompoundTargetReticle: Remove mutable specifier on x28_noDrawTicks
This is no longer needed at all.
2020-04-09 21:35:16 -04:00
Lioncash b72d217a68 CCompoundTargetingReticle: Remove mutable specifier on m_scanRetRenderer
This can be trivially resolved by dropping const qualifiers on the
necessary member functions.
2020-04-09 21:31:22 -04:00
Lioncash 35ca901784 CHudRadarInterface: Remove mutable specifiers from class members
We can just drop the const qualifiers on the relevant member functions
to make these unnecessary.
2020-04-09 21:23:50 -04:00
Lioncash 27813e5fc3 CThardus: Remove mutable specifier from m_flareFilter
Now that Render() is non-const, this specifier is no longer necessary.
2020-04-09 21:19:56 -04:00
Lioncash 1bacb69fc2 CPlasmaProjectile: Remove mutable specifier from m_renderObjs
Now that Render() is non-const, this is no longer necessary.
2020-04-09 21:17:20 -04:00
Lioncash 061b7f9a98 CCollisionActorManager: Remove usage of const_cast
We can just make Destroy() a non-const member function to eliminate the
need for this cast.
2020-04-09 20:33:49 -04:00
Lioncash e22ecf644d SpecMP1: Remove usage of const_cast
The preceding commit marked this mutex as mutable, so we can remove the
const_cast usage here.
2020-04-09 20:28:48 -04:00
Lioncash cf054f35a3 SpecBase: Remove usages of const_cast
It's generally the case that mutexes are marked as mutable whenever they
need to be used within a const class context, given they don't directly
participate as a bitwise member of the class, but only transiently exist
so that synchronization operations can occur.

Given that, marking the member as mutable in this case makes sense.
2020-04-09 20:26:31 -04:00
Lioncash b89069e1b8 CBooRenderer: Remove usages of const_cast
We can just remove the const qualifier on model here.
2020-04-09 20:22:50 -04:00
Lioncash 57d9e0f294 CFlaahgra: Remove two usages of const_cast
These are no longer necessary.
2020-04-09 20:21:04 -04:00
Lioncash 4834720bb0 CGrappleArm: Remove usage of const_cast in RenderXRayModel()
This is no longer necessary.
2020-04-09 20:18:45 -04:00
Lioncash 0c1b47faf8 CProjectileWeapon: Remove usages of const_cast
Now that the base Render() function was made non-const, it's trivial to
apply this to the other classes like CProjectileWeapon.
2020-04-09 20:09:14 -04:00
Lioncash a2f7527388 CScriptPlayerActor: Remove two usages of const_cast
While we're at it, we can also simplify the implementation of
GetPostConstructed().
2020-04-09 20:05:53 -04:00
Lioncash c796cf5315 CScriptSpecialFunction: Remove unnecessary const_cast in AcceptScriptMsg()
This const_cast isn't required at all any more.
2020-04-09 19:55:31 -04:00
Jack Andersen e858c929e3 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde into mp2-fixes 2020-04-09 13:04:37 -10:00
Luke Street d131d72efa
Merge pull request #302 from lioncash/render2
CActor: Make Render() a non-const function
2020-04-09 18:55:51 -04:00
Lioncash b8afcb42a3 CFlaahgraTentacle: Make use of TCastToConstPtr where applicable
Same behavior, but makes the read-only semantics explicit.
2020-04-09 17:43:15 -04:00
Lioncash ef70d894f5 CFlaahgraTentacle: Make private static data completely internally linked
Given these aren't referenced anywhere else, we can make them fully
internally linked. We can also make the joint list fully constexpr.
2020-04-09 17:38:06 -04:00
Lioncash 0e4bd8bf13 MP1: Make use of nullptr where applicable
Same behavior, more indicative of what is being passed.
2020-04-09 17:18:38 -04:00
Lioncash aabc0b7114 CStateManager: Mark material filters and lists as constexpr in TestRayDamage()
Allows potential runtime initializers to be elided.
2020-04-09 14:52:52 -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
Luke Street 7774bc06ca
Merge pull request #297 from lioncash/render
CActor: Make AddToRenderer() non-const
2020-04-09 10:55:16 -04:00
Luke Street 52867f9bf8
Merge pull request #300 from lioncash/compiler
CMakeLists: Specify /std:c++latest on MSVC
2020-04-09 10:47:02 -04:00
Luke Street 74bce8458b
Merge pull request #299 from lioncash/const2
CGunWeapon: Eliminate usages of const_cast
2020-04-09 10:46:52 -04:00
Luke Street 529fced48a
Merge pull request #298 from lioncash/filter
CCameraFilter: Make Draw() non-const
2020-04-09 10:46:37 -04:00
Jack Andersen a668a623cb Exclude bitmap3 from MP3's PATH 2020-04-08 20:03:52 -10:00
Jack Andersen e4ade45fd1 Remove unnecessary includes 2020-04-08 19:50:29 -10:00
Jack Andersen 73f245ee27 Specialize PATH by PAKBridge 2020-04-08 19:46:40 -10:00
Jack Andersen df229671c4 MP2 PATH support 2020-04-08 19:19:50 -10:00
Jack Andersen 5b0a4b5f60 Implement MP2 shader extraction presets 2020-04-08 16:24:18 -10:00
Lioncash ad1f56bfda CPowerBeam: Make use of std::array where applicable
Same behavior, stronger typing.

We can also narrow the scope of the array.
2020-04-07 13:57:06 -04:00
Lioncash 5405dad069 CWeaponMgr: Make use of size_t in IncrCount()
Keeps this function consistent with the previous change.
2020-04-07 13:40:14 -04:00
Lioncash 8ba2af9b5a CWeaponMgr: Avoid unnecessary repeated std::map lookups
Avoids trivial redundant std::map indexes by doing the lookup once and
then referring to the looked up object instead of doing repeated
lookups.
2020-04-07 13:38:36 -04:00
Lioncash db0091e9cd CWordBreakTables: Make use of std::array where applicable
Same behavior, but allows directly querying iterators. We can also make
these arrays constexpr.
2020-04-07 13:24:23 -04:00