summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/luaengine.c
Commit message (Collapse)AuthorAgeFilesLines
* Another round of -Wextra -Wdouble-promotion fixes. (nw) couriersud2015-05-201-10/+10
|
* Fix build on OpenBSD Brian Callahan2015-04-281-1/+1
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-5/+5
|
* luaengine: optional text color for to draw_text() Luca Bruno2015-04-211-2/+6
| | | | | | | draw_text() now accepts an optional fourth parameter to specify text color, in ARGB format. Signed-off-by: Luca Bruno <lucab@debian.org>
* luaengine: accept any LUA number type as coordinate Luca Bruno2015-04-211-10/+10
| | | | | | | | | | | | This commit fixes a type confusion bug in all draw_*() API methods. When decimal (ie. subpixels) values were passed by user scripts, they were incorrectly casted from float to plain integers, resulting in incorrect graphical artifacts. As this may happen quite often within scripts manipulating numerical values in LUA, we now also accept decimal values as coordinates. Signed-off-by: Luca Bruno <lucab@debian.org>
* cstr() - > c_str() as preparation for move to std::string (nw) Miodrag Milanovic2015-04-111-1/+1
|
* Start removing the use of OSD macros outside OSD since core objects are ↵ Vas Crabb2015-04-011-1/+1
| | | | shared between OSD builds
* Merge pull request #148 from lucab/lucab/mame-lua/misc Olivier Galibert2015-03-241-10/+16
|\ | | | | luaengine: screen drawing fixes and initial docs
| * luaengine: clip screen coordinates to screen size Luca Bruno2015-03-161-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | Several users reported that negative coordinates are wrongly handled. This happens because we assumed using unsigned values only, while unfortunately in many real cases negative values happen when tracking objects partly off-screen. This patch makes all screen drawing methods accept unsigned values, but crop them between 0 and screen size values. Signed-off-by: Luca Bruno <lucab@debian.org>
* | more Android fixes (nw) Miodrag Milanovic2015-03-211-1/+1
|/
* Cleanups and version bumpmame0158 Miodrag Milanovic2015-01-281-2/+2
|
* Minor Solaris fixes. (nw) couriersud2015-01-251-0/+4
|
* luaengine: add per-screen frame_number() getter Luca Bruno2015-01-181-0/+1
| | | | | | Add method to retrieve frame counter for each machine screen. Signed-off-by: Luca Bruno <lucab@debian.org>
* luaengine: add memory writers Luca Bruno2015-01-181-0/+54
| | | | | | Add methods for memory writing, similarly to existing readers. Signed-off-by: Luca Bruno <lucab@debian.org>
* luaengine: update copyright Luca Bruno2015-01-181-1/+1
| | | | Signed-off-by: Luca Bruno <lucab@debian.org>
* luaengine: use visible_area for drawing Luca Bruno2015-01-181-12/+44
| | | | | | | Drawing and scripts should use the actual visible_area, not the maximum declared screen size. Signed-off-by: Luca Bruno <lucab@debian.org>
* luaengine: rework state getter/setter for saves Luca Bruno2015-01-181-4/+14
| | | | | | | | | | Improve state_get_value and state_set_value by using the parent device_state_interface and triggering callbacks for updates. While at it, also remove the hackish friend relationship. Signed-off-by: Luca Bruno <lucab@debian.org>
* Made all compile for Lua 5.3 (nw) Miodrag Milanovic2015-01-131-3/+3
|
* luaengine: expose device state entries Luca Bruno2015-01-111-0/+47
| | | | | | | | | This commit exposes device_state_entry to LUA, providing methods to enumerate available states for a device object, as well as getting and setting their values. It is mostly usefull to inspect and manipulate registers content. Signed-off-by: Luca Bruno <lucab@debian.org>
* luaengine: luabridge Stack<UINT64> specialization Luca Bruno2015-01-111-0/+18
| | | | | | | Provide a Stack<UINT64> specialization for luabridge, later needed by some APIs. Signed-off-by: Luca Bruno <lucab@debian.org>
* luaengine: fix name/tag confusion Luca Bruno2015-01-111-1/+5
| | | | | | | Don't mix names and tags when exposing devices to LUA. While at it, also provide the shortname. Signed-off-by: Luca Bruno <lucab@debian.org>
* Fixed LUA compile Miodrag Milanovic2015-01-101-1/+1
|
* Added more resent lsqlite3 version and fixed compile Miodrag Milanovic2015-01-101-1/+3
|
* Added full LuaBridge sources Miodrag Milanovic2015-01-101-1/+1
|
* Made compilation with latest mongoose possible (nw) Miodrag Milanovic2015-01-101-1/+1
|
* Merge pull request #90 from lucab/lucab/mame-lua/gui-v2 Olivier Galibert2015-01-051-1/+178
|\ | | | | luaengine: add HUD-like capabilities
| * luaengine: add frame hooking support Luca Bruno2014-12-251-0/+43
| | | | | | | | | | | | | | | | | | This commit adds a method to let LUA scripts register a callback to be invoked before rendering each frame. This callback typically makes use of screen drawing methods to draw a custom HUD on top of each frame. Signed-off-by: Luca Bruno <lucab@debian.org>
| * luaengine: add screen drawing/HUD capabilities Luca Bruno2014-12-251-1/+135
| | | | | | | | | | | | | | | | | | This commit allows LUA scripts to implement HUD capabilities, by overlaying elements (lines, boxes, text) to screen. Mostly used to draw custom graphic helpers for trainings and TAS runs development. Signed-off-by: Luca Bruno <lucab@debian.org>
* | Cleanups and version bumpmame0157 Miodrag Milanovic2014-12-311-1/+1
|/
* luaengine: add access to devices and address spaces Luca Bruno2014-12-241-0/+120
| | | | | | | | | | This commit maps some more classes (device_t and address_space) to retrieve devices and address spaces out of current running machine. Proxy methods are provided to enumerate/access devices and address spaces, and to read memory content. Signed-off-by: Luca Bruno <lucab@debian.org>
* luaengine: add emu.app_name()/app_version() methods Luca Bruno2014-12-081-0/+24
| | | | | | | | | | This commit adds two methods to LUA interface, allowing scripts to programatically retrieve current running application name and version. The idea is to make scripts aware of changes in the API, by linking it to current version number. Compatibility helpers can then be added to LUA scripts to keep working across API changes. Signed-off-by: Luca Bruno <lucab@debian.org>
* luaengine: add emu.pause()/unpause() methods Luca Bruno2014-12-021-0/+18
| | | | Signed-off-by: Luca Bruno <lucab@debian.org>
* luaengine: add emu.romname() method Luca Bruno2014-12-021-0/+11
| | | | Signed-off-by: Luca Bruno <lucab@debian.org>
* Cleanups and version bump Miodrag Milanovic2014-07-221-70/+69
|
* Fixed lua engine initialization (nw) Miodrag Milanovic2014-07-151-0/+3
|
* Fix osx compile Wilbert Pol2014-06-201-3/+3
|
* Added LuaBridge and exposed few classes as example (nw) Miodrag Milanovic2014-06-201-23/+31
|
* Updated mongoose and fixed initial websocket connecte to client (nw) Miodrag Milanovic2014-06-121-0/+2
|
* Lua overhaul [Olivier Galibert, Miodrag Milanovic] Miodrag Milanovic2014-06-101-25/+273
|
* few more commands just for fun (nw) Miodrag Milanovic2014-06-091-0/+21
|
* made LUA script execute in main thread, but console running in another (nw) Miodrag Milanovic2014-06-091-64/+94
| | | Need to generalize mechanism of communication between threads and do more cleanup
* remove extra line on exit (nw) Miodrag Milanovic2014-06-081-1/+0
|
* -Created machine_manager as singleton class that contains (for now) one ↵ Miodrag Milanovic2014-06-061-85/+197
| | | | | | | | | running machine [Miodrag Milanovic] -Updated LUA engine to run in machine_manager instead of being initialized per machine -Added "-console" option so emulator can be started with LUA enabled console -Update LUA to version 5.2.3 -Enabled SQLite3 to be compiled and added LUA module for it
* Moved eminline and related files into /src/osd since it's system related (nw) Miodrag Milanovic2014-04-161-4/+4
| | | | | | | | Moved delegates into /src/lib/util to enable usage of delegates in other project parts Moved mame_printf_* calls into /src/osd/osdcore.c and renamed them to osd_printf_* Changed mess.mak to display compilation of ymmu100.ppm nicely
* Marking some of my core files (nw) Miodrag Milanovic2013-10-161-31/+2
|
* Cleanups and version bumpmame0148u5 Miodrag Milanovic2013-05-201-29/+29
|
* added emu.keypost function to lua, and made autoboot_command execute that ↵ Miodrag Milanovic2013-05-091-4/+38
| | | | one instead of direct execution, note that you need to add \n for new line at the end now (nw)
* LUA 5.2.2 added to libraries, did basic hookup of LUA VM into running ↵ Miodrag Milanovic2013-05-091-0/+180
machine [Miodrag Milanovic] added -script (or -autoboot_script) command to execute LUA script after driver startup