Compare commits

..
8 Commits
Author SHA1 Message Date
kichikuou bc8a85e046 Version 2.12.1 2024-12-02 10:42:58 +09:00
kichikuou 67f62f02e6 MSYS build: Static link portmidi
Fixes #60.
2024-12-02 10:12:20 +09:00
kichikuou 471c65973b emscripten: Do not use mmap for ALDs
To save memory, as ALD files are now stored as regular files in memfs.
2024-11-28 10:23:21 +09:00
kichikuou 5ff7149dc1 Fix a compiler warning 2024-11-28 10:21:18 +09:00
kichikuou 80988e52cf emscripten: Restore a hack to asyncify send_agsevent() callers
It was inadvertently removed in commit 61ad428.
2024-11-27 09:12:39 +09:00
kichikuou ade76adda6 Version 2.12.0 2024-11-26 20:49:17 +09:00
kichikuou 53d0e8ffef NightDemonDemo, tDemo: refresh screen when frame rate < 30 2024-11-25 17:30:15 +09:00
kichikuou b2e14bd19a Implement tDemo module
Fixes #59.
2024-11-25 16:35:05 +09:00
10 changed files with 107 additions and 11 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## 2.12.1 - 2024-12-02
- Windows: Fixed missing DLL error (#60)
## 2.12.0 - 2024-11-26
- Implemented playback of the opening movie for 妻みぐい2.
## 2.11.7 - 2024-11-12
- Fixed crash when canceling menu with two-finger touch (#58)
- Fixed screen artifact in Rance 3 immediately after selecting "Game Start"
+13 -4
View File
@@ -10,7 +10,7 @@ set(CMAKE_C_STANDARD 99)
enable_testing()
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
set(XSYSTEM35_VERSION "2.11.7")
set(XSYSTEM35_VERSION "2.12.1")
include(CheckSymbolExists)
include(FetchContent)
@@ -143,9 +143,18 @@ else() # non-emscripten, non-android
endif()
endif()
find_library(PORTMIDI portmidi)
if (PORTMIDI)
set(HAVE_PORTMIDI 1)
if (WIN32)
optional_pkg_check_modules(PORTMIDI IMPORTED_TARGET portmidi)
if (PORTMIDI_FOUND)
set(HAVE_PORTMIDI 1)
add_static_library(portmidi_static PORTMIDI)
set(PORTMIDI portmidi_static)
endif()
else ()
find_library(PORTMIDI portmidi)
if (PORTMIDI)
set(HAVE_PORTMIDI 1)
endif()
endif()
endif()
+2 -2
View File
@@ -16,8 +16,8 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 34
versionCode 25
versionName "2.11.7" + gitRevision()
versionCode 27
versionName "2.12.1" + gitRevision()
externalNativeBuild {
cmake {
arguments "-DANDROID_APP_PLATFORM=android-19", "-DANDROID_STL=c++_static"
+1 -1
View File
@@ -55,7 +55,7 @@ Game Compatibility
| Rance 5D - The Lonely Girl (MangaGamer) | Supported | |
| 俺の下であがけ | Unknown | |
| 楽園行 | Unknown | |
| 妻みぐい2 | Supported | Opening demo is not supported |
| 妻みぐい2 | Supported | |
| シェル・クレイル | Supported | |
| ナイトデーモン | Supported | |
| 学園KING | Supported | From アリスCD |
+1
View File
@@ -73,6 +73,7 @@ static void ndd_run(int demonum) {
if (sys_keywait(wait_ms, KEYWAIT_CANCELABLE))
break;
} else {
sdl_updateScreen();
if (sys_getInputInfo())
break;
}
+72 -2
View File
@@ -1,3 +1,23 @@
/*
* Copyright (C) 1997-1998 Masaki Chikama (Wren) <chikama@kasumi.ipl.mech.nagoya-u.ac.jp>
* 1998- <masaki-c@is.aist-nara.ac.jp>
* 2024 kichikuou <KichikuouChrome@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "config.h"
#include <stdio.h>
@@ -7,6 +27,16 @@
#include "xsystem35.h"
#include "modules.h"
#include "nact.h"
#include "alk.h"
#include "input.h"
#include "bgm.h"
#include "sdl_core.h"
#include "ngraph.h"
#include "cg.h"
#include "jpeg.h"
#define TDEMO_MUSIC_NO 1
#define FPS 30
static void Init() {
int p1 = getCaliValue();
@@ -16,7 +46,7 @@ static void Init() {
*var = 1;
DEBUG_COMMAND_YET("tDemo.Init %d,%d,%d,%p:", p1, p2, p3, var);
DEBUG_COMMAND("tDemo.Init %d,%d,%d,%p:", p1, p2, p3, var);
}
static void SetKeyCancelFlag() {
@@ -33,7 +63,47 @@ static void SetLoopFlag() {
}
static void Run() {
DEBUG_COMMAND_YET("tDemo.Run:");
alk_t *alk = alk_new("tDEMO.alk");
if (!alk) {
WARNING("Cannot open tDEMO.alk");
return;
}
while (sys_getInputInfo()); // wait for key up
musbgm_play(TDEMO_MUSIC_NO, 0, 100);
uint32_t start = sdl_getTicks();
while (!nact->is_quit) {
int i = (sdl_getTicks() - start) / (1000 / FPS);
if (i >= alk->datanum)
break;
cgdata *cg = jpeg_extract(alk->entries[i].data, alk->entries[i].size);
if (cg) {
gr_drawimage24(sf0, cg, 0, 0);
ags_updateFull();
cgdata_free(cg);
} else {
WARNING("Cannot decode CG %d", i);
}
int wait_ms = (i + 1) * (1000 / FPS) - (sdl_getTicks() - start);
if (wait_ms > 0) {
if (sys_keywait(wait_ms, KEYWAIT_CANCELABLE))
break;
} else {
sdl_updateScreen();
if (sys_getInputInfo())
break;
}
}
musbgm_stop(TDEMO_MUSIC_NO, 0);
alk_free(alk);
DEBUG_COMMAND("tDemo.Run:");
}
static const ModuleFunc functions[] = {
+3
View File
@@ -162,6 +162,9 @@ if (EMSCRIPTEN)
-sASYNCIFY_IGNORE_INDIRECT=1
-sASYNCIFY_REMOVE=SDL_Delay
-sASYNCIFY_IMPORTS=wait_vsync
# Functions that call an asynchronous function via a function pointer must
# be added to ASYNCIFY_ADD, even if it had a direct call to another
# asynchronous function, so that the indirect call itself is instrumented.
-sASYNCIFY_ADD=commands2F60,nact_main,send_agsevent,cb_waitkey_sprite
-sALLOW_MEMORY_GROWTH=1
-sNO_EXIT_RUNTIME=1
+1 -1
View File
@@ -77,7 +77,7 @@ static bool read_index(int volume, drifiles *d, FILE *fp) {
drifiles *dri_init(const char **file, int cnt, boolean use_mmap) {
drifiles *d = calloc(1, sizeof(drifiles));
#ifndef HAVE_MEMORY_MAPPED_FILE
#if !defined(HAVE_MEMORY_MAPPED_FILE) || defined(__EMSCRIPTEN__)
use_mmap = FALSE;
#endif
+7
View File
@@ -222,6 +222,13 @@ void send_agsevent(enum agsevent_type type, int code) {
.mousey = mousey
};
nact->ags.eventcb(&agse); // Async in emscripten
#ifdef __EMSCRIPTEN__
// HACK: this ensures that callers of this function are instrumented.
// This is necessary because ASYNCIFY_PROPAGATE_ADD does not work:
// https://github.com/emscripten-core/emscripten/issues/23015
emscripten_sleep(0);
#endif
}
void sdl_setCursorInternalLocation(int x, int y) {
+1 -1
View File
@@ -155,7 +155,7 @@ static void makeDIB(int width, int height, int depth) {
SDL_FreeSurface(sdl_dib);
}
uint32_t format;
uint32_t format = 0;
switch (depth) {
case 8:
format = SDL_PIXELFORMAT_INDEX8;