Juliano Leal Goncalves
8c620ce29e
♻️ Extract 'HeroSpeech' enum class for hero sounds instead of using raw `int`s
5 years ago
Vladimir Olteanu
0c7c71d579
Cleanup of items.cpp ( #1967 )
...
- Apply Point where applicable
- Deduplicate vendor logic
- Add comment about unhanded edge case in GetSuperItemLoc
- Initialize some variables at deceleration
5 years ago
Anders Jenbo
ad97ebe980
🔥 Remove redundant code from towners.cpp
...
This changes one bavious. Previously walking away from the dead guy
would interupt the "Your death shall be reveanged", the interuption
seamed un natural and the code didn't seam to have been specifically
made for this case (TownCtrlMsg).
Fix several edge cases in quests where the incorrect state could be reached
5 years ago
Gleb Mazovetskiy
2b690137a3
🧹 towners.cpp: Avoid allocations for animOrder
...
There is no need for `animOrder` to be a vector -- it's static data.
We don't have `std::span` yet, so opted for pointer + size.
5 years ago
Anders Jenbo
9f00de73c3
🐛 [Diablo] Fix Ogden's animation cycle
5 years ago
Anders Jenbo
4c217ec4fc
♻️ Use a vector to more sensibly assign NPC animation cycles
5 years ago
Anders Jenbo
05f8f9524f
♻️ Handle towner talk logic via initialization list instead of switch
5 years ago
Anders Jenbo
0477e86aa1
🐛 Fix Griswold animation cycle
5 years ago
Anders Jenbo
4b577329f4
♻️ Refactor towner initialization
5 years ago
Anders Jenbo
e4e924eb72
🎨 Clean up code style in towners.cpp
5 years ago
Anders Jenbo
6321bf04d5
♻️ Pass player to towner by reference instead of index
5 years ago
Anders Jenbo
c98a1409f9
♻️ Pass towners by reference instead of index
5 years ago
Anders Jenbo
f263e4e9d1
♻️ Split TalkToTowner in to a per towner sub-function
5 years ago
Anders Jenbo
48da58669d
Golden elixir remains usable in new games ( #2234 )
5 years ago
Anders Jenbo
f579b2f287
Handle cel/cl2 files as byte arrays
5 years ago
Anders Jenbo
fa0b286693
♻️ Typed file loading
...
Tthis gives us the option to specify what type a file should be loaded
as, avoidng the need to case it and does some automatic checks on the
fitness of the data, while making the process simpler.
If no type is given then the type will be set to std::byte which limit
what operations can be performed on the data.
5 years ago
Vladimir Olteanu
d9a4ff8729
Use std::string_view for towners' names ( #1750 )
5 years ago
Gleb Mazovetskiy
28182ca5e3
🧹 Fix a couple more compilation warnings
5 years ago
Gleb Mazovetskiy
052b4c12f5
♻️ LoadFileInMem: Remove `nullptr` at call sites
...
This is now the default argument, no need to provide it explicitly.
5 years ago
Gleb Mazovetskiy
1b8b62a8c2
♻️ Store CEL width with the sprite itself
...
Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.
Implemented for most sprites except towners, missiles, or monsters.
5 years ago
obligaron
239a43cc1c
Remove "AnimWidth2" expect for missiles ( #1680 )
5 years ago
Anders Jenbo
dbfa9c27a5
✨ Enable translation for all menus
5 years ago
Anders Jenbo
2bd13451a1
♻️ Apply point positioning to all remaning entities
5 years ago
Anders Jenbo
e4cfad3196
♻️ Use points instead of individual fileds for player structure
5 years ago
Anders Jenbo
a32ac83090
🎨 cleanup trivial trype comparisons
5 years ago
Anders Jenbo
593c6a6f17
🎨 Drop unused param and rename random_ to GenerateRnd
5 years ago
Anders Jenbo
f004c78824
🧹 performance-unnecessary-value-param
5 years ago
Jmgr
1d84156509
Simplify bitshift divisions/multiplications
5 years ago
qndel
ec74917cb4
class sounds cleanup
5 years ago
Anders Jenbo
9e307a0d4a
🎨 Rename towner[] to towners[]
5 years ago
Anders Jenbo
373f28736f
🎨 Acceptable parts of modernize-*
5 years ago
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
5 years ago
Gleb Mazovetskiy
95946e3a7c
🧹 Cleanup unused variables ( #1584 )
...
Fixes `unused-variable` and `unused-but-set-variable` compiler warnings.
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Juliano Leal Goncalves
8cf972e843
♻️ Move 'HeroClass::ClassCount' to external tracking template
...
This eliminates the problem where the compiler complains we are not handling all enumeration values by moving the "hack" counting member into somewhere else external to the enum.
5 years ago
Juliano Leal Goncalves
28ad9d43c5
🎨 Rename 'plr_class' enum to 'HeroClass'
...
Members were renamed as well for readability.
5 years ago
Juliano Leal Goncalves
7d95bfed39
♻️ Convert 'plr_class' to a scoped enumeration
5 years ago
Anders Jenbo
2732aea1b2
♻️ Use GameInfo instead of individual globals
5 years ago
Anders Jenbo
61244c4d93
♻️ Rearange and apply more enums
5 years ago
Anders Jenbo
36ebd857ad
🎨 Correct style of false comparisons
5 years ago
Anders Jenbo
20186e0370
🎨 Replace TRUE/FALSE with true/false
...
fix
Fix
fix
5 years ago
Anders Jenbo
93d42b62b8
♻️ Change BOOL to bool
5 years ago
Gleb Mazovetskiy
ec4da72f9e
Optimize TownerStruct
...
1. Remove unused fields.
2. Optimize used fields for size.
3. Rename `_tVar1` to `_tTalkingToPlayer`.
5 years ago
Anders Jenbo
af96de4038
♻️ Move a large part of enums to there respective headers
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
Anders Jenbo
ca2c2ba5e7
🚨 Handle a bunch of warnings from CLang
5 years ago
Anders Jenbo
a6903e93b2
♻️ Allow towners to be initialized in any order
5 years ago
Anders Jenbo
37bdeb74db
🐛 Fix overflow in Qtalklist
5 years ago
Anders Jenbo
e636376acd
[diablo] 🐛 Reset the Black Mushroom dialogs between sessions
...
Pepin will be to eager to speak about this quest if the previous session
had gotten to stage 2 of the quest (but not compleated it).
5 years ago