Commit Graph

666 Commits

Author SHA1 Message Date
Phillip Stephens ad272f7468
More refactoring, decouple tweaks from hecl 2022-02-21 08:01:05 -08:00
Phillip Stephens dad7249927
RE COutput/InputStream and friends and migrate over
This branch is probably still horribly broken, but it's a good first step to migrating away from having hecl embedded in the runtime
2022-02-21 08:01:05 -08:00
Luke Street c64f9eb2d1 aurora: Reimplement textures 2022-02-17 19:38:31 -05:00
Luke Street 7b9f893a49 aurora: the boring C++ version 2022-02-16 00:21:24 -05:00
Phillip Stephens acd861754c
TexturedQuad fixes, Better controller input handling (needs custom mapping) 2022-02-08 11:18:12 -08:00
Luke Street b871cc965a memmove -> memcpy 2022-02-08 01:59:09 -05:00
Luke Street 921d6bf10a Working movie player 2022-02-08 01:54:05 -05:00
Luke Street a1482b4743 SDL controller input 2022-02-07 20:48:08 -05:00
Phillip Stephens c53ee12578
Add ability to check if DXT1/BC1 is supported, create a fake texture for the time being for hardware that doesn't support it 2022-02-06 05:13:19 -08:00
Phillip Stephens 06a1c6e8ac
Minor fixes, get PRESS START rendering 2022-02-05 07:22:30 -08:00
Phillip Stephens 8d01afc632
Finish CModel constructors 2022-02-04 00:10:09 -08:00
Phillip Stephens dca8af4d96
Fix division on packed normals 2022-02-03 07:26:33 -08:00
Phillip Stephens 9461fe0563
More CModel RE, removed the separated normal types hack 2022-02-03 07:24:41 -08:00
Phillip Stephens aca91b9361
More CModel re-reverse engineering 2022-02-01 23:18:03 -08:00
Phillip Stephens 05f841a5ce
More CModel RE 2022-02-01 01:18:42 -08:00
Phillip Stephens 3ba2c4bfff
Minor fixes, more CModel RE 2022-02-01 00:14:49 -08:00
Luke Street e48435f11e Start wiring up wgpu+winit 2022-01-31 19:06:54 -05:00
Luke Street a2cc6cd204 Merge remote-tracking branch 'darkszero/feature/lazy-commit-resources'
# Conflicts:
#	extern/boo
2021-10-25 23:07:56 -04:00
Luke Street 32e115f4aa Merge remote-tracking branch 'origin/main' into utf8
# Conflicts:
#	DataSpec/DNAMP1/FRME.cpp
#	DataSpec/DNAMP1/MLVL.cpp
#	Runtime/CMain.cpp
#	hecl/lib/Blender/Connection.cpp
2021-10-25 19:03:01 -04:00
Phillip Stephens 3bb05c0ee5
Always initialize all pipelines in CElementGenShaders, this prevents an edge case in Quarantine Access B 2021-08-06 20:19:29 -07:00
Henrique Gemignani Passos Lima d2ae2b3818 Support lazy CGraphics::CommitResources 2021-07-04 02:53:04 +03:00
Luke Street 9ca1a38171 Use UTF-8 exclusively internally
This removes SystemString, SystemChar, etc.
All filepaths and log strings are assumed to be UTF-8,
with conversions to UTF-16 for Windows APIs as appropriate.

