Anders Jenbo
6bb0c4db07
Mark store owner names for translation
4 years ago
obligaron
98ecd0ecc5
Introduce CloseGoldDrop
4 years ago
qndel
eba6d827bf
fix typos ( #3238 )
4 years ago
qndel
70d04916cd
fix empty griswold shop
4 years ago
Anders Jenbo
7771a08d03
Translatable mainpanel
5 years ago
Juliano Leal Goncalves
379a27b64a
♻️ Convert 'ItemType' enum to enum class
...
🎨 Rename 'ItemType' elements to enum class standards
5 years ago
Anders Jenbo
7169882b1f
✨ Implement new font rendering
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
bb2dfdfb73
🚚 Rename 'ItemStruct' to 'Item'
5 years ago
Juliano Leal Goncalves
a469f7906e
♻️ Replace 'cursW' and 'cursH' globals with single 'cursSize'
5 years ago
Juliano Leal Goncalves
bbf529c65a
🚚 Rename 'PlayerStruct' to 'Player'
5 years ago
Anders Jenbo
4044fadeb5
Clean up some players references
5 years ago
qndel
9aee0360a0
stop shops reroll on load ( #2693 )
5 years ago
BC Ko
4df798808e
2435 refactor global variable Items part 2 ( #2673 )
5 years ago
BC Ko
e5434e03b3
2602 Use range-based for-loop for Quests ( #2612 )
5 years ago
BC Ko
2a7712794e
cleanup manual value clamping: stores.cpp 2 ( #2583 )
5 years ago
BC Ko
ff7891d66a
cleanup manual value clamping: stores.cpp
5 years ago
Anders Jenbo
d523fc1e81
Cleanups
5 years ago
ephphatha
0575716eac
Rename UiFlags members to group related options
5 years ago
ephphatha
4ad53232a0
Convert the UiFlags enum to a scoped enum type
...
Replace operator&& with named function
5 years ago
Anders Jenbo
de0b3a38b8
Apply code style
5 years ago
Anders Jenbo
e5fc7fd17c
Move remaning symbols in to anonymous namespaces
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
9ebdb6db69
General clean up
5 years ago
Anders Jenbo
9b8bf92575
Rename quest globals
5 years ago
Anders Jenbo
96bf75b502
Rename player globals
5 years ago
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);
^~~~~~~~~~~~~~~~~~~~~~
```
5 years ago
Anders Jenbo
fc353fc799
Clang-tidy: FunctionCase
5 years ago
Gleb Mazovetskiy
cb0dae8590
🚚 Rename `CelOutputBuf` to `Surface` and extract
5 years ago
Anders Jenbo
d9e0658643
Clang-tidy: basic naming
5 years ago
qndel
fd3893190f
inv cleanup
5 years ago
Juliano Leal Goncalves
fd9f2099d0
♻️ Leverage 'Point' to represent mouse position
5 years ago
ephphatha
357f6f1dc3
Move RNG functions to their own header/source files
5 years ago
Anders Jenbo
2bdb6caa07
Cleanup majority of remaning implicit bool conversions ( #2234 )
5 years ago
Anders Jenbo
1cc0eb25ca
♻️ Use ranges for loops (clang-tidy)
5 years ago
Andrew James
60a47caf1b
Refactor Draw* functions to use Rectangle and Point types
...
Added overload for DrawString taking a Point to avoid creating a rect for callers which only use position. This also documents the way DrawString operates when passed a clipping rectangle with a dimension of 0.
As part of this overload removed the logic for 0 width regions from DrawString. This does change the behaviour of the Rectangle version if called with a rect with width 0, all callers using that behaviour have been updated in this commit.
Using Rectangle/Size allowed simplifying the logic for certain calls where they could use DrawText alignment flags, previously this was manually aligning by calculating dimensions and offsetting the position. This also fixes #2169
Also includes a few instances where a temporary buffer was used to set the text to be drawn with unbounded sprintf calls, replaced those with snprintf as is recommended in modern C applications. Moving to C++ strings would be good in a future refactor.
5 years ago
Gleb Mazovetskiy
e40b1963f9
🚚 engine.h: Extract `CelSprite` and file loading
5 years ago
Kalebe Alves
118efe8e6d
Use Point/SDL_Rect for control functions coordinate system
5 years ago
Gleb Mazovetskiy
dd3ea66fa2
♻️ Split getTextColor(bool) into 2 functions
...
This is a bit more readable than using a bool argument.
5 years ago
Anders Jenbo
8a7ec56d3a
Player by reference part 2
...
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
5 years ago
Anders Jenbo
6ce8f13751
Apply clang-tidy to more code and do some related cleanups
5 years ago
Gleb Mazovetskiy
8ceb36a4cb
♻️ GetItemTextColor(item) -> item.getTextColor()
...
This will help with the Alt highlight feature.
5 years ago
Jmgr
bbd39aa513
Replace sprintfs with strcpy for translatable strings
5 years ago
Jmgr
6e85cde978
Update format strings
5 years ago
Jmgr
0c27e756f7
Add fmt::format
5 years ago
Anders Jenbo
34744c068f
♻️ Consitantly use %i and not %d
5 years ago
arcas
6502a3ca4d
Adding resources for translation ( #1973 )
5 years ago
Anders Jenbo
18aa04fa4f
♻️ Use common text rendering for store menus
5 years ago
Anders Jenbo
0c2042fa52
♻️ Player by reference
...
Update Source/items.cpp
Update Source/lighting.cpp
Update Source/pack.cpp
asd
ads
as
5 years ago
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
5 years ago