From 33760da0fa38eb102c96838310f27d094d51fbf6 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sat, 19 Nov 2022 13:38:49 +0900 Subject: [PATCH] Implement Cursor.Set HLL function In Toushin Toshi 3, it is used only to show / hide the mouse cursor. --- src/hll/Cursor.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/hll/Cursor.c b/src/hll/Cursor.c index 82f834f..a48f700 100644 --- a/src/hll/Cursor.c +++ b/src/hll/Cursor.c @@ -14,10 +14,27 @@ * along with this program; if not, see . */ +#include "input.h" #include "hll.h" -HLL_WARN_UNIMPLEMENTED(0, int, Cursor, Load, int nNum, int nLinkNum); -HLL_WARN_UNIMPLEMENTED( , void, Cursor, Set, int nNum); +#define TT3_CURSOR_TRANSPARENT 11 + +HLL_WARN_UNIMPLEMENTED(1, int, Cursor, Load, int nNum, int nLinkNum); + +static void Cursor_Set(int num) +{ + switch (num) { + case 0: + mouse_show_cursor(true); + break; + case TT3_CURSOR_TRANSPARENT: + mouse_show_cursor(false); + break; + default: + WARNING("Cursor.Set: unexpected argument %d", num); + break; + } +} HLL_LIBRARY(Cursor, HLL_EXPORT(Load, Cursor_Load),