Commit graph

430 commits

Author SHA1 Message Date
obligaron
82cea78def Apply clang-format 2021-08-11 20:52:32 +02:00
Aaron Sun
3ee90ca629 Add options for sub-panel alignment 2021-08-07 16:09:32 +02:00
4aron5un
4c8210df21
Center the sub-panels (Quest, Character, Spell and Inventory) (#2498) 2021-08-05 21:27:07 +02:00
Anders Jenbo
d523fc1e81 Cleanups 2021-08-02 10:12:40 +02:00
ephphatha
0575716eac Rename UiFlags members to group related options 2021-07-31 20:22:40 +02:00
ephphatha
4ad53232a0 Convert the UiFlags enum to a scoped enum type
Replace operator&& with named function
2021-07-31 20:22:40 +02:00
obligaron
7d9891b249 ADL GetOffsetForWalking: remove diagonal special 2021-07-25 21:23:32 +02:00
Anders Jenbo
a07b30a0c7 Get Towners by reference 2021-07-20 03:12:15 +02:00
Anders Jenbo
de0b3a38b8 Apply code style 2021-07-20 02:51:39 +02:00
Anders Jenbo
e5fc7fd17c Move remaning symbols in to anonymous namespaces 2021-07-20 02:51:39 +02:00
Anders Jenbo
9c4e34f988 Player by reference 2021-07-20 01:35:56 +02:00
Anders Jenbo
0889780923 Remove more usage of miniwin types 2021-07-18 02:11:58 +02:00
Anders Jenbo
9264ad4b89 Use IsTileNotSolid() in place of !nSolidTable[dPiece[][]] 2021-07-17 03:57:26 +02:00
obligaron
5ed79c38ef Introduce MissilePosition.StopMissile 2021-07-16 02:15:36 +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
obligaron
54d63e2edd Change AnimationInfo.pCelSprite to const 2021-07-12 07:40:38 -07:00
obligaron
72692028f7 Refurbish table in GetOffsetForWalking 2021-07-11 09:17:16 -07: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
9ebdb6db69 General clean up 2021-07-08 03:30:25 -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
obligaron
be53349c2d
Decouple missile movement from game logic (#2322) 2021-07-08 10:19:52 +02:00
RISHABH BUDHIRAJA
b5b3fd3958 fix: DrawMissile code doesn't handle cases where dMissile[x][y] == 0 2021-07-04 05:31:19 -07:00
Anders Jenbo
cb564a2d54 Clean up A-D 2021-07-04 05:25:37 -07:00
Anders Jenbo
4eabc6024b Apply various cleanups via Android Studio 2021-07-03 18:27:17 -07:00
Anders Jenbo
a7c7fa0030 Fully apply clang-tidy/format to all files 2021-07-03 16:41:43 -07:00
Anders Jenbo
ecea12fc15 Clang-tidy: ParameterCase 2021-07-03 15:46:39 -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
Gleb Mazovetskiy
cb0dae8590 🚚 Rename CelOutputBuf to Surface and extract 2021-07-03 05:33:32 -07:00
Anders Jenbo
a350fb0b15 Clang-tidy: FunctionCase part 1 2021-07-03 03:45:33 +02:00
Anders Jenbo
b71b0149a3 Clang-tidy: ConstexprVariableCase 2021-07-03 03:09:43 +02:00
Anders Jenbo
7e737cfa96 Merge remote-tracking branch 'refs/remotes/devilution/master' 2021-07-03 01:44:45 +02:00
Anders Jenbo
129342d07a Clang-tidy: GlobalConstantCase 2021-07-02 22:56:56 +02:00
Juliano Leal Goncalves
cbb84199c2 ♻️ Replace Point addition with 'Point + Displacement' 2021-06-28 20:37:44 -07:00
Anders Jenbo
5537fe748e Clean up debug code 2021-06-27 16:16:39 -07:00
Anders Jenbo
0f2ad469ea ♻️Clean up variable initialization 2021-06-27 14:58:51 -07:00
Anders Jenbo
f0e5bd819b 💚 Fix debug builds
This the change from 8e07ef8fe5.
2021-06-27 20:48:39 +02:00
Anders Jenbo
8e07ef8fe5 Clang-tidy: misc-unused-parameters 2021-06-27 17:34:32 +02:00
Juliano Leal Goncalves
fd9f2099d0 ♻️ Leverage 'Point' to represent mouse position 2021-06-27 16:37:59 +02:00
Anders Jenbo
7102724fda Clang-tidy: readability-named-parameter 2021-06-27 00:56:08 +02:00
Anders Jenbo
de4ced7e4f Clang-tidy: readability-qualified-auto 2021-06-27 00:56:08 +02:00
Anders Jenbo
2bdb6caa07
Cleanup majority of remaning implicit bool conversions (#2234) 2021-06-26 21:05:45 +02:00
Anders Jenbo
d8fa29c972 Clean up more implicit bool conversion 2021-06-26 10:07:02 -07:00
obligaron
0bf3943254 Use GetOffsetForWalking in DrawMonsterHelper 2021-06-26 06:10:33 -07:00