GithubHelp home page GithubHelp logo

krkrsdl2 / krkrsdl2 Goto Github PK

View Code? Open in Web Editor NEW
259.0 9.0 30.0 3.21 MB

吉里吉里SDL2プロジェクト (吉里吉里2と吉里吉里Zがベース) / Kirikiri SDL2 Project (Based on Kirikiri 2 and Kirikiri Z)

Home Page: https://krkrsdl2.github.io/krkrsdl2/

License: MIT License

Meson 0.56% C++ 83.41% C 10.78% CMake 1.42% Java 0.01% Batchfile 0.01% Python 1.91% Perl 1.90%
webassembly kirikiri kirikiri2 kirikiriz sdl2 krkr krkr2 krkrz sdl android

krkrsdl2's Introduction

吉里吉里SDL2 / Kirikiri SDL2

吉里吉里SDL2は、macOSやLinuxなど、SDL2をサポートするプラットフォームで実行できる吉里吉里Zの移植版です。

詳細については、次の Web ページを参照してください: https://krkrsdl2.github.io/krkrsdl2/

Kirikiri SDL2 is a port of Kirikiri Z that can be run on platforms supporting SDL2, such as macOS and Linux.

Please visit the following webpage for more information: https://krkrsdl2.github.io/krkrsdl2/en/

商用ゲームの実行に関する注意 / A note on running commercial games

このプロジェクトを使用して変更されていない商用ゲームを実行することはサポートされていません。
代わりにWineまたはKirikiroid2を使用してください。

Running unmodified commercial games using this project is not supported.
Please use Wine or Kirikiroid2 instead.

ライセンス / License

吉里吉里SDL2ソース(srcディレクトリ内)のコードは、MITライセンスの下でライセンスされています。 詳細については、LICENSEをお読みください。
このプロジェクトには、サードパーティのコンポーネントが含まれています (GPL に基づいてライセンスされていません)。詳細については、各コンポーネントのライセンスファイルを参照してください。

The code of the Kirikiri SDL2 source (inside the src directory) is licensed under the MIT license. Please read LICENSE for more information.
This project contains third-party components (not licensed under the GPL). Please view the license file in each component for more information.

krkrsdl2's People

Contributors

3c1u avatar guidocella avatar netdex avatar uyjulian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

krkrsdl2's Issues

External plugin handling

Currently, a selection of plugins are compiled into the main executable.
Use dyld to load plugins externally.
Since there is no issue with C++ ABI, iTJSBinaryStream can be used as-is.

tTVPBitmapBitsAlloc::Free issue

tTVPBitmapBitsAlloc::Free is being called in destructor of class tTVPBitmap.
tTVPBitmapBitsAlloc::Free can throw an exception when sentinel is corrupted (e.g. buffer overrun). However, exception cannot be handled gracefully in program exit

iOS support

It will be done eventually when I have free time…

Savedata reading/writing is broken on Emscripten

Savedata reading/writing is broken on Emscripten. Need to debug further

More specifically, (Dictionary.saveStruct incontextof data)(fn, mode); with mode as offset ('o1234') has incorrect behavior.

Emscripten multithread issue

The SDL2 implementation of pthread proxy isn't merged into emscripten-ports SDL2 yet.

Working branch is proxy_pthread, repository is uyjulian/SDL2

Even when using the above branch, it currently errors on out of bounds memory access

mac os?

Hello!
Will it work on mac os?

Couldn't find libSDL2.so on android-project

I opened the android-project with Android Studio. According to AndroidManifest.xml, I created an Activity to extends SDLActivity.

I built it and ran it on my Android phone, However, there was an error in the application like this:

W/System.err: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.libsdl.app-1/base.apk", zip file "/data/app/org.libsdl.app-1/split_lib_slice_0_apk.apk", zip file "/data/app/org.libsdl.app-1/split_lib_slice_1_apk.apk", zip file "/data/app/org.libsdl.app-1/split_lib_slice_2_apk.apk", zip file "/data/app/org.libsdl.app-1/split_lib_slice_3_apk.apk", zip file "/data/app/org.libsdl.app-1/split_lib_slice_4_apk.apk", zip file "/data/app/org.libsdl.app-1/split_lib_slice_5_apk.apk", zip file "/data/app/org.libsdl.app-1/split_lib_slice_6_apk.apk", zip file "/data/app/org.libsdl.app-1/split_lib_slice_7_apk.apk", zip file "/data/app/org.libsdl.app-1/split_lib_slice_8_apk.apk", zip file "/data/app/org.libsdl.app-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/org.libsdl.app-1/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libSDL2.so"

