Gleb Mazovetskiy
77632cd83e
`world_draw_black_tile`: Stop relying on buffer padding
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
Anders Jenbo
a2656637e4
🎨 Format source
5 years ago
Juliano Leal Goncalves
800dbce066
♻️ Move options-related structs to new 'options.h' file
5 years ago
Gleb Mazovetskiy
70d1d633bd
Get rid of SCREEN_X / SCREEN_Y
...
GlobalOutputBuffer() now returns a clipped subregion
5 years ago
Gleb Mazovetskiy
ae22644d43
CelOutputBuffer: Recover lost performance
...
Makes `RenderLine` hotspot manipulate the buffer directly again.
FPS: 195 -> 275
5 years ago
Gleb Mazovetskiy
cd59a1c323
Completely replace gpBuffer with CelOutputBuffer
...
`CelOutputBuffer` now contains an `SDL_Surface` and an `SDL_Rect`.
We now have access to SDL surface manipulation functions.
`gpBuffer` and `gpBufEnd` are completely gone 🧹
This results in some FPS loss (250 -> 195) recovered in a subsequent
commit.
5 years ago
Gleb Mazovetskiy
f607807c95
Migrate the rest of drawing away from gpBufEnd
5 years ago
Juliano Leal Goncalves
103cde53ff
♻️ Make options struct hierarchical
5 years ago
Anders Jenbo
e280432b92
🚨 Fix all SDL1 warnings
5 years ago
Gleb Mazovetskiy
83ce7c27af
Enginify `trans_rect`
...
Moves `trans_rect` to `engine` as `DrawHalfTransparentRectTo` and makes
it operate on `CelOutputBuf`.
5 years ago
FluffyQuack
63d9562cfd
Fix for RightMask_Transparent[] array so that each row increases by 2 rather than alternating between 1 and 3.
5 years ago
Anders Jenbo
39999791b3
Revamp ini options and sync in multiplayer
...
[NetMsg]
F12=Now you DIE!
F11=Here's something for you.
F10=Follow me.
F9=I need help! Come Here!
[Game]
Speed=50
Fast Walk=1
Grab Input=0
Theo Quest=0
Cow Quest=0
[Audio]
Sound Volume=0
Music Volume=0
Walking Sound=1
[Graphics]
Fullscreen=1
Fit to Screen=1
Scaling Quality=2
Integer Scaling=0
Vertical Sync=1
Blended Transparency=1
Gamma Correction=100
Color Cycling=1
[Diablo]
Intro=0
[Hellfire]
Intro=0
SItem=
[Phone Book]
Entry1=127.0.0.1
[Network]
Bind Address=0.0.0.0
5 years ago
Gleb Mazovetskiy
588458d500
Remove gpBufStart
...
Was only set once and used in one place since #964
5 years ago
Anders Jenbo
879077de7d
Fix missing tile peases when using blended transparancy
5 years ago
pionere
d5a0fa8e85
get rid of a few warnings
5 years ago
FluffyQuack
790c8e17e5
Implemented blended tranparency
5 years ago
Arsène Pérard-Gayot
c631b4daf8
`RenderLine()` function fix for issue #941 ( #942 )
...
* Fix for RenderLine() when n == 32
* Improve count_leading_zeros with better fallback and compile-time check
5 years ago
Arsène Pérard-Gayot
8e1c61a6f7
Improvements to the `RenderLine()` function ( #920 )
...
* Improvements to the `RenderLine()` function
- Simplify by using indices instead of incrementing pointers
- Improve performance in the case where mask != -1 by only processing the bits that are set
5 years ago
qndel
b81d2eb831
some cleanups ( #2099 )
6 years ago
Anders Jenbo
145ab3c48e
Apply more defines to replace magic numbers
6 years ago
Anders Jenbo
c1b4d3d8b5
Copy documentation from sanctuary/notes
6 years ago
Anders Jenbo
1ba96a6777
Add doxygen description to remaining engine files
6 years ago
Anders Jenbo
dc8be6c0ab
C++03 compatibility ( #736 )
...
* Use C++03 compatible constructors
* Remove conflicting definitions
6 years ago
Anders Jenbo
b7c126d976
Apply defines to render
6 years ago
Anders Jenbo
af4ef7b19b
Fix rendering the ground part of foliage
6 years ago
Anders Jenbo
3c276a3cd3
Add documentation
...
- Add file documentation to about 1/4 of the files in Source
- Copy over a lot of the documentation from the sanctuary/notes repo
- Standardise all the existing documentation
- Create a configuration for Doxygen
- Add more documentation (engine.cpp is now fully documented)
6 years ago
Anders Jenbo
ffb6de3f5a
Don't draw in to the panels
6 years ago
Anders Jenbo
67d7655544
Fix world_draw_black_tile not taking buffer borders in to account
...
Thanks to @imperialsecond for providing a test case for
world_draw_black_tile
6 years ago
Anders Jenbo
e641eda71d
Document a couple of render functions
6 years ago
Anders Jenbo
e7e51abd13
Document remaning functions in render related files
6 years ago
Anders Jenbo
20621a0642
add all.h and use in place of diablo.h ( #2005 )
...
Now diablo.h is treated in the same way as all other header files of
Source, as it only contains the declarations of global variables and
functions of diablo.cpp.
Besides consistency, this also enables mods to include diablo.h just
like any other header file without having to include every header file
(and without having to include C++ specific aspects of the now all.h).
6 years ago
Marek Majkowski
15b021f8b7
Misc: "typedef enum" is not correct. Just "enum" is fine.
6 years ago
Gleb Mazovetskiy
ef20d1a038
Fix more UBSAN errors
6 years ago
Mathieu Maret
a12a7998d1
simplify world_draw_black_tile
6 years ago
Mathieu Maret
b2ed866c7a
Code simplification using memset/memcpy
6 years ago
Anders Jenbo
2348c3a8fd
Documentations, enums and clean ups
6 years ago
Anders Jenbo
7d1b0f24f7
Eliminate overdraw in cell functions
7 years ago
Anders Jenbo
da679a66a6
Convert inc file to a function
7 years ago
Anders Jenbo
16820106bc
Merge town_draw() with scrollrt_draw()
...
This require calling DRLG_InitTrans() during CreateTown() to clear out
the transparancy flags after having been to the duntion. Else the
mausoleum will be transparent.
7 years ago
Anders Jenbo
f8c16a1dcb
Only use safe blitting and set gpBufEnd to the correct relative values
...
This again allows us to only selectivly render the UI panel
This also eliminates the need for the BORDER_BOTTOM 10k memory saved!
7 years ago
Anders Jenbo
d0f1100983
Drop speedcel optimizations
...
Even on VC6 this appears to not improve performance in any noticable way
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
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
arczi84
1ab2fb2666
Endian madness
7 years ago
Anders Jenbo
4fc52a0e23
Format render.cpp
7 years ago
Anders Jenbo
ec90987be0
Switch to new render from Galaxy
7 years ago
Anders Jenbo
b023104434
Remove u from values
7 years ago
Anders Jenbo
6ba57a2d10
Remove the last bit of garbage
7 years ago