Anders Jenbo
6d56058708
Move level generation to subfolder
4 years ago
Anders Jenbo
6962fcd63e
Clean up PlaceMiniSet()
4 years ago
Gleb Mazovetskiy
7fede6c4cb
Clean up owned/unowned CelSprite ambiguity
...
Makes `CelSprite` unowned and adds a new `OwnedCelSprite` class for
owned sprites.
This clarifies ownership and makes the code cleaner in a number of
places.
Additionally, because the `CelSprite` class is now tiny (1 less
pointer), we can pass it by-value instead of by-reference, removing a
pointer indirection in the rendering functions.
4 years ago
Gleb Mazovetskiy
1519e995cf
Move store graphics out of `stores.cpp`
...
These graphics are used in various places outside of `stores.cpp`.
4 years ago
Gleb Mazovetskiy
076b0c0c05
Overhaul tests
...
1. Adds a `libdevilution_so` target when tests are enabled.
2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel).
3. Tests are now defined in a separate `test/CMakeLists.txt` file.
4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest).
5. Tests are now built by default.
6. On CI, test errors are now reported.
Also:
* `.clang-format`: Enable SortIncludes in tests
* `path_test.cpp`: Fix -Wsign-compare
4 years ago
Gleb Mazovetskiy
7e1fea6f76
clang-format all files in {Source,test}/
...
Also includes a few manual tweaks to comments and newlines for better results.
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
Anders Jenbo
e68c8cc834
Reuse EntranceBoundaryContains in portal logic
5 years ago
Juliano Leal Goncalves
8a93087fb7
♻️ Extract quest entrance boundary check to a member function on QuestStruct
5 years ago
Juliano Leal Goncalves
ce40344ae9
🚚 Rename 'QuestDataStruct' struct to 'QuestData'
5 years ago
Juliano Leal Goncalves
ce23cd6bce
🚚 Rename 'QuestData' global array to 'QuestsData'
...
This will allow us to disambiguate from the 'QuestDataStruct' after the 'Struct' suffix is removed.
5 years ago
Juliano Leal Goncalves
1f7cfcf945
♻️ Replace 'ReturnLvlX' and 'ReturnLvlY' globals with single 'ReturnLvlPosition'
5 years ago
Juliano Leal Goncalves
0baffa6e33
🚚 Rename 'QuestStruct' to 'Quest'
5 years ago
Juliano Leal Goncalves
20db8d1a11
🚚 Rename 'MonsterStruct' to 'Monster'
5 years ago
vlad
dc61f5de31
Improved Questlog
...
- completed quests are displayed
- completely reworked quest log item drawing
- spacing and positioning depends on list size
- removed "Quest Log" title and "close Quest Log"
- selection follows cursor
- changed quest book ordering from alphabetical to explicitly modeled (added new field to QuestDataStruct)
5 years ago
Anders Jenbo
4891258775
Clean up quest init
5 years ago
BC Ko
40c804c0ba
Replace QuestStatus() with IsAvailable() in QuestStruct
5 years ago
BC Ko
ba5adc01f1
Use quest_id enum in QuestStatus
5 years ago
ephphatha
0efb134e18
Add tests for quest randomisation code
...
Required splitting the code to a separate function so it can be tested in isolation
5 years ago
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
5 years ago
Anders Jenbo
9b8bf92575
Rename quest globals
5 years ago
Gleb Mazovetskiy
cb0dae8590
🚚 Rename `CelOutputBuf` to `Surface` and extract
5 years ago
Anders Jenbo
d9a04b8390
🚨 Fix bool warning
5 years ago
Gleb Mazovetskiy
e40b1963f9
🚚 engine.h: Extract `CelSprite` and file loading
5 years ago
Gleb Mazovetskiy
f9f301b054
🚚 engine.h: Extract `Point`, `Direction`, `clamp`
...
`engine.h` is getting quite bloated. Moves this code to their own files.
5 years ago
staphen
b580b635eb
Optimize blended transparency calculations at the end of Poisoned Water Supply.
5 years ago
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.
5 years ago
Jmgr
c33182d6de
Modernize deprecated headers
5 years ago
Anders Jenbo
2bd13451a1
♻️ Apply point positioning to all remaning entities
5 years ago
Anders Jenbo
7912e510f0
🎨 Clean up overuse of SDL types
5 years ago
Anders Jenbo
d024f79b0e
🧹 performance-unnecessary-value-param
5 years ago
Anders Jenbo
c89bd9c001
🚨 Fix remaning warnings for clang and gcc
5 years ago
Anders Jenbo
5fdb9ce459
🎨 Format code
5 years ago
Anders Jenbo
f450d6a125
🚚 Move defines to there proper files
5 years ago
Anders Jenbo
e7ae8ddd04
🚚 Move all enums to there respective headers
5 years ago
Anders Jenbo
b46750ace3
♻️ Change _qflags to a meaningful bool
5 years ago
Anders Jenbo
61244c4d93
♻️ Rearange and apply more enums
5 years ago
Anders Jenbo
93d42b62b8
♻️ Change BOOL to bool
5 years ago
Anders Jenbo
433edc63ea
♻️ Consistently use pragma once to guard the headers
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
Anders Jenbo
a69a76941e
♻️ Clean up InitCutscene
5 years ago
Trihedraf
049b9325c4
Add ini toggle for All Quests for Single Player. Disabled by default.
5 years ago
Anders Jenbo
d6ec6395e0
♻️ change QuestTalkData in to an array of _speech_id
...
This gets rid of casting QuestTalkData to DWORD/int in various parts of
the code.
5 years ago
Gleb Mazovetskiy
d55a1c8a7d
Pass CelOutputBuffer to game text printing ( #1095 )
...
* Pass CelOutputBuffer to game text printing
* DrawHalfTransparentRectTo: minor cleanup
5 years ago
Anders Jenbo
5593ca2982
Fix loading order of poison water palette
...
Fixes #593
5 years ago
Anders Jenbo
06b7c78406
Notes of untimly header cleanups
5 years ago
Anders Jenbo
757fd4d33d
Full document and further clean up minitext.cpp
5 years ago
Anders Jenbo
e609e170d0
Merge a large chunk of Hellfire the code paths
5 years ago
Trihedraf
d5b80cb6e7
Add --allquests debug switch for Singleplayer ( #959 )
5 years ago
Anders Jenbo
129cece89f
Clean up quests.h
5 years ago