Commit Graph
77 Commits
Author SHA1 Message Date
Anders Jenbo fd98aff9f1 Move shared dungeon level code to common function 2022-06-16 11:19:14 +02:00
Anders Jenbo 6fa681e567 Clean up level initialization 2022-06-16 09:50:12 +02:00
Gleb Mazovetskiy 2386fd12a9 Fix a few warnings 2022-06-15 13:01:20 +02:00
Anders Jenbo 5fcf5ef303 Remove unused quest level code 2022-06-13 10:55:03 +02:00
Anders Jenbo 0205320a1d Export static transparancy data to .dun files 2022-06-13 10:55:03 +02:00
Anders Jenbo c241cae9e3 Test cathedral level generation 2022-06-01 13:54:18 +02:00
Anders Jenbo 6c6999235f Add debug command for testing custom levels 2022-05-14 09:11:42 +02:00
qndel 944655ff94 fix typos (#4568) 2022-05-12 08:25:55 +02:00
ephphatha 379d6e87b3 Move ObjectAtPosition to objects.cpp and make it return a pointer
All set maps initialise objects as expected so dObject has the correct ID already, no need to iterate over all active objects. Also by returning a pointer we can use this function to test if an object exists at the target position.

While on msvc int8_t is typedefed to signed char we might as well match the expected data type for the dObject array
2021-12-28 16:01:37 +01:00
Siddharth singh chouhan 0d3bf15601 Move docs to header 2021-09-10 12:18:47 +02:00
Juliano Leal Goncalves ef74b6f92d 🚚 Rename 'ObjectStruct' to 'Object' 2021-09-02 05:45:44 +02:00
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