Commit Graph
963 Commits
Author SHA1 Message Date
Anders Jenbo d83fa8edb3 🌐 Apply plural translation where applicable 2021-05-02 04:47:49 +02:00
thebigMuh cab62a7dbf Load item graphics early so they are available for hero selection 2021-05-02 04:12:54 +02:00
Gleb Mazovetskiy 8e634ff02c ♻️ Remove _iAnimWidth
No longer needed as of #1796

We could probably go further and not expose `ItemAnimWidth`,
but it'd be dangerous because sometimes `_iAnimData` is null.
2021-05-02 02:05:36 +02:00
Gleb Mazovetskiy 0b18b8977b 🐞 items.cpp: Fix nullopt access
A better fix would probably be to not call this function in the first
place before the graphics are loaded.
2021-05-02 01:49:14 +02:00
Anders Jenbo 22d7d41615 🌐 Fix remaning plural form of gold related texts 2021-05-02 00:31:02 +02:00
Gleb Mazovetskiy 5bb6dc928a 🌍 Add some missing /*xgettext:no-c-format*/ annotations 2021-05-01 23:56:27 +02:00
Gleb Mazovetskiy 4408ddc127 🧹 Fix some -Wformat warnings 2021-05-01 21:59:34 +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
Mathieu Maret dc28b7464e Do not translate spacing 2021-05-01 19:31:25 +02:00
Mathieu Maret e47d80f8df Fix in-correct c-format in pot
Detected as c-format because of % presence
but are used as regular strcpy

checked that clang-format will not break it
2021-05-01 19:31:25 +02:00
Anders Jenbo f884ba5340 🔥 Remove more miniwin dependencies 2021-04-29 23:04:56 +02:00
Anders Jenbo 5745f099ba ♻️Use Point for positions in msg.cpp functions 2021-04-29 21:36:31 +02:00
Anders Jenbo ff1bcb0d03 ♻️Clean up ItemDoppel 2021-04-29 16:04:30 +02:00
Anders Jenbo bd515ac75d ♻️Apply Point equality operator 2021-04-29 16:04:30 +02:00
qndel 0af36dc416 rename upper->uper 2021-04-29 13:30:45 +02:00
Anders Jenbo 48dbb47d70 🌐 Apply static translations 2021-04-29 01:21:28 +02:00
thebigMuh 5f288cbd43 Fixes small AC malus of less than 1 resulting in a bonus of 1 AC 2021-04-27 03:19:09 +02:00
thebigMuh ad8f342db0 Adding constness 2021-04-26 23:30:02 +02:00
John Törnblom e0dddf508a Add automatically translated string literals (#1694) 2021-04-25 18:14:58 +02:00
obligaron 239a43cc1c Remove "AnimWidth2" expect for missiles (#1680) 2021-04-25 13:32:33 +02:00
Anders Jenbo 2bd13451a1 ♻️Apply point positioning to all remaning entities 2021-04-25 01:25:48 +02:00
Anders Jenbo 7912e510f0 🎨 Clean up overuse of SDL types 2021-04-24 17:07:07 +02:00
Anders Jenbo 433fc9fa8d 💚 Packport std::clamp for pre GCC 7.1 2021-04-24 09:16:15 +02:00
Anders Jenbo a5f062b747 🎨 Use stdint instead of SDL types 2021-04-24 05:17:59 +02:00
72ad648e9a ♻️Cleanup some min/max/clamp logic
Apply suggestions from code review

Co-authored-by: Gleb Mazovetskiy <[email protected]>
Co-authored-by: thebigMuh <[email protected]>
2021-04-24 05:17:59 +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 593c6a6f17 🎨 Drop unused param and rename random_ to GenerateRnd 2021-04-22 00:08:19 +02:00
Anders Jenbo f004c78824 🧹 performance-unnecessary-value-param 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
Anders Jenbo 373f28736f 🎨 Acceptable parts of modernize-* 2021-04-19 22:42:19 +02:00
Anders Jenbo bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
Anders Jenbo c89bd9c001 🚨 Fix remaning warnings for clang and gcc 2021-04-19 02:44:39 +02:00
Anders Jenbo 5fdb9ce459 🎨 Format code 2021-04-19 00:37:33 +02:00
staphen 26fdd1fb2e Clean up unnecessary Mana Shield processing in CalcPlrItemVals(). 2021-04-18 21:12:16 +02:00
Gleb Mazovetskiy 95946e3a7c 🧹 Cleanup unused variables (#1584)
Fixes `unused-variable` and `unused-but-set-variable` compiler warnings.
2021-04-18 18:15:47 +02:00
Juliano Leal Goncalves f8871aab07 ♻️ Unify most valuable player item logic on new method 2021-04-16 04:02:18 +02:00
qndel d8444ed695 Clean DrawInvBelt + outline colors
* fix right hand items
2021-04-16 02:17:28 +02:00
Anders Jenbo 997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo f450d6a125 🚚 Move defines to there proper files 2021-04-16 01:04:54 +02:00
obligaron f2c7446134 bugfix idle animation after equipping/unequipping 2021-04-16 00:33:36 +02:00
Yuri Pourre ed1ddfdece Exposes player id from multi_send_packet 2021-04-14 17:36:31 +02:00
Juliano Leal Goncalves cc5f2a8f49 🎨 Rename 'attribute_id' enum to 'CharacterAttribute'
Members were renamed as well for readability.
2021-04-13 03:02:14 +02:00
Juliano Leal Goncalves f54cc5aa95 ♻️ Convert 'attribute_id' to a scoped enumeration 2021-04-13 03:02:14 +02:00
Juliano Leal Goncalves 8cf972e843 ♻️ Move 'HeroClass::ClassCount' to external tracking template
This eliminates the problem where the compiler complains we are not handling all enumeration values by moving the "hack" counting member into somewhere else external to the enum.
2021-04-12 20:55:33 +02:00
obligaronandAnders Jenbo c7b9ffec1f Decouple Animations from Gamelogi (Smooth Animations for skipped Frames).
NewPlrAnim: Use default arguments instead of overloads

StartPlrHit: Fix skippedAnimationFrames - Frames starts with 1

Add missing comment for StartPlrHit

Fix GotHit-Animation: Skipping Frames corrected and adjusted _pAnimGameTicksSinceSequenceStarted for animations that don't start with a additional tick.
Thanks @StephenCWills for the gothit skipping frame calculation logic :-)

Update StartWalk: calculated numSkippedFrames in own line.

Co-authored-by: Anders Jenbo <[email protected]>
StartPlrHit: always initialize skippedAnimationFrames

Co-authored-by: Anders Jenbo <[email protected]>
Update nthread_GetProgressToNextGameTick comment

Co-authored-by: Anders Jenbo <[email protected]>
fix spelling "lenght" instead of "length"

Update NewPlrAnim comment

Co-authored-by: Anders Jenbo <[email protected]>
GetFrameToUseForPlayerRendering: avoid one "else"
2021-04-12 20:44:29 +02:00
Juliano Leal Goncalves 28ad9d43c5 🎨 Rename 'plr_class' enum to 'HeroClass'
Members were renamed as well for readability.
2021-04-12 20:00:53 +02:00
Juliano Leal Goncalves 7d95bfed39 ♻️ Convert 'plr_class' to a scoped enumeration 2021-04-12 20:00:53 +02:00
qndel 25095b2ee6 fix uninitialized 2021-04-12 07:17:40 +02:00