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
3318b8fae6
Fix vanilla compatibility for saving in quest maps
2022-08-05 19:32:51 +02:00
Gleb Mazovetskiy
17a97450bc
Convert assets to CLX
...
Converted using the following commands:
```
cd Packaging/resources/assets
pcx2clx --transparent-color 1 --num-sprites 256 fonts/*.pcx && rm fonts/*.pcx
pcx2clx --num-sprites 2 ui_art/dvl_but_sml.pcx && rm ui_art/dvl_but_sml.pcx
pcx2clx --transparent-color 1 data/hintbox.pcx data/hintboxbackground.pcx && rm data/hintbox.pcx data/hintboxbackground.pcx
pcx2clx --transparent-color 1 --num-sprites 6 data/hinticons.pcx && rm data/hinticons.pcx
pcx2clx --num-sprites 2 data/panel8buc.pcx data/dirtybuc.pcx data/dirtybucp.pcx && rm data/panel8buc.pcx data/dirtybuc.pcx data/dirtybucp.pcx
pcx2clx --transparent-color 1 data/healthbox.pcx && rm data/healthbox.pcx
pcx2clx --transparent-color 1 --num-sprites 6 data/resistance.pcx && rm data/resistance.pcx
pcx2clx --transparent-color 1 --num-sprites 5 data/monstertags.pcx && rm data/monstertags.pcx
pcx2clx --transparent-color 1 data/stash.pcx && rm data/stash.pcx
pcx2clx --transparent-color 1 --num-sprites 5 data/stashnavbtns.pcx && rm data/stashnavbtns.pcx
pcx2clx **/*.pcx && rm **/*.pcx
git checkout master -- ui_art/black_diablo.pcx ui_art/black_hellfire.pcx data/charbg.pcx data/talkbutton.pcx data/panel8bucp.pcx
rm ui_art/black_diablo.clx ui_art/black_hellfire.clx data/charbg.clx data/talkbutton.clx data/panel8bucp.clx
```
2022-08-03 16:37:04 +02:00
Gleb Mazovetskiy
ba34bafb3f
Use SDL events directly
...
Removes redundant miniwin events and queue, using SDL events directly instead.
Demo migrated using this script: https://gist.github.com/glebm/8a73b04f695de96f344cc2e35151e03e
2022-08-03 03:50:19 +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
Gleb Mazovetskiy
0cd035ef61
Load PCX as CL2
...
Similar to #5059 , which converted CEL to CL2 at load time,
we now do the same for PCX.
Some size stats: https://gist.github.com/glebm/067bf1ec73f9d14514932cfe237e4e8e
Notably, fonts RAM usage is decreased by ~35%.
2022-07-20 22:58:15 +01:00
Gleb Mazovetskiy
8ca71272b8
Load all CEL as CL2
...
Convert CEL files to CL2 at load time. CL2 format is more efficient and is about as fast to render.
CEL vs CL2 sizes, on dLvl 5: https://gist.github.com/glebm/9bbdd76962abcd4fd2405ecd3379af97
Memory:
* Peak memory (while loading): -300 KiB
* Memory in-game (dLvl5): -700 KiB
* RG99 binary size: -15 KiB (1333096 -> 1317192)
Performance on rg99:
* On average, -1 FPS in town.
* Same FPS in dungeon (20 FPS on dLvl 1).
2022-07-19 10:59:35 +02:00
Gleb Mazovetskiy
3d4f0b48b8
Remove TranslateMessage
...
It has become entirely redundant.
2022-07-17 11:44:52 +02:00
obligaron
ebfb519ee0
Rename gbQuietMode to HeadlessMode
2022-07-13 18:54:36 +02:00
obligaron
bab9baa42a
Handle gbQuietMode for paths in StartGame
2022-07-13 18:54:36 +02:00
Gleb Mazovetskiy
2be823a468
Fix progress bar on already-visited levels
...
Fixes #4970
2022-07-11 23:02:09 +01:00
Anders Jenbo
3ae834148a
Split event handeling from general miniwin features
2022-07-10 21:13:39 +02:00
Anders Jenbo
a7be622aa3
Clean up naming of event handler
2022-07-10 21:13:39 +02:00
Anders Jenbo
2d21fc372e
Remove more miniwin code
2022-07-10 21:13:39 +02:00
Gleb Mazovetskiy
d152d2c0fb
Add OptionalOwnedCelSprite
2022-07-03 12:26:39 +01:00
Gleb Mazovetskiy
5d1a4fd8af
IncProgress: Do not render bar if not active
...
Loading the game from within the game calls `IncProgress` multiple times
but we should not render the progress bar when that happens.
2022-06-30 11:41:11 +02:00
obligaron
07de7e2d7c
Fix "Restart in Town" when dying on a quest/set map
2022-06-24 23:15:59 +02:00
Anders Jenbo
72656b3011
Move path and palette to the engine folder
2022-06-24 16:34:20 +02:00
Anders Jenbo
99181fd709
Move more files to the engine folder
2022-06-24 11:08:15 +02:00
Gleb Mazovetskiy
8e9c9e0238
Reduced the size of OwnedCelSprite* by 8 bytes
...
`OwnedCelSpriteWithFrameHeight`: 40 -> 32
2022-06-20 01:11:22 +02:00
Gleb Mazovetskiy
c1ea8d58e0
Fix wide-screen background paths
...
These files are lowercase when in a bundled filesystem.
2022-06-19 10:19:27 +02:00
obligaron
184290a977
Support setlevel in multiplayer
2022-06-18 17:05:30 +02:00
obligaron
9ac04314f4
Introduce Player::isOnLevel
2022-06-18 17:05:30 +02:00
obligaron
19749420b5
Introduce Player::isOnActiveLevel
2022-06-18 17:05:30 +02:00
obligaron
7afe7d2a70
Save Methods in loadsave gets MpqWriter passed
2022-06-16 09:43:34 +02:00
Gleb Mazovetskiy
9d2948c782
Loading screen: Free the background early
...
Frees the background after blitting it once in the loading screen.
This gives the game more RAM for the actual loading.
2022-06-15 12:22:28 +02:00
Gleb Mazovetskiy
e8c57aae67
Render widescreen cutscene bg as PCX
2022-06-13 09:54:01 +01:00
Anders Jenbo
54cd839cf6
Clean up drlg tests
2022-06-05 16:43:06 +02:00
qndel
354e329644
Players[MyPlayerId] -> MyPlayer
2022-05-31 05:35:52 +02:00
obligaron
d86c4e5d84
Introduce GetUIRectangle() to distinguish between UI and main panel
2022-05-29 20:20:44 +02:00
Anders Jenbo
0645d9b2a1
Correct missing hellfire level mapping in leveltype
...
Hellfire never added the 2 new dungion types, instead it makes
additional checks on currlevel. This is confusing and mess, so cleaned
it up.
2022-05-10 15:16:38 +02:00
Gleb Mazovetskiy
a66ca44695
Zero-based frame indexing
...
Index frames starting at 0 instead of 1.
2022-04-14 04:39:26 +01:00
Gleb Mazovetskiy
7de6a25b41
Remove (un)lock_buf
...
We do not seem to render from multiple threads, so these calls are
unnecessary.
2022-03-26 22:27:54 +00:00
Gleb Mazovetskiy
7fede6c4cb
Clean up owned/unowned CelSprite ambiguity
...
Makes `CelSprite` unowned and adds a new `OwnedCelSprite` class for
owned sprites.
This clarifies ownership and makes the code cleaner in a number of
places.
Additionally, because the `CelSprite` class is now tiny (1 less
pointer), we can pass it by-value instead of by-reference, removing a
pointer indirection in the rendering functions.
2022-03-06 04:49:13 +01:00
Anders Jenbo
5390c9baa3
Add widscreen cutstart
2021-09-12 01:37:28 +02:00
obligaron
be4aeca196
DebugCmdWarpToLevel: Use correct WM_DIABTOWNWARP instead of the up-to-town WM_DIABTWARPUP
2021-09-02 21:55:37 +02:00
obligaron
82a5af7332
DebugCmdWarpToLevel: Fix transition from map to level
2021-09-02 21:55:37 +02:00
Juliano Leal Goncalves
20d356a6eb
♻️ Leverage 'Point' in art_draw functions
2021-08-30 06:45:51 +02:00
obligaron
36f13b34dc
Add debug text commands
2021-08-19 03:44:20 +02:00
Anders Jenbo
069249f318
🚚 Move local function to anonymous namespace i-p
2021-07-19 05:44:20 +02:00
Anders Jenbo
35ccc8eb1c
Apply clang-tidy to code
2021-07-10 17:30:15 -07:00
Anders Jenbo
74b57558c9
🚚 Move local code to anonymous namespace
2021-07-10 17:30:15 -07:00
Anders Jenbo
9ebdb6db69
General clean up
2021-07-08 03:30:25 -07:00
Anders Jenbo
96bf75b502
Rename player globals
2021-07-08 02:01:14 -07:00
Anders Jenbo
a7c7fa0030
Fully apply clang-tidy/format to all files
2021-07-03 16:41:43 -07:00
Gleb Mazovetskiy
cb0dae8590
🚚 Rename CelOutputBuf to Surface and extract
2021-07-03 05:33:32 -07:00
Anders Jenbo
f0e5bd819b
💚 Fix debug builds
...
This the change from 8e07ef8fe5 .
2021-06-27 20:48:39 +02:00
Anders Jenbo
8e07ef8fe5
Clang-tidy: misc-unused-parameters
2021-06-27 17:34:32 +02:00
Gleb Mazovetskiy
e40b1963f9
🚚 engine.h: Extract CelSprite and file loading
2021-06-21 01:36:20 -07:00
Gleb Mazovetskiy
43bc08bd63
Hardware Cursor: Fall back to software on failure
2021-06-19 12:36:39 +01:00