Commit Graph

450 Commits

Author SHA1 Message Date
adelikat d955c468db refactor LuaHelper into an extension method class, and some nitpick cleanups 2019-12-15 09:05:33 -06:00
YoshiRulz e6cb74d314
Partially migrate EmuHawkLuaLibrary to ApiHawk delegation 2019-12-15 04:40:01 +10:00
YoshiRulz f8dc18c1bd
Migrate SavestateLuaLibrary to ApiHawk delegation
includes backwards-compatible API change
2019-12-15 04:39:16 +10:00
YoshiRulz cc8dffa769
Migrate InputLuaLibrary to ApiHawk delegation 2019-12-15 03:59:21 +10:00
YoshiRulz 104c17e77c
Prepare for EmuHawk-tied libraries to delegate to ApiHawk
Made ApiContainer inherit from APISubsetContainer, added
DelegatingLuaLibraryEmu, and reworked init logic in EmuLuaLibrary
2019-12-15 03:52:48 +10:00
YoshiRulz 7f07949816
Migrate serialised images to separate files, removing duplicates 2019-12-07 05:24:24 +10:00
adelikat 53c12ec9d9 Lua console - add newline on message to the console, better handling of attempting to load a script that already exists and has syntax errors 2019-12-03 20:42:44 -06:00
adelikat 56bacf3032 Lua Console - update dialog on Stop All Scripts 2019-12-03 20:19:37 -06:00
feos a5c3a4aee0 reorder lua console log context menus 2019-12-02 18:36:04 +03:00
adelikat 7b23c5aee8 some cleanup in some lua files 2019-11-30 11:28:56 -06:00
adelikat 2d65d2b66a Remove unused Lua/SyncTextBox 2019-11-30 10:12:33 -06:00
adelikat 99ca256087 Lua console - change Refresh toolbar icon tooltip from "Reload script" to "Refresh" to match the menu item (they do the same action but with different names) 2019-11-29 15:47:21 -06:00
adelikat 18bdaf2d99 Lua console - enable multi-select on open script dialog 2019-11-29 15:42:52 -06:00
adelikat 978277bd06 Lua console - When turning on lua scripts, first clear registered functions for that scripts (they would still exist if the script exited on its own), Don't close the registered functions dialog when a script is toggled and no registered functions are left 2019-11-29 15:32:12 -06:00
adelikat 49b8219f45 lua console - enable multiselect 2019-11-29 15:12:55 -06:00
adelikat d757b8e64f Refactor a lot of lua code to use a LuaFile object instead of a Lua object, and unify some luafile manipulation logic into methods 2019-11-29 15:02:40 -06:00
adelikat 679f691b46 Lua console - add Clear all registered function menu item to the log window context menu item too 2019-11-29 13:45:18 -06:00
adelikat 24cbf5e274 lua - a bit more cleanup 2019-11-29 13:14:30 -06:00
adelikat de2da910c2 Lua - simplify some logic 2019-11-29 12:47:50 -06:00
adelikat 263a72f57d Lua console - remove bad user option (defaulted to true even) that clears all registered functions on toggle, toggle already clears all registered functions registered to the script. If there is some edge case there, we need to fix it, not clear registered funcitons that don't even belong to the given script 2019-11-29 09:58:07 -06:00
adelikat 7a95fa543d fix crash when toggling scripts while the registered fucntions list dialog is open 2019-11-29 09:55:36 -06:00
adelikat 3a3a7e7462 Lua console - context menu item for Clear all registered functions 2019-11-29 09:36:18 -06:00
adelikat a82f0d1ce7 lua console - hack to keep someone from remove a lua script on accident if the script is highlighted and they press delete in the auto-complete box 2019-11-27 20:00:01 -06:00
adelikat f926142921 cleanup OSDManager 2019-11-26 19:36:04 -06:00
adelikat 22fdbd08d0 InputRoll - don't hardcode padding variables in the constructor 2019-11-26 12:51:36 -06:00
adelikat 56b33498d9 InputRoll - rip out the UseCustomBackGround flag, and only key off the existence of the override. Seems to be a speed hack, but the only attempt to make it faster (in ram watch) was actually making things slower 2019-11-26 12:33:39 -06:00
adelikat 4e9b780539 Lua - implement tastudio.loadbranch #fixes #1650 2019-11-24 13:55:46 -06:00
adelikat a3428128ef EmuLuaLibrary.Tastudio - organize methods some 2019-11-24 12:56:57 -06:00
adelikat 6972046509 EmuLuaLibrary.Tastudio clenaup 2019-11-24 09:37:32 -06:00
feos 5ca08b6c29
Camhack support (#1725)
for the camhack to work we have to save a state, hack memory, advance twice to see the changes, then load the state to prevent desync. since we can omit the framebuffer in savestates, loading them can happen without updating the screen, so the hacked camera remains visible.

advancing 2 frames automatically is done like tastudio does it when it seeks to a frame, only from lua now.

and the most questionable part is "invisible emulation", which is how Gens calls this IIRC, when everything that can distract or slow us down is skipped: sound, video, tools updates.

new lua functions:
- client.invisibleemulation()
- client.seekframe()

* for a test, mGBA core uses fake video and audio buffers and renders to them when we want to "skip" rendering. proper setup would involve actually skipping rendering those inside the core.
* allow disabling video and audio updates for gpgx too (proper approach, no fake buffers involved)
* add the script for Sonic Advance
2019-11-23 12:27:14 +03:00
adelikat 825f10d52c Lua console - simplify some 2019-11-22 18:54:52 -06:00
adelikat 23f283aef8 create file watch on new script 2019-11-17 13:04:09 -06:00
adelikat b65f7ae8d9 Lua console - hack to fix reloading a script if it is not enabled 2019-11-17 12:51:08 -06:00
adelikat 16f977a87c Lua console - respect the "reload scripts on load" flag in some places that were ignoring it 2019-11-17 11:25:23 -06:00
adelikat 901e9f2ceb InputRoll - when RowCount changes, deselect rows that may no longer exist, fixes crash on Lua Console when removing lua scripts (and lots of other bugs most likely) 2019-11-17 09:26:18 -06:00
adelikat c9f7838833 Lua console - put a cap on number of messages that can hit the console window in a give pass through lua scripts, set it arbitrarily at 50, fixes #376 2019-11-16 14:56:17 -06:00
adelikat c1ba930e64 Lua Console - fix double click toggle and unify logic between double click and toggle menu items 2019-11-16 12:01:43 -06:00
adelikat 6024af5dbc lua console - a bit of cleanup 2019-11-16 11:55:05 -06:00
adelikat dad8919b50 Lua functions list - unify ctrl+c and copy context menu item logic and fix bugs in both 2019-11-16 11:24:33 -06:00
YoshiRulz 6e809adc66
Disable Lua script loading on Unix (resolves #1735) 2019-11-17 02:26:23 +10:00
YoshiRulz a7ffdd948e
Add DelegatingLuaLibrary and set up ApiHawk instantiation 2019-11-16 17:19:04 +10:00
feos 8a7e495039 allow suppressing more OSD savestate reports from lua 2019-11-10 17:09:10 +03:00
YoshiRulz ae12b0e23c
Revert some changes from #1237 and #1380 that aren't needed anymore 2019-11-04 19:53:14 +10:00
YoshiRulz 8c059aa43c
Replace helper methods with readonly bool IsUnixHost and cleanup 2019-11-04 14:30:05 +10:00
J.D. Purcell fec63fb66a Spaces -> tabs, fix mixed newlines. 2019-11-03 20:58:36 -05:00
adelikat 942d9fc75e Simplify OS checks with some helpful methods 2019-11-03 16:04:42 -06:00
adelikat f967ebc3a7 cleanup Communication.cs 2019-11-02 10:33:26 -05:00
adelikat 0b965dffc5 misc cleanups 2019-10-29 08:23:45 -05:00
adelikat 5c674e5f8f Watch UI classes - some cleanups, mostly C#7isms 2019-10-27 18:02:06 -05:00
adelikat b54be19e9e InputRoll - reorg - put in its own folder, break out column and cell classes into separate files 2019-10-26 16:49:52 -05:00