Anders Jenbo
860bd1cebf
Operate directly on SOL data
4 years ago
Anders Jenbo
f64fe57fbe
Do not process theme rooms for Nest and Crypt
...
This causes Objects, Items and Monstesr to have different positions from
the original, but this is acceptable since they are stored in the save
game and so do not break compatability.
4 years ago
Anders Jenbo
52b8221460
[vanilla] Correct number of monster in libraries
4 years ago
Anders Jenbo
0645d9b2a1
Correct missing hellfire level mapping in leveltype
...
Hellfire never added the 2 new dungion types, instead it makes
additional checks on currlevel. This is confusing and mess, so cleaned
it up.
4 years ago
ephphatha
8a0f81ec12
Pass regionId to TFit_Obj3 to extract reference to themes global
4 years ago
ephphatha
3e991fc9a8
Use Point/range iterator in CheckThemeObj3
...
This does introduce a slight behaviour difference for some callers. It was possible to read out of bounds due to the bounds check only guarding against negative indexes (e.g. Theme_Library uses 1, MAXDUN - 1 as the bounds, but Theme_ArmorStand includes boundary tiles so could read off the right/bottom edge). Given the way vanilla levels are generated with a border this has no impact in practice.
4 years ago
ephphatha
a0019d289d
Use Point based object lookups in themes.cpp
...
Move bookstand lookup inside coinflip if statement, minimises the scope of that pointer.
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
Andrew James
796e2813cf
Use scoped enums for DungeonFlags/BFLAG ( #3135 )
4 years ago
Anders Jenbo
294b583dbe
Clean up Theme_Treasure
4 years ago
qndel
5656714ea9
fix 0 gold piles
4 years ago
Juliano Leal Goncalves
379a27b64a
♻️ Convert 'ItemType' enum to enum class
...
🎨 Rename 'ItemType' elements to enum class standards
5 years ago
ephphatha
b12de6fe12
Use scoped enum for Direction
...
Identified and removed an instance of Direction being used as an argument for a bool parameter
Removed a single-use temporary variable being cast from sprite frame to direction to size_t
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Fix alignment of WalkSettings array
5 years ago
Siddharth singh chouhan
6a8812c468
Move documentation from themes.cpp to themes.h
5 years ago
BC Ko
40c804c0ba
Replace QuestStatus() with IsAvailable() in QuestStruct
5 years ago
Anders Jenbo
9264ad4b89
Use IsTileNotSolid() in place of !nSolidTable[dPiece[][]]
5 years ago
ephphatha
19ae61811f
Refactor AddObject to take Point instead of int x/y
5 years ago
Anders Jenbo
903d4bd2e1
Scope all for loops
...
This caused 7 of the loops to be rewriteen using range by clang-tidy
5 years ago
Anders Jenbo
467b74dc06
Rename object globals
5 years ago
Anders Jenbo
c8870dbd1f
Rename item globals
5 years ago
Anders Jenbo
07ad083fda
Rename monster globals
5 years ago
Anders Jenbo
bc59218d0d
More clang-tidy/Android Studio cleanups
5 years ago
Anders Jenbo
0f2ad469ea
♻️ Clean up variable initialization
5 years ago
ephphatha
357f6f1dc3
Move RNG functions to their own header/source files
5 years ago
Anders Jenbo
d8fa29c972
Clean up more implicit bool conversion
5 years ago
Juliano Leal Goncalves
4668a526eb
♻️ Leverage 'Point' struct on monster functions ( #2056 )
5 years ago
Juliano Leal Goncalves
d55cd99dd5
🚚 Rename 'direction' enum to 'Direction'
5 years ago
Anders Jenbo
9e2206a673
Format code
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
34744c068f
♻️ Consitantly use %i and not %d
5 years ago
Anders Jenbo
2bd13451a1
♻️ Apply point positioning to all remaning entities
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
Jmgr
1d84156509
Simplify bitshift divisions/multiplications
5 years ago
Anders Jenbo
373f28736f
🎨 Acceptable parts of modernize-*
5 years ago
Anders Jenbo
c89bd9c001
🚨 Fix remaning warnings for clang and gcc
5 years ago
Anders Jenbo
946ff5b0fa
♻️ Performe static casts when load save game data
5 years ago
Anders Jenbo
61d15e23db
🎨 Apply direction enum to monsters and relations
...
Missiles _mimfnum is being used for a lot more then just directions and
can also be a 16 degree direction so can't apply enum verbs and
restricitons to it in most cases. This in turns also affects SetMissDir
and some other functions that have to stay int.
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Anders Jenbo
61244c4d93
♻️ Rearange and apply more enums
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
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
Anders Jenbo
6f1498d315
🚚 Move structures to there respective headers
5 years ago
Juliano Leal Goncalves
9021f8daa5
♻️ Pluralize global 'item' array variable
5 years ago
qndel
c0f5749728
Fix RNG diverging during level generation depending on the code path
...
The consequences has mostly mitigated after wards, but this will make things make more sens when analysing the state of the code.
5 years ago
Anders Jenbo
d20eddf48e
Unifcy a chunk of Hellfire's code pathts
5 years ago
qndel
7f7ae623df
Goe ( #2163 )
...
* proper random_ comparisons
* proper mienemy comparisons
* add mienemy/micaster enum
* GOE enum
5 years ago
qndel
c94c04d049
some cleanup ( #2146 )
5 years ago
qndel
7c2ee3333f
Theme_MonstPit cleanup
6 years ago