pionere
f5c1079d6f
eliminate unused code
5 years ago
pionere
d5a0fa8e85
get rid of a few warnings
5 years ago
FluffyQuack
790c8e17e5
Implemented blended tranparency
5 years ago
qndel
c0f5749728
Fix RNG diverging during level generation depending on the code path
...
The consequences has mostly mitigated after wards, but this will make things make more sens when analysing the state of the code.
5 years ago
Anders Jenbo
9ffcab40e3
Fix LLVM builds
5 years ago
Anders Jenbo
2dc33b58ea
Reorder engine.cpp
5 years ago
Gleb Mazovetskiy
ec329e645c
Fix all "no-write-strings" warnings
5 years ago
Joel Falcou
c4223d4c29
Per file basis use of extern C
6 years ago
Joel Falcou
64d26a7934
Sanitize use of namespace
...
Wrap individual headers in dvl namespace to prevent
including standard header in another namespace.
6 years ago
Anders Jenbo
cd18914026
Avoid void pointers
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
f761c73723
Correct CelBlitWidth signature
6 years ago
Marek Majkowski
d6f268545c
Misc: Don't call SwapLE32 on unaliged memory
...
On some architectures it's illegal to do unaligned memory fetches. Just
don't load 4 bytes at once, instead load byte-by-byte. A smart compiler
is supposed to recognize the pattern as little-endian unaligned load.
6 years ago
Robin Eklind
f9fa98984b
engine: pass tbl parameter explicitly instead of using default parameter values
...
This helps make the header files in `Source/*.h` parsable from both
C and C++.
Any headers in SourceX can easily be C++ only, but keeping
the core Devilution code parsable as both C and C++ is
useful for integration into mods.
6 years ago
Anders Jenbo
b528d4362d
Fix rendering on Big Endian systems
6 years ago
Anders Jenbo
933262d701
Remove support for partial cel decoding
...
Since we no longer make use of this it should result in a small speed up
6 years ago
Anders Jenbo
3e7d352fde
Format files
6 years ago
Robin Eklind
e155a9423e
rename random to random_ to avoid collision with random in stdlib.h
...
Fixes #1813 .
6 years ago
Anders Jenbo
3fe2d08940
Deduplicate monster drawing
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
337bc9b125
Render text in screen cordinates instead of buffer offsets
7 years ago
Anders Jenbo
9e1b161bc0
Unify upper and lower screen rendering
7 years ago
Anders Jenbo
11e8df8f6c
Deduplicate missile rendering code
7 years ago
Anders Jenbo
6597688eac
Rename cell functions
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
Anders Jenbo
1a2f2b5f52
Implement CelGetFrameClipped from the Mac 9 port
7 years ago
Anders Jenbo
64824cab2b
Implement CelGetFrameStart
7 years ago
Anders Jenbo
ce6fc51b50
Implement CelGetFrame (CEL decoder helper)
...
This implements the first of the inlined CEL decoder helper functions
that are still visable in the Mac port code.
Functions are still bin exact
7 years ago
Anders Jenbo
2012106b90
Fix spell rendering
7 years ago
Robin Eklind
2508690d9c
engine: rename rand_increment and rand_multiplier to RndInc and RndMult
...
Rationale described in a479cc56b8
as included below:
Note, neither rand_increment nor rand_multiplier are
present in the PSX debug info. To keep the names for
these variables consistent with the naming convention
used for sglGameSeed, SeedCount, SetRndSeed and
GetRndSeed (which are part of the PSX debug info), we
rename them to RndInc and RndMult, respectively.
7 years ago
Anders Jenbo
7883043adc
Clean up files with dirty headers
7 years ago
Anders Jenbo
dc4f0572f6
Remove unused variables
7 years ago
Anders Jenbo
32a51d17ca
Align function signatures with PSX symbols
...
Using
https://github.com/diasurgical/scalpel/tree/master/psx/_dump_/3/_dump_c_src_/diabpsx/source
as a reference
7 years ago
galaxyhaxz
75a150d142
DrawLine ( #1084 )
7 years ago
galaxyhaxz
5d4918eea0
LoadWithMem
7 years ago
galaxyhaxz
3a636fdcc6
Add missing functions for MI_Dummy ( #1004 )
7 years ago
galaxyhaxz
cef65ea0b6
Implement Critical section constructor
7 years ago
galaxyhaxz
4e01e03711
Cleanup default calling conventions
7 years ago
Anders Jenbo
e7d5aac5dc
Clean up engine and scrollrt attribute naming
7 years ago
galaxyhaxz
f388472713
ENG_set_pixel + engine_draw_pixel ( #691 )
7 years ago
galaxyhaxz
0bb9f666b3
Clean remaining .CEL functions ( #657 )
7 years ago
galaxyhaxz
9e4885a955
Cleanup CL2 functions ( #656 )
7 years ago
galaxyhaxz
81f3f5daa2
Cleaning Engine CEL functions ( #652 )
...
* Cleaning Engine CEL functions
* Fix C functions
7 years ago
Xadhoom
15341fdae3
More temporary 64 bit fixes; we can walk in town
7 years ago
Xadhoom
fa90e6720a
Revert random_ to random and remove extern "C" linkage
7 years ago
Xadhoom
3dd6cf1671
First try, merge compiles, but immediate crash
7 years ago
Anders Jenbo
cfbe27f3b8
Clean up ( #568 )
...
* Clean up mana checks
* Don't expose static globals
7 years ago
Anders Jenbo
9b7da61dcf
Auto format src
7 years ago
Anders Jenbo
54247a076c
C init ( #549 )
...
* Make initializers C compatible
* Compile more files as C
dthread.cpp dx.cpp init logging.cpp fault.cpp msgcmd.cpp nthread.cpp
* Update defs.h
7 years ago
Anders Jenbo
fd2a45ff9a
Engine.cpp ( #548 )
...
* Clean up DiabloAllocPtr
* Clean up mem_free_dbg
* Clean up GetDirection
* Clean up PlayInGameMovie
* 18 directions
7 years ago