Guillaume Roche
1bfd062b3c
Fix some write-strings warnings
...
Declare const char* arguments to get proper string conversion. Some of
these warnings still remain, as it involves code from Source/ directory.
According to https://github.com/diasurgical/devilutionX/issues/279 ,
those fixes should not be made outside of SourceX/.
6 years ago
Anders Jenbo
5b95289440
Render FPS count using ingame font
7 years ago
Anders Jenbo
0e578ffb11
Enable assertions
7 years ago
Gleb Mazovetskiy
f0eab35672
SDL 2.0.3 SVid: Use non-device Audio API
...
Fixes audio in movies on RG350!
From SDL docs: The legacy calls are good both for backwards compatibility and when you don't care about multiple, specific, or capture devices.
7 years ago
Gleb Mazovetskiy
f13d2d193a
SDL 2.0.3 SVid: Zero audio buffer before MixAudio
7 years ago
Gleb Mazovetskiy
afaa25193a
Set surface size to be the logical size
7 years ago
Guillaume Roche
5f4ba26894
Use an enum for connection type
...
This fixes some "multi-character character constant" warnings.
7 years ago
Gleb Mazovetskiy
4ac8472850
Add some checks to DrawTTF
7 years ago
Gleb Mazovetskiy
7dc73dd825
SDL1: Remove SDL_DOUBLEBUF
...
Turns out this causes flickering when consuming a potion in the belt on RG300.
Since it also doesn't work on Amiga, just remove it for now.
7 years ago
Gleb Mazovetskiy
aa816b43e2
GetAsyncKeyState: Implement more keys
7 years ago
Mathieu Maret
3c416b16d7
Fix display of Connection menu ( #354 )
7 years ago
Gleb Mazovetskiy
df8d7a1f46
Compatibility with SDL v2.0.3
...
RG350 and GCW0 devices have an ancient version of SDL2.
7 years ago
Anders Jenbo
feeae23076
Prevent infinit recursion in UiOkDialog
7 years ago
Gleb Mazovetskiy
dd5bc39816
Get a fresh window surface before rendering to it ( #358 )
...
* Get a fresh window surface before rendering to it
It is possible that a window surface gets invalidated since we initially
obtained it. We need to call GetWindowSurface every time we want one,
instead of keeping a pointer to a possibly stale one.
See https://hg.libsdl.org/SDL/file/369b01006eb2/src/video/SDL_video.c#l2312
Fixes #351
7 years ago
Gleb Mazovetskiy
9d4dce5c62
SDL1: Support fullscreen
...
This "just works" now, not sure which of the commits fixed it.
7 years ago
Anders Jenbo
b23e1ea527
Unload art fonts
7 years ago
Anders Jenbo
810b12a37d
Drop unused code
7 years ago
Anders Jenbo
0929cdd9ac
Ignore SDL_KEYMAPCHANGED event
7 years ago
Anders Jenbo
a8e4db538f
Display SDL error messages in UI dialog
...
This will also end the application in most cases
7 years ago
Gleb Mazovetskiy
426c246535
Simplify SDL1/2 palette handling
...
SDL 1 and 2 handle surface palettes very differently.
This adds a few compatibility functions that do the right thing
depending on the SDL version.
7 years ago
Gleb Mazovetskiy
356e276b0a
credits.cpp: Hard-code a safe mask color
...
palette->colors[50] was the same as palette->colors[224] for a few frames.
7 years ago
Gleb Mazovetskiy
e7d7cbe098
DiabloUI/credits: Use SDL_SetPaletteColors in SDL2
...
Internally, this increments the palette version, which we previously
didn't do.
7 years ago
Gleb Mazovetskiy
b80963f057
DiabloUI/credits: Remove BlitToViewport helper
7 years ago
Gleb Mazovetskiy
d76e577ee4
DiabloUI/credits: Render TTF only once
...
Re-use the same TTF surface for text and shadow.
This is significantly faster.
7 years ago
Gleb Mazovetskiy
89ff46a371
Remove SDL_Delay(1)
7 years ago
Gleb Mazovetskiy
f0a90f4717
DiabloUI: Credits improvements
...
1. Fix lines moving up and down on slower devices.
2. Cache rendered text surfaces (in a ring buffer).
3. SDL_Delay(1) between event polls to reduce CPU usage.
4. Move data to a separate compilation unit.
Refs #231
7 years ago
Gleb Mazovetskiy
2fb84d5f60
Renderer texture: use RGB888 instead of RGBA8888
...
Massively improves renderer performance.
7 years ago
Anders Jenbo
88039e9a21
Prepare release
7 years ago
Anders Jenbo
dc5bbd0c49
Implement DefWindowProc directly in MainWndProc
7 years ago
Anders Jenbo
b35a886846
Limit verbose info level debug to _DEBUG mode
7 years ago
Anders Jenbo
fb01349343
Ignore uninteresting SDL events
7 years ago
Anders Jenbo
5eacf0ed8e
Implement GetAsyncKeyState (enables two debug features)
...
- When started with -^ you can scroll the screen by holding shift and
moving the mouse.
- Holding menu will disable transparency.
7 years ago
Anders Jenbo
73a7a1ae6d
Remove unimplemented functions that aren't needed with SDL
7 years ago
Cybervitexus
ab60df6618
Diasurgical master ( #336 )
...
* Debian Package update
* Missing font & icons fix
* Fedora package update
* Fedora package update
* Fixing #333 Linux Font Path problem
* use of TTF_FONT_PATH
7 years ago
Gleb Mazovetskiy
d15bd453c6
Make DiabloUI/errorart arrays const
7 years ago
Gleb Mazovetskiy
52e4064fe5
art.cpp: Use `const_cast` instead of C-style cast
7 years ago
Anders Jenbo
ba9288c6cf
Unify error dialogs, for looks and portability
...
- Use UiOkDialog() to display all error messages
- Add SDL simple message, and console fallbacks to UiOkDialog()
- Boot graphics early on to facilitate most error messages with build in
gui
- Some more miniwin clean ups
7 years ago
Gleb Mazovetskiy
6b9a9faebc
Fix hero dialog image
...
Regression introduced in b536d0efa2
Fixes #318
7 years ago
Anders Jenbo
97e09e3e25
Fix music in shareware
7 years ago
Gleb Mazovetskiy
ea4358fdc7
Avoid console warnings on dialog init w/o diabdat
7 years ago
Gleb Mazovetskiy
b536d0efa2
DiabloUI: Handle logo like all the other elements
...
Adds the `animated` flag to `UiImage`, allowing us to
remove special handling for the logo.
7 years ago
Pyr0Byt3
e7e1ba96dc
fix hero order
7 years ago
Gleb Mazovetskiy
4ea3a4e941
Make Source/ dialogs call DiabloUI/dialogs.cpp
...
The diabdat.mpq absence error is handled by stubbing the art with solid
colors.
7 years ago
Gleb Mazovetskiy
850d09b0a5
Minor cleanup of internal error handling
...
1. TTF no longer crashes on exit.
2. Art failing to load simply isn't rendered instead of crashing in random places.
3. Fixes empty line rendering in ttf_render_wrapped.cpp
4. dx_cleanup is now idempotent.
7 years ago
Gleb Mazovetskiy
fd0a23aac3
Improve RenderUTF8_Solid_Wrapped comment
7 years ago
Gleb Mazovetskiy
d7bec68fb2
Reduce TTF line spacing to roughly match Diablo
7 years ago
Gleb Mazovetskiy
40651d8a19
Implement x-align for wrapped TTF text
7 years ago
Gleb Mazovetskiy
5d7f6db2fc
Wrapped text rendering for TTF
...
Does not do centering yet, but should be easy to add in the future
7 years ago
Gleb Mazovetskiy
aa3a8fecd5
DiabloUI: Dialog positioning and other tweaks
7 years ago
Gleb Mazovetskiy
458fbcef88
DiabloUI: Implement some dialogs
...
Partially addresses #303
7 years ago