Commit graph

66 commits

Author SHA1 Message Date
Anders Jenbo
de0b3a38b8 Apply code style 2021-07-20 02:51:39 +02:00
Anders Jenbo
e5fc7fd17c Move remaning symbols in to anonymous namespaces 2021-07-20 02:51:39 +02:00
Anders Jenbo
ef6275caac Clean up private function names 2021-07-12 17:59:22 -07:00
ephphatha
5a77f60caf Give skeleton king subregions more descriptive names 2021-07-11 05:09:13 -07:00
ephphatha
a842d07dab Combine duplicated initialisation logic for quest book objects 2021-07-11 05:09:13 -07:00
ephphatha
e25d287ba9 Move SetObjMapRange to a member function
Due to the way this function is used it was easiest to also change ObjIndex to return a reference to the object instead of the index. Also added an explicit conversion from Size to Displacement to make one of the uses slightly cleaner to express.
2021-07-10 19:11:30 -07:00
ephphatha
36ff5578fd Refactor LoadMapObjects/LoadMapObjs to take Point instead of int x/y 2021-07-09 18:00:08 +02:00
ephphatha
3a517048f7 Refactor ObjIndex to take Point instead of int x/y
Also updated declaration of temporary/local variables to match
convention. This includes inlining int oi in LoadMapObjects as this
matches the way SetOBjMapRange is called in other areas.
2021-07-09 17:59:07 +02:00
Anders Jenbo
903d4bd2e1 Scope all for loops
This caused 7 of the loops to be rewriteen using range by clang-tidy
2021-07-08 08:14:03 -07:00
Anders Jenbo
9ebdb6db69 General clean up 2021-07-08 03:30:25 -07:00
Anders Jenbo
467b74dc06 Rename object globals 2021-07-08 02:01:14 -07:00
Anders Jenbo
9b8bf92575 Rename quest globals 2021-07-08 02:01:14 -07:00
Gleb Mazovetskiy
e40b1963f9 🚚 engine.h: Extract CelSprite and file loading 2021-06-21 01:36:20 -07:00
Anders Jenbo
34744c068f ♻️Consitantly use %i and not %d 2021-05-15 14:17:52 +02:00
Anders Jenbo
fa0b286693 ♻️Typed file loading
Tthis gives us the option to specify what type a file should be loaded
as, avoidng the need to case it and does some automatic checks on the
fitness of the data, while making the process simpler.

If no type is given then the type will be set to std::byte which limit
what operations can be performed on the data.
2021-05-04 19:08:37 +02:00
Gleb Mazovetskiy
052b4c12f5 ♻️ LoadFileInMem: Remove nullptr at call sites
This is now the default argument, no need to provide it explicitly.
2021-05-01 20:51:55 +02:00
Gleb Mazovetskiy
1b8b62a8c2 ♻️ Store CEL width with the sprite itself
Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.

