Commit Graph

57 Commits

Author SHA1 Message Date
Henrique Gemignani Passos Lima bad8b35ae6 Fix typo in CPlayerState::ReInitializePowerUp 2021-03-16 01:33:17 +02: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
Phillip Stephens 8e2636c14c
Undo debug code 2020-04-15 23:58:00 -07:00
Phillip Stephens c64e3d2ba7
Initial string fixes 2020-04-15 23:57:04 -07:00
Luke Street 346d110b79 Runtime: Replace bitfield unions with constructor initializers 2020-04-10 15:02:36 -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
Phillip Stephens dc6954491b
Merge pull request #260 from lioncash/array2
CPlayerState: Make g_typeNameMap a compile-time array
2020-03-23 23:27:19 -07:00
Lioncash 83c9af9153 CPlayerState: Make g_typeNameMap a compile-time array
While useful as a map, this causes an allocation that occurs during
program start and lasts until the program terminates, even if the
relevant code is never executed.

Given the total number of elements is quite small, we can convert this
into a compile-time array and perform the lookup with that instead.
While we're at it, we can eliminate an unnecessary second lookup into
said array by reusing the iterator from the first find.
2020-03-21 00:57:05 -04:00
Lioncash ff703b1189 CPlayerState: Remove undefined behavior within CPlayerState constructor
Type-punning via a union is currently undefined behavior according to
the C++ standard, so we can use std::memcpy instead to accomplish the
same thing.
2020-03-21 00:39:40 -04:00
Phillip Stephens 2e8eec91ea
Missed one 2019-09-21 06:10:54 -07:00
Lioncash f49c8e9d6c CPlayerState: Use std::array where applicable
Prevents implicit array->pointer decay and makes for a more convenient
data type.
2019-09-19 15:42:50 -04:00
Lioncash f4fd182741 CPlayerState: Move arrays into an anonymous namespace where applicable
Keeps local arrays together and makes it impossible to accidentally
violate the ODR.
2019-09-19 15:36:39 -04:00
Lioncash bc285913c8 CPlayerState: Organize includes 2019-09-19 15:27:20 -04:00
Jack Andersen 233d13ceb9 Refactor for blender 2.8 and new shader model 2019-05-07 17:50:21 -10:00
Jack Andersen 8df0a4913c zeus constexpr refactor and thermal visor fixes 2019-02-23 21:15:54 -10:00
Jack Andersen 48eaa2545b Working CScriptGunTurret 2019-02-17 19:47:46 -10:00
Phillip Stephens c1c22eb065 Fix IA4 encoding/decoding 2019-02-11 17:58:12 -08:00
Jack Andersen 636c82a568 New code style refactor 2018-12-07 19:30:43 -10:00
Phillip Stephens c0b8b89a9b Various CScriptSpecialFunction implementation, more debugOverlay CVars 2018-06-08 14:00:18 -07:00
Phillip Stephens cb2b9fa8bd Initial CScriptGunTurret Implementation 2018-06-04 12:15:35 -07:00
Phillip Stephens 6d60ccfd04 Various fixes and tweaks, Implement CExplosion, Add cheats 2018-04-26 14:12:20 -07:00
Jack Andersen 898114d803 PART MBSP property yaml fix 2018-04-04 20:58:11 -10:00
Jack Andersen b405f33ded Correct rstl::prereserved_vector implementation 2018-02-14 18:37:21 -10:00
Jack Andersen fd33d05fc0 Remove temporary debugging code 2018-01-05 20:52:44 -10:00
Jack Andersen 168fab6b14 HUD rendering bug fixes 2018-01-05 20:50:42 -10:00
Jack Andersen 1c44f8d1bc Various movement and HUD bug fixes 2017-12-18 17:05:50 -10:00
Phillip Stephens 001125429f Basic CGameAllocator implementation (WIP) 2017-09-12 08:27:48 -07:00
Jack Andersen 27cee61765 Implement array-based rstl::reserved_vector 2017-09-10 21:08:30 -10:00
Jack Andersen 53ec80ce72 Implement CFlameWarp 2017-09-09 23:04:51 -10:00
Jack Andersen 149eed4b73 Implement CAuxBeam 2017-09-09 14:36:21 -10:00
Jack Andersen ed991a6ac0 Initial CPlayerGun implementations 2017-08-24 20:18:09 -10:00
Jack Andersen 8e8ce66799 Additional CPlayer implementations 2017-08-15 19:34:02 -10:00
Phillip Stephens 870e8c80ee Refactor ResId into CAssetId 2017-08-12 22:26:14 -07:00
Jack Andersen 925aa3fe1a More CPlayer imps 2017-07-30 19:19:05 -10:00
Jack Andersen 56328c3e4d Lots of CMFGame integration 2017-02-17 16:19:50 -10:00
Phillip Stephens 7e4c82a013 Fix SCAN state saving, clean up MLVL, add support for newer CRasterFont versions 2017-02-08 23:37:00 -08:00
Jack Andersen b8613d61f8 Tons of save-related fixes 2017-02-07 20:48:43 -10:00
Jack Andersen 6a7fc0145f Bitstream fixes 2017-02-05 17:21:58 -10:00
Phillip Stephens 65fb75737f CScriptTrigger work 2017-01-14 19:59:37 -08:00
Phillip Stephens af1e22a62d Start naming EMaterialTypes values 2016-12-29 13:38:59 -08:00
Jack Andersen 9639ac75cc Work on CMemoryCardDriver 2016-12-20 11:51:50 -10:00
Phillip Stephens c40135f97f Reworked CGameArchitectureSupport initialization, initial CFirstPersonCamera imp 2016-09-15 00:26:35 -07:00
Phillip Stephens 0ef4dbc7d2 Minor CStateManager fixes, CScriptColorModulate imps 2016-08-18 11:34:06 -07:00
Phillip Stephens f73b1b641f More GameState imps 2016-07-24 16:14:58 -07:00
Phillip Stephens 8c2d5eb3a3 Update kaubfuda 2016-06-30 12:35:11 -07:00
Jack Andersen 86c21a77ac Function-scope statics aren't as efficient as file-scope ones 2016-04-14 17:26:01 -10:00
Phillip Stephens 3426aaf260 Add more particle DNAs 2016-03-28 01:54:02 -07:00
Phillip ee6defb120 Compile fixes 2016-03-23 14:41:41 -07:00
Phillip Stephens dc24a864fd CPlayerState imps 2016-03-23 13:38:01 -07:00
Phillip Stephens 193e21943d Add CBitStreamReader 2016-03-19 21:11:25 -07:00