Beta 6 is out. Pi 5 working. On to 7!
This commit is contained in:
parent
0914c760a1
commit
6c6a635484
7 changed files with 125 additions and 58 deletions
17
CHANGELOG
17
CHANGELOG
|
@ -224,3 +224,20 @@ New Features
|
||||||
- singeQuit
|
- singeQuit
|
||||||
- singeVersion
|
- singeVersion
|
||||||
- soundStop
|
- soundStop
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
SINGE 1.00
|
||||||
|
==========
|
||||||
|
|
||||||
|
Released 2006
|
||||||
|
|
||||||
|
|
||||||
|
Notes
|
||||||
|
-----
|
||||||
|
|
||||||
|
- Original add-on for Daphne.
|
||||||
|
- Shipped with the ActionMax "emulator" and games.
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
\begin_header
|
\begin_header
|
||||||
\save_transient_properties true
|
\save_transient_properties true
|
||||||
\origin unavailable
|
\origin unavailable
|
||||||
\textclass scrartcl
|
\textclass scrbook
|
||||||
\use_default_options true
|
\use_default_options true
|
||||||
\begin_modules
|
\begin_modules
|
||||||
theorems-ams
|
theorems-ams
|
||||||
|
@ -205,7 +205,8 @@ Things to Know
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Don't touch the Singe/ folder!
|
Don't touch the Singe/ folder! Files in this folder belong to Singe and
|
||||||
|
may be updated or deleted at any time.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Part
|
\begin_layout Part
|
||||||
|
@ -217,7 +218,7 @@ Installing Games
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Games designed for Singe 2.x and later simply need to be unpacked and copied
|
Games designed for Singe 2.xx and later simply need to be unpacked and copied
|
||||||
into the same folder where you placed the Singe binary.
|
into the same folder where you placed the Singe binary.
|
||||||
The included menu system will automatically detect them and add them to
|
The included menu system will automatically detect them and add them to
|
||||||
the menu.
|
the menu.
|
||||||
|
@ -228,7 +229,7 @@ Customizing the Controls
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
By default, Singe maps controllers as if they were Xbox 360 gamepads.
|
By default, Singe maps controllers as if they were Xbox gamepads.
|
||||||
If your controller is not recognized or you wish to change the default
|
If your controller is not recognized or you wish to change the default
|
||||||
mappings as they appear to Singe, you can use the free SDL2 Gamepad Tool
|
mappings as they appear to Singe, you can use the free SDL2 Gamepad Tool
|
||||||
from http://generalarcade.com/gamepadtool/.
|
from http://generalarcade.com/gamepadtool/.
|
||||||
|
@ -239,31 +240,40 @@ By default, Singe maps controllers as if they were Xbox 360 gamepads.
|
||||||
In addition to configuring your controller, you can remap all the input
|
In addition to configuring your controller, you can remap all the input
|
||||||
options for Singe as a whole or for any individual game by using controls.cfg
|
options for Singe as a whole or for any individual game by using controls.cfg
|
||||||
files.
|
files.
|
||||||
When determining how inputs are mapped, Singe begins with the default settings
|
When determining how inputs are mapped, Singe reads configuration settings
|
||||||
and then applies changes specified in controls.cfg files in the following
|
in the following order:
|
||||||
order:
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Enumerate
|
\begin_layout Enumerate
|
||||||
1.
|
The defaults from inside Singe.
|
||||||
The main data directory
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Enumerate
|
\begin_layout Enumerate
|
||||||
2.
|
controls.cfg from the Singe directory.
|
||||||
The per-game data directory
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Enumerate
|
\begin_layout Enumerate
|
||||||
3.
|
controls.cfg from the root of the data directory.
|
||||||
The game script directory
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Enumerate
|
||||||
|
controls.cfg from the game's data directory.
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Enumerate
|
||||||
|
controls.cfg from the game's main script directory.
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Standard
|
||||||
|
You do not have to specify every option in a custom controls.cfg file.
|
||||||
|
Feel free to just provide the entries you want changed.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
After installing Singe, you can find a sample input configuration file at
|
After installing Singe, you can find a sample input configuration file at
|
||||||
<InstallDir>/Singe/controls.cfg.example.
|
<InstallDir> /Singe/controls.cfg.example.
|
||||||
To see the available configuration options available to be used in this
|
To see the available configuration options available to be used in this
|
||||||
file, read through <InstallDir>/Singe/Framework.singe.
|
file, read through <InstallDir> /Singe/Framework.singe.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Part
|
\begin_layout Part
|
||||||
|
@ -281,24 +291,24 @@ Singe is the name of the dragon in Dragon's Lair.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Itemize
|
\begin_layout Itemize
|
||||||
What is the difference between Daphne, Singe, Hypseus, and Singe 2.x?
|
What is the difference between Daphne, Singe, Hypseus, and Singe 2.xx?
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Quotation
|
\begin_layout Quotation
|
||||||
Daphne is an actual laserdisc game emulator that can run a handful of classic
|
Daphne is an actual laserdisc game emulator that can run a handful of classic
|
||||||
laser games.
|
laser games.
|
||||||
Daphne/Singe or Singe 1.x is the original version of Singe that was an add-on
|
Daphne/Singe or Singe 1.xx is the original version of Singe that was an
|
||||||
for the Daphne emulator.
|
add-on for the Daphne emulator.
|
||||||
Originally it was shipped as a game DLL for Daphne and then later combined
|
Originally it was shipped as a game DLL for Daphne and then later combined
|
||||||
into a single binary with the Daphne emulation features removed.
|
into a single binary with the Daphne emulation features removed.
|
||||||
Hypseus-Singe is an enhanced fork of Daphne with Singe 1.x and some Singe
|
Hypseus-Singe is an enhanced fork of Daphne with Singe 1.xx and some Singe
|
||||||
2.x support.
|
2.xx support.
|
||||||
Finally, Singe 2.x is an all-new, built-from-scratch, upgrade of the original
|
Finally, Singe 2.xx is an all-new, built-from-scratch, upgrade of the original
|
||||||
Singe.
|
Singe.
|
||||||
In short, if you want accuracy, use Daphne or Hypseus if they support emulating
|
In short, if you want accuracy, use Daphne or Hypseus if they support emulating
|
||||||
the desired game.
|
the desired game.
|
||||||
If it's a Singe game, use Singe 2.x or you can try Hypseus.
|
If it's a Singe game, use Singe 2.xx or you can try Hypseus.
|
||||||
Obviously we'd like you to use Singe 2.x.
|
Obviously we'd like you to use Singe 2.xx.
|
||||||
:-)
|
:-)
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -316,14 +326,14 @@ Emulators use the real software or ROMs from the original game and pretend
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Itemize
|
\begin_layout Itemize
|
||||||
Can I run Singe 1.x games on Singe 2.x?
|
Can I run Singe 1.xx games on Singe 2.xx?
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Quotation
|
\begin_layout Quotation
|
||||||
Yes! Probably.
|
Yes! Probably.
|
||||||
But you likely won't want to.
|
But you likely won't want to.
|
||||||
Almost everything (that I know of) from Singe 1.x has been converted and
|
Almost everything (that I know of) from Singe 1.xx has been converted and
|
||||||
enhanced for Singe 2.x.
|
enhanced for Singe 2.xx.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Itemize
|
\begin_layout Itemize
|
||||||
|
@ -361,7 +371,7 @@ Users have discovered that most Singe audio and stuttering problems are
|
||||||
|
|
||||||
\begin_layout Enumerate
|
\begin_layout Enumerate
|
||||||
Install VB-CABLE.
|
Install VB-CABLE.
|
||||||
https://vb-audio.com/Cable/
|
(https://vb-audio.com/Cable/)
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Enumerate
|
\begin_layout Enumerate
|
||||||
|
@ -393,10 +403,6 @@ You should have sound again.
|
||||||
Load up Singe, and your audio will be working and lag free!
|
Load up Singe, and your audio will be working and lag free!
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Part
|
|
||||||
History
|
|
||||||
\end_layout
|
|
||||||
|
|
||||||
\begin_layout Part
|
\begin_layout Part
|
||||||
Game Development
|
Game Development
|
||||||
\end_layout
|
\end_layout
|
||||||
|
@ -467,6 +473,14 @@ Do not distribute non-essential files.
|
||||||
not ship index files generated from the videos.
|
not ship index files generated from the videos.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Section
|
||||||
|
Game Directory Layout
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Section
|
||||||
|
Packaging Your Game
|
||||||
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Section
|
\begin_layout Section
|
||||||
Event Driven...
|
Event Driven...
|
||||||
Or Not?
|
Or Not?
|
||||||
|
@ -506,7 +520,7 @@ With the event-driven programming model, Singe controls the main "program
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
\begin_inset listings
|
\begin_inset listings
|
||||||
lstparams "basicstyle={\scriptsize},tabsize=4"
|
lstparams "basicstyle={\tiny},tabsize=2"
|
||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
|
@ -966,7 +980,7 @@ singeYield()
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
\begin_inset listings
|
\begin_inset listings
|
||||||
lstparams "basicstyle={\scriptsize},tabsize=4"
|
lstparams "basicstyle={\tiny},tabsize=2"
|
||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
|
@ -1091,7 +1105,7 @@ The games.dat file allows Singe to automatically locate new games when they
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
\begin_inset listings
|
\begin_inset listings
|
||||||
lstparams "basicstyle={\scriptsize},tabsize=4"
|
lstparams "basicstyle={\tiny},tabsize=2"
|
||||||
inline false
|
inline false
|
||||||
status open
|
status open
|
||||||
|
|
||||||
|
@ -1717,6 +1731,40 @@ GAMES = {
|
||||||
Included Libraries
|
Included Libraries
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Standard
|
||||||
|
In addition to the standard Lua libraries and the Singe API, the following
|
||||||
|
libraries are also available for use in Singe programs without the need
|
||||||
|
to install any additional software:
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
Copas - Asynchronous networking
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
LuaFileSystem - Expanded filesystem support
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
LuaJSON - JavaScript Object Notation encoding and decoding
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
LuaSec - TLS/SSL communication
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
LuaSocket - TCP and UDP
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
LuaRS232 - RS232 serial port access
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Standard
|
||||||
|
Their usage is beyond the scope of this document.
|
||||||
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Section
|
\begin_layout Section
|
||||||
API
|
API
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
BIN
assets/magnifyingGlass.xcf
(Stored with Git LFS)
BIN
assets/magnifyingGlass.xcf
(Stored with Git LFS)
Binary file not shown.
24
build-all.sh
24
build-all.sh
|
@ -55,7 +55,7 @@ function buildAll() {
|
||||||
sudo chroot ${SYSROOT} apt-get -y install libasound-dev libxi-dev libvdpau-dev
|
sudo chroot ${SYSROOT} apt-get -y install libasound-dev libxi-dev libvdpau-dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ 1 == 1 ]]; then
|
if [[ 0 == 1 ]]; then
|
||||||
pushd thirdparty/bzip2
|
pushd thirdparty/bzip2
|
||||||
clearAndEnterBuild
|
clearAndEnterBuild
|
||||||
cmake ${COMMON} \
|
cmake ${COMMON} \
|
||||||
|
@ -116,8 +116,8 @@ if [[ 1 == 1 ]]; then
|
||||||
-DSDL2IMAGE_JXL=off \
|
-DSDL2IMAGE_JXL=off \
|
||||||
-DSDL2IMAGE_TIF=off \
|
-DSDL2IMAGE_TIF=off \
|
||||||
-DSDL2IMAGE_WEBP=on \
|
-DSDL2IMAGE_WEBP=on \
|
||||||
-DSDL_LIBRARY="${G_TARGET}/lib/libSDL2.a" \
|
-DSDL2_LIBRARY="${G_TARGET}/lib/libSDL2.a" \
|
||||||
-DSDL_INCLUDE_DIR="${G_TARGET}/include" \
|
-DSDL2_INCLUDE_DIR="${G_TARGET}/include/SDL2" \
|
||||||
-DWEBP_BUILD_ANIM_UTILS=off \
|
-DWEBP_BUILD_ANIM_UTILS=off \
|
||||||
-DWEBP_BUILD_CWEBP=off \
|
-DWEBP_BUILD_CWEBP=off \
|
||||||
-DWEBP_BUILD_DWEBP=off \
|
-DWEBP_BUILD_DWEBP=off \
|
||||||
|
@ -365,10 +365,10 @@ if [[ 1 == 1 ]]; then
|
||||||
|
|
||||||
# === timerwheel.lua ===
|
# === timerwheel.lua ===
|
||||||
createEmbeddedBinary thirdparty/timerwheel.lua/src/timerwheel/timerwheel.lua ${G_GENERATED}/timerwheel_lua.h TIMERWHEEL_LUA_H
|
createEmbeddedBinary thirdparty/timerwheel.lua/src/timerwheel/timerwheel.lua ${G_GENERATED}/timerwheel_lua.h TIMERWHEEL_LUA_H
|
||||||
fi
|
|
||||||
|
|
||||||
# === json.lua ===
|
# === json.lua ===
|
||||||
createEmbeddedBinary thirdparty/json.lua/json.lua ${G_GENERATED}/json_lua.h JSON_LUA_H
|
createEmbeddedBinary thirdparty/json.lua/json.lua ${G_GENERATED}/json_lua.h JSON_LUA_H
|
||||||
|
fi
|
||||||
|
|
||||||
# === Singe Framework ===
|
# === Singe Framework ===
|
||||||
createEmbeddedBinary assets/Framework.singe ${G_GENERATED}/Framework_singe.h FRAMEWORK_SINGE_H
|
createEmbeddedBinary assets/Framework.singe ${G_GENERATED}/Framework_singe.h FRAMEWORK_SINGE_H
|
||||||
|
@ -379,20 +379,15 @@ fi
|
||||||
# === Singe Menu App ===
|
# === Singe Menu App ===
|
||||||
createEmbeddedBinary assets/Menu.singe ${G_GENERATED}/Menu_singe.h MENU_SINGE_H
|
createEmbeddedBinary assets/Menu.singe ${G_GENERATED}/Menu_singe.h MENU_SINGE_H
|
||||||
|
|
||||||
:<<UNUSED
|
|
||||||
# === Singe Manual ===
|
# === Singe Manual ===
|
||||||
#libreoffice --headless "-env:UserInstallation=file:///tmp/LibreOffice_Conversion_${USER}" --convert-to pdf:writer_pdf_Export Manual.odt
|
lyx -batch -f all -E pdf ${G_GENERATED}/Manual.pdf assets/Manual.lyx
|
||||||
documentbuilder makePDFs.docbuilder
|
createEmbeddedBinary ${G_GENERATED}/Manual.pdf ${G_GENERATED}/Manual_pdf.h MANUAL_H
|
||||||
mv /tmp/Manual.pdf ${G_TARGET}/.
|
|
||||||
createEmbeddedBinary ${G_TARGET}/Manual.pdf ${G_GENERATED}/Manual_pdf.h MANUAL_H
|
|
||||||
rm ${G_TARGET}/Manual.pdf
|
|
||||||
UNUSED
|
|
||||||
|
|
||||||
pushd ${G_TARGET}
|
pushd ${G_TARGET}
|
||||||
clearAndEnterBuild
|
clearAndEnterBuild
|
||||||
cmake ${COMMON} ${G_BUILDROOT}
|
cmake ${COMMON} ${G_BUILDROOT}
|
||||||
make
|
make
|
||||||
upx -9 --force singe2${SUFFIX}
|
#upx -9 --force singe2${SUFFIX}
|
||||||
mv -f singe2${SUFFIX} ${G_BUILDROOT}/${G_BUILDDIR}/Singe-v2.10-${OS^}-${ARCH}${SUFFIX}
|
mv -f singe2${SUFFIX} ${G_BUILDROOT}/${G_BUILDDIR}/Singe-v2.10-${OS^}-${ARCH}${SUFFIX}
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
@ -537,15 +532,16 @@ sudo apt-get install -y \
|
||||||
xxd \
|
xxd \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
lua5.4 \
|
lua5.4 \
|
||||||
|
lyx \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
libasound-dev \
|
libasound-dev \
|
||||||
libxi-dev \
|
libxi-dev \
|
||||||
libvdpau-dev \
|
libvdpau-dev \
|
||||||
upx-ucl
|
upx-ucl
|
||||||
|
|
||||||
#buildAll linux x86_64 2>&1 | tee ${G_BUILDDIR}/linux-x86_64.log
|
buildAll linux x86_64 2>&1 | tee ${G_BUILDDIR}/linux-x86_64.log
|
||||||
buildAll windows x86_64 2>&1 | tee ${G_BUILDDIR}/windows-x86_64.log
|
buildAll windows x86_64 2>&1 | tee ${G_BUILDDIR}/windows-x86_64.log
|
||||||
#buildAll pi aarch64 2>&1 | tee ${G_BUILDDIR}/pi-aarch64.log
|
buildAll pi aarch64 2>&1 | tee ${G_BUILDDIR}/pi-aarch64.log
|
||||||
|
|
||||||
#buildAll linux x86
|
#buildAll linux x86
|
||||||
#buildAll macos aarch64
|
#buildAll macos aarch64
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include "generated/Menu_singe.h"
|
#include "generated/Menu_singe.h"
|
||||||
#include "generated/FreeSansBold_ttf.h"
|
#include "generated/FreeSansBold_ttf.h"
|
||||||
#include "generated/menuBackground_mkv.h"
|
#include "generated/menuBackground_mkv.h"
|
||||||
//#include "generated/Manual_pdf.h"
|
#include "generated/Manual_pdf.h"
|
||||||
|
|
||||||
// LuaSocket
|
// LuaSocket
|
||||||
#include "generated/ftp_lua.h"
|
#include "generated/ftp_lua.h"
|
||||||
|
|
|
@ -721,7 +721,7 @@ void showHeader(void) {
|
||||||
// 00000000011111111112222222222333333333344444444445555555555666666666677777777778
|
// 00000000011111111112222222222333333333344444444445555555555666666666677777777778
|
||||||
// 12345678901234567890123456789012345678901234567890123456789012345678901234567890
|
// 12345678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||||
utilSay(" ___ ___ _ _ ___ ___");
|
utilSay(" ___ ___ _ _ ___ ___");
|
||||||
utilSay("/ __|_ _| \\| |/ __| __| Somewhat Interactive Nostalgic Game Engine %s Beta 5", VERSION_STRING);
|
utilSay("/ __|_ _| \\| |/ __| __| Somewhat Interactive Nostalgic Game Engine %s B7", VERSION_STRING);
|
||||||
utilSay("\\__ \\| || .` | (_ | _| Copyright (c) 2006-%s Scott C. Duensing", COPYRIGHT_END_YEAR);
|
utilSay("\\__ \\| || .` | (_ | _| Copyright (c) 2006-%s Scott C. Duensing", COPYRIGHT_END_YEAR);
|
||||||
utilSay("|___/___|_|\\_|\\___|___| https://KangarooPunch.com https://SingeEngine.com");
|
utilSay("|___/___|_|\\_|\\___|___| https://KangarooPunch.com https://SingeEngine.com");
|
||||||
utilSay("");
|
utilSay("");
|
||||||
|
@ -824,9 +824,9 @@ void unpackData(char *name) {
|
||||||
created |= extractFile(temp, controls_cfg, controls_cfg_len);
|
created |= extractFile(temp, controls_cfg, controls_cfg_len);
|
||||||
free(temp);
|
free(temp);
|
||||||
// Singe/Manual.pdf
|
// Singe/Manual.pdf
|
||||||
//temp = utilCreateString("Singe%Manual.pdf", utilGetPathSeparator());
|
temp = utilCreateString("Singe%cManual.pdf", utilGetPathSeparator());
|
||||||
//created |= extractFile(temp, Manual_pdf, Manual_pdf_len);
|
created |= extractFile(temp, Manual_pdf, Manual_pdf_len);
|
||||||
//free(temp);
|
free(temp);
|
||||||
// Singe/Menu.singe
|
// Singe/Menu.singe
|
||||||
temp = utilCreateString("Singe%cMenu.singe", utilGetPathSeparator());
|
temp = utilCreateString("Singe%cMenu.singe", utilGetPathSeparator());
|
||||||
created |= extractFile(temp, Menu_singe, Menu_singe_len);
|
created |= extractFile(temp, Menu_singe, Menu_singe_len);
|
||||||
|
|
12
src/singe.c
12
src/singe.c
|
@ -3488,7 +3488,9 @@ int32_t apiKeyboardIsDown(lua_State *L) {
|
||||||
if (n == 1) {
|
if (n == 1) {
|
||||||
if (lua_isnumber(L, 1)) {
|
if (lua_isnumber(L, 1)) {
|
||||||
d = lua_tonumber(L, 1); s = (int32_t)d;
|
d = lua_tonumber(L, 1); s = (int32_t)d;
|
||||||
r = _global.keyboardState[s];
|
if ((s >= 0) && (s < SDL_NUM_SCANCODES)) {
|
||||||
|
r = _global.keyboardState[s];
|
||||||
|
}
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4415,10 +4417,14 @@ void processKey(bool down, int32_t keysym, int32_t scancode) {
|
||||||
// Keep track of keyboard state for other API calls.
|
// Keep track of keyboard state for other API calls.
|
||||||
if (down) {
|
if (down) {
|
||||||
_global.keyboardLastDown = scancode;
|
_global.keyboardLastDown = scancode;
|
||||||
_global.keyboardState[scancode] = true;
|
if ((scancode >= 0) && (scancode < SDL_NUM_SCANCODES)) {
|
||||||
|
_global.keyboardState[scancode] = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
_global.keyboardLastUp = scancode;
|
_global.keyboardLastUp = scancode;
|
||||||
_global.keyboardState[scancode] = false;
|
if ((scancode >= 0) && (scancode < SDL_NUM_SCANCODES)) {
|
||||||
|
_global.keyboardState[scancode] = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_global.keyboardMode == KEYBD_NORMAL) {
|
if (_global.keyboardMode == KEYBD_NORMAL) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue