Commit Graph
20 Commits
Author SHA1 Message Date
Gleb Mazovetskiy 759ca7f055 WorldTileRectangle/Size
Adds a custom sized type for the world tile rectagle.

This allows us to better express intent.
It also allows us to make certain globals smaller, e.g. `THEME_LOC`.
2022-10-16 03:53:26 +01:00
ephphatha 22adb0a93f Use counter to track number of candidates considered in TFit_Obj5 2022-10-03 14:02:42 +02:00
obligaron 9ee325e537 TFit_Obj5: Fix theme room generation when only last skipped candidate was valid 2022-10-03 06:22:44 +02:00
ephphatha 29f65a92bb Return direct from switch in all cases of CheckThemeReqs 2022-09-15 23:37:42 +02:00
ephphatha 9c245f8ec4 Expand anonymous namespace in themes.cpp 2022-09-15 23:37:42 +02:00
ephphatha 08acd4aac0 Tidy up T_FitObj5 2022-09-15 23:37:42 +02:00
ephphatha 6656c74842 Use 0 as a default for non-random object placement tests 2022-09-15 23:37:42 +02:00
Anders Jenbo f8dca40427 Merge branch 'master' of https://github.com/diasurgical/devilution 2022-08-27 02:41:28 +02:00
ephphatha cdcccef47a Return pointer from AddObject
This allows removing the immediate lookup for call sites which need further initialisation.
2022-07-28 12:47:13 +02:00
Andrew James 2786a65e7b Tidy up ActivateSkeleton and take monster by reference (#5080)
* Take reference in OperateSarcophagus
* Use monster reference instead of pointer in ActivateSkeleton
* Clean up ActivateSkeleton
2022-07-21 18:58:27 +02:00
Gleb Mazovetskiy 33ac2cca8e ♻️ Make Monster counters size_t 2022-07-12 03:04:53 +01:00
ephphatha 7df7b6fa54 Address warning for comparing signed and unsigned values 2022-07-10 19:44:35 +02:00
Gleb Mazovetskiy 197e1180b2 Add StrCat and StrAppend
Adds simple string / integer concatenation functions.

Many of the uses of `fmt::format` are simply concatenation
of a few strings and integers.

`StrCat` is an easier-to-read alternative to such uses of `fmt`.
2022-07-10 06:14:58 +02:00
ephphatha 7bda8dcc9a Include coin flips from room gen cleanup 2022-07-10 02:37:33 +02:00
ephphatha 420a248e0c Use FlipCoin for most uses of GenerateRnd with variable frequency 2022-07-10 02:37:33 +02:00
Cesar Canassa de971c6a8b ♻️ Refactor AddMonster to return a monster pointer (#4894) 2022-07-06 02:36:02 +02:00
Gleb Mazovetskiy 72660d9189 Migrate snprintf to fmt (#4845)
* Migrate `app_fatal` from printf to libfmt
* Migrate snprintf to fmt
2022-07-02 02:36:17 +02:00
Mikołaj Piróg 7cab074aa5 Correct members' names in monster.h (#4850)
* Fix case in AnimStruct
* Rename CMonster members
2022-07-01 23:34:32 +02:00
Anders Jenbo 72656b3011 Move path and palette to the engine folder 2022-06-24 16:34:20 +02:00
Anders Jenbo 6d56058708 Move level generation to subfolder 2022-06-23 09:21:58 +02:00