Implemented for most sprites except towners, missiles, or monsters.
2021-05-01 20:51:55 +02:00
John Törnblom
e0dddf508a
Add automatically translated string literals (#1694) 2021-04-25 18:14:58 +02:00
Anders Jenbo
2bd13451a1 ♻️Apply point positioning to all remaning entities 2021-04-25 01:25:48 +02:00
Anders Jenbo
f004c78824 🧹 performance-unnecessary-value-param 2021-04-22 00:08:19 +02:00
Jmgr
1d84156509 Simplify bitshift divisions/multiplications 2021-04-21 05:31:17 +02:00
Anders Jenbo
bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
Anders Jenbo
997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo
67a7ff98c5 🚨 Clean up compiler warnings 2021-04-16 01:04:54 +02:00
Anders Jenbo
bfb3c11c2b 🎨 Change namespace to devilution 2021-04-06 15:21:25 +02:00
Anders Jenbo
630e507f63 🚚 Apply namespace 2021-04-06 15:21:25 +02:00
Anders Jenbo
fbd86cd3c5 🎨 Mark noreturn functions as such 2021-03-26 02:24:32 +01:00
Anders Jenbo
72e2637061 Merge branch 'master' of github.com:diasurgical/devilution 2020-10-25 17:38:06 +01:00
Gleb Mazovetskiy
ec329e645c Fix all "no-write-strings" warnings 2020-10-25 15:37:51 +01:00
Anders Jenbo
e073422ce7 Unify executable for Spawn and Retail
The game will now autodetect if it should run in shareware mode or full
retail based on the found mpq file. Additionally it can beforced in the
shareware mode with --spawn even if the retail data is found.

This simplifies a lot of the spagetty code and lets us better refactor,
also worth noteing is that we won't have to setup a secound set of build
tests.
2020-10-20 19:42:01 +02:00
Juliano Goncalves
09bd5f0bd8 Rename "Bone Chamber" level to "Chamber of Bone" 2020-09-30 00:54:12 +02:00
Anders Jenbo
893efd51ea Merge branch 'master' of github.com:diasurgical/devilution 2020-09-27 03:34:42 +02:00
Anders Jenbo
31ac716c3d
99 lines of documentation (#2058) 2020-07-07 19:36:18 +02:00
Anders Jenbo
1ba96a6777 Add doxygen description to remaining engine files 2020-07-06 05:43:25 +02:00
Anders Jenbo
bd155e4a03
Correct poison water spawn position 2020-04-18 16:39:38 +02:00
qndel
9a5ff805ed Remove hardcoded spawn location for Cave maps 2020-04-18 16:28:55 +02:00
Anders Jenbo
7108145a04 Merge branch 'master' of github.com:diasurgical/devilution 2020-04-14 15:30:49 +02:00
Anders Jenbo
350646fe95 Correct signatures 2020-04-11 15:22:40 +02:00
Anders Jenbo
d008af43b0 Semantic code style cleanups 2020-04-11 15:22:40 +02:00
Anders Jenbo
776ab10476 Merge branch 'master' of github.com:diasurgical/devilution 2020-03-29 23:40:05 +02:00
galaxyhaxz
71565b9c02
Several updates [enums+names] (#2002)
* Several updates

* Correct msg_get_next_packet

* Update enums.h

Co-Authored-By: Robin Eklind <mewmew@users.noreply.github.com>

Co-authored-by: Robin Eklind <mewmew@users.noreply.github.com>
2020-03-11 21:27:40 -05:00
Anders Jenbo
3c276a3cd3 Add documentation
- Add file documentation to about 1/4 of the files in Source
- Copy over a lot of the documentation from the sanctuary/notes repo
- Standardise all the existing documentation
- Create a configuration for Doxygen
- Add more documentation (engine.cpp is now fully documented)
2020-03-01 22:18:00 +01:00
Anders Jenbo
25993b4043 Merge branch 'master' of github.com:diasurgical/devilution 2020-02-14 23:03:31 +01:00
Anders Jenbo
20621a0642
add all.h and use in place of diablo.h (#2005)
Now diablo.h is treated in the same way as all other header files of
Source, as it only contains the declarations of global variables and
functions of diablo.cpp.

Besides consistency, this also enables mods to include diablo.h just
like any other header file without having to include every header file
(and without having to include C++ specific aspects of the now all.h).
2020-02-14 13:12:54 +01:00
Anders Jenbo
98ab9b9600 Merge branch 'master' of github.com:diasurgical/devilution 2019-08-18 08:07:33 +02:00
Anders Jenbo
68d51e7d27 Implementing Spawned Shareware version 2019-08-12 16:04:20 +02:00
Anders Jenbo
2fcf8dab70 Merge branch 'master' of github.com:diasurgical/devilution 2019-07-21 19:39:17 +02:00
Anders Jenbo
5ab9f4609a Clean up signedness 2019-07-21 00:57:53 +02:00
Xadhoom
148a7be44d Merge upstream branch 'devilution/master' 2019-07-10 17:04:38 +00:00
Anders Jenbo
32a51d17ca Align function signatures with PSX symbols
Using
https://github.com/diasurgical/scalpel/tree/master/psx/_dump_/3/_dump_c_src_/diabpsx/source
as a reference
2019-07-08 04:12:12 +02:00