diff options
| author | 2026-02-19 17:45:26 +0100 | |
|---|---|---|
| committer | 2026-02-20 03:45:26 +1100 | |
| commit | 57cf10f09f79fab5fef3544bca98aeca6eadcfe3 (patch) | |
| tree | 0478fd0e05bb52363b4247161b17a6cdfe1e05a2 /docs | |
| parent | 644147eb50a94c33ee1307c5fe903b4b8cf90d11 (diff) | |
video/vector.cpp, frontend/mame/luaengine.cpp: Refactored recently-added Lua hooks for vector devices. (#14991)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/source/luascript/ref-devices.rst | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/docs/source/luascript/ref-devices.rst b/docs/source/luascript/ref-devices.rst index e4e4ba9f328..b28670183f6 100644 --- a/docs/source/luascript/ref-devices.rst +++ b/docs/source/luascript/ref-devices.rst @@ -459,6 +459,67 @@ screen.palette (read-only) format. +.. _luascript-ref-vectordev: + +Vector device +------------- + +Wraps MAME’s ``vector_device`` class, which represents an emulated X/Y vector display. + +Instantiation +~~~~~~~~~~~~~ + +manager.machine.vector_devices[tag] + Gets a vector device by tag relative to the root machine device, or ``nil`` + if no such device exists or it is not a vector device. + +Base classes +~~~~~~~~~~~~ + +* :ref:`luascript-ref-device` + +Methods +~~~~~~~ + +vector:add_frame_begin_notifier(callback) + Add a callback to receive notifications when the processing of vectors + begins. The callback is not passed any arguments. + Returns a :ref:`notifier subscription <luascript-ref-notifiersub>`. +vector:add_frame_end_notifier(callback) + Add a callback to receive notifications when the processing of vectors + begins. The callback is not passed any arguments. + Returns a :ref:`notifier subscription <luascript-ref-notifiersub>`. +vector:add_line_notifier(callback) + Add a callback to receive notifications when the vector beam moves + between two points with a non-zero beam intensity. The callback is + passed the following arguments, in order: + + - **lastx:** The old horizontal beam position. + - **lasty:** The old vertical beam position. + - **x:** The current horizontal beam position. + - **y:** The current vertical beam position. + - **color:** The beam color, as a 24-bit RGB value. + - **intensity:** The beam intensity, as an 8-bit value. + - **width:** The configured pixel width of the virtual vector display. + - **height:** The configured pixel width of the virtual vector display. + + Returns a :ref:`notifier subscription <luascript-ref-notifiersub>`. +vector:add_move_notifier(callback) + Add a callback to receive notifications when the vector beam moves + with an intensity of zero. Provided as a convenience feature as + the previous position and intensity of the beam is not meaningful + when "jumping" the vector beam. The callback is passed the following + arguments, in order: + + - **x:** The current horizontal beam position. + - **y:** The current vertical beam position. + - **color:** The beam color, as a 24-bit RGB value. + - **width:** The configured pixel width of the virtual vector display. + - **height:** The configured pixel width of the virtual vector display. + + Returns a :ref:`notifier subscription <luascript-ref-notifiersub>`. + + .. _luascript-ref-cassdev: Cassette image device |
