ephphatha
78fa540ec9
Save/LoadObject by reference
2021-09-07 01:09:51 +02:00
Juliano Leal Goncalves
4ea9cd539e
🚚 Rename 'PortalStruct' struct to 'Portal'
2021-09-06 17:47:34 +02:00
Juliano Leal Goncalves
a91074d470
🚚 Rename 'LightStruct' struct to 'Light'
2021-09-06 12:49:48 +02:00
Juliano Leal Goncalves
0d3d4c14f6
🚚 Rename 'Dead' concept to 'Corpse' everywhere ( #2808 )
2021-09-06 12:49:00 +02:00
Juliano Leal Goncalves
1f7cfcf945
♻️ Replace 'ReturnLvlX' and 'ReturnLvlY' globals with single 'ReturnLvlPosition'
2021-09-06 00:31:25 +02:00
Juliano Leal Goncalves
940a120bf9
♻️ Replace 'ViewX' and 'ViewY' globals with single 'ViewPosition'
2021-09-04 18:06:28 -04:00
Juliano Leal Goncalves
6e1d05187e
🚚 Rename 'MissileStruct' to 'Missile'
2021-09-02 05:46:44 +02:00
Juliano Leal Goncalves
ef74b6f92d
🚚 Rename 'ObjectStruct' to 'Object'
2021-09-02 05:45:44 +02:00
Juliano Leal Goncalves
20db8d1a11
🚚 Rename 'MonsterStruct' to 'Monster'
2021-09-01 22:26:37 +02:00
Juliano Leal Goncalves
69a7cb66d4
♻️ Convert 'MON_MODE' enum to 'MonsterMode' enum class
2021-09-01 19:15:08 +02:00
Juliano Leal Goncalves
bb2dfdfb73
🚚 Rename 'ItemStruct' to 'Item'
2021-08-30 13:40:08 +02:00
Juliano Leal Goncalves
bbf529c65a
🚚 Rename 'PlayerStruct' to 'Player'
2021-08-30 06:44:18 +02:00
Anders Jenbo
4044fadeb5
Clean up some players references
2021-08-30 03:26:17 +02:00
Anders Jenbo
866bc56008
Clean up remaning usages of Missiles[]
2021-08-28 09:16:48 +02:00
BC Ko
536121f038
rename _miVar# to var#
2021-08-27 12:57:34 +02:00
BC Ko
4df798808e
2435 refactor global variable Items part 2 ( #2673 )
2021-08-26 08:06:48 +02:00
qndel
3d92b6eea5
Rewrite manashield into not using a missile
2021-08-25 19:32:10 +02:00
Anders Jenbo
96b19ca8d5
Set _micaster type to mienemy_type
...
Rino never made use of the player id, so no reason to abuse _micaster
2021-08-23 10:51:06 +02:00
Anders Jenbo
7f6e171b4b
Use BFLAG_MISSILE instead of dMissile
2021-08-22 21:21:33 +02:00
Anders Jenbo
3df8af0e9d
Apply missile_id to _mitype
2021-08-21 09:10:53 +02:00
BC Ko
1b91194f0f
refactor Items[ii] ( #2655 )
2021-08-21 03:30:39 +02:00
qndel
e355d03019
Rename SetDead
2021-08-21 02:11:41 +02:00
Anders Jenbo
5ddcd90ff9
Make NetSendCmdQuest() take a quest structure as input
2021-08-20 12:13:17 +02:00
Anders Jenbo
4891258775
Clean up quest init
2021-08-20 12:13:17 +02:00
ephphatha
8f2e94ae4d
Use unsigned types for player experience and related values
2021-08-12 13:38:05 +02:00
Vladimir Olteanu
b76e8c060b
Introduce MissileDataFlags
2021-08-12 00:19:09 +02:00
Anders Jenbo
8df8b940c4
Handle some clang-tidy issues
2021-08-07 16:30:14 +02:00
Anders Jenbo
069249f318
🚚 Move local function to anonymous namespace i-p
2021-07-19 05:44:20 +02:00
obligaron
91c8503ea5
Rename leaderflag to leaderRelation and MonsterRelation to LeaderRelation
2021-07-18 21:08:32 +02:00
obligaron
70db8456ba
Remove _pwtype and replace it with UsesRangedWeapon
2021-07-17 17:38:28 +02:00
Anders Jenbo
a089692850
💄 Introduce MonsterRelation enum
2021-07-15 19:48:55 +02:00
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
2021-07-14 20:22:35 -07:00
Anders Jenbo
ef6275caac
Clean up private function names
2021-07-12 17:59:22 -07:00
Anders Jenbo
4bf4e42230
Move local symbols to anonymous namespace
2021-07-12 17:59:22 -07:00
ephphatha
cc3572af81
Update BookLever related functions to use Rectangle.
...
This is mainly to help isolate functionality in the hopes of adding a specialised object class for this type of object as suggested by @julealgon in https://github.com/diasurgical/devilutionX/pull/2344#discussion_r667415019
For example, AddSCambBook performs almost the same logic but uses var6 instead of var8 for the trigger condition/identifier.
2021-07-11 05:09:13 -07:00
Andrew James
af60158274
Object by reference in SyncObjectAnimation functions ( #2344 )
2021-07-10 14:03:44 +02:00
Anders Jenbo
903d4bd2e1
Scope all for loops
...
This caused 7 of the loops to be rewriteen using range by clang-tidy
2021-07-08 08:14:03 -07:00
Anders Jenbo
467b74dc06
Rename object globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
9ae908f947
Rename missile globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
9b8bf92575
Rename quest globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
96bf75b502
Rename player globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
dce78dde62
Rename lighting globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
c8870dbd1f
Rename item globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
07ad083fda
Rename monster globals
2021-07-08 02:01:14 -07:00
Andrew James
c7e3bb4ae7
Introduce template form of skip to represent deprecated variables ( #2309 )
2021-07-05 14:51:44 +02:00
Anders Jenbo
bc59218d0d
More clang-tidy/Android Studio cleanups
2021-07-04 19:34:37 +02:00
Anders Jenbo
cb564a2d54
Clean up A-D
2021-07-04 05:25:37 -07:00
Anders Jenbo
a7c7fa0030
Fully apply clang-tidy/format to all files
2021-07-03 16:41:43 -07:00
Anders Jenbo
ee2e7518c4
Clang-tidy: FunctionCase part 2
2021-07-03 12:36:04 -07:00
Andrew James
3508aa6d3d
Align Life/Mana flask drawing routines ( #2291 )
...
* Clamp hpPer as a sanity check
* Refactor update mana routines in control.cpp to use PlayerStruct::UpdateManaPercentage
* Remove unnecessary calls to UpdateHP/ManaPercentage
* Unify logic that draws the flasks into a single internal function
* Fix style violations
* Remove unnecessary save/loads of hp/manaPer
The way this variable is used expects a value in this range and it gets clamped again anyway, but this makes the code more similar to the manaPer logic for future refactoring
Identical logic in use, the checks to see if the values are negative can be accomplished using clamp and the same divide by zero guard. I'll combine the two attributes in a near future commit.
control_update_life_mana is called during the game loop before any of the drawing functions so hpPer/manaPer are calculated based on the latest current/max of their respective attributes every frame.
There's no need to do the calculation again in the draw routines. (There's also no need to calculate this every frame but that's going to take a bit to untangle.)
2021-07-03 18:06:24 +02:00