qndel
92d1006134
Use std::move for premiumitems shift
5 years ago
Vladimir Olteanu
e664e39061
Direction16: nits
...
* use static_cast
* fix bad math that yielded same result as correct math
5 years ago
Anders Jenbo
a1a8dd4bba
🔥 Remove redundant MI_Lightctrl code
5 years ago
Gleb Mazovetskiy
8a9618aea2
♻️ Clean up `cel_header.hpp`
...
1. Rename `CelGetFrameStart` to `CelGetFrame`, in line with the other 2
functions with the same name and load the `uint32_t` safely.
2. Remove redundant `FrameHeader`, simply use `LoadLE16`.
3. Document all the functions.
5 years ago
Matheus Gomes
5ee7edbde1
Refactored "StartWalk(...)" into different functions and moved tightly coupled "Direction" parameters into an array.
5 years ago
Gleb Mazovetskiy
f98148484f
🐞 Fix inventory manipulation ( #2216 )
...
Fixes #2214
Co-authored-by: staphen <staphen@gmail.com>
5 years ago
Vladimir Olteanu
2624d1e62f
Introduce Direction16 as enum
5 years ago
Vladimir Olteanu
74863f95e9
Cleanup of MI_Lightctrl * Removal of redundant checks w.r.t. mx, my * Reduced indentation * Use Point stuff
5 years ago
Juliano Leal Goncalves
604b72bb12
Reword potion effect descriptions for consistency
5 years ago
ephphatha
ac8d40458c
Add tests for corner cases of the distribution functions
...
Hoping to add a few tests for normal operation as a sanity check. The eventual goal is to be able to split the distribution functions from the engine so they can be tested and implemented independently.
5 years ago
ephphatha
a88f991746
Declare RandomTest test suite in the devilution namespace
...
This is recommended for GTest and is a requirement to use FRIEND_TEST (see http://google.github.io/googletest/reference/testing.html#FRIEND_TEST ). If the random number generator code becomes a class with private attributes this allows us to switch to test fixtures more easily.
5 years ago
Vladimir Olteanu
8c3c9ae74a
Cleanup AddWarp
5 years ago
Anders Jenbo
00f8cab32a
Cleanup missile velocity calculations
5 years ago
Vladimir Olteanu
0765d2a70e
Cleanup missiles_process_charge
5 years ago
Vladimir Olteanu
52cc7ccc63
Cleanup MI_Hbolt
5 years ago
Vladimir Olteanu
1368c4d499
Cleanup MI_Wave
5 years ago
Vladimir Olteanu
67e37e5b54
Cleanup of MI_Apoca
5 years ago
Vladimir Olteanu
87d5124fac
Consolidate MI_FireRing and MI_LightningRing
5 years ago
Vladimir Olteanu
fab8ecbb78
AddHiveExplosion: remove duplicate code
5 years ago
Vladimir Olteanu
0b72187cbc
Refactor MI_Cbolt
5 years ago
Vladimir Olteanu
356a90411a
AddRuneExplosion: Use loop to get rid of duplicate code
5 years ago
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)
5 years ago
Gleb Mazovetskiy
14218080b6
🚚 engine.h: Extract `CelGetFrame` and friends
5 years ago
Gleb Mazovetskiy
4ea7ba0f5f
🚚 engine.h: Extract `LoadLE32` and `LoadBE32`
5 years ago
Gleb Mazovetskiy
1bc9c3973f
🚚 engine.h: Extract `Rectangle`
5 years ago
Gleb Mazovetskiy
5cefb4a365
Fix `-Wswitch` in `UseInvItem`
...
Fixes a giant non-exhaustive switch warning in `UseInvItem`:
```
../Source/inv.cpp: In function ‘bool devilution::UseInvItem(int, int)’:
../Source/inv.cpp:2131:9: warning: enumeration value ‘IDI_GOLD’ not handled in switch [-Wswitch]
2131 | switch (item->IDidx) {
| ^
../Source/inv.cpp:2131:9: warning: enumeration value ‘IDI_WARRIOR’ not handled in switch [-Wswitch]
../Source/inv.cpp:2131:9: warning: enumeration value ‘IDI_WARRSHLD’ not handled in switch [-Wswitch]
../Source/inv.cpp:2131:9: warning: enumeration value ‘IDI_WARRCLUB’ not handled in switch [-Wswitch]
...
```
5 years ago
Gleb Mazovetskiy
e40b1963f9
🚚 engine.h: Extract `CelSprite` and file loading
5 years ago
Gleb Mazovetskiy
aa54675d83
🚚 engine.h: Extract `Size`
5 years ago
Gleb Mazovetskiy
dcf3397139
🚚 engine.h: Extract `ActorPosition`
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
Juliano Leal Goncalves
25eaac78c1
♻️ Leverage 'Size' to represent a 'Rectangle's width/height
5 years ago
Juliano Leal Goncalves
e3ea6a9042
♻️ Leverage 'Point' to represent a 'Rectangle's position
5 years ago
Juliano Leal Goncalves
ff147f9280
🚚 Rename 'RECT32' to 'Rectangle' to match naming style of other core structs
5 years ago
Juliano Leal Goncalves
4490340a47
🚚 Move 'RECT32' type to 'engine.h' alongside other core types
5 years ago
Juliano Leal Goncalves
a983792880
♻️ Replace 'pair<int, int>' with 'Size' in 'GetItemSizeOnSlot' and 'GetInvItemSize'
5 years ago
Juliano Leal Goncalves
572c3e632e
♻️ Leverage 'Point' in 'InvDrawSlotBack' implementation
5 years ago
Juliano Leal Goncalves
07a049f667
♻️ Replace 'INV_SLOT_SIZE_PX' macro with Size-based constexpr
5 years ago
Juliano Leal Goncalves
0e2d734bbb
♻️ Leverage 'Size' in 'CheckInvPaste' implementation
5 years ago
Juliano Leal Goncalves
4ab80d25f4
♻️ Leverage 'Size' in 'AddItemToInvGrid' function
5 years ago
nsm53project
713abdca8f
Update Korean localization
...
725/1173 lines
5 years ago
staphen
b16eec262a
Disable ASAN and UBSAN for 3DS builds
5 years ago
staphen
1ca50e65eb
Fix and reenable SNetReceiveTurns on 3DS
5 years ago
staphen
c6a9eaaf88
Implement sendmsg and recvmsg
5 years ago
staphen
9ab268ee31
Reduce memory usage requirement for key derivation
5 years ago
staphen
fea2cbb104
Initialize AC and SOC services at startup
5 years ago
staphen
12cd536259
Stub missing functions for 3DS
5 years ago
staphen
d0059c01cc
Headers for 3DS asio compilation
5 years ago
staphen
14a0da7fb3
Enable TCP in 3DS build
5 years ago
staphen
57856fa2a6
3DS SOC service initialization functions
5 years ago
staphen
f2bf6f3ff3
3DS custom RNG for libsodium
5 years ago