Commit Graph
13 Commits
Author SHA1 Message Date
Gleb Mazovetskiy c19bfe87fa Remove utils/stdcompat/algorithm.hpp 2023-08-14 01:54:29 +01:00
Gleb Mazovetskiy 750cebc561 Delay reinitializing hwcursor until fade 1
With fade 0 the cursor is never visible because everything is black.

While this is a very minor optimization, it works around
one of the instances of a bug in certain drivers as seen in #5618.
2023-05-22 13:21:36 +01:00
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
2023-05-10 13:50:12 +01:00
qndel 216febfe8a fix rotating right (#6020) 2023-04-22 16:14:01 +02:00
qndel 731ad1ada5 use std::rotate (#6019) 2023-04-22 13:53:03 +02:00
Gleb Mazovetskiy 957bd03b98 Remove FMT_COMPILE in "cold" places
Removes most `FMT_COMPILE` calls.
`FMT_COMPILE` results in better performance but larger code size.

Removes `FMT_COMPILE` calls for places that are called infrequently,
i.e. not on every frame.

RG-99 binary size reduced by ~4 KiB.
2023-03-12 19:29:35 +01:00
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).
2022-11-25 23:13:11 +01:00
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
2022-11-01 02:43:24 +00:00
Gleb Mazovetskiy 6327e713e0 Lowercase all file paths
We want to be able to use unpacked MPQs on low-end platforms
(PS2/rg99/etc).

This is tricky on case-sensitive filesystems. Avoids case issues by
lowercasing all paths in the code (then we'll just need lowercased
listfiles).
2022-08-20 23:49:23 +01:00
Anders Jenbo 74eacc1794 Clean up color cycling (#4966) 2022-07-17 07:58:19 +02:00
Anders Jenbo ac2bf9aaac Limit what gets called in headless mode 2022-07-13 18:54:36 +02:00
Gleb Mazovetskiy 3178dd5158 Replace most uses of sprintf with fmt (#4837) 2022-07-01 17:02:56 +02:00
Anders Jenbo 72656b3011 Move path and palette to the engine folder 2022-06-24 16:34:20 +02:00