Commit Graph

530 Commits

Author SHA1 Message Date
Lioncash 3a0daa3ab9 CLogBookScreen: Use forward declarations where applicable
Allows for avoiding the over exposing of types through the header when
included in other translation units or headers.
2019-10-15 10:25:43 -04:00
Lioncash 5b8f3f6693 CLogBookScreen: Organize cpp includes
Tidies them up to be consistent with its header.
2019-10-15 10:13:30 -04:00
Lioncash 4db0e49851 CLogBookScreen: Invert conditional within UpdateBodyText()
Allows unindenting the contained code by one level.
2019-10-15 10:05:53 -04:00
Lioncash b93f7a4ceb CLogBookScreen: Use std::u16string's append() member instead of operator+
Appends to the existing buffer instead of constructing a superfluous
temporary.
2019-10-15 10:03:54 -04:00
Lioncash d64824d3e5 CLogBookScreen: Make use of std::any_of within IsScanCategoryReady()
Same thing but collapses into a single return.
2019-10-15 10:00:15 -04:00
Lioncash 251a2a7723 CLogBookScreen: Make use of structured bindings where applicable
Allows decomposing long pair names into their constituent elements
2019-10-15 09:57:24 -04:00
Lioncash f21ee0786a CLogBookScreen: Make signed/unsigned/FP conversions explicit
Silences warnings relating to signed/unsigned comparisons and
conversions to floating-point types.
2019-10-15 09:36:10 -04:00
Lioncash 3951a07bfa CLogBookScreen: Dehardcode constants where applicable
We can just query the containers for the iteration value
2019-10-15 09:16:13 -04:00
Lioncash 4b78d51a85 CLogBookScreen: Use emplace_back where applicable
Allows simplifying code and constructing elements in place instead of
copying them (which is what would occur with the defautl move
constructor).
2019-10-15 07:22:01 -04:00
Phillip Stephens 5f0f3ea45c
More tweak CVars 2019-10-05 07:07:13 -07:00
Lioncash 67cd0d44c6 CAtomicBeta: Make skBombLocators an internal array
Like with CAtomicAlpha, we can also fully hide this array from external
view by making it internally linked.
2019-10-03 01:34:45 -04:00
Lioncash abe8b9510b CAtomicBeta: Organize cpp includes 2019-10-03 01:30:04 -04:00
Lioncash e0e38b569e CAtomicAlpha: Remove .data() call in SBomb constructor
We can just use the std::string_view constructor for std::string, which
eliminates an unnecessary strlen call.
2019-10-03 01:26:50 -04:00
Lioncash 18eb2b73b1 CAtomicAlpha: Use emplace_back where applicable
Simplifies the construction of the SBomb instances, while also
constructing in place.
2019-10-03 01:26:50 -04:00
Lioncash c882003d37 CAtomicAlpha: Make skBombLocators an internal array
This is only used within the cpp file, so we can relocate its definition
there to make it fully internally-linked.
2019-10-03 01:26:50 -04:00
Lioncash ee791d6a37 CAtomicAlpha: Organize cpp includes 2019-10-03 01:26:42 -04:00
Phillip Stephens 7d2ad7b1b2
Merge pull request #93 from lioncash/loop
CSlideShow: Use ranged for loops in constructor
2019-10-01 06:43:56 -07:00
Phillip Stephens d2e9495686
Merge pull request #96 from lioncash/array2
CFinalInput, ControlMapper: Use std::array where applicable
2019-10-01 06:43:23 -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 dc565969e6 CFinalInput: Use std::array where applicable
Allows simplifying copies and gets rid of hardcoded size values.
2019-10-01 01:59:56 -04:00
Lioncash 2eb5e7c446 CSlideShow: Use emplace_back where applicable
Same behavior, but constructs in place instead of potentially copying.
2019-09-30 18:07:34 -04:00
Lioncash b7e0dbd354 CSlideShow: Use ranged for loops in constructor
Same behavior, but without hard-coded magic size values.
2019-09-30 18:06:33 -04:00
Lioncash 6ad5de497f CSeedling: Make skNeedleLocators an array of std::string_view
Makes the strings non-allocating. This also eliminates 12 runtime static
constructors that need to execute on program start.
2019-09-28 20:22:31 -04:00
Lioncash 3f743d5c9f CSeedling: Use std::array with skNeedleLocators
Makes the array strongly-typed and impervious to implicit array to
pointer decay.
2019-09-28 20:21:24 -04:00
Lioncash 2a34b6be68 CSeedling: Move skNeedleLocators into the cpp file
This can be entirely hidden from external view, making it an
implementation detail.
2019-09-28 20:15:39 -04:00
Lioncash 08d4addc70 CSeedling: Organize source file includes
Tidies it up a little.
2019-09-28 20:08:45 -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 027c10464f CMemoryCardDriver: Correct erroneous fallthrough within HandleCardError()
In the game executable itself, there exists no fallthrough here (which
makes sense, given all IO errors would be reported as character set
errors, otherwise).
2019-09-24 16:36:43 -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 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 86218421f5 CFrontEndUI: Use std::array where applicable
Makes the array types strongly-typed and also allows us to eliminate a
few magic values within the code.
2019-09-14 16:26:29 -04:00
Lioncash b6ea391755 CFrontEndUI: Enclose file-local data within an anonymous namespace
Gets rid of the need to write static, and also makes it impossible to
violate the ODR for any declared types within the namespace (e.g.
FEMovie).
2019-09-14 15:45:17 -04:00
Lioncash 2a10e547d2 CFrontEndUI: Sort includes
Tidies up the includes for the translation unit and alphabetizes them
for easier reading.
2019-09-14 15:42:12 -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 9983366a53 RumbleFxTable: Use std::array for the lookup table
Strongly enforces the type of the array and also allows size querying,
etc, directly from the type.
2019-09-10 19:13:34 -04:00
Lioncash d25f4fa9a3 MP1/CFlaahgraTentacle: Amend sphere collision list appending
This was always using the first element in the array to append t the
output joint list, resulting in incorrect names and radius values.
2019-09-06 09:43:32 -04:00
Lioncash 5aafd3935b CGBASupport: Amend code to compile with jbus changes 2019-09-04 01:56:08 -04:00
Phillip Stephens 256994c199
Initial CEnergyBall, update submodules, various fixes 2019-08-31 02:02:21 -07:00
Phillip Stephens 9866bac443 Update jbus, initial CEnergyBall stub 2019-08-23 01:32:48 -07:00
Phillip Stephens e855cbd902 Update hecl, fix CFlickerBat's targetable state being inverted 2019-08-20 06:58:13 -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
Phillip Stephens 2ace76e3d2
Merge pull request #41 from lioncash/const
RuntimeCommon: Use const on member functions where applicable
2019-08-14 06:36:27 -07:00
Phillip Stephens 64489c7461
Merge pull request #39 from lioncash/bind
MP1: Migrate from std::bind to lambdas
2019-08-14 06:36:06 -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 8b7945e76f MP1: Migrate from std::bind to lambdas
Provides a more straightforward means of supplying custom behavior in
place. Lambdas also typically optimize better compared to std::bind
objects.
2019-08-14 04:55:21 -04:00
Lioncash acb9ac92e7 Runtime/CGameOptions: Use std::array where applicable
Makes the data a little more strongly typed; preventing implicit
array->pointer decay. It also allows simplifying assignments within the
CGameState code.

While we're at it, we can also eliminate several instances of magic
numbers related to the array sizes throughout the code.
2019-08-14 03:24:00 -04:00
Phillip Stephens 7eb3bce499 Update submodules, more CMetroidBeta imps 2019-08-13 14:41:15 -07:00
Phillip Stephens ebdcfb6b51 Initial CMetroidBeta imps 2019-08-11 08:14:52 -07:00
Phillip Stephens a572100176 Add CRipper files 2019-08-10 20:02:54 -07:00