Is there any binary file missing?

Add cross-platform krkrrel utility

Add cross-platform krkrrel utility.
The current existing tool is Win32-only and only compiles with Borland C++ Builder 5.
Also, there are issues running it on newer operating systems.

File handle leak

There appears to be a file handle leak. After opening however many ulimit -n is set as, no more files can be opened.

[Suggestion] Win32 builds.

This isn't really an issue but I wonder if you could (if at all possible) also provide Windows Builds alongside Mac and Linux Binaries. Kirkiri Z works fine on windows but I would like to test and work with Krkrsdl2 too. I'm working on my own project with Kirkiri Z and it would be nice if it works with this out of the box. Future Kag developers will probably utilize this.

Thanks in Advance.

TJS2 to C++ compiler

This will make debugging and profiling much easier. This will also make loading much faster

Broken SSE2 graphic functions

Currently, TVPInterpStretchCopy_sse2_c is broken (results in "blocky" image).

Currently, to work around this, use -cpusse2=no command line argument.

XP3 reading causes data abort on ...

PC is near tTJSBinaryStream::SetPosition. Some quick printf debugging shows that the issue is caused near TVPGetXP3ArchiveOffset in XP3Archive.cpp. Commenting out the call to TVPGetXP3ArchiveOffset removes the cause of the data abort.

TVPGL issues

The behavior of some functions in tvpgl.c differ from the MMX code used in Kirikiri 2 and the SSE2 code used in Kirikiri Z.
The AVX2 code in Kirikiri Z is known to be incorrect, so it will not be used as a reference.

Android application crash without any error message

I build the android-project and ran it on my Android phone, but the application crashed and there was no error message in logcat.

The information in logcat is like this:

01-20 11:16:44.262 4256-4256/? I/art: Late-enabling -Xcheck:jni
01-20 11:16:44.308 4256-4256/org.libsdl.app I/InstantRun: starting instant run server: is main process
01-20 11:16:44.320 4256-4256/org.libsdl.app V/SDL: Device: sagit
01-20 11:16:44.320 4256-4256/org.libsdl.app V/SDL: Model: MI 9
01-20 11:16:44.320 4256-4256/org.libsdl.app V/SDL: onCreate()
01-20 11:16:44.320 4256-4256/org.libsdl.app W/linker: libhidapi.so: unused DT entry: type 0x6ffffffe arg 0x541c
01-20 11:16:44.320 4256-4256/org.libsdl.app W/linker: libhidapi.so: unused DT entry: type 0x6fffffff arg 0x2
01-20 11:16:44.320 4256-4256/org.libsdl.app W/linker: libSDL2.so: unused DT entry: type 0x6ffffffe arg 0xbd28
01-20 11:16:44.320 4256-4256/org.libsdl.app W/linker: libSDL2.so: unused DT entry: type 0x6fffffff arg 0x3
01-20 11:16:44.321 4256-4256/org.libsdl.app W/linker: libmain.so: unused DT entry: type 0x6ffffffe arg 0x17319c
01-20 11:16:44.321 4256-4256/org.libsdl.app W/linker: libmain.so: unused DT entry: type 0x6fffffff arg 0x3
01-20 11:16:44.327 4256-4256/org.libsdl.app V/SDL: nativeSetupJNI()
01-20 11:16:44.328 4256-4256/org.libsdl.app V/SDL: AUDIO nativeSetupJNI()
01-20 11:16:44.328 4256-4256/org.libsdl.app V/SDL: CONTROLLER nativeSetupJNI()
01-20 11:16:44.333 4256-4256/org.libsdl.app D/hidapi: Initializing Bluetooth
01-20 11:16:44.334 4256-4256/org.libsdl.app D/BluetoothAdapter: 242668809: getState() : mService = null. Returning STATE_OFF
01-20 11:16:44.340 4256-4256/org.libsdl.app V/SDL: onStart()
01-20 11:16:44.340 4256-4256/org.libsdl.app V/SDL: onResume()
01-20 11:16:44.341 4256-4276/org.libsdl.app D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
01-20 11:16:44.341 4256-4256/org.libsdl.app D/Atlas: Validating map...
01-20 11:16:44.361 4256-4276/org.libsdl.app I/OpenGLRenderer: Initialized EGL, version 1.4
01-20 11:16:44.377 4256-4276/org.libsdl.app D/OpenGLRenderer: Enabling debug mode 0
01-20 11:16:44.390 4256-4256/org.libsdl.app V/SDL: surfaceCreated()
01-20 11:16:44.390 4256-4256/org.libsdl.app V/SDL: surfaceChanged()
01-20 11:16:44.390 4256-4256/org.libsdl.app V/SDL: pixel format RGB_565
01-20 11:16:44.390 4256-4256/org.libsdl.app V/SDL: Window size: 1600x850
01-20 11:16:44.390 4256-4256/org.libsdl.app V/SDL: Device size: 1600x900
01-20 11:16:44.391 4256-4277/org.libsdl.app V/SDL: Running main function SDL_main from library /data/app/org.libsdl.app-1/lib/x86/libmain.so
01-20 11:16:44.391 4256-4277/org.libsdl.app V/SDL: nativeRunMain()
01-20 11:16:44.402 4256-4256/org.libsdl.app V/SDL: onWindowFocusChanged(): true

