Anders Jenbo
f73707df4f
Implement streaming
3 years ago
Anders Jenbo
39af36496b
Only open one file at a time
3 years ago
Anders Jenbo
246c6f9e66
Implement PS2 audio via SPU
...
This give us 2MB of dedicated audio memory and support for compressed
audio at runtime which is a huge boost to the already limited system
memory
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
0e0cc9d1b0
Reduce to just `STREAM_ALL_AUDIO_MIN_FILE_SIZE`
...
This does result in a bit more code and RAM usage for soundsample when
`STREAM_ALL_AUDIO` is on, but not by much.
3 years ago
Gleb Mazovetskiy
0dd95adcd1
Add a minimum threshold for STREAM_ALL_AUDIO
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
Gleb Mazovetskiy
6b338eac9f
Display path in `LoadAudioFile` error dialog
3 years ago
Gleb Mazovetskiy
6d274c9547
`UNPACKED_SAVES`: Saves without MPQs
...
Reduces rg99 binary size by ~70 KiB.
3 years ago
KPhoenix
8db521727d
`enum missile_id` -> `enum class MissileID`
...
Changes `enum missile_id` to `enum class MissileID`
3 years ago
Anders Jenbo
e50e21e0e4
Use outline for spell icon texts
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
5bf9dfd7ee
Demo mode: Force resolution to that of the demo
3 years ago
ephphatha
9da76e0003
Update CheckReflect to return applied damage
...
Instead of modifying the damage value by reference
3 years ago
qndel
efaf334965
typos and code cleanup
3 years ago
KPhoenix
75d785a5f0
Bugfix: AnimationInfo integer division by 0
3 years ago
obligaron
5b11dfa2ed
Fix preview frame shown fragment overflow
3 years ago
Gleb Mazovetskiy
fab6f362c3
Point: Avoid construction in distance functions
...
This reduces the runtime of timedemo_test by 25% in debug mode.
Makes no difference to optimized mode of course.
3 years ago
Gleb Mazovetskiy
9b1ff3d50b
demomode.cpp: Fix creating a bogus event
...
The `eof()` does not return true until a failed read attempt.
> Note that the value returned by this function depends on the last operation performed on the stream (and not on the next).
3 years ago
Gleb Mazovetskiy
45757856c1
DemoMode: Add a debug define to log events
3 years ago
obligaron
5180bd02b4
Timedemo: don't update ProgressToNextGameTick in pause menu
3 years ago
obligaron
028f630848
Timedemo: don't play and record messages in loading screens
3 years ago
obligaron
6e08ad658f
Timedemo: represent game tick progress as uint8_t
3 years ago
Gleb Mazovetskiy
f4b8edb5dc
Surface.pitch(): int -> uint16_t
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
9a1587060d
Use real `CalculateSoundPosition` with NOSOUND
...
Fixes big-endian tests, which currently build with `-DNOSOUND`
to reduce build time.
3 years ago
Gleb Mazovetskiy
cffb2566df
Fix timedemo on SDL1
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
staphen
ce413ec4a6
Round to the nearest integer when computing missile coordinates
3 years ago
Gleb Mazovetskiy
1addfc9e54
dun_render: Deduplicate trapezoid upper half
3 years ago
Gleb Mazovetskiy
63a042d0e3
dun_render: Simplify non-masked primitives
...
As we recently confirmed, Square and Left/RightTriangle primitives
never use masks other than Transparent and Solid.
Simplify the code to take advantage of that.
3 years ago
Gleb Mazovetskiy
55d25fd079
dun_render: Swap32LE the data offset
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
7a3882722e
Text rendering and chat input fixes
...
1. Fixes the return value (bytes rendered).
2. Fixes line wrapping / end-of-rendering based on the given rectangle:
1. Accounts for `BaseLineOffset`.
2. Fixes an off-by-one error for the y coordinate.
3. Wraps the cursor when needed.
3. Fix chat input box dimensions (height is 3 * line height).
4. Set the hint that indicates that we do not render the current
IME suggestion (SDL_TEXTEDITING). This indicates to IME
that it should render the suggestion instead.
3 years ago
Gleb Mazovetskiy
20c27d92e4
Disable fade-in/out in demomode
...
Disables FadeIn/FadeOut and progress bar updates in demo mode.
This makes the demo run much faster (6s -> 2s).
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
ab5733b5e3
Support demo playback in SDL1
...
Useful for measuring performance in SDL1.
The demomode test now passes in SDL1 as well.
3 years ago
Gleb Mazovetskiy
5ac54027dc
Text rendering: Clip text to the given rect
...
Previously, we only clipped to the given surface, without clipping to the given rect.
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