Commit Graph

293 Commits

Author SHA1 Message Date
YoshiRulz 9829fd699b Unify helpers for generating file extension lists (for open/save) 2020-02-20 21:59:20 +00:00
YoshiRulz f71cc532a8
Misc. cleanups 2020-02-21 07:05:13 +10:00
adelikat ef13754f79 consistent variable naming in config.cs 2020-01-25 10:57:39 -06:00
YoshiRulz b1e02fbdce
Enable SA1106 and fix noncompliance
"Code should not contain empty statements"
i.e. don't put a semicolon there
2020-01-25 18:06:34 +10:00
adelikat 3414cc1d33 Merge branch 'release' 2020-01-18 16:19:03 -06:00
adelikat f9435fb17f Lua - tastudio.applyinputchanges() - always refresh tastudio - fixes #1799 2020-01-18 14:53:12 -06:00
adelikat 1519110691 Always refresh the APIHawk library instances instead of checking for null, fixes #1791 2020-01-18 13:22:19 -06:00
YoshiRulz 0f1fa1531f
Use ranges in ApiHawk and Lua 2020-01-13 06:57:24 +10:00
YoshiRulz c38fb09d3c
Fix typos in strings and comments (from #971) 2020-01-13 00:22:01 +10:00
adelikat 57610488fe use globals a bit less 2020-01-03 13:59:39 -06:00
YoshiRulz 060255471b
Improve exception docs in BizHawk.Client.EmuHawk 2020-01-02 21:51:37 +10:00
adelikat 7de9309be1 Lua - pass in MainForm to the EmuHawkLuaLibrary class 2019-12-31 16:46:05 -06:00
adelikat 64ea9afee5 cleanups 2019-12-31 10:17:55 -06:00
adelikat 2403f38bcc pass in LuaImp to LuaWinform, now the global usage is in the lua library, but baby steps 2019-12-22 13:32:18 -06:00
YoshiRulz 0fcb6cbaa7
ApiHawk refactoring and cleanup
MemApi.ReadByteRange now returns the requested number of bytes and not 1 extra,
MemApi.ReadByteRange now warns only once per call for addrs outside range,
MemApi.ReadByteRange now warns for negative addrs (once per call; previous
implementation passed negative addresses to PeekByte), MemApi.WriteByteRange now
warns only once per call for addrs outside range, MemApi.WriteByteRange now
warns for negative addrs (once per call; previous implementation passed negative
addresses to PokeByte)
2019-12-17 02:39:04 +10:00
YoshiRulz 0b43b35427
Migrate GuiLuaLibrary to ApiHawk delegation
Changed param clear of IGui.DrawNew from bool? to bool (default value remains
true), made IGui and GuiLuaLibrary inherit IDisposable, added
GetDefaultTextBackground to IGui, applied fix from 6b3071d8a to
GuiApi.DrawString, replaced background box drawn by Lua API
gui.drawString/gui.drawText with what I think is a shadow (now matches
GuiApi.DrawString)
2019-12-16 16:54:06 +10:00
adelikat ad8f321ea1 Add event.availableScopes(), fix LogWithSeparator, cleanup 2019-12-15 12:25:49 -06:00
YoshiRulz 05801dc2c5
Reduce LINQ usage in Lua subsystem 2019-12-16 04:08:22 +10:00
adelikat b6df55bbf0 fix double new line in lua console.log() 2019-12-15 10:18:58 -06:00
adelikat 5d03062c4c remove redundant console checks in console logging methods 2019-12-15 10:06:31 -06:00
adelikat d2f21f84e3 another extension method for lua table creation 2019-12-15 09:46:39 -06:00
adelikat 7ebfd42229 Simplify some lua table creation with an extension method 2019-12-15 09:22:10 -06:00
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
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 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 f926142921 cleanup OSDManager 2019-11-26 19:36:04 -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
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
adelikat f967ebc3a7 cleanup Communication.cs 2019-11-02 10:33:26 -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
James Groom 90b0574bc3
Remove unnecessary calls to ToList (e.g. in foreach)
squashed PR #1591
2019-10-13 15:50:57 +00:00
YoshiRulz 0840687d4e
Allow disabling frame skip from Lua (resolves #1655) 2019-09-02 15:20:09 +10:00
YoshiRulz e3e51678b7
Improve docs in SavestateLuaLibrary (resolves #1649) 2019-08-28 15:11:14 +10:00
YoshiRulz 0d610301ec Use a new order for socket connection instructions (resolves #1174)
patch by @Ashafix
2019-06-10 21:32:42 +10:00
Maximilian Peters 80c0fe571b Squash merge #1505 - set socketServer IP/port via Lua (resolves #1495) 2019-05-29 15:06:38 +10:00
adelikat 8132afec8b
Merge pull request #1536 from Ashafix/sleep
Added sleep functions for Lua to client module (resolves #1177)
2019-04-12 12:51:25 -05:00
Ashafix 598723266e added sleep functions for Lua to client module 2019-04-12 19:03:14 +02:00
zeromus 41c57e5217 fix repeating sound buffer when calling client.SetSoundOn 2019-04-08 16:09:26 -04:00