63 Commits
Author SHA1 Message Date
Gleb Mazovetskiy a2b94cc03c Lua: Migrate and organize the rest of debug cmds
Fully migrates debug commands to Lua and organizes them into logical
groups.

The CLI `+` syntax now runs Lua, e.g.:

```bash
build/devilutionx '+dev.player.trn.plr("infra")'
```

Chat hotkeys run Lua code if they start with `/lua`, e.g.:

```ini
[NetMsg]
QuickMessage1=/lua message(dev.player.info())
```
2023-11-07 22:27:48 +00:00
Gleb Mazovetskiy 8c1a847f41 Remove utils/stdcompat/string_view.hpp 2023-08-14 09:59:14 +01:00
staphen 1cb367ab91 Move seedinfo to text commands 2023-06-04 02:36:52 +02:00
qndel c362808165 debug path command (#6101) 2023-05-13 10:20:15 +01:00
Gleb Mazovetskiy 4fa3732526 Add missing <cstdint> includes
Done with the following script:

```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
  v = File.read(path)
  next if !v.include?("uint32_t") || v.include?("cstdint")

  lines = v.lines
  line_num = if lines[2].start_with?(" *")
    lines.index { |l| l.start_with?(" */") } + 3
  else
    3
  end

  lines.insert(line_num, "#include <cstdint>\n")

  File.write(path, lines.join(""))
end
```

then fixed-up manually
2023-05-10 13:50:12 +01:00
obligaron 0d2e43daa8 Add search monster/item/object debug commands 2023-02-26 04:40:31 +01:00
qndel 5dc95550ce Add TRN debug command and support for optional class TRNs 2022-08-11 01:02:36 +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
Anders Jenbo 0312bae93f 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 21dc7f553d Add OptionalCelSprite: smaller than std::optional
`CelSprite` data pointer can never be `nullptr`.

We implement a smaller `optional` for it by taking advantage of that.
2022-07-03 12:26:39 +01:00
Anders Jenbo 6c6999235f Add debug command for testing custom levels 2022-05-14 09:11:42 +02: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
ephphatha 903b661307 Use ObjectAtPosition for debug object type display
The other use of dObject is displaying the contents of that array so makes sense to leave as is. We're also able to remove the map since we can reference the current object type value directly on the returned object.
2021-12-28 16:01:37 +01:00
qndel 46ed79ad42 add megatiles to tiledata (#3211) 2021-11-06 18:53:53 +01:00
qndel 5193abebcb add objectindex to tiledata 2021-10-20 22:30:18 +02:00
obligaron a99a824647 Introduce playerinfo debug command and remove d hotkey 2021-09-17 21:05:31 +02:00
obligaron ccbdf3bf55 Introduce questinfo debug command and remove PrintDebugQuest Keybinding 2021-09-17 21:05:31 +02:00
obligaron f9192d2312 Remove debug command line argument -^ (Enable debug tools) and added
scrollview debug command
2021-09-17 21:05:31 +02:00
obligaron 9678d002d3 Reduce exported functions in debug.h 2021-09-16 19:18:06 +02:00
qndel a0461bd1c0 stop displaying 0's in tiledata debug command 2021-09-12 18:15:45 +02:00
qndel d05316c67d tiledata debug command 2021-09-12 15:20:27 +02:00
qndel a3603d824e debug X toggle 2021-09-12 12:15:41 +02:00
Anders Jenbo de01f15398 Make debug compatible with GCC 6.2 2021-08-29 17:54:40 +02:00
obligaron cc881a1c85 Add "seedinfo" debug command 2021-08-29 11:13:59 +02:00
qndel 8436e1f641 Merge pull request #2711 from qndel/show_coords 2021-08-28 17:15:24 +02:00
Anders Jenbo 7ed3db5f68 Add command for revealing the map 2021-08-22 02:54:31 +02:00
Anders Jenbo 4a1e4c599b Port debug vision to a command 2021-08-19 20:36:12 +02:00
Anders Jenbo f931778b90 Remove debug_mode_key_w
Replaced by debug commands
2021-08-19 20:36:12 +02:00
Anders Jenbo 4c6a5bab56 Clean up god mode 2021-08-19 20:36:12 +02:00
obligaron 36f13b34dc Add debug text commands 2021-08-19 03:44:20 +02:00
Anders Jenbo 90960f0c14 Remove dead code 2021-08-07 00:36:38 +02:00
Gleb Mazovetskiy 1b8b62a8c2 ♻️ Store CEL width with the sprite itself
Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.

Implemented for most sprites except towners, missiles, or monsters.
2021-05-01 20:51:55 +02:00
Anders Jenbo 5fdb9ce459 🎨 Format code 2021-04-19 00:37:33 +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 e7ae8ddd04 🚚 Move all enums to there respective headers 2021-04-10 16:30:00 +02:00
Anders Jenbo 93d42b62b8 ♻️ Change BOOL to bool 2021-04-09 15:13:02 +02:00
Anders Jenbo 433edc63ea ♻️ Consistently use pragma once to guard the headers 2021-04-06 15:21:25 +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 327042c2e5 Strip out debug features from the release builds
leveldebug and lightmax still remains
2021-02-19 22:04:11 +01:00
Anders Jenbo 0c96e32f19 Unify all defines, enums and structs 2021-01-08 20:53:06 +01:00
Anders Jenbo 4794c8357c Merge branch 'master' of github.com:diasurgical/devilution 2020-11-02 03:59:47 +01:00
Anders Jenbo 926b2ee2ae Cleanup debug.h 2020-11-02 02:56:37 +01:00
Joel Falcou c4223d4c29 Per file basis use of extern C 2020-04-22 13:15:29 +02:00
Joel Falcou 64d26a7934 Sanitize use of namespace
Wrap individual headers in dvl namespace to prevent
including standard header in another namespace.
2020-04-22 13:15:29 +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 263ab2bb48 Remove unused debug functions 2019-10-13 03:40:45 +02:00