Andrettin
0c3fe1345c
Parse Quest Data from TSV
7 months ago
Anders Jenbo
a977a76392
clang-tidy: simple cleanup of monsters
7 months ago
Anders Jenbo
62d2ff607c
Only resize monster data vectors when needed
7 months ago
Andrettin
20b63ba201
Simplified ParseAiId(), ParseMonsterClass() and ParseMonsterResistance(), ParseUniqueMonsterPack() with magic_enum
7 months ago
Andrettin
1ca8fcf460
Removed the unused ParseMonsterIdIfNotEmpty() function
7 months ago
Andrettin
5d21bfae37
Reworked the unique monster Lua bindings to load from a TSV file
7 months ago
Andrettin
be956f0608
Added Lua Bindings for Adding New Monster Types
7 months ago
Andrettin
d7404c070c
Simplified ParseMonsterId() by using the magic_enum library
7 months ago
Andrettin
cfb52ee239
Added support for mods to add unique monsters without replacing any data ( #8092 )
7 months ago
Anders Jenbo
e949f41d83
Clean up selection type
2 years ago
Gleb Mazovetskiy
e9c29fa806
Switch to ankerl::unordered_dense
2 years ago
obligaron
d4a70a2bc5
Fix MSVC warnings in monster.cpp/monsterdat.cpp
2 years ago
Gleb Mazovetskiy
7cb24054a3
DataFile: Add a couple of helper methods
2 years ago
Gleb Mazovetskiy
cfdade5f37
Simplify txtdata parsing with a helper class
2 years ago
Gleb Mazovetskiy
99fea0d1c5
Migrate unique monsters to data files
2 years ago
Gleb Mazovetskiy
2eae121931
Migrate monstdat to a data file
...
We may want to migrate this to 1 file per monster but for now the
migration is as close to the hard-coded version as possible.
Sprites that are used by multiple monsters are only loaded from disk
once.
2 years ago
Gleb Mazovetskiy
0d19c1b773
Slightly optimize loading same-sprite monsters
...
For monsters with the same sprite, load the sprite from the file system only once.
Example:
```
VERBOSE: Loaded monster graphics: falspear\phall 452 KiB x1
VERBOSE: Loaded monster graphics: skelbow\sklbw 618 KiB x1
VERBOSE: Loaded monster graphics: skelsd\sklsr 610 KiB x1
VERBOSE: Loaded monster graphics: goatbow\goatb 832 KiB x1
VERBOSE: Loaded monster graphics: bat\bat 282 KiB x2 <-- here we only load the sprite once
VERBOSE: Loaded monster graphics: rhino\rhino 1306 KiB x1
VERBOSE: Loaded monster graphics: golem\golem 298 KiB x1
VERBOSE: Total monster graphics: 4401 KiB 4684 KiB
```
Here, the bat sprite will be loaded from the MPQ only once.
For the second sprite, we simply clone the first sprite before applying TRNs.
This also reduces the size of `MonsterData` from 88 bytes to 80.
When we migrate monster data to a TSV, the sprite IDs can be generated automatically at load time.
2 years ago
Gleb Mazovetskiy
5bf0b8bc96
Add more missing <cstdint> includes
...
https://github.com/diasurgical/devilutionX/pull/6095 only added includes
for `uint32_t`, this PR also adds the includes for the remaining
integral types.
3 years ago
staphen
82cf475b05
Change Na-Krul's animation rates from 0 to 1
3 years ago
Eric Robinson
d7b6c7dca8
Refactor Missile Function Names ( #5733 )
3 years ago
Eric Robinson
30c1991039
`enum _mai_id` -> `enum class MonsterAIID` ( #5683 )
3 years ago
Gleb Mazovetskiy
7c53a5d5b3
Reduce `ObjectData` size: 24 bytes -> 11 bytes
...
1. Reduces sizes of integral fields.
2. Merges boolean flags into a single field.
3 years ago
Gleb Mazovetskiy
b281f0afac
Run tools/cpp_format_struct_table.py
3 years ago
staphen
6199019d5a
Fix alignment of values and field names in monster data
3 years ago
Gleb Mazovetskiy
6327e713e0
Lowercase all file paths
...
We want to be able to use unpacked MPQs on low-end platforms
(PS2/rg99/etc).
This is tricky on case-sensitive filesystems. Avoids case issues by
lowercasing all paths in the code (then we'll just need lowercased
listfiles).
4 years ago
Vladimir Olteanu
33f4289634
Get rid of unused immunity
4 years ago
Anders Jenbo
16b65120ea
Clean up LevelMonsterTypes related code
4 years ago
Mikołaj Piróg
262fa9ac2d
Rename MonsterData members ( #5000 )
4 years ago
Gleb Mazovetskiy
9928d691e4
Remove `MonsterData#has_trans`
...
1. Removes the field because it is redundant, checks for
`TransFile != nullptr` instead.
2. Fixes the missing TRN on Bone Demon, a stronger variant of Skullwing.
4 years ago
Gleb Mazovetskiy
53975d9264
monstdat: Simplify paths
...
1. Remove `Monsters\` from `sndfile` and `TransFile`.
2. Where `sndfile` is the same as `GraphicType`, set `sndfile` to
`nullptr`.
4 years ago
Mikołaj Piróg
15989609a8
Members' name changes and comments in Monster struct ( #4861 )
4 years ago
Mikołaj Piróg
7cab074aa5
Correct members' names in monster.h ( #4850 )
...
* Fix case in AnimStruct
* Rename CMonster members
4 years ago
Gleb Mazovetskiy
3178dd5158
Replace most uses of `sprintf` with `fmt` ( #4837 )
4 years ago
Gleb Mazovetskiy
a939b12f97
monstdat: Fix incompatible enum warning
4 years ago
Anders Jenbo
8e334ada77
[hellfire] Fix incorrecct monster ids in dun tabel
4 years ago
Anders Jenbo
d6b258926e
Apply type checking on monster type
4 years ago
Anders Jenbo
134791af3f
Remove pointless math related to finding monsters for levels
4 years ago
ikonomov
c09751b388
minor alignment adjustment ( #4534 )
...
* minor header alignment adjustment in monstdat.cpp
4 years ago
Gleb Mazovetskiy
48ff656dc0
Load monster graphics into a single buffer
...
Follow-up to a5e1fa5bbe , which loaded
the missiles into a single buffer.
4 years ago
DakkJaniels
0790416781
Unique Monster Variable Rename ( #4060 )
...
* fix variable name to reflect what it is modifying (unique monster custom to hit, not custom hit points)
* align UniqueMonstersData table
4 years ago
Gleb Mazovetskiy
7e1fea6f76
clang-format all files in {Source,test}/
...
Also includes a few manual tweaks to comments and newlines for better results.
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
Anders Jenbo
f13e66ad04
Mark all names as translatable
5 years ago
Anders Jenbo
671fdbd125
Implement contextural translation (pgettext)
...
Fixes #2369
Fixes #2790
5 years ago
Juliano Leal Goncalves
5430672477
🚚 Rename 'UniqMonstStruct' struct to 'UniqueMonsterData' ( #2814 )
5 years ago
Juliano Leal Goncalves
d225202c34
🚚 Rename 'MonsterClass' members for consistency
5 years ago
Juliano Leal Goncalves
21b481bb46
♻️ Convert 'MonsterClass' enum to enum class
5 years ago
Juliano Leal Goncalves
db1026fa39
🚚 Rename 'MonsterDataStruct' to 'MonsterData'
5 years ago
Juliano Leal Goncalves
6146b828e9
🚚 Rename 'MonsterData' global to 'MonstersData'
...
This avoids conflicts with the struct name as we'll be renaming that next.
5 years ago
qndel
a14a3ba455
add enums to monsters
5 years ago
qndel
0530fcb969
apply enums to mTreasure
5 years ago