Guillaume Roche
5f4ba26894
Use an enum for connection type
...
This fixes some "multi-character character constant" warnings.
7 years ago
Guillaume Roche
e8393704ef
README: Add missing dependency for Fedora
7 years ago
galaxyhaxz
85afd0768a
Add bugfix for dupe bug
7 years ago
miqlas
360543703e
Cleanup HAIKU compilation instructions ( #371 )
7 years ago
Gleb Mazovetskiy
f72b3fbd48
credits.cpp: Enum for CreateFontA iPitchAndFamily ( #1811 )
...
* credits.cpp: Enum for CreateFontA iPitchAndFamily
From https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createfonta :
> The two low-order bits specify the pitch of the font
> The four high-order bits specify the font family
[[MS-WMF]: 2.1.1.8 FamilyFont Enumeration](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/9a632766-1f1c-4e2b-b1a4-f5b1a45f99ad )
[[MS-WMF]: 2.1.1.24 PitchFont Enumeration](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/22dbe377-aec4-4669-88e6-b8fdd9351d76 )
* credits.cpp: Use enum for font weight
https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createfonta
7 years ago
Robin Eklind
a7ca9bfbf1
comparer-config: add newline between gamemenu_gamma and gamemenu_color_cycling
7 years ago
Gleb Mazovetskiy
4ac8472850
Add some checks to DrawTTF
7 years ago
Anders Jenbo
d1914efa41
Make sens of lineoffset ( #1810 )
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
qndel
f6379c3692
[hellfire] M_ChangeLightOffset bin exact ( #1809 )
7 years ago
qndel
5250d019cb
[hellfire] PlaceMonster bin exact ( #1808 )
7 years ago
Anders Jenbo
18d38d102e
Fix compiling Hellfire
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
141bffe1dd
Update town.cpp
7 years ago
Anders Jenbo
a0baa92ef0
Merge branch 'master' of github.com:diasurgical/devilution
7 years ago
Anders Jenbo
86cc3c8799
Update function names
7 years ago
Anders Jenbo
0502ba70ea
Merge branch 'master' of github.com:diasurgical/devilution into hellfire
7 years ago
galaxyhaxz
7f0eb791f8
Fix function order [drlg_l4.cpp]
7 years ago
galaxyhaxz
2b05500486
Fix function order [drlg_l3.cpp]
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
Anders Jenbo
6597688eac
Rename cell functions
7 years ago
Robin Eklind
9aabe31cc3
Merge pull request #1803 from galaxyhaxz/NameFixersrt
...
Fix function order [drlg_l1.cpp]
7 years ago
galaxyhaxz
74216dc1b4
Fix function order [drlg_l1.cpp]
7 years ago
Anders Jenbo
263ab2bb48
Remove unused debug functions
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
Anders Jenbo
02416d3fc7
Merge branch 'master' of github.com:diasurgical/devilution
7 years ago
Anders Jenbo
bf040777cb
Make more use of cell helpers
7 years ago
Gleb Mazovetskiy
69d6238a7c
Add BUGFIX comment for gmenu_call_proc
7 years ago
Gleb Mazovetskiy
332dbf71c1
CMake: LTO improvements
...
1. Move `project` before `check_ipo_supported`, so that the check knows
the languages to check.
2. Better error message if LTO is not supported.
3. Use a separate flag for LTO
4. Enable LTO for the nightly build.
5. Move git commands to a separate file.
7 years ago
Gleb Mazovetskiy
bf493d8b58
Fix UB: pointer overflow gmenu.cpp:112
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
Anders Jenbo
354adc480f
Merge branch 'master' of github.com:diasurgical/devilution into hellfire
7 years ago
Anders Jenbo
3d1dadced1
Move the comparer-config to the devilution repo
7 years ago
galaxyhaxz
3c7a08a336
Fix function order [scrollrt.cpp] ( #1800 )
7 years ago
Gleb Mazovetskiy
2fb84d5f60
Renderer texture: use RGB888 instead of RGBA8888
...
Massively improves renderer performance.
7 years ago
Gleb Mazovetskiy
fb37bbf675
Disable some signed shift UBSAN warnings
...
On Clang we can do this globally via a sanitizer blacklist, but that's not supported on GCC (yet):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61978
We disable these warnings because all compilers implement them in the
same way according to the N2218 proposal to standardize the behaviour:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2218.htm
7 years ago
Gleb Mazovetskiy
65344058ec
Fix UB: Misaligned access in GetCelFrameClipped
...
runtime error: load of misaligned address 0x632000363773 for type 'WORD', which requires 2 byte alignment
0x632000363773: note: pointer points here
7f 7f 7f 3e 0a 00 02 01 50 04 00 00 00 00 7f 7f 7f 7f 7f 7f 7f 7f 7f 34 bc ac ff bc 5b f9 fc dc
It was actually out-of-bounds as well so I had to add a bounds check.
7 years ago