Gleb Mazovetskiy
4fa3732526
Add missing <cstdint> includes
...
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
3 years ago
Anders Jenbo
e969a8ad01
Invert player to vision relation
3 years ago
Anders Jenbo
382212b98c
Remove DisableLighting from release builds
3 years ago
Anders Jenbo
779f16280c
Consistently use uint8_t for lighting values
3 years ago
Gleb Mazovetskiy
38e37e0d53
Fix warnings/errors with `-funsigned-char`
3 years ago
Gleb Mazovetskiy
79b330825d
dun_render: Avoid `Invalid` tile type
...
1. Do not call `RenderTile` with invalid values to begin with.
2. Move mask selection out of `RenderTile`.
3 years ago
Gleb Mazovetskiy
b5f788cb33
trigs.cpp: Optimize & clean up the data structures
...
1. Use appropriate types.
2. Do not use an end marker for static arrays (their length is known).
3 years ago
Gleb Mazovetskiy
759ca7f055
`WorldTileRectangle/Size`
...
Adds a custom sized type for the world tile rectagle.
This allows us to better express intent.
It also allows us to make certain globals smaller, e.g. `THEME_LOC`.
3 years ago
obligaron
496689bb87
Fix incorrect SOLData for L1 arched/pillar Pieces (BlockLight and BlockMissile is missing)
3 years ago
obligaron
f8a3212fba
Fix incorrect SOLData for L1 Piece 27 (BlockMissile is missing)
4 years ago
Gleb Mazovetskiy
6327e713e0
Lowercase all file paths
...
We want to be able to use unpacked MPQs on low-end platforms
(PS2/rg99/etc).
This is tricky on case-sensitive filesystems. Avoids case issues by
lowercasing all paths in the code (then we'll just need lowercased
listfiles).
4 years ago
obligaron
a410e989bf
Remove ScrollInfo
4 years ago
Gleb Mazovetskiy
961866e1c4
CLX: A new graphics format
...
The format is almost identical to CL2, except it uses the frame header
to store frame width and height instead of 5 32-line offsets.
This means we always have access to frame dimensions, so we can use it
as an on-disk format for our graphics as well.
Additionally, we may be able to optimize the rendering even more
in the future now that we have guaranteed knowledge of frame dimensions.
4 years ago
ephphatha
e7708f44d9
Ensures that tests pass
4 years ago
Anders Jenbo
bd175f1c53
Reduce double scans in GetSizeForThemeRoom
...
This takes it from 200% to just 110% tiles scanned during the processes
4 years ago
Anders Jenbo
dd2644373d
Use a single main loop in GetSizeForThemeRoom
4 years ago
Anders Jenbo
3f6e6b19db
Restore optional optimization of GetSizeForThemeRoom
...
Looks like this improves performance by about 8%
4 years ago
Anders Jenbo
8d32782b12
Cleanup GetSizeForThemeRoom
4 years ago
ephphatha
e8a50f104e
Restore legacy behaviour
...
Ensures that tests pass
4 years ago
Andrew James
629fe1647a
Fix incorrect size determination in GetSizeForThemeRoom ( #4959 )
...
This was a corner case where a boundary was determined by the edge of the search region. Not 100% sure it's correct in all cases, aiming to add some tests to try cover every possible case.
4 years ago
ephphatha
4802c0c8cf
Split loops by phases
...
Hoping the comments make it easier to understand, I think this is what the intent was.
4 years ago
ephphatha
3812d75480
Use point/size for WillThemeRoomFit, rename to match use
4 years ago
ephphatha
7bb401d9e8
Simplify loop used to find the area for a theme room
4 years ago
ephphatha
420a248e0c
Use FlipCoin for most uses of GenerateRnd with variable frequency
4 years ago
Anders Jenbo
8ed3cb476b
Clean up initial room generation
4 years ago
Gleb Mazovetskiy
d152d2c0fb
Add OptionalOwnedCelSprite
4 years ago
ephphatha
c68fcf3cb1
Apply MethodCase config to Rectangle::Contains
...
Also included Circle and VirtualButton classes due to the shared use.
4 years ago
Anders Jenbo
6d56058708
Move level generation to subfolder
4 years ago
ephphatha
c1ef9c8255
Use Rectangle::contains for IsNearThemeRoom check
...
would be able to use a Rectangle::grow helper if it wasn't for the off-by one, but maybe cleaning up the way theme dimensions are set will help?
4 years ago
ephphatha
3354c57ca8
Rename SkipThemeRoom/invert logic to match use
4 years ago
ephphatha
de05ce6562
Use theme room attributes directly instead of recalculating
4 years ago
Gleb Mazovetskiy
de3c9874c7
Migrate large bool arrays to `std::bitset`
...
E.g. `dRendered` size is reduced by 10 KiB
4 years ago
Gleb Mazovetskiy
c69173e9bd
Fix `-Wsign-compare` in `SetDungeonMicros`
4 years ago
Anders Jenbo
4cc3a5264c
Make dPiece zero-indexed
4 years ago
Anders Jenbo
446a56d655
Reduce dPiece from int to uint16_t
4 years ago
Anders Jenbo
98e4310cad
Index Minis by tile instead of by coordinate
4 years ago
Anders Jenbo
d8c65a8c31
[diablo] Fix some floor tiles in hell being marked as solid
4 years ago
Anders Jenbo
860bd1cebf
Operate directly on SOL data
4 years ago
obligaron
b2714da91e
Fix: Disable lightning in town
4 years ago
Anders Jenbo
fd98aff9f1
Move shared dungeon level code to common function
4 years ago
Anders Jenbo
6fa681e567
Clean up level initialization
4 years ago
Anders Jenbo
6fffbb4676
Clean up selecting what chamber to spawn quests in
4 years ago
Anders Jenbo
d17d7e018d
Use common function for loading .dun tile data
4 years ago
Anders Jenbo
0205320a1d
Export static transparancy data to .dun files
4 years ago
Anders Jenbo
98a10d262e
Unify PlaceMiniSet
4 years ago
Anders Jenbo
6962fcd63e
Clean up PlaceMiniSet()
4 years ago
Anders Jenbo
afec954c9a
Convert dflags to boolean
4 years ago
Anders Jenbo
408c665a3c
Remove duplicate code in DRLG_MRectTrans
4 years ago
Anders Jenbo
54cd839cf6
Clean up drlg tests
4 years ago
Anders Jenbo
0508311959
Cleanup block_lvid checks
4 years ago