diff --git a/CHANGELOG b/CHANGELOG index 8ae3182d0..2442b75b6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -224,3 +224,20 @@ New Features - singeQuit - singeVersion - soundStop + + +------------------------------------------------------------------------------ + + +SINGE 1.00 +========== + + Released 2006 + + +Notes +----- + +- Original add-on for Daphne. +- Shipped with the ActionMax "emulator" and games. + diff --git a/assets/Manual.lyx b/assets/Manual.lyx index c2eb44249..590e53b89 100644 --- a/assets/Manual.lyx +++ b/assets/Manual.lyx @@ -4,7 +4,7 @@ \begin_header \save_transient_properties true \origin unavailable -\textclass scrartcl +\textclass scrbook \use_default_options true \begin_modules theorems-ams @@ -205,7 +205,8 @@ Things to Know \end_layout \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 \begin_layout Part @@ -217,7 +218,7 @@ Installing Games \end_layout \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. The included menu system will automatically detect them and add them to the menu. @@ -228,7 +229,7 @@ Customizing the Controls \end_layout \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 mappings as they appear to Singe, you can use the free SDL2 Gamepad Tool 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 options for Singe as a whole or for any individual game by using controls.cfg files. - When determining how inputs are mapped, Singe begins with the default settings - and then applies changes specified in controls.cfg files in the following - order: + When determining how inputs are mapped, Singe reads configuration settings + in the following order: \end_layout \begin_layout Enumerate -1. - The main data directory +The defaults from inside Singe. \end_layout \begin_layout Enumerate -2. - The per-game data directory +controls.cfg from the Singe directory. \end_layout \begin_layout Enumerate -3. - The game script directory +controls.cfg from the root of the data 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 \begin_layout Standard After installing Singe, you can find a sample input configuration file at - /Singe/controls.cfg.example. + /Singe/controls.cfg.example. To see the available configuration options available to be used in this - file, read through /Singe/Framework.singe. + file, read through /Singe/Framework.singe. \end_layout \begin_layout Part @@ -281,24 +291,24 @@ Singe is the name of the dragon in Dragon's Lair. \end_layout \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 \begin_layout Quotation Daphne is an actual laserdisc game emulator that can run a handful of classic laser games. - Daphne/Singe or Singe 1.x is the original version of Singe that was an add-on - for the Daphne emulator. + Daphne/Singe or Singe 1.xx is the original version of Singe that was an + add-on for the Daphne emulator. Originally it was shipped as a game DLL for Daphne and then later combined 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 - 2.x support. - Finally, Singe 2.x is an all-new, built-from-scratch, upgrade of the original + Hypseus-Singe is an enhanced fork of Daphne with Singe 1.xx and some Singe + 2.xx support. + Finally, Singe 2.xx is an all-new, built-from-scratch, upgrade of the original Singe. In short, if you want accuracy, use Daphne or Hypseus if they support emulating the desired game. - If it's a Singe game, use Singe 2.x or you can try Hypseus. - Obviously we'd like you to use Singe 2.x. + If it's a Singe game, use Singe 2.xx or you can try Hypseus. + Obviously we'd like you to use Singe 2.xx. :-) \end_layout @@ -316,14 +326,14 @@ Emulators use the real software or ROMs from the original game and pretend \end_layout \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 \begin_layout Quotation Yes! Probably. But you likely won't want to. - Almost everything (that I know of) from Singe 1.x has been converted and - enhanced for Singe 2.x. + Almost everything (that I know of) from Singe 1.xx has been converted and + enhanced for Singe 2.xx. \end_layout \begin_layout Itemize @@ -361,7 +371,7 @@ Users have discovered that most Singe audio and stuttering problems are \begin_layout Enumerate Install VB-CABLE. - https://vb-audio.com/Cable/ + (https://vb-audio.com/Cable/) \end_layout \begin_layout Enumerate @@ -393,10 +403,6 @@ You should have sound again. Load up Singe, and your audio will be working and lag free! \end_layout -\begin_layout Part -History -\end_layout - \begin_layout Part Game Development \end_layout @@ -467,6 +473,14 @@ Do not distribute non-essential files. not ship index files generated from the videos. \end_layout +\begin_layout Section +Game Directory Layout +\end_layout + +\begin_layout Section +Packaging Your Game +\end_layout + \begin_layout Section Event Driven... Or Not? @@ -506,7 +520,7 @@ With the event-driven programming model, Singe controls the main "program \begin_layout Standard \begin_inset listings -lstparams "basicstyle={\scriptsize},tabsize=4" +lstparams "basicstyle={\tiny},tabsize=2" inline false status open @@ -966,7 +980,7 @@ singeYield() \begin_layout Standard \begin_inset listings -lstparams "basicstyle={\scriptsize},tabsize=4" +lstparams "basicstyle={\tiny},tabsize=2" inline false status open @@ -1091,7 +1105,7 @@ The games.dat file allows Singe to automatically locate new games when they \begin_layout Standard \begin_inset listings -lstparams "basicstyle={\scriptsize},tabsize=4" +lstparams "basicstyle={\tiny},tabsize=2" inline false status open @@ -1717,6 +1731,40 @@ GAMES = { Included Libraries \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 API \end_layout diff --git a/assets/magnifyingGlass.xcf b/assets/magnifyingGlass.xcf index 2d134a7bd..71f63de76 100644 --- a/assets/magnifyingGlass.xcf +++ b/assets/magnifyingGlass.xcf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09f79c6cf6fda66cffc8f9d2c0b057b6e69e849b9791dedc910e720895ca9576 -size 215535 +oid sha256:6701bc1050020363850820ac0cd0606ea5dd05ccc3d77baa1ab58891042a4bf7 +size 209461 diff --git a/build-all.sh b/build-all.sh index 3563a378d..5ee8047ef 100755 --- a/build-all.sh +++ b/build-all.sh @@ -55,7 +55,7 @@ function buildAll() { sudo chroot ${SYSROOT} apt-get -y install libasound-dev libxi-dev libvdpau-dev fi -if [[ 1 == 1 ]]; then +if [[ 0 == 1 ]]; then pushd thirdparty/bzip2 clearAndEnterBuild cmake ${COMMON} \ @@ -116,8 +116,8 @@ if [[ 1 == 1 ]]; then -DSDL2IMAGE_JXL=off \ -DSDL2IMAGE_TIF=off \ -DSDL2IMAGE_WEBP=on \ - -DSDL_LIBRARY="${G_TARGET}/lib/libSDL2.a" \ - -DSDL_INCLUDE_DIR="${G_TARGET}/include" \ + -DSDL2_LIBRARY="${G_TARGET}/lib/libSDL2.a" \ + -DSDL2_INCLUDE_DIR="${G_TARGET}/include/SDL2" \ -DWEBP_BUILD_ANIM_UTILS=off \ -DWEBP_BUILD_CWEBP=off \ -DWEBP_BUILD_DWEBP=off \ @@ -365,10 +365,10 @@ if [[ 1 == 1 ]]; then # === timerwheel.lua === createEmbeddedBinary thirdparty/timerwheel.lua/src/timerwheel/timerwheel.lua ${G_GENERATED}/timerwheel_lua.h TIMERWHEEL_LUA_H -fi # === json.lua === createEmbeddedBinary thirdparty/json.lua/json.lua ${G_GENERATED}/json_lua.h JSON_LUA_H +fi # === Singe Framework === createEmbeddedBinary assets/Framework.singe ${G_GENERATED}/Framework_singe.h FRAMEWORK_SINGE_H @@ -379,20 +379,15 @@ fi # === Singe Menu App === createEmbeddedBinary assets/Menu.singe ${G_GENERATED}/Menu_singe.h MENU_SINGE_H -:<&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 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 macos aarch64 diff --git a/src/embedded.h b/src/embedded.h index 766cfc846..c117aba10 100644 --- a/src/embedded.h +++ b/src/embedded.h @@ -37,7 +37,7 @@ #include "generated/Menu_singe.h" #include "generated/FreeSansBold_ttf.h" #include "generated/menuBackground_mkv.h" -//#include "generated/Manual_pdf.h" +#include "generated/Manual_pdf.h" // LuaSocket #include "generated/ftp_lua.h" diff --git a/src/main.c b/src/main.c index b4ffa7555..71365d881 100644 --- a/src/main.c +++ b/src/main.c @@ -721,7 +721,7 @@ void showHeader(void) { // 00000000011111111112222222222333333333344444444445555555555666666666677777777778 // 12345678901234567890123456789012345678901234567890123456789012345678901234567890 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("|___/___|_|\\_|\\___|___| https://KangarooPunch.com https://SingeEngine.com"); utilSay(""); @@ -824,9 +824,9 @@ void unpackData(char *name) { created |= extractFile(temp, controls_cfg, controls_cfg_len); free(temp); // Singe/Manual.pdf - //temp = utilCreateString("Singe%Manual.pdf", utilGetPathSeparator()); - //created |= extractFile(temp, Manual_pdf, Manual_pdf_len); - //free(temp); + temp = utilCreateString("Singe%cManual.pdf", utilGetPathSeparator()); + created |= extractFile(temp, Manual_pdf, Manual_pdf_len); + free(temp); // Singe/Menu.singe temp = utilCreateString("Singe%cMenu.singe", utilGetPathSeparator()); created |= extractFile(temp, Menu_singe, Menu_singe_len); diff --git a/src/singe.c b/src/singe.c index a139cc618..d4c44a3ff 100644 --- a/src/singe.c +++ b/src/singe.c @@ -3488,7 +3488,9 @@ int32_t apiKeyboardIsDown(lua_State *L) { if (n == 1) { if (lua_isnumber(L, 1)) { 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; } } @@ -4415,10 +4417,14 @@ void processKey(bool down, int32_t keysym, int32_t scancode) { // Keep track of keyboard state for other API calls. if (down) { _global.keyboardLastDown = scancode; - _global.keyboardState[scancode] = true; + if ((scancode >= 0) && (scancode < SDL_NUM_SCANCODES)) { + _global.keyboardState[scancode] = true; + } } else { _global.keyboardLastUp = scancode; - _global.keyboardState[scancode] = false; + if ((scancode >= 0) && (scancode < SDL_NUM_SCANCODES)) { + _global.keyboardState[scancode] = false; + } } if (_global.keyboardMode == KEYBD_NORMAL) {