ephphatha
0efb134e18
Add tests for quest randomisation code
...
Required splitting the code to a separate function so it can be tested in isolation
2021-07-16 15:13:32 +02:00
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
2021-07-14 20:22:35 -07:00
Anders Jenbo
ef6275caac
Clean up private function names
2021-07-12 17:59:22 -07:00
Andrew James
af60158274
Object by reference in SyncObjectAnimation functions ( #2344 )
2021-07-10 14:03:44 +02:00
ephphatha
19ae61811f
Refactor AddObject to take Point instead of int x/y
2021-07-09 17:58:34 +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
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
Anders Jenbo
96bf75b502
Rename player globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
07ad083fda
Rename monster globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
56d3b5d710
clang-tidy/Android Stuidio cleanups 5
2021-07-05 13:14:47 -07:00
Gleb Mazovetskiy
55464eec78
Fix -Wmissing-braces
...
Fixes warnings such as this one:
```
../../../../../../Source/engine/render/text_render.hpp:83:33: warning: suggest braces around initialization of subobject [-Wmissing-braces]
return DrawString(out, text, { position.x, position.y, out.w() - position.x, 0 }, flags, spacing, lineHeight, drawTextCursor);
^~~~~~~~~~~~~~~~~~~~~~
```
2021-07-03 19:08:45 -07:00
Gleb Mazovetskiy
cb0dae8590
🚚 Rename CelOutputBuf to Surface and extract
2021-07-03 05:33:32 -07:00
Anders Jenbo
129342d07a
Clang-tidy: GlobalConstantCase
2021-07-02 22:56:56 +02:00
Anders Jenbo
0f2ad469ea
♻️ Clean up variable initialization
2021-06-27 14:58:51 -07:00
Juliano Leal Goncalves
fd9f2099d0
♻️ Leverage 'Point' to represent mouse position
2021-06-27 16:37:59 +02:00
ephphatha
357f6f1dc3
Move RNG functions to their own header/source files
2021-06-27 03:09:41 -07:00
Anders Jenbo
d9a04b8390
🚨 Fix bool warning
2021-06-26 15:01:14 -07:00
ephphatha
f4f6a8a51e
Refactor PlaySfxLoc to take a Point instead of x/y params
...
Because of the heavy usage of this function in objects.cpp and the mixed use of aliases and direct references to the active object in Operate*Door functions I've done some refactoring of those areas beyond what is strictly necessary. Hopefully this makes sense and is reasonable to include in this change.
2021-06-26 10:12:28 -07:00
Anders Jenbo
d8fa29c972
Clean up more implicit bool conversion
2021-06-26 10:07:02 -07:00
Anders Jenbo
22b632f04a
♻️ Clean up implicit bool conversions
2021-06-26 08:57:59 -07:00
Vladimir Olteanu
95643029e3
Refactor missiles.cpp
...
Use Point wherever possible
Make some functions static (not exhaustive)
Reduce excessive indentation (not exhaustive)
Declare variables as needed (not exhaustive)
2021-06-21 12:10:37 -07:00
Gleb Mazovetskiy
e40b1963f9
🚚 engine.h: Extract CelSprite and file loading
2021-06-21 01:36:20 -07:00
Kalebe Alves
118efe8e6d
Use Point/SDL_Rect for control functions coordinate system
2021-05-28 19:57:16 +02:00
Juliano Leal Goncalves
15c46b9eb0
💬 Rename HeroSpeech members to improve discoverability
2021-05-23 22:01:47 +02:00
Juliano Leal Goncalves
5350250a76
🚚 Rename speech functions to 'Say' variations
2021-05-23 05:32:34 +02:00
Juliano Leal Goncalves
8c620ce29e
♻️ Extract 'HeroSpeech' enum class for hero sounds instead of using raw ints
2021-05-23 05:32:34 +02:00
Jmgr
bbd39aa513
Replace sprintfs with strcpy for translatable strings
2021-05-21 01:02:45 +02:00
Jmgr
6e85cde978
Update format strings
2021-05-21 01:02:45 +02:00
Jmgr
0c27e756f7
Add fmt::format
2021-05-21 01:02:45 +02:00
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
2021-05-17 00:12:53 +02:00
arcas
6502a3ca4d
Adding resources for translation ( #1973 )
2021-05-15 14:12:28 +02:00
staphen
b580b635eb
Optimize blended transparency calculations at the end of Poisoned Water Supply.
2021-05-13 23:37:36 +02:00
Anders Jenbo
2472aca44f
♻️ Use DrawString for rendering the unique and quest box
2021-05-08 19:56:44 +02:00
Anders Jenbo
68923c6c33
✨ Generic game text render function
...
This should gradually replace all the direct rendering of game texts
throughout the code. The interface is made to closly mirror that of the
art fonts as that is what will eventually be used for rendering Unicode
fonts both in the menus and ingame.
fixup! ✨ Generic game text render function
2021-05-08 18:48:19 +02:00
Gleb Mazovetskiy
0edfa3de66
🚚 Move CEL rendering to engine/render/cel_render.cpp
2021-05-07 00:16:40 +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
Anders Jenbo
bd515ac75d
♻️ Apply Point equality operator
2021-04-29 16:04:30 +02:00
Anders Jenbo
48dbb47d70
🌐 Apply static translations
2021-04-29 01:21:28 +02:00
Anders Jenbo
187d547fb8
🌐 Remove unused string from the translation list
2021-04-28 01:58:00 +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
e4cfad3196
♻️ Use points instead of individual fileds for player structure
2021-04-24 04:46:08 +02:00
Anders Jenbo
a32ac83090
🎨 cleanup trivial trype comparisons
2021-04-23 02:48:25 +02:00
Anders Jenbo
aa290b6f63
🎨 Add missing braces
2021-04-22 00:31:39 +02:00
Anders Jenbo
593c6a6f17
🎨 Drop unused param and rename random_ to GenerateRnd
2021-04-22 00:08:19 +02:00
Anders Jenbo
d024f79b0e
🧹 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