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
YoshiRulz
e6374ef477
Use string interpolation
2019-03-19 00:06:37 +10:00
feos
ce3e3d2ed3
lua docs: couple hints
2019-01-23 15:42:02 +03:00
James Groom
42764f0019
Add preliminary Unix compatibility (using Mono; resolves #1384 ) ( #1380 )
...
* Move PlatformSpecificLinkedLibs and implementations to common and rename
* Specify file ext. at LoadPlatformSpecific call site
* Move Client.Common.Global.RunningOnUnix to PlatformLinkedLibSingleton
* Inline var Resolver
* Use PlatformLinkedLibManager internally
* Move plugin load check to LinkedLibManager, use LinkedLibManager
* Interpolate
* Return exit code from dlclose/FreeLibrary
* Skip all calls to externs in BlipBufDll when using mono
* Use PlatformLinkedLibManager in SevenZipLibraryManager
* Add expected return value to workaround (from testing on Win32)
* Remove ".dll" from DllImport attr, remove temporary workaround, see desc.
The library can be built by changing the output file name in
`.../blip_buf/Makefile` to `libblip_buf.so`, and running `make`. It will be
loaded if placed in the `.../output` folder.
* Remove unused code, add TODO (this class is req. for Waterbox.PeWrapper)
The TODO is to [rewrite with
C#](https://docs.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files )
instead of importing from `kernel32.dll`.
* Update OpenTK again but better (for #1384 )
* Add Mono run script
* Add libblip_buf.so (temporary)
Temporary because it should be a separate package which BizHawk depends on.
* Add distro detection, add "already running" and "unknown distro" messages
* Gray-out Lua Console on Unix
* Extract superclass from EmuLuaLibrary, add shell implementation for Unix
* Specify libdl version, Fedora doesn't have the versionless symlink
* Remove empty `ToolStripMenuItem`, null `Text` caused crash on Unix
* Transform OpenTK keyboard input into a `List<KeyEvent>` and read that
Also fixes crash on rebind
* Remove debug `using ...;`
2019-01-04 01:50:55 +03:00
adelikat
12c11eec5d
lua method - client.getconfig(), returns the current config object, note that you can actually use this to set primitive config values, do so at your own risk
2018-12-01 09:20:08 -06:00
adelikat
db50cfc648
Merge branch 'lua-polygon-pos'
2018-11-18 08:28:05 -06:00
adelikat
7d708029ad
drawPolygon - change x,y to offsetX,offsetY, make them truely optional by fixing a subtle order of operations problem
2018-11-18 08:27:32 -06:00
adelikat
ee9e21bcb2
Merge pull request #1180 from AntyMew/lua-polygon-pos
...
Lua: Add optional position parameters to `DrawPolygon`
2018-11-18 08:12:01 -06:00
nog5
6b3071d8a7
lua: drawText() alignment fix
...
The vertical alignment "top" and "bottom" was backwards
2018-09-14 23:16:35 +02:00
Asnivor
3e8326da50
Lua: client.getversion() - #1314
...
fix #1271
2018-09-10 19:24:36 +03:00
Callie LeFave
be2085ecfb
._.
2018-04-16 16:56:56 -04:00
Callie LeFave
a10d0ec6cc
Fix CI build
2018-04-16 16:44:18 -04:00
Callie LeFave
0d9ced7d83
Lua: Add optional position parameters to `DrawPolygon`
2018-04-16 16:15:37 -04:00
feos
ae6ce00d7c
I've heard bad things about ElementAt()
2018-03-27 19:01:17 +03:00
zeromus
0a18040aff
remove pointless redundant function name from LuaMethodExampleAttributes
2018-03-13 21:05:30 -04:00
zeromus
2203270868
Merge remote-tracking branch 'remotes/origin/pr/1131''
2018-03-13 20:37:48 -04:00
zeromus
b179a30d99
Merge remote-tracking branch 'remotes/origin/pr/1080'
...
# Conflicts:
# BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
merges PR #1080
closes PR #1080
(let's see if either of these can do it)
2018-03-13 16:33:53 -04:00
Azreal
6032063518
Now looks good :)
2018-03-10 03:00:44 -08:00
Azreal
26c0b1fff2
Continuing...
2018-03-10 02:49:39 -08:00
Azreal
96a35fe71b
My first commit - add file "EmuLuaLibrary.Tastudio.cs" to examples (not all have a examples yet)"
2018-03-10 02:33:41 -08:00
TASeditor
6580c2abef
Tastudio: drawing stuff, selection, patterns, add column lua function ( #1125 )
...
* alt+columnclick draws pattern
* selection: taseditor logic
* shift/ctrl keys restructure to taseditor
shift + up/down: move frame courser up/down by one
shift + pageup/pagedown: move frame courser to next/prev marker
ctrl + left/right: add/remove selection at last selected row
ctrl + shift + left/right: add/remove selection at first selected row
* Alt+drawing pattern
still not working with drawing upwards
* pattern drawing
upwards drawing working except it doesn't update last row.
TODO: Disallow Alt click to focus on menu.
* pattern: last input ignoring fixed
* Lua columnms
TODO: Don't save them into tasproj
* no need to update float edit stuff or cell changes when its not needed
* Shift+clicking draws input from first selected row to clicked cell
* fixed pattern drawing on empty cells
2018-03-08 22:15:47 +03:00
Xadrophonix
d91bd35a95
Second pool of examples.
2018-03-04 14:07:06 -08:00
Masterjun
605ca5816a
Lua: fix client.openrom
2018-03-01 01:06:15 +01:00
TASeditor
36900b15d4
tastudio lua: setinput functions, onbranch callbacks ( #1098 )
2018-02-10 14:58:46 +03:00
vadosnaprimer
eea6740722
lua: client.isturbo() and client.isseeking()
2018-01-06 13:30:47 +03:00
Ashafix
07da0170fa
unified camelCase for Lua functions, changed Lua test script
2017-12-24 11:42:51 +01:00
Ashafix
4d063f6061
new library for communicating with other programs via Lua
2017-12-24 00:24:22 +01:00
adelikat
3f8aa0e018
Lua - implement tastudio.getbranches() and tastudio.getbranchinput(), fixes #843
2017-08-05 11:04:00 -05:00
adelikat
51eed83cce
lua - tastudio.getselection() - make key of the lua table an index
2017-07-24 08:44:15 -05:00
zeromus
d5770fb8a3
re-apply "keepalive" GC fixes to luainterface mode in emuhawk; maybe it will actually work now and not result in crashes. at least we should check it.
2017-07-22 23:41:30 -05:00
zeromus
afda5dbb62
set a value in the switchable lua library to indicate whether it's NLua or LuaInterface; effectively undo 8bc067cbbe
for LuaInterface
2017-07-15 16:36:18 -05:00
Trivial-Man
7b8818c35b
Resolve issues with Master
...
- Uses NLua instead of LuaInterface
- Uses LuaMethod instead of LuaMethodAttribute
- All LuaCanvas Lua calls now begin with lowercase
- Also allows LuaPictureBoxes added through forms to be compatible with addClick
2017-07-13 22:32:27 -06:00
zeromus
d54fee4d91
Merge branch 'master' into master
2017-07-13 19:17:09 -05:00
adelikat
5978db7036
Lua - forms.setsize() - add a description instead of just TODO
2017-07-11 08:17:49 -05:00
adelikat
9581ce6a93
rename LuaMethodAttributes to LuaMethodAttribute so as not to be a bad person
2017-07-10 14:02:08 -05:00
zeromus
0f686a0de1
* revert strict string checking behaviour from nlua Revision 10f4d0ce78a2a3cb9b727ac55c8705385f0ded7e (we dont want it, probably)
...
* do a better job porting old commits from bizhawk (should fix memory leaks, optional arguments)
2017-07-10 12:59:06 -05:00
adelikat
5781746251
Lua - use the proper Log method in some lua libraries
2017-07-10 11:24:32 -05:00
zeromus
3417453b43
use NLua+KopiLua instead of LuaInterface
2017-07-09 23:51:02 -05:00
Trivial-Man
1a1ae98a2e
EmuLuaLibrary.Gui: update createcanvas
...
createcanvas now takes additional parameters that specify where the canvas window should be created
2017-06-29 20:03:18 -06:00
Trivial-Man
eb6676e0ba
EmuLuaLibrary.Forms: add more PictureBox functions
...
Adds the functions for getting the mouse x and y coordinates from PictureBox components.
2017-06-29 19:59:27 -06:00
Trivial-Man
2ddadeae24
Add PictureBox component and methods for drawing on it
2017-06-20 01:20:27 -06:00
adelikat
3c7707a6a0
lua - add gui.clearImageCache, also add a param to drawImage that can force it to not be cached if desired
2017-05-29 11:09:19 -05:00
adelikat
f81f745fcc
Some luaconsole refactoring and moving more logic into LuaImp
2017-05-24 15:59:05 -05:00
adelikat
770f27dfd4
Console lua library functions - check if LuaConsole is loaded on these calls. Currently the console should always be open if a script is being called but this is a preparation commit to eventually support running lua scripts without the lua console loaded
2017-05-23 13:05:36 -05:00
adelikat
facd845453
Lua Console - Move StartLuaDrawing() and EndLuaDrawing() to LuaImp since they exclusively LuaImp logic
2017-05-23 12:40:40 -05:00
adelikat
6196d81b5d
Move _luaList from LuaConsole to LuaImp
2017-05-22 16:47:27 -05:00
adelikat
a6414ff05c
Mainform cleanup round 2
2017-05-22 14:23:13 -05:00
adelikat
31e68a38f9
Cleanup EmuHawk lua library code
2017-05-19 09:47:18 -05:00
adelikat
7f269d25df
Make lua library dependent services private
2017-05-19 08:58:23 -05:00
nattthebear
ebe789eed2
heh
2017-05-10 07:45:23 -04:00
zeromus
8bc067cbbe
lua: fix memory leak causing crash after a few dozen script loads/resets
2017-05-10 01:58:19 -05:00
adelikat
e839a1c163
Add lua canvas methods to documentation
2017-05-07 16:33:48 -05:00
zeromus
ac767a2acc
clarification to the saveram flushing system
2017-05-06 17:50:36 -05:00
adelikat
20d2a7d198
Lua - tastudio onquery callbacks - attempt to better clarify the expected lua function that is taken as a parameter
2017-04-30 12:05:27 -05:00
adelikat
1184e8ed05
lua - implement tastudio.getselection(), tastudio.insertframes(), tastudio.deleteframes()
2017-04-22 20:50:03 -05:00
J.D. Purcell
b53502eed8
Spaces -> tabs.
2017-04-15 16:37:30 -04:00
adelikat
e23dc983f0
Merge pull request #826 from lenalia/master
...
Added horizalign and vertalign to DrawText
2017-04-11 16:43:20 -05:00
lenalia
117ce07aaf
Added horizalign and vertalign to DrawText
2017-04-04 21:20:33 -04:00
shanehoman
58e1b52369
expose MainForm.SaveRam() method to lua
2017-04-02 23:12:38 -07:00
feos
853432da26
tastudio lua: add recording mode functions
...
finally fixes #793
2017-03-08 19:56:44 +03:00
adelikat
5d4c8020c2
Delete more stuff
2017-02-22 10:12:14 -06:00
adelikat
f35717aae2
Remove yet more unused code
2017-02-22 10:11:08 -06:00
adelikat
7653b86f44
Remove some unused code
2017-02-22 10:09:44 -06:00
feos
b5730bda3a
clarify lua doc
2017-02-19 11:56:17 +03:00
zeromus
ea2188dc46
make tastudio.setplayback correctly restore the recording flag after it finishes seeking from the greenzone to the target frame
2017-02-07 00:01:14 -06:00
zeromus
d87a2b27a2
make lua's new tastudio.setplayback re-enable the record flag if it was set (the existing logic leaves it disabled I think as security against the GUI use case where users might stomp their video seeking while playing in record mode). future work: add lua control for the record mode flag
2017-02-05 04:20:07 -06:00
zeromus
539cdc29f3
add SetPlayback to tastudio lua library. Can't be 100% sure it works, but it seems to be working OK. it may hang everything up if you seek through a really long redzone.....
2017-02-04 21:40:29 -06:00
zeromus
a70e6e2fc4
fix #790 (Scroll wheel missing from input.getMouse())
2017-02-04 20:52:32 -06:00
adelikat
0480ea3f44
when toggling a script on, update on screen lua drawing stuff. On gui.clearGraphics() immediate update the screen
2017-02-04 15:54:04 -06:00
adelikat
0c7cedd2ac
lua - tastudio.setmarker() - make marker message optional
2017-02-04 15:11:43 -06:00
zeromus
f7638e8352
"fix" client.bufferwidth and client.bufferheight .... I dont understand why they were doing what they were doing. It seems like such a simple thing, just return the dimensions of the core's videoprovider. Someone should rethink all these (and the surface names, and the padding names) and craft a complete, new design.
2017-01-26 00:54:44 -06:00
Isotarge
ab1b1877e8
Lua: Implement forms.setdropdownitems()
2016-12-26 12:13:19 +10:30
adelikat
3bfce81eae
LuaConsole - have a RequiredService of IEmulator and pass it into the lua implementation instead of using Global.Emulator
2016-12-06 10:35:11 -06:00
adelikat
e99bc9ba41
use the Emulator property instead of Global.Emulator in some lua library files
2016-12-04 12:37:29 -06:00
adelikat
b7a6542fb6
Lua - gui.drawImage(), gui.drawImageRegion() - log an error if image can not be found, instead of throwing an exception
2016-11-19 14:10:17 -06:00
adelikat
e281950902
Close a lua instance before creating a new one, fixes #455
2016-10-06 15:17:05 -05:00