Anders Jenbo
654a2b8834
♻️ Clean up automap code
...
Use Point for x,y pairs. Make helpers for drawing door and squares
5 years ago
Gleb Mazovetskiy
0bfc147b78
🧹 Remove `DiabloAllocPtr` and friends ( #1824 )
5 years ago
Gleb Mazovetskiy
63e0e60956
Add `MeasureSolidHorizontalBounds`
...
Adds a function to measure the X-coordinates of the solid
(non-transparent) bounding box of a CEL.
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
Gleb Mazovetskiy
f0d61c7533
🔨 Fix no-message static_asserts in Source/engine.h
...
Restores GCC5 compatibility
5 years ago
Vladimir Olteanu
f95851a767
Make Point comparison operators const
5 years ago
Anders Jenbo
bd515ac75d
♻️ Apply Point equality operator
5 years ago
Vladimir Olteanu
ebd57e4bc6
Operators for Point: +, -, +=, -= ( #1739 )
5 years ago
Vladimir Olteanu
bea21a5e20
Replace LOAD_LE32 & LOAD_BE32 with signedness- and endian-agnostic equivalents
5 years ago
thebigMuh
ad8f342db0
Adding constness
5 years ago
obligaron
239a43cc1c
Remove "AnimWidth2" expect for missiles ( #1680 )
5 years ago
Jmgr
c33182d6de
Modernize deprecated headers
5 years ago
Anders Jenbo
f77c52941a
♻️ Make GetDirection take Points instead of ints
5 years ago
Anders Jenbo
2bd13451a1
♻️ Apply point positioning to all remaning entities
5 years ago
Anders Jenbo
efbe8a8338
♻️ add possition points to monsters
5 years ago
Anders Jenbo
275404029e
♻️ Cleanup player temp variables
5 years ago
Anders Jenbo
f5012c6b85
🎨 Use feature macro instead of GCC version
5 years ago
Anders Jenbo
433fc9fa8d
💚 Packport std::clamp for pre GCC 7.1
5 years ago
Anders Jenbo
593c6a6f17
🎨 Drop unused param and rename random_ to GenerateRnd
5 years ago
Anders Jenbo
d024f79b0e
🧹 performance-unnecessary-value-param
5 years ago
Anders Jenbo
8c821e98d3
🚚 Restructure files
5 years ago
Anders Jenbo
997c1dba55
🚚 Split up all.h in to proper header relations
5 years ago
Anders Jenbo
f04b5501ef
🚚 Desolve types.h
5 years ago
Anders Jenbo
f450d6a125
🚚 Move defines to there proper files
5 years ago
Anders Jenbo
e7ae8ddd04
🚚 Move all enums to there respective headers
5 years ago
Anders Jenbo
61244c4d93
♻️ Rearange and apply more enums
5 years ago
Anders Jenbo
433edc63ea
♻️ Consistently use pragma once to guard the headers
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Anders Jenbo
630e507f63
🚚 Apply namespace
5 years ago
Gleb Mazovetskiy
21a4a671e4
Cleanup DiabloAllocPtr
...
1. Removes a lock around allocation. `malloc` is required to be thread-safe in C11.
2. Defines it as a macro so that:
1. We provide the correct location for the OOM error.
2. We get better attribution from memory profilers.
5 years ago
FluffyQuack
c0f57f3020
🐮 Draw outline for color in index 0 for inventory icons. ( #1318 )
5 years ago
Anders Jenbo
a2656637e4
🎨 Format source
5 years ago
Gleb Mazovetskiy
92fbd21b11
Fix SDL_Rect warnings on SDL1
5 years ago
Gleb Mazovetskiy
70d1d633bd
Get rid of SCREEN_X / SCREEN_Y
...
GlobalOutputBuffer() now returns a clipped subregion
5 years ago
Anders Jenbo
17803d5923
♻️ Apply proper types to PlayerStruct
5 years ago
Gleb Mazovetskiy
3363e8f8f3
Remove extern C from engine.h
...
The headers don't actually work with C as they're now.
A better long-term solution should be able to use idiomatic C++ throughout
and expose things to other languages via a separate C API layer.
Fixes #1178
5 years ago
Anders Jenbo
069195eba2
💚 Fix 3DS builds
5 years ago
Anders Jenbo
71c7a541ef
🚨 Fix SDL1.2 warnings
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
3c4ccfc2e4
CelOutputBuffer: Replace subregion with subregionY
...
We can't do anything with X yet
5 years ago
Xadhoom
cb65d308cf
RNG: do not rely on implicit conversions in arithmetic expressions
5 years ago
Gleb Mazovetskiy
ba6a78ebc8
Migrate `Cl2DrawOutline` to accept a buffer
5 years ago
Gleb Mazovetskiy
819b5b05df
Migrate `Cl2DrawLightTbl` to accept a buffer
5 years ago
Gleb Mazovetskiy
07f4dbbd2e
Migrate `Cl2Light` to accept a buffer
5 years ago
Gleb Mazovetskiy
bb3ba369df
Migrate `Cl2Draw` to accept a buffer
5 years ago
Gleb Mazovetskiy
eadc5a20a3
Migrate `CelDrawLightRedSafe` to `CelDrawLightRedSafeTo`
5 years ago
Gleb Mazovetskiy
a70de3cecd
Migrate `CelClippedDrawSafe` to `CelClippedDrawSafeTo`
5 years ago
Gleb Mazovetskiy
9ca1fd8996
Migrate `CelBlitOutline` to `CelBlitOutlineTo`
5 years ago
Gleb Mazovetskiy
242341c0b3
Migrate `CelClippedDraw` to `CelClippedDrawTo`
5 years ago
Gleb Mazovetskiy
2f68e8e74e
Migrate `CelDrawLightRed` to `CelDrawLightRedTo`
5 years ago