Gleb Mazovetskiy
3afef6299f
Level renderer: Remove `cel_transparency/foliage_active` globals
3 years ago
Gleb Mazovetskiy
1293dfb86d
Level renderer: Remove `level_piece_id` global
...
`DrawFloor` now passes the piece ID into RenderTile.
Previously, `DrawFloor` did not set `level_piece_id`.
3 years ago
Gleb Mazovetskiy
c616e0d6d2
Level renderer: Remove `arch_draw_type` global
3 years ago
Gleb Mazovetskiy
69c429bb68
Level renderer: Remove `level_cel_block` global
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
a4ac41cece
Replace `DVL_VK` virtual key codes with `SDLK`
4 years ago
Anders Jenbo
3ae834148a
Split event handeling from general miniwin features
4 years ago
Anders Jenbo
2d21fc372e
Remove more miniwin code
4 years ago
Gleb Mazovetskiy
eb8721885d
Fix clang warnings
...
As seen in the Xbox NDK build.
4 years ago
Anders Jenbo
860bd1cebf
Operate directly on SOL data
4 years ago
Anders Jenbo
0508311959
Cleanup block_lvid checks
4 years ago
Anders Jenbo
b6bdbcfc98
Stip stippled transparency
4 years ago
obligaron
6273f700fa
Add some Graphic Settings to Settingsmenu ( #3617 )
4 years ago
Juliano Leal Goncalves
7da37da8c9
♻️ Leverage 'Point' in 'RenderTile' function
5 years ago
Anders Jenbo
dce78dde62
Rename lighting globals
5 years ago
Gleb Mazovetskiy
cb0dae8590
🚚 Rename `CelOutputBuf` to `Surface` and extract
5 years ago
Anders Jenbo
8e07ef8fe5
Clang-tidy: misc-unused-parameters
5 years ago
Anders Jenbo
2bdb6caa07
Cleanup majority of remaning implicit bool conversions ( #2234 )
5 years ago
Anders Jenbo
af254601d6
♻️ Apply clang-tidy to engine
5 years ago
Gleb Mazovetskiy
f624b9788c
🔥 Mark `dun_render` functions as `hot`
5 years ago
Gleb Mazovetskiy
4d10642b3d
🧹 Add and use a DVL_ALWAYS_INLINE macro
...
Also moves attribute macros out of miniwin into a new header.
5 years ago
Gleb Mazovetskiy
fb27ee3907
💨 dun_render.cpp: Faster RenderLine
...
Turns RenderLine line branches into template parameters, allowing the
compiler to eliminate the branches and also fully inline it.
Example FPS change
* In dungeon: 1450 -> 1530
* In town: 1655 -> 1700
Also splits RenderLine into 3 functions
Easier to read and also gives more useful profiling.
Apparently the most time is spent in `RenderLineOpaque`.
Also, mark them `inline` because that apparently hints GCC to inline
the function (in a later refactoring we can introduce attribute
always_inline instead where supported).
5 years ago
Gleb Mazovetskiy
59dd42692f
🚚 Move render.cpp to engine/render/dun_render.cpp
5 years ago
Anders Jenbo
f579b2f287
Handle cel/cl2 files as byte arrays
5 years ago
Gleb Mazovetskiy
18967ce5ff
🎉 render.cpp: Do not render out-of-bounds
...
This is part of the work to allow us to eliminate buffer padding.
As this is a hotspot, we have 4 separate functions for each non-square
primitive, resulting in quite a bit of code:
1. Unclipped ("Full")
2. Vertical-only clip
3. Vertical + Left clip
4. Vertical + Right clip
FPS at 640x480: 1420 -> 1530
5 years ago
Gleb Mazovetskiy
1b8b62a8c2
♻️ Store CEL width with the sprite itself
...
Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.
Implemented for most sprites except towners, missiles, or monsters.
5 years ago
thebigMuh
ad8f342db0
Adding constness
5 years ago
Anders Jenbo
a32ac83090
🎨 cleanup trivial trype comparisons
5 years ago
Anders Jenbo
2969b80163
🎨 Run readability-identifier-naming on all src sub-folders
5 years ago
Anders Jenbo
373f28736f
🎨 Acceptable parts of modernize-*
5 years ago
Anders Jenbo
c89bd9c001
🚨 Fix remaning warnings for clang and gcc
5 years ago
Anders Jenbo
5fdb9ce459
🎨 Format code
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Anders Jenbo
f450d6a125
🚚 Move defines to there proper files
5 years ago
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