obligaron
2296bf5625
Use StashStruct::EmptyCell instead for empty stash item check
3 years ago
Gleb Mazovetskiy
ebcd6b222d
Optimize `SpellData` size: 40 bytes -> 24
3 years ago
KPhoenix
a1fbf5253f
`enum talk_id` -> `enum class TalkID`
3 years ago
Gleb Mazovetskiy
b61dac853b
Add `GetSpellData(SpellID)`
3 years ago
KPhoenix
d813f13700
`enum spell_id` -> `enum class SpellID`
3 years ago
Gleb Mazovetskiy
1788d2f8ec
Remove miniwin
...
Event handling code moved to `engine/events.{hpp,cpp}`.
3 years ago
Eric Robinson
ef3a57b7d9
`enum spell_type` -> `enum class SpellType` ( #5674 )
3 years ago
KPhoenix
8db521727d
`enum missile_id` -> `enum class MissileID`
...
Changes `enum missile_id` to `enum class MissileID`
3 years ago
Anders Jenbo
a29fc3a074
Correct casing for Player::isWalking()
3 years ago
staphen
b66b6c611b
Produce multiple controller button events for SDL_JOYHATMOTION events
3 years ago
staphen
f17ea8db98
Implement settings menu for gamepad customization
3 years ago
Gleb Mazovetskiy
46e755f680
Simplify spell icon handling
...
Hide the internals of spell icon rendering behind simple functions.
3 years ago
Gleb Mazovetskiy
74ca2ab0db
Use no-background spell icons with UNPACKED_MPQS
...
Spell icons size: 200 KiB -> 81 KiB
Fixes #5470
3 years ago
Gleb Mazovetskiy
a2a8b1c706
Padmapper: Simplify `buttonTo*` data structures
...
Use an `std::array` instead of `std::unordered_map`.
3 years ago
staphen
f60f704ecc
Reverse A and B in pad button to key translation functions
3 years ago
staphen
e1167350a2
Clean up handling for gamepad IGNORE/NONE buttons
3 years ago
staphen
6a565d3755
Further improve simulated mouse interaction
3 years ago
staphen
198dec9412
Iron out interactions between simulated mouse movement and character movement
3 years ago
staphen
d7908d82f4
Always remove release actions from padmapper regardless of whether the action can be invoked
3 years ago
staphen
33d4cc2544
Properly handle d-pad events for mouse simulation
3 years ago
Gleb Mazovetskiy
0498d7d3a7
Fix compilation warnings
3 years ago
Gleb Mazovetskiy
88289bb02e
Fix HAS_KBCTRL build
3 years ago
staphen
21bd760bfa
Bypass CMD_PUTITEM when triggering CMD_OPENHIVE or CMD_OPENGRAVE
3 years ago
obligaron
ba65d5fbff
SyncPutItem: Always use passed coordinates for item position
3 years ago
staphen
0f74370a99
Move gamepad logic from FetchMessage() to GameEventHandler()
3 years ago
Gleb Mazovetskiy
179ae009df
Improve logic and fix for old compilers
3 years ago
staphen
e67e4934cc
Add padmapper for gamepad customization
3 years ago
Gleb Mazovetskiy
759ca7f055
`WorldTileRectangle/Size`
...
Adds a custom sized type for the world tile rectagle.
This allows us to better express intent.
It also allows us to make certain globals smaller, e.g. `THEME_LOC`.
3 years ago
Gleb Mazovetskiy
57e267e990
button.png: Arrange sprites horizontally
...
87x2262 -> 1131x174
This makes the file smaller and also makes the texture fit
on devices with 2048x2048 max texture size (Fixes #5403 ).
`button.png` updated with:
convert -crop 87x174 button.png +append out.png
optipng -o9 out.png
mv out.png button.png
3 years ago
Gleb Mazovetskiy
f7335e9df7
Xbox nxdk: Set gamepad type
...
Set the gamepad type to Xbox for the original Xbox.
3 years ago
Gleb Mazovetskiy
12c7dab3f3
Define gamepad type for SDL1 handhelds
3 years ago
Gleb Mazovetskiy
6150973c1b
Clean up gamepad icons code
...
1. Correctly defined button strings.
2. Clean up the printing code.
3. Use translatable strings for the generic gamepad type.
3 years ago
Nicholas Calaway
eb45857422
Gamepad icons ( #5357 )
3 years ago
staphen
8b6db3a678
Get rid of panelstr, pnumlines, and ClearPanel()
4 years ago
staphen
c90d884597
Fix skipping intro using gamepad
4 years ago
Anders Jenbo
872456ae5d
Use size_t for a select few pnum variables
4 years ago
Gleb Mazovetskiy
188dc79f6e
Make `Players` a vector
4 years ago
Nicholas Calaway
cf33230293
#3380 Use appropriate terms for mouse/gamepad/touch #5234 ( #5235 )
4 years ago
Gleb Mazovetskiy
4cf0053ece
Set underlying type for all the enums
...
Reduces rg99 binary size by 3 KiB.
4 years ago
Gleb Mazovetskiy
580d3cb6ee
touch/renderers: Migrate away from Art
4 years ago
Gleb Mazovetskiy
d741018fee
Remove more redundant `devilutionx.mpq` checks
4 years ago
Gleb Mazovetskiy
17a97450bc
Convert assets to CLX
...
Converted using the following commands:
```
cd Packaging/resources/assets
pcx2clx --transparent-color 1 --num-sprites 256 fonts/*.pcx && rm fonts/*.pcx
pcx2clx --num-sprites 2 ui_art/dvl_but_sml.pcx && rm ui_art/dvl_but_sml.pcx
pcx2clx --transparent-color 1 data/hintbox.pcx data/hintboxbackground.pcx && rm data/hintbox.pcx data/hintboxbackground.pcx
pcx2clx --transparent-color 1 --num-sprites 6 data/hinticons.pcx && rm data/hinticons.pcx
pcx2clx --num-sprites 2 data/panel8buc.pcx data/dirtybuc.pcx data/dirtybucp.pcx && rm data/panel8buc.pcx data/dirtybuc.pcx data/dirtybucp.pcx
pcx2clx --transparent-color 1 data/healthbox.pcx && rm data/healthbox.pcx
pcx2clx --transparent-color 1 --num-sprites 6 data/resistance.pcx && rm data/resistance.pcx
pcx2clx --transparent-color 1 --num-sprites 5 data/monstertags.pcx && rm data/monstertags.pcx
pcx2clx --transparent-color 1 data/stash.pcx && rm data/stash.pcx
pcx2clx --transparent-color 1 --num-sprites 5 data/stashnavbtns.pcx && rm data/stashnavbtns.pcx
pcx2clx **/*.pcx && rm **/*.pcx
git checkout master -- ui_art/black_diablo.pcx ui_art/black_hellfire.pcx data/charbg.pcx data/talkbutton.pcx data/panel8bucp.pcx
rm ui_art/black_diablo.clx ui_art/black_hellfire.clx data/charbg.clx data/talkbutton.clx data/panel8bucp.clx
```
4 years ago
Gleb Mazovetskiy
961866e1c4
CLX: A new graphics format
...
The format is almost identical to CL2, except it uses the frame header
to store frame width and height instead of 5 32-line offsets.
This means we always have access to frame dimensions, so we can use it
as an on-disk format for our graphics as well.
Additionally, we may be able to optimize the rendering even more
in the future now that we have guaranteed knowledge of frame dimensions.
4 years ago
ephphatha
0ce76a3f13
Add Object lookup method to mimic map::at()
4 years ago
ephphatha
975eb3674b
Add helper to check if a monster belongs to a player
...
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
Anders Jenbo
046f826931
[gamepad/touch] Fix targeting berserked
4 years ago
ephphatha
9e76cd4ab7
Use object pointer for pcursobj
4 years ago
ephphatha
3a7fd8da2d
Only send and consume object location for location based messages
...
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
Gleb Mazovetskiy
8ca71272b8
Load all CEL as CL2
...
Convert CEL files to CL2 at load time. CL2 format is more efficient and is about as fast to render.
CEL vs CL2 sizes, on dLvl 5: https://gist.github.com/glebm/9bbdd76962abcd4fd2405ecd3379af97
Memory:
* Peak memory (while loading): -300 KiB
* Memory in-game (dLvl5): -700 KiB
* RG99 binary size: -15 KiB (1333096 -> 1317192)
Performance on rg99:
* On average, -1 FPS in town.
* Same FPS in dungeon (20 FPS on dLvl 1).
4 years ago
Anders Jenbo
d1189388f5
Use user by reference
4 years ago