Gleb Mazovetskiy
c19bfe87fa
Remove utils/stdcompat/algorithm.hpp
3 years ago
Anders Jenbo
64d7af2937
Fix loading new demo files and give better error messages when failing
3 years ago
Gleb Mazovetskiy
936b3bd45a
Demomode: Store/override gameplay options
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
Gleb Mazovetskiy
c5e6bf630f
demomode.cpp: Set `mouse.*.which` to 0
...
Otherwise it can end up as `-1`, triggering the `VirtualGamepad` input
type (-1 is `SDL_TOUCH_MOUSEID`).
3 years ago
Gleb Mazovetskiy
1a1a282d9a
Use C FILE instead of C++ streams throughout
...
Reduces binary size by ~2 KiB and may improve compatibility with oddball
systems (e.g. PS2).
3 years ago
Gleb Mazovetskiy
1788d2f8ec
Remove miniwin
...
Event handling code moved to `engine/events.{hpp,cpp}`.
3 years ago
Gleb Mazovetskiy
5bf9dfd7ee
Demo mode: Force resolution to that of the demo
3 years ago
qndel
efaf334965
typos and code cleanup
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
cffb2566df
Fix timedemo on SDL1
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
obligaron
eca1a68bec
AnimationInfo: Use fixed point math for fractions
3 years ago
Gleb Mazovetskiy
4cf0053ece
Set underlying type for all the enums
...
Reduces rg99 binary size by 3 KiB.
4 years ago
Gleb Mazovetskiy
ba34bafb3f
Use SDL events directly
...
Removes redundant miniwin events and queue, using SDL events directly instead.
Demo migrated using this script: https://gist.github.com/glebm/8a73b04f695de96f344cc2e35151e03e
4 years ago
obligaron
2c7e886c85
Add detail log info to CompareSaves
4 years ago
Gleb Mazovetskiy
7c0b72abc0
Improve demo test error message
...
Example:
```
file "game" is different at byte 54251:
Expected: ... 00 00 00 00 00 00 00 00 30 00 00 00 50 00 00 00 ...
Actual: ... FF FF FF FF 00 00 00 00 30 00 00 00 50 00 00 00 ...
```
4 years ago
Gleb Mazovetskiy
adf40f5c80
misc_msg: Always use `lParam` for mod state
...
Previously, keyboard events used `lParam` for modifier key state,
while mouse events used `wParam`.
Changes the mouse events to use `lParam`, which allows us to
change `lParam` to `uint16_t`.
Demo migrated with a script.
4 years ago
Gleb Mazovetskiy
4c1dbaba72
Demo mode: Handle endianness
4 years ago
Gleb Mazovetskiy
ea1087dfeb
Use `StrCat` in a few more places
...
Now `fmt` is only used for more complex formatting and for translations.
4 years ago
Gleb Mazovetskiy
a4ac41cece
Replace `DVL_VK` virtual key codes with `SDLK`
4 years ago
Anders Jenbo
ac2bf9aaac
Limit what gets called in headless mode
4 years ago
obligaron
ebfb519ee0
Rename gbQuietMode to HeadlessMode
4 years ago
obligaron
bab9baa42a
Handle gbQuietMode for paths in StartGame
4 years ago
Anders Jenbo
3ae834148a
Split event handeling from general miniwin features
4 years ago
Gleb Mazovetskiy
72660d9189
Migrate snprintf to fmt ( #4845 )
...
* Migrate `app_fatal` from printf to libfmt
* Migrate snprintf to fmt
4 years ago
obligaron
0d2a23254e
Use binaryformat for demofile ( #4799 )
4 years ago
obligaron
1608219b39
Timedemo: Create reference save game and allow comparing of reference save game with actual timedemo save game
4 years ago
obligaron
b62cacd1d6
Demomode: Init ControlMode to KeyboardAndMouse
4 years ago
obligaron
79b926c375
Move more options to OptionEntryBase
4 years ago
obligaron
9a14edfcd9
Add OptionEntries for Hardware Cursor
4 years ago
Gleb Mazovetskiy
9bc9bb6d33
Fix demomode file comments
4 years ago
Gleb Mazovetskiy
1f2d67f98b
Fix demomode line endings
4 years ago
obligaron
5e2ad66e64
Add OptionEntry Resolution
4 years ago
obligaron
2e5a488d5f
Add OptionEntry for graphics
4 years ago
obligaron
6273f700fa
Add some Graphic Settings to Settingsmenu ( #3617 )
4 years ago
Gleb Mazovetskiy
7e1fea6f76
clang-format all files in {Source,test}/
...
Also includes a few manual tweaks to comments and newlines for better results.
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
obligaron
02900c8fa5
Demo: Fix rendering jittering
5 years ago
obligaron
2a6e5712de
Disable hardware cursor for demo playback
5 years ago
obligaron
26e61b363b
demo: Centralize options override
5 years ago
obligaron
77f9bded9e
Introduce demo namespace
5 years ago