Gleb Mazovetskiy
bd5647fb06
Fix premium items reroll on level change
...
Bug introduced a few commits ago in 1519e995cf
Fixes #4036
2022-02-06 18:45:07 +01:00
Gleb Mazovetskiy
1519e995cf
Move store graphics out of stores.cpp
...
These graphics are used in various places outside of `stores.cpp`.
2022-01-30 14:56:04 +01:00
Anders Jenbo
6d346c7e18
Use std::string in PrintItemPower
2021-12-13 01:02:07 +01:00
Anders Jenbo
af08a99691
Perform item requirement check when entering vendors
2021-12-13 00:56:38 +01:00
obligaron
ff5de056fa
Add all (boolean) Game Settings to Settingsmenu ( #3616 )
2021-11-26 23:43:46 +01:00
Gleb Mazovetskiy
dbdae7b389
Fix the divider line position in the help menu
...
Fixes #3552
2021-11-20 14:45:31 +00:00
Gleb Mazovetskiy
e29c1d05a2
Improve Help screen layout + fix CJ
2021-11-20 02:31:21 +00:00
Gleb Mazovetskiy
4f64b87330
Fix talk/store text overlap for Chinese and Japanese
...
We ensure that selectable lines are placed at the same vertical
coordinates but space out unselectable text lines at the cost
of reduced heigh of empty space between the store items.
We also have to move the back button in scrollable lists to the
lower right.
This can definitely be improved further but at least it solves
the problem for now.
Refs #3162
2021-11-20 02:31:21 +00:00
Anders Jenbo
b21e92baae
Mark store owner names for translation
2021-10-31 23:18:38 +01:00
obligaron
98ecd0ecc5
Introduce CloseGoldDrop
2021-10-27 00:06:30 +02:00
qndel
eba6d827bf
fix typos ( #3238 )
2021-10-24 18:03:29 +02:00
qndel
70d04916cd
fix empty griswold shop
2021-10-20 18:22:31 +02:00
Anders Jenbo
7771a08d03
Translatable mainpanel
2021-09-19 07:21:52 +02:00
Juliano Leal Goncalves
379a27b64a
♻️ Convert 'ItemType' enum to enum class
...
🎨 Rename 'ItemType' elements to enum class standards
2021-09-13 00:25:49 +02:00
Anders Jenbo
7169882b1f
✨ Implement new font rendering
2021-09-12 01:37:28 +02:00
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.
2021-09-06 12:54:40 +02:00
Juliano Leal Goncalves
bb2dfdfb73
🚚 Rename 'ItemStruct' to 'Item'
2021-08-30 13:40:08 +02:00
Juliano Leal Goncalves
a469f7906e
♻️ Replace 'cursW' and 'cursH' globals with single 'cursSize'
2021-08-30 06:45:51 +02:00
Juliano Leal Goncalves
bbf529c65a
🚚 Rename 'PlayerStruct' to 'Player'
2021-08-30 06:44:18 +02:00
Anders Jenbo
4044fadeb5
Clean up some players references
2021-08-30 03:26:17 +02:00
qndel
9aee0360a0
stop shops reroll on load ( #2693 )
2021-08-27 14:28:13 +02:00
BC Ko
4df798808e
2435 refactor global variable Items part 2 ( #2673 )
2021-08-26 08:06:48 +02:00
BC Ko
e5434e03b3
2602 Use range-based for-loop for Quests ( #2612 )
2021-08-19 01:42:49 +02:00
BC Ko
2a7712794e
cleanup manual value clamping: stores.cpp 2 ( #2583 )
2021-08-12 12:22:34 +02:00
BC Ko
ff7891d66a
cleanup manual value clamping: stores.cpp
2021-08-11 13:09:49 +02:00
Anders Jenbo
d523fc1e81
Cleanups
2021-08-02 10:12:40 +02:00
ephphatha
0575716eac
Rename UiFlags members to group related options
2021-07-31 20:22:40 +02:00
ephphatha
4ad53232a0
Convert the UiFlags enum to a scoped enum type
...
Replace operator&& with named function
2021-07-31 20:22:40 +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
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
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
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
Anders Jenbo
fc353fc799
Clang-tidy: FunctionCase
2021-07-03 15:46:39 -07:00
Gleb Mazovetskiy
cb0dae8590
🚚 Rename CelOutputBuf to Surface and extract
2021-07-03 05:33:32 -07:00
Anders Jenbo
d9e0658643
Clang-tidy: basic naming
2021-07-02 22:55:01 +02:00
qndel
fd3893190f
inv cleanup
2021-07-02 05:00:31 -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
2bdb6caa07
Cleanup majority of remaning implicit bool conversions ( #2234 )
2021-06-26 21:05:45 +02:00
Anders Jenbo
1cc0eb25ca
♻️ Use ranges for loops (clang-tidy)
2021-06-25 13:22:08 +02:00
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.
2021-06-24 01:36:06 +02: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
Gleb Mazovetskiy
dd3ea66fa2
♻️ Split getTextColor(bool) into 2 functions
...
This is a bit more readable than using a bool argument.
2021-05-28 13:38:36 +02:00
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.
2021-05-24 21:00:32 +02:00
Anders Jenbo
6ce8f13751
Apply clang-tidy to more code and do some related cleanups
2021-05-24 05:27:06 +02:00
Gleb Mazovetskiy
8ceb36a4cb
♻️ GetItemTextColor(item) -> item.getTextColor()
...
This will help with the Alt highlight feature.
2021-05-23 18:45:01 +02:00