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
obligaron
d63fcded76
Refactor PlaceGroup ( #2425 )
...
* Rename MonstPlace -> CanPlaceMonster
* Refactor custom hitpoints and armorclass out of mUnqAttr
* Introduce enum UniqueMonsterPack
5 years ago
Anders Jenbo
ef6275caac
Clean up private function names
5 years ago
Anders Jenbo
bc0d1f7ac0
clang-tidy/Android Stuidio cleanups 3
5 years ago
obligaron
3ba4bac5e2
Harmonize DelayLen for Player and Monster (was 1-based on monseter (>= DelayLen) and 0-based on player (> DelayLen). Now both are 1-based (>= DelayLen)
5 years ago
arcas
6502a3ca4d
Adding resources for translation ( #1973 )
5 years ago
Anders Jenbo
4b577329f4
♻️ Refactor towner initialization
5 years ago
M0Rf30
570372331b
🐞 Fix typo for Maelstrom monster
5 years ago
Anders Jenbo
5517bb05bd
✏️ Correct name of Black Jade
5 years ago
Anders Jenbo
187d547fb8
🌐 Remove unused string from the translation list
5 years ago
Anders Jenbo
b69d18f12d
🌐 Enable translation of all remaning strings
5 years ago
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Anders Jenbo
20186e0370
🎨 Replace TRUE/FALSE with true/false
...
fix
Fix
fix
5 years ago
Gleb Mazovetskiy
6a3ae9e35b
Optimize MonsterData layout: sizeof 160 -> 80
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago