Commit Graph
389 Commits
Author SHA1 Message Date
Anders Jenbo e969a8ad01 Invert player to vision relation 2023-04-21 21:25:19 +02:00
Anders Jenbo a997f8d597 Only update vision in dungeon 2023-04-21 21:25:19 +02:00
Anders Jenbo 13c5c09990 Clean up Light related naming
A few are left unchanged as they will be removed in a later commit
2023-04-21 21:25:19 +02:00
Anders Jenbo ec9d1b5550 Rename _oLight to applyLighting 2023-04-19 19:41:10 +02:00
Anders Jenbo a1df95d580 Do not manipulate lights when saving and also correct save state 2023-04-19 07:53:36 +02:00
Anders Jenbo 779f16280c Consistently use uint8_t for lighting values 2023-04-18 23:53:04 +02:00
obligaron a0fca12d22 Only reset _oVar1 for dynamic lights 2023-04-18 21:29:54 +02:00
ThomasChr c91feb71f9 make light objects unseen when saving level change data, because level change data (instead of real save data) does not save light source and if the light objects will be marked as seen there lights won't be created and they stay dark 2023-04-18 15:27:18 +02:00
obligaron b87711bc08 Reintroduce Player::spellFrom to seperate teleport cursor from queued spell 2023-04-17 03:22:50 +02:00
Eric Robinson 81e3c7abaa Remove fixed bugfix comments, apply golem fix 2023-04-13 21:18:04 +02:00
obligaron eeca953615 Introduce UpdateHellfireFlag to set missing CF_HELLFIRE flag 2023-04-13 00:07:00 +02:00
Gleb Mazovetskiy 957bd03b98 Remove FMT_COMPILE in "cold" places
Removes most `FMT_COMPILE` calls.
`FMT_COMPILE` results in better performance but larger code size.

Removes `FMT_COMPILE` calls for places that are called infrequently,
i.e. not on every frame.

RG-99 binary size reduced by ~4 KiB.
2023-03-12 19:29:35 +01:00
Eric Robinson f75f66d54b Add playerdat (#5763) 2023-02-10 12:56:28 +00:00
Gleb Mazovetskiy 98294e0ad5 Optimize MissileData: 32 bytes -> 24
23 bytes used, 1 spare byte in the padding.
2023-02-07 08:08:04 +01:00
KPhoenix d813f13700 enum spell_id -> enum class SpellID 2023-02-05 10:24:58 +00:00
KPhoenix 7947b99511 Implement new enum class 2023-02-03 05:05:12 +01:00
Eric Robinson ef3a57b7d9 enum spell_type -> enum class SpellType (#5674) 2023-01-28 22:25:37 +01:00
Eric Robinson 30c1991039 enum _mai_id -> enum class MonsterAIID (#5683) 2023-01-28 00:10:15 +01:00
DakkJaniels d683039bdd stop shaking camera if dead diablo loaded from save. (#4149) 2023-01-28 00:06:06 +01:00
Gleb Mazovetskiy 6d274c9547 UNPACKED_SAVES: Saves without MPQs
Reduces rg99 binary size by ~70 KiB.
2023-01-18 23:40:30 +00:00
KPhoenix 8db521727d enum missile_id -> enum class MissileID
Changes `enum missile_id` to `enum class MissileID`
2023-01-18 17:17:25 +00:00
Anders Jenbo a29fc3a074 Correct casing for Player::isWalking() 2023-01-12 09:42:49 +01:00
Gleb Mazovetskiy ec12d7ce44 Player: Optimize to save 40 bytes 2022-10-11 10:17:01 +01:00
Mikołaj Piróg 4cff046ba9 Replace toHitSpecial member with a function & fix wrong arguments being passed (#5337) 2022-09-18 17:26:23 +02:00
Mikołaj Piróg 5e340d3261 Replace level member with a member function in monster (#5336) 2022-09-17 11:39:44 +02:00
Mikołaj Piróg 32b3333bfb Exp overflow fix (#5070) 2022-08-28 17:35:58 +02:00
Anders Jenbo f8dca40427 Merge branch 'master' of https://github.com/diasurgical/devilution 2022-08-27 02:41:28 +02:00
Stephen C. Wills c91702ffbc Don't use MyPlayer in SaveHotkeys() (#5292) 2022-08-26 23:53:38 +02:00
qndel ef5a4de227 typos + code cleanup 2022-08-07 20:28:43 +02:00
obligaron 2493f06116 ActorPosition: Remove offset, offset2 and velocity 2022-08-03 21:25:21 +02:00
obligaron 1cfd1ca99d Fix double casting bug - use separated info for casted and queued spells 2022-08-02 03:05:46 +02:00
obligaron ca1949a87f Don't recalculate leveltype (from currlevel) in SaveGameData 2022-07-29 20:25:43 +02:00
Gleb Mazovetskiy b21ebffaf2 Clean up player graphic loading 2022-07-24 18:25:12 +02:00
ephphathaandAnders Jenbo 975eb3674b Add helper to check if a monster belongs to a player
Co-authored-by: Anders Jenbo <[email protected]>
2022-07-24 16:08:09 +02:00
Anders Jenbo d1189388f5 Use user by reference 2022-07-17 18:41:05 +02:00
Gleb Mazovetskiy 04c3d85179 Remove MAX_PATH
Rather than using the Windows-like `MAX_PATH`, what we really want is 2
things:

1. Maximum path of a file in an MPQ. This is now `MaxMpqPathSize`.
2. Max size for the known monster paths. This is now 64 for sounds and
   TRNs, which is more than enough (picked arbitrarily).
2022-07-16 11:14:16 +01:00
Gleb Mazovetskiy 7ad0ec925f Reduce sizes of Monster (goal)Vars
sizeof(Monster): 168 -> 144
2022-07-15 17:15:50 +01:00
Mikołaj Piróg 262fa9ac2d Rename MonsterData members (#5000) 2022-07-15 16:20:13 +02:00
ephphatha 1337ff6ea2 Add check if a monster potentially has leashed minions 2022-07-13 07:13:34 +02:00
ephphathaandAnders Jenbo 4fef842b0b Remove use of ID/index from PlaceGroup
use getId helper for leader id

Co-authored-by: Anders Jenbo <[email protected]>
2022-07-13 07:13:34 +02:00
ephphatha 1e0f2c149c Add getLeader helper for monsters in a pack 2022-07-13 07:13:34 +02:00
Gleb Mazovetskiy 33ac2cca8e ♻️ Make Monster counters size_t 2022-07-12 03:04:53 +01:00
Anders Jenbo 38113c0ad8 Convert monster_goal in to a scoped enum 2022-07-11 01:46:24 +02:00
Anders Jenbo 2d21fc372e Remove more miniwin code 2022-07-10 21:13:39 +02:00
Anders Jenbo 6a8fd04067 Use player by references (#4938) 2022-07-10 11:40:04 +02:00
Stephen C. Wills 4398c1e06a Use absolute coordinates for temp position when north-walking (#4937) 2022-07-10 07:25:53 +02:00
Cesar Canassa e538acb248 📝 Fixes Doxygen warnings (#4904) 2022-07-07 12:51:24 +02:00
Mikołaj Piróg 15989609a8 Members' name changes and comments in Monster struct (#4861) 2022-07-06 10:21:22 +02:00
obligaron 3c571bf64b Avoid overflow of tickCounterOfCurrentFrame (#4893)
* When MFLAG_ALLOW_SPECIAL is set, don't call processAnimation (avoid overflow of tickCounterOfCurrentFrame)
2022-07-05 19:23:32 +02:00
aetn23 bf568fe480 Remove assert to check if value is in bounds 2022-07-05 17:38:39 +02:00