Updates amuse, athena, boo, kabufua and nod
2021-06-30 14:20:45 -04: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
Luke Street 94f10bb002 Remove Editor & specter 2021-05-29 18:45:07 -04:00
Phillip Stephens 847211f81f Remove unnecessary switch from CLight constructor 2021-05-06 10:52:35 -07:00
Phillip Stephens 5e0604f101 Correct Light radius calculation 2021-05-06 10:51:54 -07:00
Phillip Stephens f795332d89
Merge pull request #388 from henriquegemignani/feature/optick
Using optick, linked from boo
2021-04-18 17:31:29 -07:00
Luke Street fb9ea9092a Merge branch 'massive-rename' 2021-04-10 09:38:42 -04:00
Henrique Gemignani Passos Lima d6f19d26e7 Using optick, linked from boo 2021-04-10 09:21:34 -04:00
Henrique Gemignani Passos Lima e3896bdee9 Combine CommitResources for CBooRenderer::UpdateAreaUniforms.
This shares the IGraphicsDataFactory::Context over many functions, to avoid
the overhead of calling CGraphics::CommitResources multiple times.
2021-04-10 09:18:45 -04:00
Phillip Stephens 9bae2f943e
Rename everything 2021-04-10 01:42:06 -07:00
SirMangler 7fb4c45046 FPS Counter and debug overlay CVAR 2021-01-10 16:10:55 +00:00
Luke Street 168eb6ac39 CModelShaders: Split Thermal into ThermalModel, ThermalStatic extended shaders
This semi-hacky approach will be replaced with future hsh work
2020-12-18 06:08:25 -05:00
Luke Street 9e5f28ba80 CModelShaders: Check noZWrite for thermal depth test
Adds back LightingAlphaWrite extended shader
2020-09-27 12:59:56 -04:00
Luke Street 6ff305da06 CModelShaders: Disable Z-test for LightingAlphaWrite
Permits static thermal hot objects to render properly
2020-09-27 12:23:54 -04:00
Luke Street 2361916614 CBooRenderer: Don't smash the stack 2020-09-16 13:07:53 -04:00
Luke Street bc8135e896 CBooRenderer: Fix light count in ActivateLightsForModel 2020-09-16 13:01:06 -04:00
Lioncash a32e21df14 General: Resolve -Wcast-qual warnings
We can just avoid casting away const in order to resolve these warnings.
2020-08-23 15:54:54 -04:00
Lioncash c9f5483c59 CLineRendererShaders: Make use of static inline variables
Same behavior, less code.
2020-08-02 03:02:08 -04:00
Lioncash 83c2023bbb CElementGenShaders: Make use of static inline variables
Same behavior, less code
2020-08-02 02:57:02 -04:00
Lioncash 4e1ff26f56 CDecalShaders: Make use of static inline variables
Same behavior, less code.
2020-08-02 02:53:15 -04:00
Lioncash 25c017e0cc CModelBoo: Make use of static inline variables
Same behavior, but allows all the initializers to be in one place,
rather than throughout the cpp file.
2020-08-01 23:33:50 -04:00
Lioncash 391e97fbd1 CBooRenderer: Eliminate mixed signedness bitwise ANDing
Prevents sign mismatch warnings.
2020-08-01 04:42:06 -04:00
Luke Street d44eccc386 Runtime: constexpr fixes for gcc 2020-05-27 13:02:20 -04:00
Luke Street c1f7358d96 CWideScreenFilter: Implement DrawFilter 2020-05-14 19:23:43 -04:00
Lioncash f2d0939a15 CParticleSwooshShaders: Remove unused file-scope variable
Same behavior, one less runtime static constructor.
2020-05-12 20:50:35 -04:00
Lioncash 4e718a805f CFluidPlaneShader: Replace explicit operator bool calls with the analogous named function
Same behavior, more informative to the reader about what is being
checked for.
2020-05-12 20:45:32 -04:00
Lioncash 4b5074b298 RuntimeCommon: Const qualify auto references where source is const
Marks references that would be deduced as const automatically with const
to be explicit to the reader.
2020-05-12 20:32:51 -04:00
Lioncash 8e77d6175c CTextureBoo: Make use of std::array where applicable
Allows dehardcoding some array sizes.
2020-05-12 20:23:27 -04:00
Lioncash e0a44bdf45 CTextureBoo: Prevent signed conversion warnings from occurring in Convert* helper functions 2020-05-12 20:03:58 -04:00
Lioncash fee8d91dca CTextureBoo: Make use of anonymous namespace
Makes some helper functions have internal linkage, silencing some
-Wmissing-declarations warnings, and also allows preventing ODR
violations from ever occurring with the RGBA8 and DXT1Block structs.
2020-05-12 20:01:58 -04:00
Lioncash df3aed75fe CGameArea: Eliminate implicit sign conversions in Validate() 2020-04-23 02:53:24 -04:00
Lioncash fe642bde8b CCameraBlurFilter: Make use of std::array where applicable
Same behavior, less hardcoded sizes.
2020-04-22 00:13:43 -04:00
Lioncash fa3e639a9d RuntimeCommon: Make use of bitfield initializers where applicable
Continues and finishes the migration towards initializing all bitfield
members where applicable
2020-04-21 17:16:19 -04:00
Luke Street 32c44cbf05 Merge branch 'master' into omegapirate
# Conflicts:
#	Runtime/GuiSys/CAuiImagePane.cpp
2020-04-19 22:12:18 -04:00
Luke Street 24acb585f8 MSVC & zeus fixes; update hecl-gui 2020-04-19 21:09:30 -04:00
Luke Street 4e88f503ac COmegaPirate: Implement CFlash 2020-04-19 02:47:25 -04:00
Phillip Stephens df75c00203
Fix WideScreenFilter crash 2020-04-17 15:32:26 -07:00
Phillip Stephens 6838515d3d
Fix ALPH default value 2020-04-13 00:48:00 -07:00
Lioncash aee2259972 CTexturedQuadFilter: Mark DefaultRect as constexpr
Same behavior, minus runtime initializers.
2020-04-12 10:40:36 -04:00
Lioncash 3efc8486a4 CColoredQuadFilter: Mark DefaultRect as constexpr
Same behavior, minus runtime initializers.
2020-04-12 10:39:02 -04:00
Lioncash e0c187c607 CModelBoo: Make use of std::array where applicable
Allows decoding some array sizes.
2020-04-12 10:35:56 -04:00
Lioncash c203a0de7c CGraphics: Mark skCubeBasisMats as constexpr
Same behavior, minus potential runtime initializers.
2020-04-12 10:31:07 -04:00
Luke Street 56cebfbacd
Merge pull request #308 from AxioDL/fmtlib-update
Update fmtlib
2020-04-12 03:06:46 -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
Jack Andersen 5b4441ac36 Update fmtlib 2020-04-11 12:51:39 -10:00
Luke Street 7055b6983f
Merge pull request #306 from lioncash/random
CRandom16: Make constructor explicit
2020-04-11 16:36:51 -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 232823ae69 Runtime/Graphics: Replace bitfield unions with constructor initializers 2020-04-10 15:03:31 -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 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 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 fe32cea8fc CRainSplashGenerator: Always initialize x24_generateInterval
Provides a deterministic consistent initial state.
2020-04-07 13:02:02 -04:00
Lioncash 1279be5e56 CGraphics: Mark internal file-scope matrices as constexpr
Same behavior, but allows omission of runtime initializers.
2020-04-05 05:48:54 -04:00
Lioncash 95199848d3 CGraphics: Make use of std::array where applicable 2020-04-05 05:46:07 -04:00
Lioncash da75543c76 CRainSplashGenerator: Dehardcode line vector size in constructor
We can query the capacity instead.
2020-04-01 00:27:56 -04:00
Lioncash 254a96313a CSkinnedModel: Convert typedef into using alias
Same behavior, nicer to read.
2020-04-01 00:06:52 -04:00
Lioncash 1415265ef2 Runtime: Default destructors where applicable
Same behavior, but allows the destructors to be trivial, etc.
2020-03-31 04:50:26 -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 6ae935924b IRenderer/CBooRenderer: Add parameter names to function prototypes
Makes the interface more self-documenting and allows IDEs to perform
better parameter introspection
2020-03-30 00:34:38 -04:00
Lioncash 111f0c3d3a IRenderer: Convert typedef to using alias
Same behavior, but nicer to read.
2020-03-30 00:18:38 -04:00
Lioncash 51afa94e8c Add missing includes where applicable
Resolves a few required dependencies
2020-03-26 01:10:55 -04:00
Lioncash 40fc3f9dd8 CModelBoo: Remove usages of const_cast
Many functions are modifying internals of CBooModel and const-casting
is performed in order to work around functions being const when they
really shouldn't be.

This amends the function signatures in order to allow these functions to
exist without const_cast, making code much nicer to read.
2020-03-25 02:01:46 -04:00
Luke Street dcc7affb8f
Merge pull request #243 from lioncash/light
CLight: Minor cleanup
2020-03-18 01:03:04 -04:00
Luke Street 18ef68df2a
Merge pull request #239 from lioncash/line
CLineRenderer: Minor changes
2020-03-18 00:58:46 -04:00
Lioncash ec7bca8c20 CLight: Collapse std::max calls into one
We can use the overload that takes an initializer list to make it easier
to read.
2020-03-17 20:54:56 -04:00
Lioncash e821f736de CLight: Mark caching member variables as mutable
Member variables acting as caches is one of the areas where marking
variables as mutable makes sense.

We can do this to allow for the elimination of const_cast in some member
functions.
2020-03-17 20:47:12 -04:00
Lioncash 9483b64c91 CLight: Mark kDefaultPosition and kDefaultDirection as constexpr
Same behavior, but allows runtime constructors to be elided.
2020-03-17 20:44:22 -04:00
Lioncash 17a1f90a89 CLight: Prevent implicit double->float truncations
We can just mark these literals as floats to keep the arithmetic
operating on floats instead of doubles.
2020-03-17 20:42:39 -04:00
Lioncash 1dd1542106 CLight: Remove unnecessary initializer list initializers
These are already initialized within the class definition, so they don't
need to be respecified here.
2020-03-17 20:39:29 -04:00
Lioncash e5e4a6482c CLineRenderer: Make use of std::array where applicable
Same behavior, but without the potential for unintentional array to
pointer decay.
2020-03-17 19:07:27 -04:00
Lioncash 858162e0c1 CLineRenderer: Remove unnecessary casts to bool
These constructs function identically without the need for casting.
2020-03-17 19:04:01 -04:00
Lioncash b1e5bf72b6 CFogVolumeFilter: Make use of std::array where applicable
Makes data strongly typed and also allows for the removal of some
hardcoded array sizes.
2020-03-17 18:52:47 -04:00
Lioncash bb075d51ed CPhazonSuitFilter: Convert define into local variable
Same behavior, but with a more localized scope.
2020-03-16 15:57:21 -04:00
Phillip Stephens 6567ae8d42
Merge pull request #218 from lioncash/emplace
Runtime: Collapse emplace_back() calls where applicable
2020-03-13 15:30:43 -07:00
Lioncash 097d4a4422 Runtime: Collapse emplace_back() calls where applicable
Same behavior, but with less code.
2020-03-13 17:14:44 -04:00
Lioncash c37b3df27b CLineRenderer: Silence -Wmaybe-uninitialized warning
We can just initialize maxTriVerts to zero to prevent warnings from
occurring.
2020-03-12 19:15:51 -04:00
Lioncash 9db07b037a CElementGen: Make use of std::array where applicable 2020-03-09 12:53:28 -04:00
Lioncash 8d42eb4287 CPVSVisOctree: Initialize in-class member variables where applicable
Provides a deterministic initial state for the default constructor.
2020-03-07 05:01:29 -05:00
Lioncash 4034e3b31f CPVSVisOctree: Make use of std::array where applicable
Makes the arrays strongly typed.
2020-03-07 04:50:19 -05:00
Lioncash 969bcdba35 CPVSVisOctree: Use static qualifying name for ReadBoundingBoxBig()
It looks very odd using the name of the object being initialized to call
through to a static member function. We can disambiguate this by making
use of the qualifying name directly.
2020-03-07 04:46:19 -05:00
Phillip Stephens 4daa8ac374
CModelBoo: Fix missing cast 2020-03-06 16:27:33 -08:00
Phillip Stephens 24baafb996
Merge pull request #190 from lioncash/render
CBooRenderer: Minor cleanup
2020-03-06 16:14:47 -08:00
Phillip Stephens ae25392d19
Merge pull request #189 from lioncash/model
CModelBoo: Make static data constexpr where applicable
2020-03-06 16:14:05 -08:00
Lioncash b1426867bf CBooRenderer: Make use of std::array where applicable
Makes the data strongly typed and allows eliminating some hardcoded
sizes.
2020-03-06 02:25:40 -05:00
Lioncash 4f7f5cf09a CBooRenderer: Make Buckets class mostly internal
This is only ever functionally used within this translation unit, so we
can hide the class internally.
2020-03-06 01:16:02 -05:00
Lioncash 3c4e25062d CModelBoo: Make static data constexpr where applicable
Gets rid of potential runtime-initializers.
2020-03-06 00:46:30 -05:00
Lioncash d9664d165f CModelShaders: Make EExtendedShader an enum class
Prevents pollution of the urde namespace with general names like Flat,
etc.
2020-03-06 00:16:31 -05:00
Phillip Stephens 9f5f0abab4
More CThardus imps, add reference CTevPass imps 2020-02-29 17:11:41 -08:00
Luke S 1d9224f55c
Merge pull request #156 from lioncash/moving
CSkinnedModel: std::move constructor arguments where applicable
2020-02-24 03:00:59 -05:00
Lioncash 6c6df4d4ee CSkinnedModel: std::move constructor arguments where applicable
Fairly straightforward change. We can move the elements here to make use
of the move constructor over the copy constructor.
2020-02-24 02:36:44 -05:00
Lioncash 35ae2c2981 CGraphics: Silence missing initializer warning
Makes the initializer field for the aspect member explicit along with
the rest of the supplied values.
2020-02-24 02:28:27 -05:00
Lioncash 1aa24bd287 CRainSplashGenerator: Amend lower bound constant for speed in SSplashLine::Update()
Game code actually uses a constant of 4.0f as the lower bound for speed, not
0.015625f.
2020-01-30 22:20:49 -05:00
Lioncash 1cb289f243 RuntimeCommon: Normalize cpp inclusions
Normalizes the headers for the cpp files in the RuntimeCommon target.
Now all headers and source files within the RuntimeCommon/RuntimeCommonB
targets are normalized and consistent with one another.
2020-01-15 09:15:47 -05:00
Phillip Stephens 70747e23d5
Fix font rendering and world teleporter in MPT and PAL 2019-12-11 10:55:19 -08:00
Phillip Stephens b507799478
Add texture info lookup 2019-12-11 00:37:30 -08:00
Phillip Stephens 1a13f7e4ee
Update submodules, initial CTextureCache 2019-12-10 20:51:33 -08:00
Phillip Stephens 697a100bca
Implement CScriptSpecialFunction::ThinkAreaDamage, and more CThardus 2019-11-24 07:32:45 -08:00
Phillip Stephens 8b6dff70b4
Properly cleanup Xorg in visigen, various fixes and cleanups in URDE, more CRidley imps 2019-11-19 15:06:25 -08:00
Phillip Stephens 3b101267f8
Merge pull request #88 from lioncash/radar
Graphics/Shaders: Minor changes
2019-11-10 08:03:42 -08:00
Lioncash 136a229a1a Graphics/Shaders: Use std::array where applicable
Makes the arrays strongly typed and impervious to array->pointer decay.
This also allows simplifying some operations (such as being able to call
fill() instead of needing to use std::fill, etc).
2019-11-09 20:22:16 -05:00
Lioncash 417506572c Graphics/Shaders/CCameraBlurFilter: Move Vert definition into cpp file
This is private and not used anywhere in the exposed interface, so this
can be moved into the cpp file to make it an implementation detail and
allow moving a zeus header into the cpp file.
2019-11-09 20:22:16 -05:00
Lioncash 902f4fb5c5 Graphics/Shaders: Use forward declarations where applicable
Now, with all of the headers normalized, we can safely convert some
headers into forward declarations without needing to worry about
potentially breaking code in other headers or source files.
2019-11-09 20:22:09 -05:00
Phillip Stephens 6c1f682e0f
Initial CRidley implementation 2019-11-09 15:48:46 -08:00
Lioncash 8f28786048 CModel: Implement CModelFlags' operator!= in terms of operator==
Same behavior, less code.
2019-10-26 14:58:38 -04:00
Lioncash a633b8e8fd General: Normalize RuntimeCommon include paths
Performs the same normalizing done to the RuntimeCommonB target, now all
of the runtime headers have normalized include paths.
2019-09-28 04:14:29 -04:00
Lioncash 178e0e2cbc CBooRenderer: Use emplace_back() where applicable
Given the appended types consist of trivial types, it's more efficient
in this context to construct the data in place over using push_back,
which will cause a redundant copy (move semantics on trivial types are a
copy).
2019-09-24 22:51:38 -04:00
Phillip Stephens a41bd828e7 Update submodules 2019-08-18 18:49:54 -07: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
Lioncash 9312eef905 RuntimeCommon: Use override where applicable
Continues the override modernization by applying it to the main
RuntimeCommon target. Resolves around 1100+ cases where override can be
used.
2019-08-09 17:39:42 -04:00
Phillip Stephens d648f156b8 Revert original dolphin hash idea completely 2019-08-03 17:05:40 -07:00
Phillip Stephens ff83dbc676 Minor fixes and cleanup 2019-08-03 17:02:53 -07:00
Jack Andersen 0ab08daae7 Windows build fixes 2019-07-27 15:21:31 -10:00
Jack Andersen 5acf9ecbcf Graphics debug groups and bug fixes 2019-07-20 22:42:52 -10:00
Jack Andersen 7a3da1f7a6 Massive fmtlib refactor 2019-07-19 18:27:21 -10:00
Jack Andersen 77af3f0ebd CPuddleToadGamma and animation system fixes 2019-06-20 20:02:56 -10:00
Jack Andersen 87023b432e Fixes in ANIM cooking 2019-06-15 16:22:23 -10:00
Jack Andersen e218b8aeb5 CActorContraption fixes, better CMake dependency handling 2019-06-11 16:05:17 -10:00
Jack Andersen b7aa3e06d2 Per-stage shader hashing 2019-06-05 14:07:50 -10:00
Jack Andersen 4a4cf58b6f HLSL cubemaps 2019-05-31 23:28:12 -10:00
Jack Andersen 410d7896f7 Support for rendering dynamic cubemaps 2019-05-31 17:41:01 -10:00
Jack Andersen 5f4ebcb2f5 Windows fixes 2019-05-09 18:09:01 -10:00
Jack Andersen 233d13ceb9 Refactor for blender 2.8 and new shader model 2019-05-07 17:50:21 -10:00
Jack Andersen a63a61fef8 Implement CWallCrawlerSwarm 2019-03-23 22:06:59 -10:00
Jack Andersen 99b1a8ef49 Lots of bug fixes 2019-03-12 17:46:20 -10:00
Jack Andersen 52b36795ac Proper handling for persistently resident resources 2019-03-09 23:37:36 -10:00