Commit graph

580 commits

Author SHA1 Message Date
Gleb Mazovetskiy
e40b1963f9 🚚 engine.h: Extract CelSprite and file loading 2021-06-21 01:36:20 -07:00
Anders Jenbo
c6f6c99add Fix GCC warning 2021-06-13 05:18:08 +02:00
qndel
816b244689 HasItem/RemoveInvItem combo refactor 2021-06-13 05:18:08 +02:00
Juliano Leal Goncalves
9c85e61025 ♻️ Leverage 'Point' struct on 'ItemSpaceOk' 2021-05-31 06:05:35 +02:00
Gleb Mazovetskiy
f319c593a6 🧹 player.cpp: Remove unused GetPlrGFXClass 2021-05-28 13:27:08 +02:00
Juliano Leal Goncalves
dd9e05222d ♻️ Change 'PosOkPlayer' to take a 'Point' instead of 2 separate ints 2021-05-25 04:09:02 +02:00
Juliano Leal Goncalves
c6fafbf64b ♻️ Change 'SolicLoc' to take a 'Point' instead of 2 separate ints 2021-05-25 04:09:02 +02:00
Anders Jenbo
8a7ec56d3a Player by reference part 2
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
2021-05-24 21:00:32 +02:00
obligaron
da7ded3170 Integrate GetAnimationWidth in LoadPlrGFX (only callside) 2021-05-24 20:12:43 +02:00
obligaron
d97131349e Unify player_graphic memory handling 2021-05-24 20:12:43 +02:00
obligaron
61ba5009ac Convert to CelSprite 2021-05-24 20:12:43 +02:00
obligaron
3067aeacb8 Remove PlayerStruct._pXYZWidth and replace it with calls to GetAnimationWidth 2021-05-24 20:12:43 +02:00
obligaron
d11ed50585 NewPlrAnim now also loads the graphics if needed 2021-05-24 20:12:43 +02:00
obligaron
c424f601ec Change LoadPlrGFX from pnum to PlayerStruct 2021-05-24 20:12:43 +02:00
obligaron
3a6e631261 Remove memset for PlayerStruct 2021-05-24 20:12:43 +02:00
Juliano Leal Goncalves
b3ec79af4f
Leverage 'Point' in Lighting and Player functions (#2048) 2021-05-24 17:28:52 +02:00
Juliano Leal Goncalves
cc936dacd7 ♻️ Replace 'int' with 'Direction' parameter on 'PlrDirOK' 2021-05-24 06:11:59 +02:00
Anders Jenbo
6ce8f13751 Apply clang-tidy to more code and do some related cleanups 2021-05-24 05:27:06 +02:00
Juliano Leal Goncalves
21fdb0dcd9 ♻️ Replace manual direction displacement logic with 'Point' add operator 2021-05-24 04:46:08 +02:00
Juliano Leal Goncalves
d55cd99dd5 🚚 Rename 'direction' enum to 'Direction' 2021-05-24 04:46:08 +02:00
Juliano Leal Goncalves
15c46b9eb0 💬 Rename HeroSpeech members to improve discoverability 2021-05-23 22:01:47 +02:00
Juliano Leal Goncalves
5350250a76 🚚 Rename speech functions to 'Say' variations 2021-05-23 05:32:34 +02:00
Juliano Leal Goncalves
8c620ce29e ♻️ Extract 'HeroSpeech' enum class for hero sounds instead of using raw ints 2021-05-23 05:32:34 +02:00
Jmgr
bbd39aa513 Replace sprintfs with strcpy for translatable strings 2021-05-21 01:02:45 +02:00
Jmgr
6e85cde978 Update format strings 2021-05-21 01:02:45 +02:00
Jmgr
0c27e756f7 Add fmt::format 2021-05-21 01:02:45 +02:00
obligaron
1c21607ccf Use new stand animation for cast in town 2021-05-20 10:05:36 +02:00
obligaron
11f8c952e5 CheckNewPath: Use correct player for repeated attack check 2021-05-20 10:01:22 +02:00
obligaron
4de25cd2ea Introduce PlayerStruct.IsWalking() 2021-05-16 21:24:36 +02:00
Anders Jenbo
34744c068f ♻️Consitantly use %i and not %d 2021-05-15 14:17:52 +02:00
Anders Jenbo
d0ee8f90cf 🐛 Fix run in town 2021-05-13 03:14:05 +02:00
Anders Jenbo
a095bc0bf7 ♻️Migrate more code away from miniwin 2021-05-13 02:30:18 +02:00
Anders Jenbo
ad2085ab7b 💚 Fix bad merge. 2021-05-13 02:01:22 +02:00
Anders Jenbo
bec0ceec4a ♻️ Add points 2021-05-13 01:47:46 +02:00
Anders Jenbo
0c2042fa52 ♻️ Player by reference
Update Source/items.cpp
Update Source/lighting.cpp
Update Source/pack.cpp
asd


ads


as
2021-05-13 01:47:46 +02:00
obligaron
7ed009ecb7
Remove PlayerStruct.actionFrame and enable ADL for Walking/Run (#1939)
- Remove (unused) actionFrame for PM_DEATH
- Remove actionFrame for PM_SPELL
- Remove actionFrame for PM_WALK
- Remove actionFrame
2021-05-13 01:24:26 +02:00
thebigMuh
15ec16af7e Remove crashing feature from PlayerStruct::HasItem 2021-05-09 15:35:33 +02:00
obligaron
b94e599f5e ADL: Advance skipped Frames in SetNewAnimation and remove logic from PM_XYZ 2021-05-09 09:53:53 +02:00
staphen
3e5e5b2696 Synchronize SFileCloseFile() access 2021-05-08 04:01:07 +02:00
Anders Jenbo
b0f2d5b5d2 🐛 Fix all monsters wanting to talk 2021-05-08 00:41:08 +02:00
obligaron
aba3bb42fa Fix Bard incorrect number of sword animation frames 2021-05-07 09:08:24 +02:00
Gleb Mazovetskiy
b6adc10af0 🐞 Fix return value in PlayerStruct::HasItem 2021-05-07 01:02:30 +02:00
Anders Jenbo
6321bf04d5 ♻️Pass player to towner by reference instead of index 2021-05-07 00:29:46 +02:00
Anders Jenbo
f579b2f287 Handle cel/cl2 files as byte arrays 2021-05-06 13:17:54 +02:00
obligaron
cb7819a75c Introduce AnimationDistributionFlags::RepeatedAction 2021-05-06 07:52:17 +02:00
obligaron
b5954eb34b Change AnimationDistributionParams to AnimationDistributionFlags 2021-05-06 07:52:17 +02:00
obligaron
7740a66dc4 Set correct Hit-Frame for Spell Animation 2021-05-06 07:52:17 +02:00
Juliano Goncalves
6e3c33ad23 Add key to stop walking and cancel pending actions 2021-05-05 00:38:58 +02:00
Juliano Leal Goncalves
39736e2538 ♻️ Pass 'PlayerStruct' pointer to 'ClrPlrPath' 2021-05-05 00:38:58 +02:00
Gleb Mazovetskiy
0bfc147b78
🧹 Remove DiabloAllocPtr and friends (#1824) 2021-05-02 07:06:18 +02:00