* 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
* 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
* 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
* feat(auto-splitter): getMaps function
* docs(auto-splitter): Documented new getMaps function
* chore(style): Style fixes
* chore(style): Other style fixes
* 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>
* 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>
* 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
* 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
* 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
* 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>