206 Commits
Author SHA1 Message Date
Anders Jenbo af295b9f48 Fix warnings with conversion between size_t and int for playerId 2023-11-07 22:07:07 +01:00
Gleb Mazovetskiy c5a5dc9f5c Fix a few MSVC warnings 2023-11-05 12:57:59 +00:00
Gleb Mazovetskiy 0f77cc3797 Force-inline methods to improve debug build perf
This has little or no effect on the optimized build
but significantly improves performance of the headless debug build

`timedemo_test` on my machine goes from 3s to 2s.
2023-09-10 02:14:01 +01:00
Gleb Mazovetskiy 5bf0b8bc96 Add more missing <cstdint> includes
https://github.com/diasurgical/devilutionX/pull/6095 only added includes
for `uint32_t`, this PR also adds the includes for the remaining
integral types.
2023-05-10 16:29:27 +01:00
Anders Jenbo b7424a0068 Clean up PmChangeLightOff() 2023-04-30 01:03:34 +02:00
Anders Jenbo 124cc71800 Update realtime lighting when static lights are changed 2023-04-24 17:20:17 +02:00
Anders Jenbo acf98f2bdc Fix wrong check for light level
Introduced in 13c5c09990
2023-04-24 17:20:17 +02:00
Anders Jenbo f345087e75 Fix Lazarus glowing inside the wall 2023-04-24 17:20:17 +02:00
Anders Jenbo 4db65d94de Add glow to Crypt lava tiles 2023-04-24 14:20:06 +02:00
Anders Jenbo eef0b10e1f Hellfire: Fix light fall off not with in it's radious 2023-04-24 13:33:06 +02:00
Anders Jenbo 6ba5998a97 Unset all vision before updating current ones 2023-04-22 18:06:55 +02:00
Anders Jenbo d8b5c3a970 Fix light brightness pop on load 2023-04-22 11:32:26 -04:00
Anders Jenbo 828a52dc6d Clean up ProcessLightsList() 2023-04-22 17:14:19 +02:00
qndel 731ad1ada5 use std::rotate (#6019) 2023-04-22 13:53:03 +02:00
Anders Jenbo e969a8ad01 Invert player to vision relation 2023-04-21 21:25:19 +02:00
Anders Jenbo 231f6814f7 Use rectangle logic in vision and lighting updates 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 13c5c09990 Clean up Light related naming
A few are left unchanged as they will be removed in a later commit
2023-04-21 21:25:19 +02:00
Anders Jenbo 3304e8a542 Clean up lighting_color_cycling() 2023-04-21 07:40:19 +02:00
Anders Jenbo 0b19c2fd4f Assert correct use of LightFalloffs 2023-04-21 07:40:19 +02:00
Anders Jenbo 3723fb2cf0 Clean up light table generation 2023-04-21 07:40:19 +02:00
Anders Jenbo 53d4e72e19 Fix Hell modification of the light table
There was a precission issue that caused some jitter in the light table.
This is solved and made made more redable by using a shift instead of
tricky use of remander from a devision.
2023-04-21 07:40:19 +02:00
Anders Jenbo b36709666b Clean up Nest and Crypt modifications to the light table 2023-04-21 07:40:19 +02:00
Anders Jenbo 8ef94f7cc0 Only generate the relevant version of LightFalloffs 2023-04-21 07:40:19 +02:00
Anders Jenbo 2afcd9e654 Cleanup generation of LightConeInterpolations 2023-04-21 07:40:19 +02:00
Anders Jenbo 5d57d5a323 Rename lightradius and lightblock 2023-04-21 07:40:19 +02:00
Anders Jenbo dc2d97c112 Split lighting shades from trn tables 2023-04-21 07:40:19 +02:00
Anders Jenbo f9b5c61f68 Extract pause translations table as a data file 2023-04-19 23:28:33 +02:00
Anders Jenbo 7aee0b311b Fix light smearing when walking (#6002) 2023-04-19 01:16:13 +02:00
Anders Jenbo 779f16280c Consistently use uint8_t for lighting values 2023-04-18 23:53:04 +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
Vladimir Olteanu 8fd3be67b5 Refactor VisionCrawlTable 2022-07-17 23:28:40 +02:00
Anders Jenbo 2d21fc372e Remove more miniwin code 2022-07-10 21:13:39 +02:00
Andrew James 593a9f3b4b Pull distinct points from VisionCrawlTable used by guardians (#4844) 2022-07-10 07:21:22 +02:00
Gleb Mazovetskiy c8ddf7df65 Crawl: Move implementation from header to cpp 2022-07-09 11:29:31 +02:00
Vladimir Olteanu bed5bd9ec1 Eliminate CrawlTable 2022-07-07 18:55:34 +02:00
Gleb Mazovetskiy 3b2e560fa0 Non-int versions of Point and Displacement (#4824)
* Non-int versions of `Point` and `Displacement`

This will allow us to make some structs, such as `ActorPosition`, much
smaller.

* ActorPosition: Use smaller types

`Monsters`: 56K -> 46K

* player.cpp: Reduce size of `DirectionSettings`

* CrawlTable: Displacement -> DisplacementOf<int8_t>

* CrawlTable: vector<vector> -> array<vector>

Also only allocate one vector during construction instead of two.
A bit less indirection.

* Monster#enemyPosition: Point -> WorldTilePosition

sizeof(Monster): 240 -> 232

* Monster: Further optimize field layout and sizes

sizeof(Monster): 232 -> 208

`Monsters` is down to 40,000 bytes

* DMonsterStr: _mx/_my -> position
2022-07-02 01:49:17 +02:00
Vladimir Olteanu 5a5111f1d8 Refactor CrawlTable (#4833) 2022-07-01 06:19:33 +02:00
Anders Jenbo 860bd1cebf Operate directly on SOL data 2022-06-18 21:27:05 +02:00
obligaron 19749420b5 Introduce Player::isOnActiveLevel 2022-06-18 17:05:30 +02:00
Anders Jenbo 1203514383 Clean up use of currlevel 2022-06-07 21:35:01 +02:00
Andrew James 1047e408bd Simplify logic of UpdateMissilePos using helpers from 4620 (#4621) 2022-05-31 06:58:47 +02:00
qndel 354e329644 Players[MyPlayerId] -> MyPlayer 2022-05-31 05:35:52 +02:00
obligaron 1124dd1bd2 Don't show hostile players in automap 2022-05-20 22:46:48 +02:00
Brandon Cullen 926f6b44bc Minimize direct usage of Lights[] global 2022-04-18 01:55:55 +02:00
Vladimir Olteanu 25d412d1ac Remove duplicate code in DoLighting 2022-04-14 01:21:18 +02:00
qndel b7b01ce1fd remove InitLightMax 2022-02-11 02:34:47 +01:00
Andrew James 796e2813cf Use scoped enums for DungeonFlags/BFLAG (#3135) 2021-11-07 03:11:16 +01:00
qndel e567953bc9 Sharing automap exploration in multiplayer 2021-10-25 02:58:41 +02:00
qndel 0ccdf940f7 fix bounds checks (#3237) 2021-10-24 17:20:04 +02:00