Commit graph

31 commits

Author SHA1 Message Date
Pedro Montes Alcalde
a29f3ba34c
timer: Overhaul the logic and callings (#290)
* meow

* miao

* :3

* aaaaaaa

* cheese

* bbbbbbbbb

* blehhhhhh

* miao

* :D

* nyan

* small

* splits

* last tick fix

* maybe

* hehe

* docstrings

* docs change

* Fix segfault on no splits

* remove asserts

* Dont run reset when not running

* actually reset this time i swear

* avoid reset desync

* suggestions

* meow

* miao

* format nyaaaa
2026-03-02 14:58:45 -03:00
Daniele Penazzo
3e94856963
Str2ida functionality (#313)
* Added rough str2ida implementation

* Added small documentation.

* Move the lua pushed string to the heap

Works with compilers that don't support VLA and avoids
stack-overflow-induced headaches.

* Check if malloc actually mallocs
2026-02-18 21:00:47 -03:00
Daniele Penazzo
7faf65eadd
Add missing settings in documentation (#305)
* Add missing settings in documentation

* Replace single quotes with double quotes
2026-02-16 12:08:26 -03:00
Daniele Penazzo
8b96ab1a2e
Reset rules (#281)
* Added main-window class

Seems that editing the `.window` class affects all windows in
LibreSplit, which is definitely unwanted.

Left the note in the CSS classes for posterity.

* Added another note on LibreSplit/GTK's theming capabilities

* Added a reset stylesheet as string

Theoretically, if it works as it should should fix both #272 and #63

* Applied suggestions and fixes

* Changed function signature and error handling

* Pointer Confusion

This shows the error in case of bad reset rules, tested by stepping with
GDB
2026-02-04 18:38:52 -03:00
MxCraven
79a8fb159c
Fill out descriptions of themes.md (#263)
* Fill out descriptions of themes.md

Some are self explanitory, but I got confused by a lot while making a theme so I thought I'd try and add something to everything.

* Update themes.md

From review from penaz
2026-02-03 15:37:31 -03:00
Daniele Penazzo
d703856d9b
Added types to splits docs (#256) 2026-01-30 17:18:40 -03:00
Pedro Montes Alcalde
82f257e4c6
maps: Add env var to disable ioctl (#247) 2026-01-26 09:44:54 -03:00
Daniele Penazzo
17f8a208c6
Add getMaps function (#201)
* feat(auto-splitter): getMaps function

* docs(auto-splitter): Documented new getMaps function

* chore(style): Style fixes

* chore(style): Other style fixes
2026-01-16 17:48:40 -03:00
Pedro Montes Alcalde
6f056c90ba
Add an option to force enable global hotkeys on Wayland (#183) 2026-01-07 19:59:55 -03:00
Daniele Penazzo
11fcc57ff3
Auto Splitter Utilities (#171)
* Add a C implementation of table shallow-copy

* Added print_tbl function

* docs: Added some tips for auto splitter developers

* Update docs/auto-splitter-tips.md

Co-authored-by: Pedro Montes Alcalde <pedro.montes.alcalde@gmail.com>

* Added bitwise operations for Auto Splitters

---------

Co-authored-by: Pedro Montes Alcalde <pedro.montes.alcalde@gmail.com>
2025-12-26 11:20:56 -03:00
Daniele Penazzo
63ed87a8eb
Added more theming classes (#173)
* Added more classes for better theming support

Mostly for missing containers. Added them to the docs too.

* Added note about additional footer
2025-12-22 17:53:54 -03:00
Daniele Penazzo
10cfa38fb1
Signature Scanning (#149)
* add signature scanning

* bug fixes

* offset handling

* Update signature.c

* convert sig scan result to hex before returning

* add sig_scan to docs

* add note about sig scan performance to docs

* fix docs formatting

* remove unused include

* properly handle FF bytes/integer underflow

* fix formatting

* update docs with sig_scan example

* Add info regarding Lua's string to number conversions.

* fix formatting (again)

* prefix return string with "0x" and improve error handling

* Update build.yml

* Revert build.yml

* Update docs

* docs(themes): Added how to hide sections

Created an FAQ section in the hopes of facilitating theme development

* docs(themes): Added how to use the GTK Debugger for theme development

It's mostly a stub, but we can easily make an animation for it, if
necessary

* fix(main): Load the theme variant from the right JSON setting

* chore(build): Update meson.build to include signature.c

* fix(signature.c): Offset the result by the process base_address

Or due to commit 2b4417f subsequent memory reads from the Lua Auto
Splitter will result in wrong reads (due to the auto-offsetting done by
readAddress) or even out-of-process reads

* docs(signature): Added some devdocs to the signature source files

* docs(signature): Update sig_scan documentation

* Allow for sig_scan to return negative values.

This is to allow readAddress to work when the main module (containing
the process name) happens to be "after" the address found by the
sig_scan. The memory is still held by the same PID but needs a negative
offset to be reachable by readAddress.

* Restored int type on offset

* Use intptr_t for offset

So we won't have to worry about big values.

* Make sig_scan return an integer to the Lua stack.

In Lua hex numbers are just integers, so returning an integer number
should work without the issues given by snprintf not supporting negative
numbers.

This also assumes that LuaJIT is able to contain the entirety of the
value inside of a C intptr_t without over/underflowing.

* docs(sig_scan): Fixes and improvements

* feat(auto-splitter): Add getBaseAddress function

Needs documentation and testing

* feat(auto-splitter): Added convenience function "sizeOf"

* fix(auto-splitter): Fix wrong ordering of pushing functions to Lua

* feat(auto-splitter): Allow getBaseAddress to be called without arguments

* docs(auto-splitter): Added documentation for new auto-splitter functions

Under the "experimental stuff" section, since they're untested.

* fix(memory): Better handling of Lua Stack

* docs(memory): Added docstrings to get_base_address and size_of

* fix(memory): Reduce downcasting where possible

This won't fix downcasting issues when we work with unsigned 64-bit
integers, but it shouldn't break stuff with uint32 as downcasting to int
may do.

See #158 for the full context

* docs(README): Remove leftover gsettings references

And redirect Wayland users to the settings_keybinds file for workarounds
for global keys.

* docs(themes): Remove leftover reference to gsettings

* Collapse gettop and isnil conditions for get_base_address

* Treat half-byte masks as full-byte masks

This allows to support stuff like in the VVVVVV auto splitter, where "0?" is used and treated as "??"

* Replace MemoryRegion with the more generic ProcessMap

* Update documentation to make it (hopefully) more readable

* The offset in sig_scan is actually not optional

It would be better if it were zero by default, but for now let's shape
the documentation to fit what the actual code is.

* Revert "fix(memory): Reduce downcasting where possible"

This reverts commit dc285cf0da.

---------

Co-authored-by: Loomeh <loombadoop@gmail.com>
Co-authored-by: Zane Holbrooke-Jones <67561520+Loomeh@users.noreply.github.com>
2025-12-16 22:57:16 -03:00
Daniele Penazzo
e791573822
Module size (at least for the first module) (#161)
* Prepare the ProcessMap struct to save the map size

* Define the getModuleSize function

Might need to think about getting all the module sizes for certain more
complicated auto splitters.

* Added some docs for getModuleSize

* Fixing getModuleSize behaviour to make it adherent to docs

* Added a small tag for the error when a module name is not found
2025-12-11 16:37:21 -03:00
Daniele Penazzo
020b16684d
docs: Adding some tips for theme development (#132)
* docs(themes): Added how to hide sections

Created an FAQ section in the hopes of facilitating theme development

* docs(themes): Added how to use the GTK Debugger for theme development

It's mostly a stub, but we can easily make an animation for it, if
necessary
2025-11-13 16:31:11 -03:00
Daniele Penazzo
1a149e2d6d
Json settings porting and GSchema Removal (#130)
* feat(settings): Allow to set a key when saving settings

* chore(settings)!: Move all history-related config under "history" key

* feat(settings)!: Remove dependency on gsettings

Now every setting is read from the `settings.json` file.

I added a model "default_settings.json" that might be used as a fallback
in the future. The old schema has been gutted out until and kept until
it won't be considered necessary to compile/install anymore.

* chore(build): Remove GTK Schema

* chore(docs): Update Documentation

* chore(docs): Fix some typos

* chore(build): Replace compile_schemas with update_desktop_database

* chore(build): Copy default settings

Edited the meson build file to copy the `default_settings.json` to
`/usr/local/share/libresplit` and insert the path in a generated header
file as per https://mesonbuild.com/Configuration.html

This should fix the "defaults" problem.

* fix(settings): Add missing checks and change copy of default settings

For practicality, the settings file will be stat-ed first and copied
over if it doesn't exist.

* chore(build): Remove update_desktop_database due to actions

* fix(settings): Merge default and user settings

This allows us to update the default settings without breaking existing
setups. If we add a keybind or anything, and it is missing from the user
config, LibreSplit will do its best to fall back to the default value
for each setting.

* enhancement(settings): Rework settings loading logic
2025-11-11 20:02:40 -03:00
Daniele Penazzo
51f97f7e25
docs(theming): Add missing styling classes (#129) 2025-11-02 16:34:55 -03:00
Pedro Montes Alcalde
d1578bd231
lasr: Implement reading byte arrays from memory (#120) 2025-11-02 16:17:04 -03:00
Pedro Montes Alcalde
89c77176ef
lasr: Add dialog when insufficient permissions (#125) 2025-11-02 16:05:10 -03:00
Daniele Penazzo
0ced63525b
Readme and documentation restyling (#122)
* wip: Readme glow-up

* Split some README sections into `docs/` and finished restyling

* Update README.md

Co-authored-by: Pedro Montes Alcalde <pedro.montes.alcalde@gmail.com>

* Update README and Docs

* Update README

* Added links to badges, fixed auto split spelling

* Fixed typo

* Trying to reword the Themes docs

---------

Co-authored-by: Pedro Montes Alcalde <pedro.montes.alcalde@gmail.com>
2025-10-30 10:04:20 -03:00
Pedro Montes Alcalde
f2248ad1a6
docs: Add notice about isLoading when using GameTime (#92) 2025-10-15 10:25:41 -03:00
EXtremeExploit
3b9f9dabb1 docs: Add gameTime documentation 2025-10-12 11:32:15 -03:00
EXtremeExploit
bdd2c1cebe asl: Change maps cache cycles default to 1 2025-10-11 11:11:45 -03:00
wins1ey
60fbc7ad44
Merge branch 'main' into libresplit 2024-06-02 20:26:22 +01:00
EXtremeExploit
8d88cd17d6
Auto Splitters: Add optional cache for memory mappings 2024-05-13 15:14:09 -03:00
wins1ey
6c3779f89d Rename LAST to LibreSplit 2024-04-11 14:34:33 +01:00
wins1ey
815a127d47 Rename Auto-Splitters.md to auto-splitters.md 2024-04-08 14:10:12 +01:00
=
26900fa972 Rename AutoSplitters.md to Auto-Splitters.md
This is to improve the naming of wiki pages from the workflow that
publishes docs to the wiki
2024-03-25 23:25:02 +00:00
wins1ey
9d0d904431
Grammar changes to auto splitter documentation 2024-03-20 19:23:53 +00:00
Zane Holbrooke-Jones
1cd4419c29
Update AutoSplitters.md 2024-03-20 17:35:08 +00:00
Zane Holbrooke-Jones
066745c594
Update AutoSplitters.md
Fixes grammatical errors, simplifies some explanations and provides more detail on others.
2024-03-20 14:17:23 +00:00
EXtremeExploit
8aa0626e1a
Initial auto splitters documentation 2024-03-19 01:54:16 -03:00