Gleb Mazovetskiy
62e9aa0448
`MissilePosition`: Use `WorldTilePosition`
...
Reduces struct size and makes the types of coordinates more obvious.
3 years ago
Gleb Mazovetskiy
5355146d51
Use structured bindings
3 years ago
Gleb Mazovetskiy
ba4def9382
Use utils/algorithm/container.hpp in more places
3 years ago
Gleb Mazovetskiy
26f42520fa
Fix unused variable warnings
3 years ago
Gleb Mazovetskiy
8c1a847f41
Remove utils/stdcompat/string_view.hpp
3 years ago
Gleb Mazovetskiy
62d067b653
Remove utils/stdcompat/abs.hpp
3 years ago
obligaron
d5642daeb4
Introduce GetScreenPosition
3 years ago
obligaron
578ce01432
Introduce Towner/Player/Object/Item/Monster::currentSprite/getRenderingOffset
3 years ago
DakkJaniels
ad19caf667
Move hp/mana display and item graphics to gameplay options
3 years ago
qndel
c362808165
debug path command ( #6101 )
3 years ago
qndel
3500dc1861
code cleanup
3 years ago
Gleb Mazovetskiy
4fa3732526
Add missing <cstdint> includes
...
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
3 years ago
Anders Jenbo
6998906b32
Hellfire: let light affect the player
3 years ago
Anders Jenbo
ec9d1b5550
Rename _oLight to applyLighting
3 years ago
Gleb Mazovetskiy
8408743eed
Draw item labels before the monster health bar
...
Fixes #5867
3 years ago
obligaron
36ecc50fcb
Always use infravision in Arenas
3 years ago
KPhoenix
a1fbf5253f
`enum talk_id` -> `enum class TalkID`
3 years ago
Gleb Mazovetskiy
98294e0ad5
Optimize `MissileData`: 32 bytes -> 24
...
23 bytes used, 1 spare byte in the padding.
3 years ago
Gleb Mazovetskiy
0a6a8e8aa0
Clean up missile data access
...
Replace enum static casts with `GetMissile(Sprite)Data`.
3 years ago
KPhoenix
7947b99511
Implement new enum class
3 years ago
Gleb Mazovetskiy
1788d2f8ec
Remove miniwin
...
Event handling code moved to `engine/events.{hpp,cpp}`.
3 years ago
staphen
dd6ce177f7
Derive viewport geometry from player position
3 years ago
Gleb Mazovetskiy
527e876fff
Disable item labels when in store
...
Also disable ground item outlines on hover when in store.
3 years ago
Anders Jenbo
c99f7cf644
Floating numbers ( #5639 )
...
Co-authored-by: qndel <stefan551@o2.pl>
Co-authored-by: Stephen C. Wills <staphen@gmail.com>
3 years ago
KPhoenix
8db521727d
`enum missile_id` -> `enum class MissileID`
...
Changes `enum missile_id` to `enum class MissileID`
3 years ago
Anders Jenbo
bb2463862c
Use Position in AddItemToLabelQueue()
3 years ago
Anders Jenbo
a29fc3a074
Correct casing for Player::isWalking()
3 years ago
Gleb Mazovetskiy
e06ca9a016
dun_render: Remove unused argument from RenderTile
...
Now that we pass the mask into `RenderTile`, we no longer need to pass
`levelPieceId`.
3 years ago
Gleb Mazovetskiy
aa2f88e5f6
Remove software cursor state for hardware cursor
...
Switching between software and hardware cursor could cause a glitch
as described in #5560 .
Fixes #5560
3 years ago
Gleb Mazovetskiy
79b330825d
dun_render: Avoid `Invalid` tile type
...
1. Do not call `RenderTile` with invalid values to begin with.
2. Move mask selection out of `RenderTile`.
3 years ago
Gleb Mazovetskiy
44ed0296d8
dun_render: Overhaul mask handling
...
We notice that masks can be described by 2 parameters:
1. Whether they have 0 or 1 as their high bits.
2. Whether they shift to the left or to the right on the next line.
Describing masks this way allows us to lift them to template variables and simplify the code.
We also avoid handling the mask in the `RenderLine` loop entirely.
Also fixes a foliage rendering bug: Transparent foliage pixels were previously blended but they should have been simply skipped.
3 years ago
Gleb Mazovetskiy
5024bc0f07
Show FPS up to 1 decimal point
...
If FPS < 100, print it with 1 decimal point.
Useful for measuring performance impact on low-end devices.
3 years ago
Gleb Mazovetskiy
aca4aae3c1
dun_render: Remove the use of `LightTableIndex`
...
Replaces the global with an argument.
3 years ago
Gleb Mazovetskiy
3afef6299f
Level renderer: Remove `cel_transparency/foliage_active` globals
3 years ago
Gleb Mazovetskiy
1293dfb86d
Level renderer: Remove `level_piece_id` global
...
`DrawFloor` now passes the piece ID into RenderTile.
Previously, `DrawFloor` did not set `level_piece_id`.
3 years ago
Gleb Mazovetskiy
c616e0d6d2
Level renderer: Remove `arch_draw_type` global
3 years ago
Gleb Mazovetskiy
69c429bb68
Level renderer: Remove `level_cel_block` global
3 years ago
Gleb Mazovetskiy
a7324a15c0
Item labels: Clip to viewport
...
Instead of redrawing the panel to avoid item label clipping, clip the labels themselves.
3 years ago
Gleb Mazovetskiy
4c0b43508a
DoBlitScreen: Fix update rects
...
Fixes chat input at 640x480.
Also fixes the other rects, they were slightly off.
3 years ago
obligaron
dc3d797269
GetOffsetForWalking: use uint8_t for animation fraction
3 years ago
obligaron
eca1a68bec
AnimationInfo: Use fixed point math for fractions
3 years ago
Gleb Mazovetskiy
1da4be3839
Fix chat
...
Accidentally broken by #5453
3 years ago
Gleb Mazovetskiy
680ab5ec40
Overhaul backbuffer state handling
...
When rendering directly to the output buffer, we need to maintain the
state of what has been drawn and what needs redrawing per-buffer.
We previously tried to do it implicitly by checking `SDL_DOUBLEBUF` and
other flags. The previous implementation was broken in several
ways, resulting in rendering issues on devices that support 8-bit output
directly.
Changes this mechanism to explicitly maintain buffer state per output
buffer. The new mechanism doesn't require knowledge of the number of
buffers, and thus also works correctly with triple-buffering.
Fixes #5447
3 years ago
Gleb Mazovetskiy
0498d7d3a7
Fix compilation warnings
3 years ago
obligaron
a2ec22667f
Use AnimationInfo::isLastFrame in more places
4 years ago
obligaron
deb0d6d9e1
Use missile helpers in MoveMissile/UpdateMissileRendererData ( #5291 )
4 years ago
Gleb Mazovetskiy
188dc79f6e
Make `Players` a vector
4 years ago
obligaron
68891a8df1
Rename MissileMovementDistrubution => MissileMovementDistribution
4 years ago
Gleb Mazovetskiy
580d3cb6ee
touch/renderers: Migrate away from Art
4 years ago
obligaron
2493f06116
ActorPosition: Remove offset, offset2 and velocity
4 years ago