Anders Jenbo
e969a8ad01
Invert player to vision relation
2023-04-21 21:25:19 +02:00
Anders Jenbo
382212b98c
Remove DisableLighting from release builds
2023-04-21 21:25:19 +02:00
Anders Jenbo
779f16280c
Consistently use uint8_t for lighting values
2023-04-18 23:53:04 +02:00
Gleb Mazovetskiy
38e37e0d53
Fix warnings/errors with -funsigned-char
2022-12-05 07:52:13 +01:00
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`.
2022-12-05 01:32:29 +01:00
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).
2022-10-16 03:53:26 +01:00
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`.
2022-10-16 03:53:26 +01:00
obligaron
496689bb87
Fix incorrect SOLData for L1 arched/pillar Pieces (BlockLight and BlockMissile is missing)
2022-10-11 22:24:48 +02:00
obligaron
f8a3212fba
Fix incorrect SOLData for L1 Piece 27 (BlockMissile is missing)
2022-08-21 10:38:48 +02:00
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).
2022-08-20 23:49:23 +01:00
obligaron
a410e989bf
Remove ScrollInfo
2022-08-03 21:25:21 +02:00
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.
2022-08-03 02:38:55 +02:00
ephphatha
e7708f44d9
Ensures that tests pass
2022-07-17 07:44:52 +02:00
Anders Jenbo
bd175f1c53
Reduce double scans in GetSizeForThemeRoom
...
This takes it from 200% to just 110% tiles scanned during the processes
2022-07-17 07:44:52 +02:00
Anders Jenbo
dd2644373d
Use a single main loop in GetSizeForThemeRoom
2022-07-16 16:41:56 +02:00
Anders Jenbo
3f6e6b19db
Restore optional optimization of GetSizeForThemeRoom
...
Looks like this improves performance by about 8%
2022-07-16 16:41:56 +02:00
Anders Jenbo
8d32782b12
Cleanup GetSizeForThemeRoom
2022-07-16 16:41:56 +02:00
ephphatha
e8a50f104e
Restore legacy behaviour
...
Ensures that tests pass
2022-07-16 10:32:12 +02:00
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.
2022-07-11 16:04:47 +02:00
ephphatha
4802c0c8cf
Split loops by phases
...
Hoping the comments make it easier to understand, I think this is what the intent was.
2022-07-10 05:52:58 +02:00
ephphatha
3812d75480
Use point/size for WillThemeRoomFit, rename to match use
2022-07-10 05:52:58 +02:00
ephphatha
7bb401d9e8
Simplify loop used to find the area for a theme room
2022-07-10 05:52:58 +02:00
ephphatha
420a248e0c
Use FlipCoin for most uses of GenerateRnd with variable frequency
2022-07-10 02:37:33 +02:00
Anders Jenbo
8ed3cb476b
Clean up initial room generation
2022-07-08 12:01:47 +02:00
Gleb Mazovetskiy
d152d2c0fb
Add OptionalOwnedCelSprite
2022-07-03 12:26:39 +01:00
ephphatha
c68fcf3cb1
Apply MethodCase config to Rectangle::Contains
...
Also included Circle and VirtualButton classes due to the shared use.
2022-06-24 00:39:55 +02:00
Anders Jenbo
6d56058708
Move level generation to subfolder
2022-06-23 09:21:58 +02:00