Anders Jenbo
810b12a37d
Drop unused code
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
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
bf493d8b58
Fix UB: pointer overflow gmenu.cpp:112
7 years ago
galaxyhaxz
3c7a08a336
Fix function order [scrollrt.cpp] ( #1800 )
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
Gleb Mazovetskiy
c2056c6cbf
SHA: Fix some implementation-defined behaviour ( #343 )
...
* SHA: Fix negative base shift UB
* SHA: Avoid signed integer overflow
We do cast from uint32_t to int32_t but that should be OK everywhere.
* SHA: Always use portable arithmetic right shift
7 years ago
Gleb Mazovetskiy
e4de2ad177
Fix UB: Signed integer overflow engine.cpp:1264
7 years ago
Gleb Mazovetskiy
1ec5fa7896
Fix UB: load/store of misaligned render.cpp:130
...
Source/render.cpp:130:47: runtime error: load of misaligned address 0x7fea0df260da for type 'DWORD', which requires 4 byte alignment
Source/render.cpp:130:26: runtime error: store to misaligned address 0x7fea5796ff62 for type 'DWORD', which requires 4 byte alignment
7 years ago
Anders Jenbo
dc5bbd0c49
Implement DefWindowProc directly in MainWndProc
7 years ago
Anders Jenbo
73a7a1ae6d
Remove unimplemented functions that aren't needed with SDL
7 years ago
qndel
a89a719f09
[hellfire] OperateMushPatch bin exact
7 years ago
qndel
83d68786b5
[hellfire] 3 functions bin exact
7 years ago
qndel
b24a30814b
[hellfire] PlayDungMsgs bin exact ( #1797 )
...
* [hellfire] PlayDungMsgs bin exact
* newline
7 years ago
qndel
e0cebaf164
formatting
7 years ago
qndel
989d39ab0b
[hellfire] GetBookSpell bin exact
7 years ago
arczi84
1ab2fb2666
Endian madness
7 years ago
Anders Jenbo
adbd08137f
Work around VC5 DialogBoxParam definition
7 years ago
qndel
13eb926575
[hellfire] GetManaAmount bin exact
7 years ago
qndel
a4852904be
sneaky bug
7 years ago
qndel
7fd66b103b
[hellfire] game_2_ui_class / pfile_get_player_class bin exact ( #1792 )
7 years ago
qndel
5d7e0d04f6
[hellfire] GetDamageAmt bin exact
7 years ago
qndel
3f1cdf9bc8
[hellfire] GetDamageAmt bin exact
7 years ago
qndel
7956bf81da
[hellfire] gamemenu_save_game / gamemenu_load_game bin exact ( #1772 )
7 years ago
Marlon Beijer
d641c65562
Some fixes for Big Endian systems
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
qndel
06e7b4dbdb
more enums
7 years ago
qndel
7129558d0b
apply enums
7 years ago
qndel
124b8a60c3
DIABOOL ( #1768 )
7 years ago
Anders Jenbo
edbc23f144
Clean up diablo.cpp
7 years ago
qndel
ee590ad129
DrawAutomapType cleanup
7 years ago
qndel
473f6216df
[hellfire] SetupAllUseful bin exact
7 years ago
qndel
ffbcccbab6
[hellfire] items.cpp_2 ( #1774 )
...
* [hellfire] items.cpp_2
* formatting
7 years ago
Anders Jenbo
a8dd5dcd4a
Correct signature of FuncDlg
...
This reduces a lot of the casting in appfat.cpp
7 years ago
Anders Jenbo
6d982f6d06
Correct parameter naming for init_test_access
7 years ago
Anders Jenbo
683a50527d
Correct missmatched bool types
7 years ago
Anders Jenbo
4caa9be882
Itemdat ( #1717 )
...
* Align itemdat.cpp
* [hellfire] Add itemdat and related enums
7 years ago
Anders Jenbo
c97388386c
Correct textdat.cpp for shareware version
...
This fixes all speech missing for towners.
7 years ago
qndel
562d5ee073
[hellfire] DrawClippedMissile
7 years ago
qndel
0b40e796c0
[hellfire] DrawMissile bin exact
7 years ago
qndel
ca1b5ce485
[hellfire] DrawObject bin exact
7 years ago
qndel
83a04341ca
[hellfire] DrawClippedObject bin exact
7 years ago
qndel
0fb6025948
scrollrt_draw_lower_2 cleanup
7 years ago
qndel
2dadb3e3a3
scrollrt_draw_lower cleanup
7 years ago
qndel
d375bb2852
[hellfire] InitItems / items_42390F bin exact ( #1787 )
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
qndel
6b286941f3
enums
7 years ago