Is this problem caused by missing XP3 file? If the application needs to read the XP3 file, where should I place the XP3 file in the Android project? Assets folder?

DrawDevice OpenGLES GPU acceleration

Implement OpenGLES DrawDevice.
Depends on #8 ?

A few additional ideas for layer blit acceleration:
GLSL GPGPU blending functions
Queue blending functions until draw time, Layer.update, bitmap unsharing, etc…
Keep layers in GPU memory until Layer.mainImageBufferForWrite / Layer.provinceImageBufferForWrite is accessed
On systems with unified memory, work directly on the memory instead of doing an additional copy

Change build system to CMake

Meson has a limited feature set (especially no accesssing environment variables).

Change the build system to CMake

Write documentation

Planned documentation:

  • TJS<->JS interface
  • Creating a macOS app bundle
  • Compiling the iOS/Android version
  • How to integrate your own plugin into the compiled executable
  • Optional features such as GPU rendering with Canvas class, case insensitivity, SDL threads, plugin enable/disable…
  • Differences between Kirikiri SDL2 and Kirikiri Z (mainly, stubbed and incomplete functinality)
  • reStructuredText/Sphinx version of Kirikiri Z/TJS2/KAG3 documentation (English, Japanese, and both Chinese variants)

Win32 dll plugin support

Possible support for win32 dll plugins?

There appears to be a product "CheerpX" that does such thing…

Script exception raised Member "WIN32Dialog" does not exist

I'm trying to launch English version of visual novel "Sanoba Witch" for testing purposes; first of all I decompiled data.xp3 and then started krkrsdl2 from the Terminal. But eventually I got an «Member "WIN32Dialog" does not exist» error and game hadn't start.

I'm using macOS 10.15.6 Catalina.
Снимок экрана 2020-09-10 в 23 41 05

Startup directory handling

Currently, the current directory in the TVP storage system is set to the current directory provided by getcwd.
Change startup directory handling so that it will prefer the following:

  • path specified by command line argument
  • ./data.xp3>
  • ./data

Cannot read and save files on the browser

I used the web version of release: https://github.com/uyjulian/krkrsdl2/releases.
And then I used this kag3: https://github.com/uyjulian/kag3

I wanted to show a picture, so I modified it first.ks file :

[wait time=200]
*start|スタート
@cm
@layopt layer=message0 visible=false
[backlay]
[image storage="bg.jpg" layer=base page=back visible=true]
[trans method=crossfade time=500]
[wt]

Finally, I packaged it into an XP3 file and ran it on a browser.

The browser displays an error:

14:58:17 trace : animationlayer.tjs(483)[(function) loadImages] <-- graphiclayer.tjs(66)[(function) loadImages] <-- graphiclayer.tjs(368)[(function) loadImages] <-- mainwindow.tjs(5408)[(function expression) (anonymous)] <-- conductor.tjs(440)[(function) onTag] <-- conductor.tjs(104)[(function) timerCallback]
14:58:17 エラーが発生しました
ファイル : first.ks 行 : 6
タグ : image ( ← エラーの発生した前後のタグを示している場合もあります )
Cannot open storage file://./data/data.xp3>bg.jpg

I guess it maybe unable to read the file?
Then I have a question, the web version may not be able to save the file too, because it is running on the browser, can not operate the local file, right? As a result, it may not be able to archive locally.

Emscripten ≥2.0.10 string truncation issue

There is a string truncation issue.

Possible change:

  • The WebAssembly memory used by emscripten programs is now, by default, created
    in the wasm file and exported to JavaScript. Previously we could create the
    memory in JavaScript and import it into the wasm file. The new
    IMPORTED_MEMORY setting can be used to revert to the old behaviour.
    Breaking change: This new setting is required if you provide a runtime
    value for wasmMemory or INITIAL_MEMORY on the Module object.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.