Commit Graph
176 Commits
Author SHA1 Message Date
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
qndel f8cda02456 apply bounds check function 2021-10-12 01:18:28 +02:00
obligaron 1b3381ce8e Move CrawlNum to CrawlTable and make it extern visible 2021-09-11 14:41:30 +02:00
Juliano Leal Goncalves a91074d470 🚚 Rename 'LightStruct' struct to 'Light' 2021-09-06 12:49:48 +02:00
Anders Jenbo 87f478d82f Remove unnecessary indentation 2021-08-12 21:04:26 +02:00
BC Ko a9754d664b Reduce use of globals: VisionList 2021-08-12 21:04:26 +02:00
Anders Jenbo 7463d2c7dc Update Source/lighting.cpp 2021-08-12 12:24:30 +02:00
BC Ko c589ccb0ac cleanup manual value clamping: lighting.cpp 2021-08-12 12:24:30 +02:00
Anders Jenbo ef6275caac Clean up private function names 2021-07-12 17:59:22 -07:00
Anders Jenbo 4bf4e42230 Move local symbols to anonymous namespace 2021-07-12 17:59:22 -07:00
ephphatha af7adda161 Refactor GetLight/SetLight to take Points instead of x/y params
Doing both functions at once as they are called from the same places with the same arguments.

They also operate on char values internally but get treated as if they are ints, might be more appropriate to use int8_t/uint8_t?
2021-07-09 18:52:49 +10:00
ephphatha 8dbbdcca0d remove unnecessary cast from MakeLightTable
Also changed the c-style cast to static_cast with appropriate type for destination.
2021-07-08 07:53:40 -07:00
Anders Jenbo 9ebdb6db69 General clean up 2021-07-08 03:30:25 -07:00
Anders Jenbo 467b74dc06 Rename object globals 2021-07-08 02:01:14 -07:00
Anders Jenbo 96bf75b502 Rename player globals 2021-07-08 02:01:14 -07:00
Anders Jenbo dce78dde62 Rename lighting globals 2021-07-08 02:01:14 -07:00
Anders Jenbo bc59218d0d More clang-tidy/Android Studio cleanups 2021-07-04 19:34:37 +02:00
Anders Jenbo a7c7fa0030 Fully apply clang-tidy/format to all files 2021-07-03 16:41:43 -07:00
Anders Jenbo ecea12fc15 Clang-tidy: ParameterCase 2021-07-03 15:46:39 -07:00
qndel dadf418fe0 fix typo (#2266) 2021-06-29 19:15:01 +02:00
Anders Jenbo b1d237c823 More init clean up (#2262) 2021-06-29 06:37:38 +02:00
Anders Jenbo 5537fe748e Clean up debug code 2021-06-27 16:16:39 -07:00
Anders Jenbo 22b632f04a ♻️Clean up implicit bool conversions 2021-06-26 08:57:59 -07:00
Gleb Mazovetskiy e40b1963f9 🚚 engine.h: Extract CelSprite and file loading 2021-06-21 01:36:20 -07:00
Juliano Leal Goncalves b3ec79af4f Leverage 'Point' in Lighting and Player functions (#2048) 2021-05-24 17:28:52 +02:00
Anders Jenbo 44b58c4970 Clean up L5dflags flags 2021-05-19 14:09:33 +02:00
Anders Jenbo 0c2042fa52 ♻️ Player by reference
Update Source/items.cpp
Update Source/lighting.cpp
Update Source/pack.cpp
asd


ads


as
2021-05-13 01:47:46 +02:00
Anders Jenbo 92db72719d 🔥 Remove some unused code 2021-05-05 10:16:45 +02:00
Anders Jenbo 3746723f52 ♻️Add type to MIN-files and TRN-files 2021-05-05 04:03:23 +02:00
Anders Jenbo fa0b286693 ♻️Typed file loading
Tthis gives us the option to specify what type a file should be loaded
as, avoidng the need to case it and does some automatic checks on the
fitness of the data, while making the process simpler.

If no type is given then the type will be set to std::byte which limit
what operations can be performed on the data.
2021-05-04 19:08:37 +02:00
Anders Jenbo 654a2b8834 ♻️Clean up automap code
Use Point for x,y pairs. Make helpers for drawing door and squares
2021-05-02 15:27:38 +02:00