Commit Graph

92 Commits

Author SHA1 Message Date
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
Anders Jenbo f167bd4dfb Clang-tidy: llvm-include-order 2021-06-27 01:45:49 +02:00
Anders Jenbo f99ef2c195 A couple of clean ups suggested by Android Studio/Clang Tidy 2021-06-18 16:17:46 +02:00
Gleb Mazovetskiy 1181cc68ac 🎉 Remove buffer padding
The padding is no longer needed
2021-05-11 07:57:08 +02:00
Gleb Mazovetskiy 59dd42692f 🚚 Move render.cpp to engine/render/dun_render.cpp 2021-05-06 21:30:06 +02:00
Gleb Mazovetskiy f33f7ae7eb 💨 Do not zero-initalize arrays we write to
`std::make_unique<T[]>(size)` always zero-initalizes the array.

C++20 has `std::make_unique_for_overwrite` to avoid that, while
older C++ versions can use the approach applied here.
2021-05-02 05:52:11 +02:00
Vladimir Olteanu af50ed7302 Fix memleak in CapturePix (#1762) 2021-04-30 08:02:02 +02:00
thebigMuh ad8f342db0 Adding constness 2021-04-26 23:30:02 +02:00
Jmgr d4f62870b8 Remove globals from paths.h
Fix for Vita

Update to use free functions

Use std::optional to allow setting empty paths

Change header inclusion order

Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>

Use std::optional to allow setting empty paths

Apply clang-format

Temporary commit
2021-04-25 22:26:37 +02:00
Jmgr 1b7e0d2cb3 Migrate existing log entries 2021-04-25 02:39:42 +02:00
Anders Jenbo f004c78824 🧹 performance-unnecessary-value-param 2021-04-22 00:08:19 +02:00
Anders Jenbo f8e3672469 ♻️Fully apply clang-tidy rules to a few files 2021-04-20 19:39:38 +02:00
Anders Jenbo bb4e1960e7 🎨 modernize-use-nullptr 2021-04-19 16:02:05 +02:00
Anders Jenbo 8c821e98d3 🚚 Restructure files 2021-04-16 03:57:22 +02:00
Anders Jenbo 997c1dba55 🚚 Split up all.h in to proper header relations 2021-04-16 01:04:54 +02:00
Anders Jenbo 6e1a106a38 🚚 Move header we implement into the project 2021-04-16 01:04:54 +02:00
Anders Jenbo 93d42b62b8 ♻️ Change BOOL to bool 2021-04-09 15:13:02 +02:00
Anders Jenbo bfb3c11c2b 🎨 Change namespace to devilution 2021-04-06 15:21:25 +02:00
Anders Jenbo 630e507f63 🚚 Apply namespace 2021-04-06 15:21:25 +02:00
Anders Jenbo 6f1498d315 🚚 Move structures to there respective headers 2021-04-06 12:41:00 +02:00
Gleb Mazovetskiy 70d1d633bd Get rid of SCREEN_X / SCREEN_Y
GlobalOutputBuffer() now returns a clipped subregion
2021-03-17 23:37:58 +01:00
Gleb Mazovetskiy b6db4d02da Clean up CapturePix 2021-03-14 15:13:27 +01:00
Gleb Mazovetskiy d6f73b576c Fix screenshotting
Broken by https://github.com/diasurgical/devilutionX/commit/afa3a6bf27ac82cc3e288d5fe24a3613ff87d641
2021-03-14 15:13:27 +01:00
Anders Jenbo cb1016a6d9 🚨 Fix a handful of warnings from Clang 2021-03-14 05:40:10 +01:00
Gleb Mazovetskiy cd59a1c323 Completely replace gpBuffer with CelOutputBuffer
`CelOutputBuffer` now contains an `SDL_Surface` and an `SDL_Rect`.

We now have access to SDL surface manipulation functions.

`gpBuffer` and `gpBufEnd` are completely gone 🧹

This results in some FPS loss (250 -> 195) recovered in a subsequent
commit.
2021-03-13 05:13:26 +01:00
Gleb Mazovetskiy afa3a6bf27 Migrate capture.cpp away from gpBuffer 2021-03-13 02:26:11 +01:00
Anders Jenbo e280432b92 🚨 Fix all SDL1 warnings 2021-03-06 05:56:47 +01:00
Anders Jenbo 61b2d0de95 Merge branch 'master' of github.com:diasurgical/devilution 2020-12-16 02:24:39 +01:00
Gleb Mazovetskiy a091a56e8e Remove MAX_PATH restriction (#898)
Do not limit filesystem paths to 259 chars for MPQs, save files, and diablo.ini.

The MAX_PATH constant remains but now only limits path lengths within the MPQs.
2020-10-26 13:39:27 +01:00
Anders Jenbo d8367365d8 Apply fade out to all colors
Fixes #795
2020-09-28 07:57:35 +02:00
Anders Jenbo 893efd51ea Merge branch 'master' of github.com:diasurgical/devilution 2020-09-27 03:34:42 +02:00
Anders Jenbo 31ac716c3d 99 lines of documentation (#2058) 2020-07-07 19:36:18 +02:00
Anders Jenbo 4b46361442 Remove some unused variables 2020-05-14 11:44:15 +02:00
Anders Jenbo 69ad34f58f Consistently use NULL instead of nullptr
While nullptr does have extra checking, most of the code uses NULL and
nullptr makes it harder to port the code to some targets like the
original XBox
2020-05-14 11:44:15 +02:00
Anders Jenbo 3c5982083f Merge branch 'master' of github.com:diasurgical/devilution 2020-04-06 12:05:13 +02:00
Anders Jenbo 10febf7e15 Decompose a few numbers 2020-04-06 05:43:20 +02:00
Anders Jenbo c540f74709 Clean up calls to WriteFile 2020-04-06 05:43:20 +02:00
Anders Jenbo 660405505f Remove C compat
It's unmaintained and clear that we won't be going back since some
functions can only be solved with C++
2020-04-06 05:43:20 +02:00
Anders Jenbo 776ab10476 Merge branch 'master' of github.com:diasurgical/devilution 2020-03-29 23:40:05 +02:00
Anders Jenbo 3c276a3cd3 Add documentation
- Add file documentation to about 1/4 of the files in Source
- Copy over a lot of the documentation from the sanctuary/notes repo
- Standardise all the existing documentation
- Create a configuration for Doxygen
- Add more documentation (engine.cpp is now fully documented)
2020-03-01 22:18:00 +01:00
Anders Jenbo 25993b4043 Merge branch 'master' of github.com:diasurgical/devilution 2020-02-14 23:03:31 +01:00
Anders Jenbo 20621a0642 add all.h and use in place of diablo.h (#2005)
Now diablo.h is treated in the same way as all other header files of
Source, as it only contains the declarations of global variables and
functions of diablo.cpp.

Besides consistency, this also enables mods to include diablo.h just
like any other header file without having to include every header file
(and without having to include C++ specific aspects of the now all.h).
2020-02-14 13:12:54 +01:00
Anders Jenbo a9e955578a Correctly apply the red palette when taking screenshots 2020-02-08 23:07:19 +01:00
Anders Jenbo 08aa6a860a Move generic helpers out of miniwin 2020-02-01 13:56:08 +01:00
Anders Jenbo 913de17a56 Use SDL_Color nativly instead of converting betwen it and PALETTEENTRY 2020-01-31 01:20:10 +01:00
Anders Jenbo 6a0daa6217 Fix screen shot path 2020-01-27 00:46:38 +01:00
Anders Jenbo 4ff5c8987a Fix screen shots on big-endian 2020-01-27 00:46:38 +01:00
Gleb Mazovetskiy c8605f79bd capture.cpp: Replace WriteFile with <fstream> 2020-01-26 16:53:41 +01:00