1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-09-20 03:03:50 +00:00

Compare commits

...

750 commits

Author SHA1 Message Date
Alula 37b70c3f4d
Add copyright notices for organism code [ci skip]
The original code is licensed under MPL, we have an explicit permission to include it under MIT.
2025-09-19 13:25:17 +02:00
Alula f02147d9a0
Add AUTHORS.md [ci skip] 2025-09-19 09:56:59 +02:00
Alula 06b3933102
Add correct copyright notices to source files derived from 3rd party code [ci skip] 2025-09-19 09:55:56 +02:00
Vinícius Miguel c087f17054
sound: reuse buffers (#336) 2025-09-18 18:31:55 +03:00
periwinkle efc483290a Fix inaccuracies in characters.rs 2025-09-15 19:56:00 +02:00
biroder 14df62ab11
Update the link to the Discord server in the issue creation window 2025-09-08 10:14:14 +03:00
biroder 1e776e7d3a Make the name and description of CS+ mods optional 2025-09-01 19:36:13 +03:00
N.E.C. 8b5406d941 Improve code generation when accessing BorrowedNPC's 2025-08-23 02:15:39 +02:00
N.E.C. c7160c9ea8 Use RefCells in NPCList to prevent Undefined Behavior 2025-08-23 02:15:39 +02:00
Alula 20f541d469 Fix apt install failing on ubuntu-latest sometimes 2025-08-23 02:15:39 +02:00
Alula f5d729c8a1 Refactor: Unify NPC AI handler signature 2025-08-23 02:15:39 +02:00
Alula 2335cf0064 Use HitExtents instead of Rect for hitboxes 2025-08-23 02:15:39 +02:00
biroder f4602687eb Fix editor compilation errors
The `--editor` flag has no practical use and has never been used, so it's been removed.
2025-08-04 23:42:59 +03:00
biroder f4b5df3640 Fix music fading out too quickly 2025-07-22 00:33:36 +03:00
biroder 37aa3f36aa Reduce log file size and fix the error window on Windows doesn't appear
Info that NPC is creating or a script successfuly compiled can be useful for debugging, but on a regular run it just clogs up the log file. If we need such specific info from users, they'll need to reproduce the issue using `--log-level debug` program argument.
2025-07-14 00:24:43 +03:00
biroder 896f43dc1e Fix build with CMake 4.x 2025-07-02 11:58:59 +03:00
biroder adb7a4dff6
Fix typo in default window height 2025-07-01 11:07:19 +03:00
biroder 7b588f0222 Always use a hi-res logo on the title screen for CS+ data (resolve #225, fix #171) 2025-06-30 15:57:06 +03:00
biroder d96f7054e3 Add cli args to set initial window size and fullscreen state (resolve #211)
Fully implemented only for SDL backend. For Glutin backend only the flag to run in fullscreen mode is implemented, since it's broken for PC anyway
2025-06-26 19:45:52 +03:00
Alula 5d68ea9f89 Add issue templates [ci skip] 2025-06-24 06:20:21 +02:00
Edward Stuckey 13e09e8679 Improve background colors
Background color is now set inside of engine_constants/mod.rs, and can be changed on a port-to-port basis, including intro background color.
2025-06-14 21:48:45 +02:00
Edward Stuckey 2f73066d12 Fix intro background color
The intro scene should have a black background, not dark blue.
2025-06-14 21:48:45 +02:00
biroder 5f517e6992
Stop noise when <ESC opcode is executed (fix #244) 2025-06-14 19:36:52 +03:00
biroder 2f1159c14f Add a drop in animation when acquiring an item (fix #277) 2025-05-30 12:59:41 +03:00
biroder 50ea506c53 Fix Android build (bump cpal) 2025-04-28 17:15:56 +03:00
biroder 8fce1cddbc
Update the release notes again
This item is more a project change rather than an application change, so it shouldn't be included in this list as it's unnoticeable to users
2025-04-28 14:51:17 +03:00
biroder a925c4e7e8 Update flatpak metadata [ci skip]
Update screenshots and homepage URL, add release notes and supported control types. Remove the shadow from the app icon, as required by Flathub Quality Guidelines. Also all flatpak-related files are moved to the  folder
2025-04-09 15:50:29 +03:00
Alula eb7bdf4313
ci: 0.102.0 2025-03-08 01:14:58 +01:00
Alula 36e21810df
ci: workflow for actual releases 2025-03-08 01:12:24 +01:00
Alula 70611a8957
fix: do not censor "doukutsu-rs" in CI output [ci skip] 2025-03-08 00:48:28 +01:00
Alula 8d1da15cfd
feat: implement get.doukutsu.rs support 2025-03-08 00:38:28 +01:00
Giantblargg 50cd0e54f5 Remove glFinish
glFinish waits until rendering is complete, there usually isn't a good reason to do this.
Removing it improves performance on (very) low end hardware.
2025-02-22 01:10:07 +01:00
biroder 6973573721 Modify app id for Android debug builds[ci skip]
Also debug builds have `(debug)` in the app name, documents provider label and authority. This is done to make it possible to install custom debug builds without uninstalling the official one.
2025-02-05 23:02:06 +02:00
biroder 71452113ac
Add link to Flatpak 2025-01-15 04:34:49 +02:00
alula a82a536e09
Before you ask, we're not enabling LTO [ci skip] 2025-01-13 11:56:30 +01:00
Tulip Blossom 60cfc47a21
fix: satisfy the flathub linter 😭 (#303)
* fix: satisfy the flathub linter 😭

* Fix the 0.99.0-beta4 release date 

This version was released on May 3, 2022, 1:46 AM UTC

* chore: add instructions on how to get the game data working

* Remove CS+ screenshots, add valid content rating and screenshots caption

The engine is not distributed with the CS+ game data, so this screenshots are not correct for the most of the flatpak users. The content rating is just copy-pasted from the NXEngine package and and should probably be changed in the future
2025-01-13 00:56:54 +00:00
Tulip Blossom 9a0fa2d0ad
feat: add flathub metadata (#302) 2025-01-12 23:16:10 +02:00
biroder 7376875151 Crop Sue properly 2025-01-10 14:13:27 +02:00
biroder deea09407b
Add missing target triple for Android CI 2025-01-10 03:42:41 +02:00
biroder 3ebb02be1d
Fix Android CI 2025-01-10 03:39:13 +02:00
biroder 11d5212f47 Change icon for all platforms 2025-01-10 03:30:09 +02:00
biroder 080bb43429 Add Cargo.lock for Android port and change file naming scheme for stable builds [ci skip]
Also enable support for x86_64 ABI and bump `versionCode` for Android builds. 'local.properties' has been removed, as it must not be tracked by git and can be unintentionally commited with other changes.
2025-01-10 01:31:18 +02:00
biroder 2fc564b498
Change macOS architecture in the release metadata[ci skip] 2025-01-09 01:50:44 +02:00
biroder 2214179e0e
Fix Linux CI 2025-01-08 17:32:38 +02:00
+KZ d9ad87323f
Add macOS Icon (#299) 2025-01-08 17:16:54 +02:00
biroder 8195097363
ci: fix ref_name templating for Android builds [ci skip] 2025-01-06 03:59:17 +02:00
biroder 1c0c68ce48
Remove Kotlin debug file from Android release builds [ci skip] 2025-01-05 00:47:23 +02:00
alula 9f8e386370
ci: fix ref_name templating 2024-12-31 23:38:21 +01:00
biroder 3ef2f652c3
Fix of the last fix
2024-12-23 11:50:21 +02:00
biroder fc1bfdcc68
Fix Android build on non-Linux platforms
The `cfg(target_os)` for the build script contains the name of the OS on which the build takes place (the OS of the host machine). Because of this, the build of the Android port on Windows is broken, as an attempt to add the Windows resource file fails. Probably the build for Windows on Linux, for Linux on Windows, etc., is also broken.
Therefore, in the build script, we must rely only on the values of the `TARGET` environment variable, which contains the target triple of the platform for which the build is performing. `cfg(target_os)` should only be used to include platform-specific dependencies (e.g. `winres` for Windows).
2024-12-23 11:43:25 +02:00
Edward Stuckey f03401915d
Fix unlabeled element errors in live debugger (#284) [ci skip]
IMGUI considers this a hard-exception now, so we need at least some form label, even if it is unused and hidden.
Also fixed various "Unused" warnings
2024-12-08 18:52:58 +02:00
periwinkle d8605f4027
Fix Labyrinth M overflow crash (#290) 2024-12-08 12:49:43 +02:00
biroder bf8a80150d Make the get_headband_spritesheet function static[ci skip] 2024-12-03 22:41:17 +02:00
Edward Stuckey f7e76e09a2
Fix "More Rust" mode for freeware (#288)
The engine would previously use the upscaled spritesheet for the headbands since the "original_textures" setting is only used with the Nicalis releases.
2024-12-03 22:30:57 +02:00
biroder acc365451c
Remove the unused TextScriptEncoding implementation[ci skip] 2024-11-30 17:01:17 +02:00
biroder 247fbf2936
Set JP locale on CS+ to ShiftJIS to resolve bug with JP locale (#285)
Set JP locale on CS+ to ShiftJIS to resolve bug with JP locale (#285)
2024-11-30 16:40:18 +02:00
biroder 8004e4ace3
Make code more pretty and add comments 2024-11-30 16:21:47 +02:00
GenkaiToppa 4e539b73f2 Set JP locale on CS+ to ShiftJIS to resolve bug with JP locale (#285) 2024-11-28 22:44:09 -05:00
Dr. Glaucous 2df21c8e8d Fix vanilla executable extraction bug
The only physicalFS currently loaded uses ./data/ already as its root, so it will check for /data/data/stage.sect, which is wrong
2024-11-07 05:15:49 +01:00
biroder ec21a22e30 Add a warning about build tools version changes to the Android build script[ci skip] 2024-11-04 13:36:49 +02:00
Edward Stuckey aebf4c2d59
Fix inaccuracy with curly boss bullet (#281)
This should not move on the first tick. Also in vanilla, the projectile makes a movement before dissipating from hitting the wall.
2024-11-04 12:52:53 +02:00
Jordan Christiansen 97d85aa841
Detect controllers from SDL_GameControllerDB correctly (#280)
SDL generates ControllerDeviceAdded events for controllers that are
already plugged in at the start of the game, but only if those are
recognized as game controllers at the time that we run SDL_Init.
Unfortunately, rust-sdl2 requires initializing SDL before we can call
load_mappings_from_read.

doukutsu-rs ships with this nice gamecontrollerdb.txt file built-into
the binary and loads it at startup, but previously it would not work for
controllers already plugged in before the game started because of the
above. This change works around the ordering issues between recognizing
devices as game controllers and event generation. Instead of using the
ControllerDeviceAdded events, we now use JoyDeviceAdded events. We still
check that the device is a supported game controller, and if it's not
supported then we skip it.
2024-10-22 18:14:00 +03:00
biroder 2ef34fe6f8
Add music fade out in the credit script executor 2024-10-12 20:30:36 +03:00
biroder 5a1bacdba6 Fix Android CI build and revert to the previous version of the NDK 2024-10-05 18:18:24 +03:00
biroder 548d8cdd77
Update NDK 2024-09-22 12:54:12 +03:00
raisin 4d43c9c828
Fix pixel birthday easter egg (#275) 2024-09-06 18:07:12 +03:00
Alula dce696282b
Add Cargo.lock (#273) 2024-08-28 20:42:27 +02:00
Dr. Glaucous 44d5893a7a Fix button mapping icons for Nintendo controllers 2024-07-24 05:45:11 +02:00
Daniel Doran c19d0738fa Update gamecontrollerdb.txt 2024-06-17 19:18:31 +02:00
Alula 5434e6dbf5
Fix for Rust 1.78 (thanks imgui) 2024-05-29 00:55:57 +02:00
Alula 60a6c97834
Remove old Lua scripting support 2024-05-29 00:22:01 +02:00
biroder c33d387031 Add Ridiculon soundtrack name 2024-05-20 01:20:30 +03:00
Laura K b572fdfd47
Fix dead Discord CDN urls [ci skip] 2024-04-27 20:00:37 +02:00
Laura K 94b9f930ce
ci: fix windows targets 2024-04-27 00:24:32 +02:00
莯凛 01ec93dd27
support custom text encoding for .tsc and stage table (#259)
* feat: support optional custom encoding
* feat: support custom encoding for stage table
2024-04-10 13:06:14 +03:00
biroder ca5361cc58 Add panic logging 2024-03-25 16:06:47 +00:00
poly000 08f086bfc4
localize difficulty name in save menu (#263) 2024-03-25 11:41:21 +00:00
poly000 1f288e2a39
replace impl Clone with #[derive(Clone)] (#262) [ci skip] 2024-03-25 11:04:13 +00:00
poly000 0e0cd66564
ci: migrate to node 20 actions (#261) 2024-03-24 14:58:32 +02:00
József Sallai 9c95b20f5c use localized soundtrack names 2024-03-24 00:57:56 +02:00
Alula 7630a9b60e
Update gamecontrollerdb 2024-03-11 07:57:07 +01:00
Alula ae909878c4
Parse machine code to determine vanilla stage table offset 2024-03-08 02:46:21 +01:00
Alula 7785513e8b
Fix inaccuracy: bloody water droplets 2024-03-08 01:44:30 +01:00
Alula 7f33f7b6c8
Support for loading 0.9.x.x beta saves 2024-03-08 01:39:48 +01:00
József Sallai 6c9b4d9a54
fix minor grammar mistake in readme 2024-03-04 00:12:12 +02:00
Edward Stuckey af9947b931 Fix ORG sampling bug
Also included the full org2 wavetable.
2024-02-29 19:54:09 +01:00
Laura K b275816e76
Update README.md [ci skip] 2024-02-23 11:44:25 +01:00
Laura K 8e3ccea8a1
Add font credits [ci skip] 2024-02-19 22:21:21 +01:00
biroder 76ec4771b3 Add local.properties file [ci skip] 2024-02-09 21:07:29 +00:00
biroder 3b77cdf0c5 Change the search directory for Lua scripts back to data dir[ci skip] 2024-01-26 10:30:08 +02:00
biroder 397cd8f584 Make some changes to the Android port
- Add application category and description
- Hide system navigation bar
- Change documents provider name to application name
- Disable multi-window mode support because touch controls don't work in this mode
2024-01-16 12:17:52 +00:00
biroder 21c255efb4
Make discord-rich-presence an optional dependency [ci skip] 2024-01-09 11:58:05 +00:00
Sobakin e1fb118910
Added cutscene auto skip option (#249) 2024-01-09 11:17:08 +00:00
Laura K c56bd2e8ae
Add EGS warning + some cleanup [ci skip] 2023-12-29 03:22:00 +01:00
periwinkle e09fbf5c63 Make all occurrences of Stage::change_tile spawn an accurate amount of smoke
Wouldn't it be better to have change_tile itself make the smoke?
2023-12-29 03:08:46 +01:00
biroder c4cffd54a8
Update sdl2 2023-12-28 17:12:38 +00:00
biroder 99f13a746e
Dummy change to trigger CI build 2023-12-27 03:07:33 +02:00
biroder 690c97e44d
Add nightly builds link for Android 2023-12-26 20:37:22 +02:00
biroder 311ca8b12f
Update ci.yml [ci skip] 2023-12-14 20:04:44 +02:00
biroder 152e31966a
Update ci.yml
This will need to be fixed later
2023-12-14 19:43:30 +02:00
biroder b4ede5bcad
Enable Android nightly builds 2023-12-14 19:18:44 +02:00
biroder a5f49c07e4 Fix #241 2023-12-08 15:07:54 +00:00
biroder fc66b84d8f
Add commit sha to nightly builds metadata 2023-11-27 09:13:14 +00:00
biroder 87cc7f12e3
Fix nightly build links [ci skip] 2023-11-26 15:56:49 +02:00
biroder e9cf548cc2 Add builds metadata saving
And remove the `pkg-config` dependency installation for Linux builds.
2023-11-26 15:31:09 +02:00
biroder 3af1d61e5b
Fix CI 2023-11-12 12:34:38 +02:00
Edward Stuckey 3b14adf949
Fix Player gun desync bug and inventory inconsistencies (#245)
* add inventory and player render fixes
2023-11-12 10:02:59 +00:00
biroder 46710dd31a Make some changes to README and CI config[ci skip]
Change links to nightly builds in README.

Change the version of nightly builds (use the build number at the end of the version string for master and part of the commit hash for other branches). Make it so that the workflow can be run manually. Disable cache saving for non-master branches, because in this case the cache is always created new and doesn't update the existing one, which wastes cache space. Temporarily disable build for Android
2023-11-11 00:38:47 +02:00
biroder 10e4d3efff
Change build number 2023-11-06 16:14:48 +00:00
biroder 2b1411787b Switch to Github Actions and add Android nightly builds 2023-11-06 17:48:00 +00:00
biroder 0e33bcaaf9
Prevent "Missing data files" message box from closing 2023-11-02 13:11:36 +00:00
biroder 45443dfa23 Fix #221 2023-10-30 09:35:35 +00:00
biroder 06ae269b7b Implement "Open game/user data directory" menus on Android[ci skip] 2023-10-29 17:17:01 +00:00
periwinkle 12a305becb
Accuracy fixes for misc NPCs (#242) 2023-10-06 13:14:05 +03:00
periwinkle bd203cfddb
Fix Misery bubble going the wrong way (oops sorry) (#240) 2023-09-28 11:18:51 +03:00
periwinkle c2ad3dd643
Accuracy fixes for Waterway through Hell (#237)
* Accuracy fixes for Waterway through Balcony

* Hell accuracy fixes
2023-09-27 22:14:26 -04:00
biroder 3468bcf5fd Disable debug hotkeys in non-debug mode, fix Balrog text scrolling sound from #165 2023-09-25 14:30:12 +03:00
biroder 21221d80e7 Fix #233 2023-09-03 11:40:00 +03:00
József Sallai a45c630116 add compact jukebox for non-switch CS+ (#232) 2023-08-23 02:50:03 +03:00
biroder 73295a6351 <FMU opcode fix 2023-08-10 13:39:40 +03:00
biroder ab87862646
Fix #222 [ci skip]
In general this isn't a bug or inaccuracy, because in the vanilla it's normal behaviour. But since most of the pause menu entries don't working during the intro, this had to be fixed anyway
2023-07-14 18:15:21 +03:00
József Sallai 5f24ee52b0 make strafing toggleable (closes #220) 2023-07-11 10:20:13 +03:00
biroder 02e1763e1d Fix a couple of warnings[ci skip] 2023-07-05 11:58:54 +03:00
biroder 44c6af2146
Add guide to setting up game data on Android 2023-07-05 11:37:58 +03:00
periwinkle d1d008edda Balfrog accuracy fixes 2023-07-04 08:39:58 +02:00
periwinkle 4d7dfd0266 Accuracy fixes for First Cave through Grasstown 2023-07-04 08:39:58 +02:00
biroder b70f0007b1
add japanese translation of display touch controls option[ci skip] 2023-06-28 14:39:18 +03:00
biroder f7148edd96 This implementation is better[ci skip] 2023-06-28 12:15:54 +03:00
biroder 425a26b3a0 Add display touch controls option[ci skip] 2023-06-28 11:37:05 +03:00
periwinkle f6caffd624
Accuracy fixes for Sand Zone and Labyrinth (#215)
* Accuracy fixes for Sand Zone and Labyrinth
And a couple of smaller things as well

* Remove NPCList::remove_by_type (kill_npcs_by_type does the same thing)
Also rename remove_by_event to kill_npcs_by_event for consistency
2023-06-22 17:26:51 +03:00
biroder b294f65656
fix of fix [ci skip] 2023-06-21 12:15:08 +03:00
karnak a5ed1a370e Fix fullscreen mode on glutin backend[ci skip] 2023-06-21 10:54:52 +03:00
karnak f07228895c Add some tsc settings to the Lua API[ci skip] 2023-06-19 16:05:24 +03:00
periwinkle b3007c10e3 Better number popup behavior (fixes #163) 2023-06-17 15:04:26 +02:00
periwinkle 7caff84e04
Fix LOTS of bugs and inaccuracies (#213)
- Player vs. soft solid NPCs used the wrong collision size
- Curly w/ Nemesis attached too high above the player when standing facing up
- Butes from Bute spawners started following the player at the wrong conditions
- Small pignons in Cemetery never turned around
- Refill stations spawned with alt direction didn't spawn with upward velocity
- Misery blocks spawned with glitchy framerects
- Various issues with possessed Misery
- Various issues with possessed Sue
- Ballos (phase 1) didn't face the player at certain points
- Ballos orbiting eyes (phase 4) didn't spawn smoke when killed
- A part of Ballos phase 2 had the wrong collision type
  (apparently this was intentional due to a bug with soft solid collision;
  hopefully that's also fixed by these changes?)
- A few missing sound effects during the Ballos fight
- Green devil generators weren't spawning enough enemies
- Balrog missile trails were in the wrong direction
- Core blade projectiles had the wrong check for water collision
- Monster X fish missiles moved at the wrong initial angle
- Sisters fireball attacks shot in the wrong direction
- Sisters missing smoke when shot
- Undead Core missing smoke in some cases
- <DNA'd NPCs spawned the wrong amount of smoke
  (fixes Heavy Press lightning despawn for the speedrun ;) )
- Player jumping and falling animations were flipped
- Implemented <MYDxxxx facing towards entity xxxx if xxxx >= 10
  (also <MYD0003 should not set the player's direction to down)
- <TRA resets invincibility in freeware (due to starting a new event)
- Bubbler level 1 bullets spawned at the wrong offset
- Bubbler and Machine Gun autofire timers shouldn't reset when fire button is pressed
- Fixed level 3 missile and Super Missile spawn offsets and trajectories
- Nemesis carets spawned at wrong offsets
- Various small typos/logic errors
2023-06-16 12:51:22 +03:00
Alula dcdb4e9d39
Fix <FOB emitting wrong code 2023-06-15 21:24:14 +02:00
biroder 596c7b8aff Lua api fixes[ci skip] 2023-06-15 13:01:09 +03:00
biroder ed2c5f510a Fixed game crash when disabing Discord Rich Presense setting and Discord isn't running. Fixed crash o exit when Discord isn't running 2023-05-30 12:37:41 +03:00
biroder 0ba5aad8af Merge branch 'master' of https://github.com/doukutsu-rs/doukutsu-rs 2023-05-30 11:35:07 +03:00
biroder 50ff888141 Fix #208 and add a different log level for file logging 2023-05-29 10:42:34 +03:00
biroder 72e74e2113 Merge branch 'master' of https://github.com/doukutsu-rs/doukutsu-rs 2023-05-29 10:38:28 +03:00
biroder 47a43467d0 Fix #208 and add different log level for file logging 2023-05-29 10:32:27 +03:00
biroder 19e0da519f
Fix of.fix(again) [ci skip] 2023-05-24 15:04:56 +03:00
biroder 721a0c907a Fix og logo offset 2023-05-24 13:59:50 +03:00
biroder 2a3341e3c5 Update android port strings 2023-05-23 10:10:12 +03:00
biroder 63f903104a Fix of #192 2023-05-16 17:00:17 +03:00
biroder 277f5d957b Add logging to file 2023-05-11 17:40:11 +03:00
biroder 9409bb35fe
The final change to the save point smoke [ci skip]
Hope this is the last change:/
2023-04-30 12:21:49 +03:00
biroder 9e09d56b76
Some changes to creating smoke when save point spawned in a shelter 2023-04-26 18:22:09 +03:00
biroder 40767c021b Fix innacuracy [ci skip] 2023-04-26 12:07:20 +03:00
biroder 0e164a44df
Revert changes [ci skip] 2023-04-23 15:04:41 +03:00
biroder 38338ae551
let's try again 2023-04-23 14:22:37 +03:00
biroder dbb72ff6c1
yet another fix 2023-04-23 14:12:07 +03:00
biroder 0a45332f3f
fix 2023-04-23 12:45:08 +03:00
biroder aa27680baf
Trying to add android CI builds 2023-04-23 12:42:45 +03:00
biroder 67fb32499f Partial fixes of bosses 2023-04-17 16:51:52 +03:00
biroder 5821f06928
Dehardcode menu toogles text [ci skip] 2023-04-14 16:39:16 +03:00
biroder 5f93658f0f
Fix of fix textscript encoding [ci skip] 2023-04-13 18:02:41 +03:00
biroder cd671cce48 * i18n improving for Android [ci skip] 2023-04-13 17:10:27 +03:00
biroder 2a162d948f
Fix textscript encoding 2023-04-12 21:36:32 +03:00
biroder 72a2ada0b2
Minor refactoring of TSC decryption [ci skip] 2023-04-10 16:23:46 +03:00
biroder 0ccbbefbed
Fix skip_commits rule in CI config [ci skip] 2023-04-08 11:46:13 +03:00
biroder bc91d9f366 Minor icon change 2023-04-03 17:35:22 +03:00
Alula beb290dafb
no more april fools 2023-04-02 11:52:32 +02:00
biroder 5f7bae8f4f
Fix a linker error on Windows 2023-04-02 11:52:12 +03:00
biroder 11eafb8d03
Add window icons for non-Windows systems (#206) 2023-04-01 21:18:25 +03:00
biroder f99b452073
Fix sound volume change and inventory overflow on Android (#207)
* Android changing volume fix. Added arrows to indicate volume buttons

* Fix inventory overflowing on Android
2023-04-01 20:27:30 +03:00
Alula 51834be404
yeah 2023-04-01 13:56:52 +02:00
Alula b2fb548584
april fools 2023-04-01 13:53:52 +02:00
biroder 1633eef3dd
Skip appveyor builds for android and horizon (#205)
Builds for Android and Horizon isn't currently configured, so starting the build after changing these files is useless
2023-03-25 12:42:44 +02:00
biroder e57c9cdb27
Minor editor fixes (#204) 2023-03-24 12:52:55 +02:00
biroder 07b1550cf4 Revoke remove of kotlin builtins
They may be used by one of dependencies, so maybe it's better to leave them
2023-03-17 13:22:33 +01:00
biroder a15fd4d190 Remove useless files from output android build 2023-03-17 13:22:33 +01:00
biroder b8af9aed25 Fix display of picked up expirience when player took damage 2023-03-15 15:15:56 +01:00
biroder 8992889e94 Maybe this implementation would be better 2023-03-15 15:15:56 +01:00
biroder f91e793062 Add damage amount display when taking fatal damage
Fix doukutsu-rs/doukutsu-rs#163
2023-03-15 15:15:56 +01:00
biroder 3fbe94ecd1 Remove use of MakePortable enrty on unsupported targets (#201)
`MakePortable` not supported on `android` and `horizon` targets
2023-03-03 20:28:43 +02:00
biroder 5bd0dcd564
DocumentsProvider refreshing after changing files (#197)
* DocumentsProvider refreshing after changing files

* Add a flags for notifyChange function
2023-03-03 17:46:00 +02:00
József Sallai 41b840d13f reset game difficulty on title screen (fixes #196) 2023-02-25 13:45:36 +02:00
József Sallai 95e09ded99 fix game crashing when discord isn't open (lol) 2023-02-24 13:42:47 +02:00
József Sallai 6bccf59f5b improve quick discord RPC updates and prevent crashes 2023-02-23 15:23:59 +02:00
József Sallai 890c0596ed add portable user directory setting 2023-02-23 14:27:53 +02:00
József Sallai b22ca8b35e add difficulty icons to discord rich presence 2023-02-18 22:13:14 +02:00
József Sallai e77241cd56 improve command line appearance and autofocus 2023-02-18 21:05:30 +02:00
József Sallai 3dbe56690a add experimental discord rich presence support 2023-02-18 20:42:00 +02:00
József Sallai 1810bf6d5b fix missing as_any methods in the glutin backend 2023-02-17 16:06:11 +02:00
József Sallai d6715bccea add menu options for opening user and data dirs 2023-02-17 16:05:38 +02:00
alula 30c85c2f8b
Merge pull request #193 from biroder/patch-1 2023-02-07 09:16:34 +01:00
biroder 979909faa8
Fix 'render_opengl' import
Import 'render_opengl' only when feature 'render-opengl' is enabled
2023-02-06 10:23:39 +02:00
Alula 90df8faa7a
fix a nasty type confusion bug in SDL backend 2023-01-30 23:18:16 +01:00
Daedliy 6d3c127912
Minor missing texture rewording (#190)
* Minor missing texture rewording

* ababa

---------

Co-authored-by: Daedliy <missari.bb@gmail.com>
2023-01-29 19:40:42 +02:00
Alula 515a0a7fe7
Well, there's something to see there now... [ci skip] 2023-01-28 00:47:50 +01:00
Alula 7fe96780de
oops I pushed and forgot to save [ci skip] 2023-01-28 00:44:13 +01:00
Alula f1e5d11b2a
Switch to 0.101 and introduce new versioning scheme 2023-01-28 00:42:56 +01:00
Alula 3739e9f170
do not hardcode x86_64 as arch name on windows 2023-01-28 00:41:07 +01:00
József Sallai 3c79582fed bump webbrowser 2023-01-26 17:42:16 +02:00
József Sallai a187942cff remove 2P options from pause menu on android 2023-01-26 17:34:35 +02:00
József Sallai 4ae085f7e2 add engine constant flags for difficulty and 2P menus 2023-01-26 17:29:53 +02:00
József Sallai 153b1b4962 fix P2 skin OOB error 2023-01-26 16:56:13 +02:00
Alula 2774eae66f
revert [ci skip] 2023-01-25 20:46:16 +01:00
Alula 4928ce4682
set version to 0.100.0-beta5 for just this commit for gh release builds 2023-01-25 20:45:34 +01:00
Alula 64290ae5a3
h 2023-01-25 20:08:20 +01:00
Alula 1457aa3caa
preserve cache 2023-01-25 19:52:24 +01:00
Alula ee58c1c8af
revert [ci skip] 2023-01-25 19:40:48 +01:00
Alula a5bb130e73
this is stupid as fuck but I don't want to remake the release once again 2023-01-25 19:40:19 +01:00
Alula bbd20a003b
bruh [ci skip] 2023-01-25 19:38:21 +01:00
Alula ef1c2a5930
hotfix time 2023-01-25 18:23:15 +01:00
Alula 074af609bc
fix syntax error [ci skip] 2023-01-25 15:53:40 +01:00
Alula efa8a47b8d
use tag for CI builds if present [ci skip] 2023-01-25 15:48:39 +01:00
Alula bc3616d073
android + hos fixes 2023-01-25 15:25:51 +01:00
Devon W 510442490e
Map System Equip fix (#185)
Changing map key enable from hardcoded to item 2 to the actual vanilla behavior of checking for equip flag.
2023-01-23 17:51:40 -05:00
József Sallai 0a7fd4dc47 add win32 build to readme [skip ci] 2023-01-23 13:27:29 +02:00
József Sallai 4fa7069e82 fix 32-bit windows builds 2023-01-22 21:13:19 +02:00
József Sallai 212d7b915b don't try to render fps counter on no data scene 2023-01-22 20:27:46 +02:00
József Sallai cb95db1e89 fix text wrapping on no data scene 2023-01-22 19:42:40 +02:00
József Sallai 334e64f499
kurwa mać 2023-01-22 18:19:13 +02:00
József Sallai 90e58649a7
fuck yaml 2023-01-22 18:06:24 +02:00
Alula e845c87738
let's see if win32 builds work 2023-01-22 16:19:26 +01:00
alula 2cb36de715
Merge pull request #183 from doukutsu-rs/horizon-os
merge Horizon branch with portability fixes
2023-01-18 00:12:48 +01:00
alula c2a8bf52e9
Merge branch 'master' into horizon-os 2023-01-17 17:57:55 +01:00
József Sallai e975a75ec4 sue 2023-01-06 10:01:45 +02:00
Alula 5854735392
i forgor to push 2023-01-01 17:36:16 +01:00
József Sallai 356f4230b5 refactor co-op skins 2022-12-23 00:26:46 +02:00
József Sallai 4be3dd518b add basic support for switch P2 skins 2022-12-22 22:59:24 +02:00
József Sallai 5ed2d40e23 rumble failure shouldn't crash game 2022-12-18 19:07:37 +02:00
alula a246d1a2f9
Switch homebrew port notes 2022-12-01 15:20:02 +01:00
Alula e567dd6296
Use correct branch for cpal 2022-12-01 14:41:57 +01:00
Alula 066389a29f
thanks dawn 2022-12-01 14:39:07 +01:00
Alula 67979a03ea
Mostly-working Horizon port 2022-12-01 14:30:59 +01:00
Alula f91513edd2
small oops 2022-11-21 15:16:57 +01:00
Alula 5d92cafe67
Initial Horizon OS bringup 2022-11-21 15:15:51 +01:00
Alula d87bbf2b46 abstract gamepad away from SDL 2022-11-21 15:13:46 +01:00
Alula 2860938b9a
abstract gamepad away from SDL 2022-11-21 15:12:45 +01:00
Alula e74b586dd1
Font rendering refactor 2022-11-20 20:38:49 +01:00
alula 0fca898c54
Update README.md 2022-11-20 10:19:01 +01:00
Alula df467e8764
gitignore moment 2022-11-19 18:27:28 +01:00
Alula 17e1156850
Refactoring time 2022-11-19 18:20:03 +01:00
Alula 9fd04ed47a
remove this stupid feature 2022-11-19 12:21:10 +01:00
Alula c9e6dd7181
add teleport_player command and use if let() instead of unwrapping 2022-11-19 12:10:02 +01:00
dawnDus 0330cf3b2b
Fix MYB bumping away from NPC when direction >4 2022-11-12 17:11:03 -05:00
dawnDus 2be1c422d6
Adjust horizontal booster caret (Fixes #173) 2022-11-03 20:29:24 -04:00
Awesomegamer6566 0f79474aae Fix downward facing fans pointing upwards 2022-11-01 22:42:52 +01:00
dawnDus 713e704b9b
Fix seasonal mychar offsets 2022-10-26 17:04:06 -04:00
dawnDus d42632f973
Fix Curly NPC 2022-10-21 12:07:43 -04:00
dawnDus 57b2be5211
Fix stuck popups with Spur 2022-10-17 17:40:30 -04:00
Alula 3a756e0ac4
abuse ASLR for RNG seeding 2022-10-15 14:13:04 +02:00
József Sallai 6607d2fc15 play get item sfx on AM+ 2022-10-10 10:44:51 +03:00
József Sallai 8ebe210105 play get item sound on <I+N 2022-10-06 19:31:10 +03:00
József Sallai f0949f49cf fix a few NPC inaccuracies from #165 2022-09-24 23:27:27 +03:00
dawnDus 2b9a0198cb
Safely get current stage name for Save Menu 2022-09-17 18:05:10 -04:00
József Sallai 8684dd8448 some runtime optimizations 2022-09-17 13:57:37 +03:00
Awesomegamer6566 72c268647f
Fix changing BGM Interpolation setting with left and right keys (#161)
* Fix changing BGM Interpolation setting with left and right keys

* Actually fix changing BGM Interpolation Setting with left and right keys
2022-09-16 22:08:19 +03:00
Daedliy e9d2099f42
Add Links Menu (#159)
* Add Links Menu

* Suggested Changes
2022-08-29 00:06:58 +03:00
Sallai József f7d635a3d7 add switch boss health bar 2022-08-28 16:17:54 +03:00
Sallai József 029d6d52e4 add/drop player 2 from pause menu 2022-08-28 15:00:53 +03:00
Sallai József dec913dd65 make vanilla extractor input and output configurable 2022-08-28 14:07:01 +03:00
Sallai József 028c60157d make localization system dynamic 2022-08-26 03:17:45 +03:00
dawnDus 3d86995feb
Add fast-forward cutscene skip option 2022-08-23 18:27:39 -04:00
Sallai József 670e6891c1 run arbitrary TSC from debug command line 2022-08-22 03:08:57 +03:00
dawnDus a25dc297ef
Add spawn_npc command 2022-08-21 18:32:51 -04:00
Sallai József 4ed7ba66b8 add in-game debug command line 2022-08-22 01:10:33 +03:00
Sallai József b1b3b131e2 process debug keys in game scene and add quick save shortcut 2022-08-21 22:06:06 +03:00
Sallai József f1b3c680c9 throttle number popup on NPC damage 2022-08-21 18:57:01 +03:00
Sallai József ca1fa7b7c0 fix egg corridor inaccuracies (fixes #155) 2022-08-21 13:20:04 +03:00
dawnDus 3cc9d75681
Fix spur damage inaccuracy 2022-08-20 21:22:45 -04:00
dawnDus 92bc887663
Fixed order of operations for bullets (Fixes #131) 2022-08-20 18:43:48 -04:00
Sallai József 59da01b7b9 even more rust
sprites by @RedCoder09 and @Krunchy0920
2022-08-20 22:08:15 +03:00
Sallai József e07207b40c more rust
crab headband sprites by @RedCoder09
2022-08-16 14:47:11 +03:00
Daedliy 1688f4bcbc
Proper wiiware DEMO support (#153)
* Fixed Crashing

* Add Demo Splash Rect + Fixes

* FIX newgame pos (Joe)
2022-08-14 18:36:50 +03:00
Sallai József 8c70e1a13d fix missing muscle doctor action and sue teleport sound 2022-08-14 16:49:11 +03:00
Sallai József b1d578c0b4 record last challenge attempts 2022-08-14 14:19:46 +03:00
Sallai József 290068dd37 add gamepad rumble 2022-08-13 17:54:05 +03:00
Sallai József 7b359ae4c1 main menu improvements 2022-08-07 22:54:23 +03:00
Sallai József 56631201c8 fix igor inaccuracies (fixes #132) 2022-08-06 20:41:18 +03:00
dawnDus 81755d4ad9
Require control to look up/down while falling 2022-08-06 12:44:14 -04:00
Sallai József f1542246c6 make curly's weapon respect light cone setting (fixes #109) 2022-08-06 17:06:17 +03:00
Sallai József b29c375a7a fix broken new game menu after deleting save 2022-08-06 14:47:02 +03:00
Sallai József bfd9c8c343 oops 2022-08-06 14:10:21 +03:00
Sallai József 1883045f75 make controller selection its own menu 2022-08-06 14:07:00 +03:00
Sallai József 4cfbcc50ac add gamecontrollerdb, update default inputs, add reset controls option 2022-08-01 03:18:43 +03:00
Sallai József f74ec19cb5 make menu ok/back remappable and fix jump/shoot rebind bug (#150) 2022-07-31 14:50:46 +03:00
Sallai József c68fedaa50 fix menu controller swap issues and handle jump/shoot rebind edge case 2022-07-31 03:00:19 +03:00
Sallai József 8a4201f381 fix some controls menu bugs 2022-07-31 02:16:34 +03:00
Sallai József ffaf12cca8 add controls settings menu 2022-07-30 23:20:53 +03:00
Sallai József 03e9c9db0c make menus scrollable 2022-07-30 15:01:22 +03:00
dawnDus c9ba05c948
Ballos inaccuracies (Fixes #149) 2022-07-27 21:27:26 -04:00
Sallai József 914555eac0 don't disable keyboard input when using gamepad 2022-07-27 14:14:05 +03:00
Sallai József fee63f2600 make pausing on focus loss toggleable 2022-07-25 11:41:20 +03:00
alula 2a792db797
Update README.md 2022-07-25 06:09:22 +02:00
Sallai József a598f31716 don't pause the game loop when the window loses focus 2022-07-24 19:38:39 +03:00
Sallai József ef040a393c refactor menus to use enums instead of indices 2022-07-24 17:52:51 +03:00
Sallai József 4a6b2c4400 add gamepad jukebox indicators 2022-07-23 23:29:58 +03:00
Sallai József 398f610c09 skip after Y/N prompts 2022-07-23 20:55:58 +03:00
Sallai József fb4ac0dae8 add gamepad input icons 2022-07-23 18:45:08 +03:00
Sallai József 0415f917f8 render = as white circle (closes #110) 2022-07-23 14:57:40 +03:00
Sallai József 6f95e6109c add methods for rendering text with sprite rects 2022-07-23 13:59:13 +03:00
dawnDus cdd3a37754
Fixed snack tile rendering (Fixes #147) 2022-07-22 17:32:16 -04:00
József Sallai f00f35ca2c
actually bump the version number 2022-07-21 16:49:45 +03:00
Sallai József eee0f9eff9 bump settings version to fix skip keybinding and gamepad mappings 2022-07-21 14:38:44 +03:00
Sallai József 84d9dbf877 remove gilrs dependency for controller support 2022-07-21 03:19:23 +03:00
Sallai József 9932b1209f very initial gamepad support 2022-07-20 16:07:24 +03:00
dawnDus 6d8e58090a
Allow switch data to use original portraits 2022-07-17 22:37:35 -04:00
Sallai József 93e567981e teleport second player when off-screen 2022-07-18 01:57:49 +03:00
József Sallai 7693a4ff20
Merge pull request #146 from Daedliy/patch-1
re-add wiiware extraction guide
2022-07-17 21:31:46 +03:00
Daedliy 86f89e7522
re-add wiiware extraction guide
using the more complete one from the CSMC
2022-07-17 14:48:02 -03:00
Sallai József 3297b151ad update extraction guide link on android 2022-07-17 17:57:33 +03:00
Sallai József aaecafcb72 stop shipping data files in appveyor builds and update readme 2022-07-17 17:38:35 +03:00
Sallai József 444539405a detect and extract vanilla exe resources 2022-07-16 15:33:31 +03:00
Sallai József 2177382b5a add fullscreen toggle 2022-07-13 17:03:17 +03:00
Sallai József a1d0f2dc63 fix 2P behavior in TSC commands and ironhead fight 2022-07-09 20:01:31 +03:00
Sallai József 75b077c772 add screen shake intensity setting (closes #129) 2022-07-09 18:06:22 +03:00
Sallai József d8636bc693 refactor sound manager to prevent audio crashes (fixes #112) 2022-07-09 16:49:56 +03:00
József Sallai 9d7c63571d
Merge pull request #145 from jozsefsallai/bugfix/filesystem-errors
fix filesystem errors and UB warnings on rust >= 1.62.0
2022-07-07 17:02:18 +03:00
Sallai József 3faf99b535 fix filesystem errors and UB warnings on rust >= 1.62.0 2022-07-07 16:32:33 +03:00
Sallai József 1440a91fba trigger appveyor rebuild 2022-07-07 12:21:35 +03:00
dawnDus 6d08eb716e
Add missing fireplace smoke 2022-06-30 11:40:24 -04:00
dawnDus 69fdc7d3d2
Fix warnings from #141 2022-06-30 11:39:56 -04:00
IruzzArcana 18a7670248
add coop menu (#141) 2022-06-22 18:08:36 -04:00
József Sallai d7face2544
fix zombie curly corpses not despawning (fixes #137) (#140) 2022-06-07 14:48:43 -04:00
dawnDus 987c857b1c
show missing mod.txt 2022-05-22 09:17:55 -04:00
dawnDus 3f8c66db0f
fix undead minicore rotation 2022-05-14 13:48:58 -04:00
dawnDus dc2476c9dd
fix volume rounding 2022-05-14 09:18:50 -04:00
dawnDus 8a2e9fa569
bugfixes for #120 and #122 2022-05-11 20:19:43 -04:00
dawndus 588b0d53dd
Update README.md 2022-05-10 18:31:57 -04:00
dawnDus 7c07986b5d
Minor rendering tweak [ci skip] 2022-05-02 19:34:16 -04:00
dawnDus 02a9cac305
Added Android cutscene skip 2022-05-02 18:54:57 -04:00
dawnDus af39130fed
undo android restriction 2022-05-02 16:36:27 -04:00
dawnDus 2d2e712eab
fix loading order 2022-04-30 11:54:48 -04:00
dawnDus acad65d233
enable cs+ japanese font when valid 2022-04-30 11:48:47 -04:00
Alula 24762a1c45
enable cs+ japanese font 2022-04-29 20:38:02 +02:00
dawnDus 75f5e9f364
Cutscene skip tutorial prompt 2022-04-26 23:23:55 -04:00
dawnDus 7e793e09a8
Bug Fixes 2022-04-26 23:23:14 -04:00
dawnDus 7dcf30f854
Android pause menu fix 2022-04-24 18:25:37 -04:00
dawnDus 5fdd9676cb
Refire fix 2022-04-24 17:45:44 -04:00
dawnDus f672ff6f24
Trigger CPS and CSS when going to title 2022-04-24 11:55:37 -04:00
dawnDus e4ec69b6dc
Assorted Fixes 2022-04-24 11:32:26 -04:00
Daedliy 934df79f85
debug menu additions (#124) 2022-04-24 11:01:31 -04:00
dawnDus c97ed04fea
Inventory inaccuracies (fixes #119) 2022-04-21 13:24:44 -04:00
dawnDus daea35381b
Delete replay menu option 2022-04-20 08:47:31 -04:00
dawnDus 28a3f160c3
RNG Tweaks 2022-04-20 08:07:27 -04:00
dawnDus b94b20bf76
Fixed Curly/Toroko+/Undead Core bugs 2022-04-19 19:39:36 -04:00
dawnDus b626472f10
Debug mode config toggle 2022-04-19 18:50:04 -04:00
dawnDus 0c97d554ae
Cleanup 2022-04-19 18:20:18 -04:00
dawnDus 9b572190de
Weapon XP and missile damage (fixes #116) 2022-04-18 14:12:26 -04:00
Daedliy 90900f01e1
Menu titles (#115) 2022-04-17 20:21:57 -04:00
dawnDus adfc768a8f
Remove blank space on sound menu 2022-04-16 17:15:30 -04:00
dawnDus 11f335acc4
Puu black fix and reword Vsync options 2022-04-14 22:15:25 -04:00
Alula ca1d7a8642
Add frame cap configuration 2022-04-15 02:51:48 +02:00
dawnDus 339f822a80
Better Save Menu UX (fixes #111) 2022-04-10 15:57:19 -04:00
dawnDus 68318e3a69
Wind fortress NPCs 2022-04-08 16:37:36 -04:00
dawnDus 2d9840c901
adjust background for freeware widescreen 2022-04-02 16:45:53 -04:00
dawnDus 858abae42d
better widescreen support for cloud backgrounds (fixes #105) 2022-04-02 16:36:16 -04:00
Daedliy 730d1cb5d8
Game Speed debug text (#103) 2022-03-27 17:11:32 -04:00
dawndus 7c8f2ac60a
Update README.md 2022-03-27 09:05:41 -04:00
dawnDus 2bce0136ff
Use game_rng for NPC splash effect 2022-03-27 08:40:14 -04:00
dawnDus 8b31d0a9ab
NPCs trigger plash effect with dynamic water (fixes #102) 2022-03-27 00:31:10 -04:00
dawnDus 299ef053f4
Less dumb fullscreen 2022-03-26 18:00:20 -04:00
dawnDus 77fdd19ec2
Simple fullscreen on Maximize 2022-03-26 17:01:16 -04:00
dawnDus 55e80b4c69
Add max fall speed function for NPCs 2022-03-26 11:05:56 -04:00
dawnDus b0958749f6
More NPC refactoring 2022-03-26 10:53:03 -04:00
Alula a0df539b7b
some refactorings, behemot smoke fix 2022-03-26 10:21:08 +01:00
dawnDus fb17edea7a
Fixed <ESC skipping intro cutscene 2022-03-25 08:58:01 -04:00
dawnDus 11454183a1
Changed debug cheat display 2022-03-23 22:12:57 -04:00
dawnDus 0dbee1e854
Add debugger window for invincibility 2022-03-23 18:09:32 -04:00
dawnDus 890c297437
Add offset for Balfrog adds (Fixes #99) 2022-03-23 08:58:51 -04:00
Alula e27d555bc6
add sue banner [ci skip] 2022-03-23 02:37:02 +01:00
alula 51d384aee8
Update README.md 2022-03-23 02:36:46 +01:00
Daedliy 06709ae031
Better wiiware instructions (#98) 2022-03-22 20:30:53 -04:00
dawnDus ecdc84fba7
Update Sue 2022-03-22 13:49:25 -04:00
dawnDus 8fbab06192
update mac build 2022-03-22 13:18:53 -04:00
megumin bd00c8a372
codesign macOS builds (#97) 2022-03-22 12:56:57 -04:00
Alula d69e158b41
switch to winres crate 2022-03-22 05:26:38 +01:00
Alula 91f6f19914
put windres in build-dependencies 2022-03-22 04:51:13 +01:00
Alula fb253b7573
add windows .exe icon 2022-03-22 04:47:02 +01:00
alula 04fecdeee0
Update README.md 2022-03-22 03:38:08 +01:00
dawnDus 2e1188d854
cleanup readme [ci skip] 2022-03-21 22:27:10 -04:00
Alula cd8a23391a
Add Apple M1 builds 2022-03-22 03:15:54 +01:00
dawnDus 703413dcb6
Gaudi projectiles and red demon exp (Fixes #95) 2022-03-21 22:08:08 -04:00
Alula f60440f877
try to fix m1 build v2 2022-03-22 03:01:08 +01:00
Alula 42edfd7fd6
Add macOS ARM64 (M1) build configuration 2022-03-22 00:36:03 +01:00
alula 6408ffcf21
Update README.md 2022-03-22 00:30:29 +01:00
alula 01d88c2d33
Update README.md 2022-03-22 00:27:15 +01:00
dawnDus 675e321d8f
Fixed basu spawn location 2022-03-19 22:21:21 -04:00
dawnDus 99d7ef67e0
Missing barking puppy action 2022-03-19 09:14:41 -04:00
dawnDus 9dba30d360
Allow TSC to keep running when no proper end is reached 2022-03-17 18:26:48 -04:00
dawnDus 1e7da276ab
HP/Exp bar flash with player damage (Fixes #92) 2022-03-16 22:22:22 -04:00
József Sallai 7e3fef8d41
add challenge unlocking (#90) 2022-03-15 18:18:25 -04:00
József Sallai 1795d71b37
Basic i18n support (#82) 2022-03-14 21:54:03 -04:00
dawnDus 500f53bebb
Fix for interacting while shooting (#89) 2022-03-14 21:52:32 -04:00
dawnDus ad2beacf40
Removed extra song from jukebox 2022-03-13 18:06:08 -04:00
dawnDus c0efcbef71
Slight changes to water fill logic 2022-03-13 17:45:21 -04:00
József Sallai 2dadbdb905
add ikachan title theme (fixes #85) (#87) 2022-03-13 15:58:22 -04:00
dawnDus 8fd0a814e9
Add schema for texture_sizes.json [ci skip] 2022-03-12 12:38:58 -05:00
dawnDus 38ea01d605
Actually fix press damage 2022-03-12 10:00:46 -05:00
dawnDus 5795015059
Press damage fix 2022-03-12 09:35:06 -05:00
Daedliy df2663d9fb
Unique Data detection (#81) 2022-03-11 17:13:11 -05:00
dawnDus 2415d74a46
Challenge original graphics fix (#83) 2022-03-11 17:11:25 -05:00
dawnDus f50760d9c6
Switch offset for Quote in ending cutscene 2022-03-10 21:54:26 -05:00
dawnDus ef99809c95
Fix Switch dog rendering and add springy effect 2022-03-10 17:37:02 -05:00
dawnDus b2ae281483
Co-op cutscene handling for NPCs 2022-03-10 17:35:22 -05:00
alula 42f35b673d
Update README.md 2022-03-10 18:52:56 +01:00
dawnDus b079488c27
Fix graphics toggle breaking NPCs and TSC 2022-03-08 21:37:44 -05:00
dawnDus 06b4aeead9
Initial P2 Quote NPC 2022-03-08 21:08:53 -05:00
dawnDus 4b0b667ed5
Properly fix balrog cutscene and undo NPC 0 change 2022-03-07 08:51:12 -05:00
József Sallai d2a671e04c
refactor CS+ soundtrack loading (#79) 2022-03-07 08:47:37 -05:00
dawnDus 62efbf0cc3
Fix upward wind tile's gravity 2022-03-06 19:04:15 -05:00
József Sallai 465825797e
fix bleeding pixels in cutscene skip box (#78) 2022-03-06 17:50:02 -05:00
dawnDus e1f1dd4554
Custom SFX support 2022-03-06 17:49:25 -05:00
dawnDus cb7b2bd402
Don't draw NPC 0 2022-03-06 11:15:39 -05:00
dawnDus 067bcc5c8b
Improved texture scaling logic 2022-03-06 11:01:23 -05:00
József Sallai 05b9d9ebe0
fix menu selection snapping on first tick (#77) 2022-03-06 11:00:50 -05:00
József Sallai bc56271174
prevent stray bytes from disallowing subsequent events (fixes #73) (#74) 2022-03-05 13:03:58 -05:00
József Sallai d45e611466
fix cutscene skip speeding up title screen (#75) 2022-03-05 13:03:02 -05:00
dawnDus 0db6b60251
Display Nicalis copyright with nicalis data 2022-03-05 13:02:09 -05:00
dawnDus 657be6159e
Fix Sisters and Undead Core bugs 2022-03-05 13:01:08 -05:00
dawnDus 4b5d70ea3f
Update readme [ci skip] 2022-03-04 20:39:24 -05:00
dawnDus bba0313824
Assorted bug fixes 2022-03-04 20:38:13 -05:00
dawnDus 15010e54c2
Initial challenge replay support 2022-03-04 18:37:25 -05:00
dawnDus 0387a450ce
Fix soundtrack texture bleed 2022-03-01 18:45:10 -05:00
József Sallai 71b39cdadc
make jukebox start with selected soundtrack + chevrons (#72) 2022-03-01 18:44:03 -05:00
dawnDus 4055fef911
Difficulty changes Quote NPC and original graphics sprites 2022-02-28 21:45:43 -05:00
dawnDus 7a580fdf44
Revert fade changes 2022-02-28 21:24:24 -05:00
Alula 4cdadfc505
fix linking 2022-02-28 23:33:29 +01:00
Alula b6712409ab
strip linux binary, fix data files not being put in linux .zip 2022-02-28 20:07:25 +01:00
Alula 7f35dbf19e
some tweaks for faster builds 2022-02-28 19:31:04 +01:00
Alula b673d5a33d
fix macOS build 2022-02-28 19:13:27 +01:00
Sallai József 657b73aefc refactor stuff to make code cleaner 2022-02-28 19:03:57 +01:00
Sallai József 0c33795356 fix difficulties interfering with challenges 2022-02-28 19:03:57 +01:00
Sallai József 6b7b6b7032 add CS+ game difficulties 2022-02-28 19:03:57 +01:00
Alula a6272476ba
add screenshots [ci skip] 2022-02-28 19:01:41 +01:00
Alula 3867dd58c4
Add Linux AppVeyor builds, remove GitHub Actions. 2022-02-28 18:53:38 +01:00
Alula 390cc45153
updated readme [ci skip] 2022-02-28 18:53:18 +01:00
Alula c5e73fac91
Relicense under modified MIT (#70) 2022-02-28 09:00:18 +01:00
Alula 765d520d70
merge dawns water speed patch 2022-02-28 08:58:13 +01:00
Alula fc2f26db91
use references to slices in draw_triangle_list() 2022-02-28 08:42:04 +01:00
dawnDus efd1729ce5
Fix fade in/out for widescreen 2022-02-27 23:15:35 -05:00
dawnDus 74a5cddeaf
Fix water effect speed 2022-02-27 20:25:10 -05:00
Alula 464ea6f194
remove old shaders 2022-02-27 20:26:44 +01:00
Alula e216110864
water improvements 2022-02-27 20:26:42 +01:00
dawnDus d61602b7bb
formatting 2022-02-26 23:54:15 -05:00
dawnDus 287e06e24b
Boss bugs #68 2022-02-26 23:54:04 -05:00
dawnDus b29fe87e76
Boss damage popups 2022-02-26 23:53:33 -05:00
dawnDus ccd4030dc1
Add texture size lookup file 2022-02-26 14:07:35 -05:00
dawnDus 9b3e2837b7
Fixed falling block spawn trigger 2022-02-25 22:32:05 -05:00
dawnDus 7db42e86e6
Booster strafing 2022-02-25 21:49:14 -05:00
dawnDus f26f019584
Added strafing 2022-02-25 20:51:10 -05:00
dawnDus befac5db85
Challenge fixes: saves, nikumaru timer, menu 2022-02-25 17:00:14 -05:00
Alula 49d14b58a3
Make NPC rect arrays tolerant for invalid indexes 2022-02-25 10:51:27 +01:00
Alula 39171cc9a9 prevent zero division if 0 as wait is passed to <FON/<FOM 2022-02-25 06:06:30 +01:00
Alula 19dad43d7a tweak defaults 2022-02-25 06:03:05 +01:00
Alula 1c2eaae4d1 macOS fixes 2022-02-25 06:03:05 +01:00
dawnDus a2ebaaaab6
Further super missile fix 2022-02-24 22:40:50 -05:00
dawnDus 5909fedf33
Fixed fireball sfx and missiles going through walls (#37) 2022-02-24 21:00:10 -05:00
dawnDus 5ee580cb35
Enable challenges outside of CS+ 2022-02-23 23:21:06 -05:00
dawnDus 1070e67af4
Start event #0000 on profile load 2022-02-23 19:05:19 -05:00
József Sallai 8a94c841c6
Soundtrack menu improvements (#66) 2022-02-23 16:37:02 -05:00
dawnDus 5cf63660ef
Add save slots for challenges 2022-02-22 19:46:49 -05:00
dawnDus 41bf965937
Prevent vanish showing incorrect sheet on 1st tick 2022-02-21 17:59:18 -05:00
dawnDus 5ed2883954
Fixed ProjectileDissipation 1st frame missing 2022-02-21 17:22:14 -05:00
dawnDus d49c261a17
Even more bugfixes 2022-02-17 19:54:22 -05:00
dawnDus 0d20b1a209
Bug fixes for #63 2022-02-16 23:16:25 -05:00
Alula 44f478be75
remove clay hanson from credits and .pxchar support 2022-02-17 04:45:21 +01:00
dawnDus b771005816
New Android app icon by Daedliy 2022-02-15 17:22:07 -05:00
dawnDus c43d822c44
formatting 2022-02-14 20:50:57 -05:00
dawnDus 6a8d0bfd22
Disable exp popup for Spur 2022-02-14 20:50:18 -05:00
dawnDus e6632a845d
Drowning fixes 2022-02-14 20:03:24 -05:00
dawnDus 38efa5ded9
Fixes for #63
- Booster caret location
- Game should start tick/control (flag 3)
- Extend fade timer for Switch
2022-02-13 22:39:53 -05:00
dawnDus d7a25f2681
Parse mod names and string table 2022-02-13 14:39:28 -05:00
dawnDus dfcf2e2f3f
Initial jukebox scene 2022-02-12 13:32:48 -05:00
dawnDus 1fe00d25c6
Move broken animation fix 2022-02-12 13:31:36 -05:00
Alula 37cb574907
special treatment for cs+ challenges 2022-02-12 10:12:30 +01:00
Alula 3cd95b4427
switch like look for map system gui 2022-02-12 09:28:09 +01:00
Alula 680294def8
adjust design of skip cutscene popup 2022-02-12 09:25:13 +01:00
Alula 99c4798bed
switch: use 427px image for upper part 2022-02-12 09:19:12 +01:00
Alula e109db81e6
tsc newline fix 2022-02-12 09:18:32 +01:00
Alula c82c65c39f
round viewport width on android 2022-02-12 08:57:06 +01:00
dawnDus c4f1c60e35
Initial Android pause menu support 2022-02-11 22:28:30 -05:00
dawnDus b457f5dd6f
Fixed left/right in menu on Android 2022-02-11 19:07:27 -05:00
dawnDus 8cd22b932b
Set width of soundtrack menu to longest 2022-02-10 18:37:08 -05:00
dawnDus 2e3245c654
Use CS+ menu assets 2022-02-10 18:23:14 -05:00
dawnDus fe3e60ecbf
Fix challenge's incomplete stage.tbl 2022-02-10 18:02:45 -05:00
Alula 8e2088adb4
initial cs+ challenge support 2022-02-10 10:21:28 +01:00
Alula c127ee4bd4
use path list for resource loading 2022-02-10 08:54:20 +01:00
Alula 3374f13c2b
soundtrack switching menu 2022-02-10 07:15:28 +01:00
Alula e09ea37bda
Add support for triangle rendering using SDL 2.0.17+ APIs 2022-02-10 06:01:58 +01:00
Alula 338dbe4bc8
use git version of rust-sdl2 2022-02-10 06:01:58 +01:00
Alula 7bc8e18310
implement remaining switch TSC opcodes 2022-02-10 06:01:57 +01:00
dawnDus c722582ff2
Assorted bugs #60 2022-02-09 23:00:02 -05:00
dawnDus 0369b37d10
Save, load, and display item counts 2022-02-08 19:04:36 -05:00
dawnDus e53d4c7f43
Fix balrog missile trail 2022-02-08 17:26:21 -05:00
dawnDus 79d28822e8 Animated portrait support 2022-02-07 17:33:09 +01:00
dawndus 693155ca6a
Added save select menu (#58) 2022-02-06 12:23:24 -05:00
dawnDus 2223358991
<FAC slide-in animation 2022-02-06 12:22:26 -05:00
dawnDus a359a756d0
Include BMFont config file 2022-02-05 13:25:25 -05:00
dawnDus 32526f92f8
TSC Fixes:
- <CLR should not reset <FAC
- Last character \n bugfix
2022-02-04 19:31:16 -05:00
dawndus bd0762f812
Added volume settings (#57) 2022-02-02 22:09:29 -05:00
dawnDus 88fdb7b0ce
Load bullet.tbl and arms_level.tbl from plus files 2022-02-02 22:08:20 -05:00
dawnDus ff79957145
Enable closing map while it draws 2022-01-30 15:40:59 -05:00
dawnDus 807cc305b9
Use skin sheet for whimsical star 2022-01-29 12:48:45 -05:00
dawnDus d3d77b58e3
Refactor whimsical star 2022-01-29 11:14:39 -05:00
dawnDus ff5cf7359b
Reduce flickering and whimsical star fix 2022-01-28 19:44:03 -05:00
dawnDus 9f530ce6a5
Main menu music and cursor for nikumaru time 2022-01-28 16:17:00 -05:00
dawnDus 5725948f85
Adjust polar star caret 2022-01-28 12:52:30 -05:00
dawnDus db50f67876
Fix FacingPlayer condition 2022-01-28 12:46:33 -05:00
dawnDus a02284c439
Missing bubble caret 2022-01-27 09:43:03 -05:00
dawnDus 6e7191e5d3
Missing carets (Bubbler, Empty!, Push Jump) 2022-01-26 23:56:32 -05:00
dawnDus 654cbfb814
Universal offset for hardcoded bosses (Switch) 2022-01-26 18:51:05 -05:00
dawnDus b99cb8a34d
Use set_flag function to handle OOB flags 2022-01-25 23:41:21 -05:00
dawnDus 7448ce0e59
Fixed Sister's spawn location on Switch 2022-01-25 23:32:47 -05:00
dawnDus fba36467ea
FPS counter 2022-01-25 20:37:45 -05:00
dawnDus b7f226b322
Pause menu background dimming 2022-01-25 19:35:41 -05:00
dawnDus 698d694c43
Missed tilemap calls in editor 2022-01-25 00:16:07 -05:00
dawnDus 3b307c7c9d
Wrong dimension on clip width 2022-01-25 00:13:51 -05:00
dawnDus 95fd91b8a0
Better control over tilemap ticks 2022-01-25 00:10:13 -05:00
dawnDus 6302258817
Push tile animations 2022-01-24 23:07:23 -05:00
dawnDus d32cd87532
Pause menu improvements 2022-01-24 22:34:21 -05:00
dawnDus 7b5d4c367c
Correct layering on damage numbers 2022-01-23 19:51:18 -05:00
dawnDus e1b33aa0e9
Persistent damage numbers 2022-01-23 19:29:41 -05:00
Alula 12d7758ea7
Adjust lighting effects 2022-01-23 18:50:10 +01:00
Alula a098095c13
change version to 0.99.0 in appveyor builds 2022-01-23 18:17:01 +01:00
Alula 59b2e9954a
Fix a big mistake in ogg resampling code 2022-01-23 18:01:35 +01:00
dawnDus bb07919505
fixed core ball direciton and shock state 2022-01-23 10:09:04 -05:00
Alula 4c20234d5e fix stack overflows in audio code by moving huge structs to heap 2022-01-23 15:00:10 +01:00
Alula 0e06113738
Add Map System 2022-01-23 05:56:10 +01:00
alula 3054d07213
fix credit list appearance 2022-01-23 05:05:44 +01:00
dawnDus 1c7e4c9f65 SSS operand implemented 2022-01-22 23:32:40 +01:00
Alula b880fee8e7
Switch to upsteam cpal and avoid creating unnecessary threads 2022-01-22 05:08:53 +01:00
Alula dba6789b0a
Consistent menu spacing 2022-01-22 05:08:13 +01:00
Alula dcd33d943e
Compliant BMFont renderer 2022-01-22 05:07:53 +01:00
Alula 4325dcad86
Add support for GOG version 2022-01-22 02:19:18 +01:00
Alula d6df4640ab
Merge branch 'master' of github.com:alula/doukutsu-rs 2022-01-22 02:18:26 +01:00
Alula bc3906e39d
SDL/KAGE -> Original/Remastered because Nicalis surprised us a little 2022-01-22 02:18:12 +01:00
dawnDus 203bacb1a0 reset cutscene skip speed in main menu 2022-01-21 23:23:57 +01:00
dawnDus eadeedae6b STC command 2022-01-21 23:23:57 +01:00
dawnDus af1f9f5d89 Loading counter 2022-01-21 23:23:57 +01:00
Daedliy ce6de7c0a0
decorative border fix + spacing (#52)
* decorative border fix + spacing

* extra shifting around
2022-01-21 15:00:36 -05:00
dawnDus 6226df68ca
F2 for quick retry 2022-01-20 22:30:25 -05:00
dawndus fb5a72c565
Merge pull request #50 from dawndus/master
Ironhead letterbox
2022-01-20 21:22:17 -05:00
dawnDus c9f11d6c9f
fix jittery whimsical star during pause 2022-01-20 21:21:34 -05:00
dawnDus b181f9293f
Initial pause menu 2022-01-20 21:14:12 -05:00
dawnDus c63c520553
ghost puppy particles 2022-01-20 21:00:44 -05:00
dawnDus 53fdb890b1
curly lightcone 2022-01-19 19:23:31 -05:00
dawnDus dd8f2dcf67
Added missing core action 2022-01-19 18:50:33 -05:00
dawnDus 924f23154b
Ironhead Switch fixes 2022-01-19 00:05:34 -05:00
Vinícius Miguel f676b73c0e
typo: rect_deserialze -> rect_deserialize (#51) 2022-01-19 04:58:44 +01:00
dawnDus 46045c2a7e
Ironhead letterbox 2022-01-17 22:46:27 -05:00
Marcin Puc c8115df285
Add various refactorings (#48) 2022-01-17 23:29:30 +01:00
alula 529a1c122d
Merge pull request #49 from Daedliy/master
small start menu fixes
2022-01-17 21:51:56 +01:00
Daedliy df297819fe applying suggested changes 2022-01-17 16:34:37 -03:00
Daedliy 3d1ebf76a3 -consistent 14/7 pixel spacing between option and selected value
-fixed small bug in audio menu where cursor would select the first entry, despite being un-selectable
-gave MenuEntry:Options an additional Vec<String> for hopefully better descriptions
-removed "Player's" from "Player's Weapon Light Cone" over redundancy and so it'd fit
2022-01-16 14:52:08 -03:00
alula 824ba2c287
Update credits 2022-01-16 03:18:07 +01:00
alula 8786787249
Remove dead link to CSE2 repo 2022-01-16 03:12:16 +01:00
alula ef1d2a320e
Update README.md 2022-01-16 03:10:21 +01:00
Alula 4f00d439f3
fix android build 2022-01-16 02:57:12 +01:00
Alula 1b702d1a5a
bump version to 0.99.0, add dawn to authors 2022-01-16 02:52:42 +01:00
alula 58406aae71
Merge pull request #45 from dawndus/whimsical-star
Adding whimsical star
2022-01-16 02:46:30 +01:00
Alula 1ae5ecdbbf
fix CS+ font rendering inaccuracies 2022-01-16 02:45:17 +01:00
alula 87792972d0
Merge pull request #46 from dawndus/fixes
Minor fixes
2022-01-16 02:36:22 +01:00
Alula 87bab5fca9
add text box scrolling and fix opengl cliprects 2022-01-16 02:35:36 +01:00
dawnDus 27003f4e64
fix ballos leaving animation 2022-01-15 17:28:29 -05:00
dawnDus 2fed0928d8
Fixed butes getting stuck in walls 2022-01-15 16:36:24 -05:00
dawnDus 375c72cfbd
Fixed heavy press cutscene on switch 2022-01-15 16:35:57 -05:00
dawnDus cd049fd378
don't allow inventory while scripts are running 2022-01-15 16:13:21 -05:00
dawnDus fa0695b546
add whimsical star 2022-01-15 10:09:41 -05:00
alula e57bf29703
Merge pull request #44 from dawndus/ballos
Implemented all remaining NPCs
2022-01-15 08:04:49 +01:00
dawndus 85b1b71a0f
Merge branch 'doukutsu-rs:master' into ballos 2022-01-14 21:30:30 -05:00
dawnDus 6cef63bd0e
Fixed curly walking into death in cutscene 2022-01-14 21:30:14 -05:00
dawnDus b492be2203
All remaning NPCs 2022-01-14 21:29:39 -05:00
dawnDus 39267048c7
More ballos 2022-01-14 09:09:39 -05:00
dawnDus d5743ac972
reset ground collision check for <WAS 2022-01-13 11:34:36 -05:00
dawnDus 1f8690263b
add super_quake 2022-01-13 11:32:33 -05:00
dawnDus 10b7b5536d
Primary ballos NPC+Boss 2022-01-12 22:47:41 -05:00
Alula 89771844cc
fix black bars margin 2022-01-11 16:50:51 +01:00
Alula 0804fe86ce
fix ogg resampling bug 2022-01-11 16:01:49 +01:00
Alula e27cde67c7
Reset invicibility timer (#30) 2022-01-11 15:26:22 +01:00
alula be91851952
Merge pull request #43 from dawndus/master
Don't animate up/down in ironhead fight
2022-01-10 05:30:50 +01:00
dawnDus c4d80eecb3
Don't animate up/down in ironhead fight 2022-01-09 23:11:48 -05:00
Alula 4c8ec46864
make menu background scale better 2022-01-10 04:37:03 +01:00
dawndus 87ddcc1324
Implemented Heavy Press boss fight (#40)
* heavy press

* fixed incorrect scale for death smoke call

* Shoot caret animates at correct speed

* formatting
2022-01-10 04:02:27 +01:00
dawnDus e7b666b4cc implemented scrolling background type 2022-01-10 04:02:13 +01:00
dawnDus 6339a612b5 ironhead bugfixes 2022-01-10 04:02:13 +01:00
dawnDus cb52935d9f added ikachan 2022-01-10 04:02:13 +01:00
dawnDus 25a098145d format ma pignon 2022-01-10 04:02:02 +01:00
dawnDus af6e36ef3b control_enabled check on nikumaru 2022-01-10 04:02:02 +01:00
Alula 7d92b55b58
fix nikumaru z index and behavior on <TRA 2022-01-09 13:11:25 +01:00
Alula 124b2e2c82
hell cleanup 2022-01-09 12:56:06 +01:00
alula d572aebe32
Tyrone lied 2022-01-09 09:14:32 +01:00
Alula 0cad0b0762
document remaining flags 2022-01-08 15:43:46 +01:00
Alula 27b439f2cb
document bullet flags 2022-01-08 15:20:41 +01:00
Alula 3e6adbe3c1
fix unused variable warning in nikumaru.rs 2022-01-08 15:19:57 +01:00
Alula 7ac4346012
add nikumaru counter 2022-01-08 12:39:17 +01:00
Alula 75a1b3f9f4
<rmu fix 2022-01-08 11:36:33 +01:00
Alula 4a91448067
oops 2022-01-08 06:59:16 +01:00
Alula d484e8a183
get rid of some warnings 2022-01-08 06:57:04 +01:00
Alula 4d6768c015
fix few warnings 2022-01-08 06:15:30 +01:00
Alula b80f57ae49
fix macOS builds 2022-01-08 05:57:53 +01:00
Alula 4f3312d9ca
try to fix linux builds 2022-01-08 05:54:57 +01:00
Alula a10a5f138c
remove unreachable in curly boss bullet npc 2022-01-08 05:54:57 +01:00
Alula 94514d3b68
44100hz drums fix 2022-01-08 05:54:56 +01:00
dawndus d15fd43c84
Adding Ma Pignon NPCs (#38)
* add ma pignon

Co-authored-by: alula <6276139+alula@users.noreply.github.com>
2022-01-08 05:53:29 +01:00
dawndus 77fc4ca5b9
Hell enemies + small fixes (#36)
* Added curly_carried (320)

* add curly_carried property

* add Curly's nemesis

* add lightcone for Curly

* fixed caret spawn locations

* B2

* Butes

* Arrow collision

* Mesas

* Hell NPCs

* suggested changes

* lighting -> lightning and hell lighting

* curly lighting to NPC
2022-01-08 05:52:26 +01:00
Alula 3d912f6fbb
sound system improvements 2022-01-06 19:51:21 +01:00
Alula c8dc2d3443
remove credit.tsc debug print 2022-01-06 19:51:11 +01:00
Alula d09e0f8a91
update sdl2 crate 2022-01-06 19:49:44 +01:00
Alula cdfa550110
pretty print settings.json 2022-01-06 19:49:20 +01:00
Alula ef84379b62
editor shit 2022-01-06 02:11:17 +01:00
Alula e2afafdfa3
graphics::imgui_texture_id and soundness fixes 2022-01-05 11:42:39 +01:00
Alula ebe3c2f2af
refactor: fade 2022-01-05 06:59:47 +01:00
Alula b7680019ee
refactor: split background and fix outside scaling 2022-01-05 06:40:50 +01:00
Alula 575dcc7a6d
refactor: split text boxes 2022-01-05 06:08:36 +01:00
Alula 3b1a5f149e
refactor: split tilemap out 2022-01-05 05:50:16 +01:00
Alula ac58602ed0
add out of bounds black bars 2022-01-05 04:17:22 +01:00
Alula 4134d4754e
some editor barebones 2022-01-05 04:16:29 +01:00
Alula 5a6f7dec59
reformat 2022-01-05 04:15:19 +01:00
alula 00309a73f0
Merge pull request #35 from dawndus/master
fix Yes/No animation
2022-01-02 02:08:44 +01:00
dawnDus 9b4fd7d1a0 fix Yes/No animation 2022-01-01 17:20:06 -05:00
Alula 75e05c5ca5
update some deps + android build fix and downloader 2021-12-02 09:21:06 +01:00
Alula eaaa11d4f6
normal ending... 2021-12-02 06:57:44 +01:00
Alula 1b424f0b80
improved npc lighting 2021-10-31 09:14:13 +01:00
Alula 23f0feaae0
fix cs+switch scrolling 2021-10-16 15:26:10 +02:00
Alula f3a87259a1
cover half of the viewport during credits 2021-10-16 15:25:55 +02:00
Alula bdc4e7d209
Add <SIL/<CIL 2021-10-16 14:59:27 +02:00
Alula 8b5d56fe27
slight optimization for vfs lookups 2021-10-16 04:45:23 +02:00
Alula df1fbbf0d1
tsc refactor/optimization, credits interpreter 2021-10-16 04:37:42 +02:00
Alula 66106c7e82
make the VFS case insensitive on linux 2021-10-16 04:37:18 +02:00
Alula 164b2bf295
refactoring 2021-10-15 16:36:05 +02:00
Alula d147242199
scaling / ui tweaks, persistent timing 2021-10-14 09:43:17 +02:00
Alula 4854d9e758
fix libstdc++ not being embedded in apk 2021-10-14 09:31:30 +02:00
Alula 68cf299e96
netplay shit, visual tweaks 2021-10-14 06:54:11 +02:00
Alula 01e35a09eb
add <2PJ tsc command 2021-10-11 00:17:49 +02:00
Alula 3f9ad235ce
light cone toggle 2021-10-10 02:31:07 +02:00
Alula cd959f8f7c
fix a bunch of warnings, inventory dimming 2021-10-10 02:11:58 +02:00
Alula 481f61a705
needs more misery 2021-10-10 01:47:04 +02:00
Alula e018b53b04
commit stuff from last 2 months idfk what I've exactly changed 2021-10-08 04:41:31 +02:00
Alula 2cb9335453
Merge branch 'master' of github.com:alula/doukutsu-rs 2021-08-16 19:12:09 +02:00
Alula e80673ecb5
lua api for lighting 2021-08-16 19:12:00 +02:00
Alula 55afe1292f
various lighting improvements 2021-08-16 18:41:42 +02:00
Alula 8a94f7f9d1
fix missile launchers 2021-08-16 18:38:06 +02:00
Alula a601d6c044
settings menu rework 2021-08-16 09:47:11 +02:00
Alula c815c91541
rework lighting 2021-08-16 08:51:59 +02:00
Alula 6d9ed16668
slight cleanup 2021-08-16 08:51:21 +02:00
Alula a203af7e7b
add organya interpolation modes 2021-08-16 08:48:17 +02:00
Alula a226447a92 re-add windows build 2021-08-13 04:45:27 +02:00
Alula e1a05cb3fb rename -> mv 2021-08-13 04:30:32 +02:00
Alula 7f65136f3d send more help 2021-08-13 04:23:50 +02:00
Alula 329cd9d646 send help 2021-08-13 04:09:22 +02:00
Alula 5637bb6052 remove data files from GH builds 2021-08-13 03:57:46 +02:00
Alula f44e3c298a mac ci: add cargo-bundle 2021-08-13 03:48:19 +02:00
Alula 79c54b09c3 macOS tweaks / CI builds 2021-08-13 03:46:41 +02:00
Alula a52d095e45
an attempt to fix opengl initialization on windoze 2021-07-07 11:41:14 +02:00
Alula 4f65d42881
Merge branch 'master' of github.com:alula/doukutsu-rs 2021-07-07 11:36:08 +02:00
Alula e2c6ee8caf
various memery 2021-07-07 11:36:02 +02:00
alula 39ab0d8bcc
Merge pull request #32 from JakeVanV/chungus
Fixed various inaccuracies regarding player interaction
2021-07-01 21:30:20 +02:00
jake 639c296bcc Make <MYB change the player direction... Shack cutscene pretty accurate 2021-06-30 19:29:14 -07:00
jake d427651de3 moved down facing this from MYB to MYD, whoops. Also implemented <MYB for facing npc 2021-06-30 19:15:27 -07:00
jake cfbb2c3286 Make <MOV reset interaction flag, fixed <MYB 2021-06-30 18:48:26 -07:00
jake a085037fc6 Fixed various inaccuracies regarding player interaction 2021-06-29 21:00:22 -07:00
Alula e53944bcb5
minor cleanup 2021-06-28 13:08:29 +02:00
Alula 3806531e34
ensure requested viewport always fits in window 2021-06-28 13:07:20 +02:00
Alula 47b42bcf1e
fix inability to jump on slopes in certain cases 2021-06-28 13:06:38 +02:00
Alula 79a6c93060
Fix 'Load Game' behaving incorrectly when no save is present 2021-06-28 07:27:36 +02:00
Alula eeb290a6f3
lua 5.3, a bunch of new functionality for scripting api 2021-06-27 23:14:36 +02:00
Alula fcf7b292b1
remove sokol leftovers 2021-06-27 08:03:35 +02:00
Alula d1ca07c297
fix layout of text boxes being completely fucked 2021-06-27 08:03:07 +02:00
Alula 2b873a92a2
sample looping support 2021-06-27 08:02:21 +02:00
Alula 0e5d85ff05
fix #29 2021-06-27 04:24:01 +02:00
Alula 5ce0e1d67d
make <2MV not generate smoke if other player is hidden 2021-06-27 03:43:11 +02:00
Alula ba582882cc
make bottom facing fan blow, not suck 2021-06-27 03:42:44 +02:00
Alula 584df5518b
fix an imgui rendering issue on sdl2 backend 2021-06-27 03:29:48 +02:00
Alula 6f3beb6e28
slopes, pxmap, camera fixes 2021-06-27 03:06:56 +02:00
Alula 0d47a0f401
more collision fixes 2021-06-21 13:35:19 +02:00
Alula 215ec9ed6c
fix stuttering of number popup on players with different hitboxes 2021-06-21 13:35:05 +02:00
Alula c1bd334844
various tweaks, dskinmeta format 2021-06-21 13:12:58 +02:00
Alula 937d12c87b
number popup stuttering fix 2021-06-21 13:11:58 +02:00
Alula 752ecac3ee
support for overriding pixtone samples 2021-06-21 00:42:10 +02:00
Alula 3fe8e132e5
cs+ inspired water thing 2021-06-20 21:41:38 +02:00
Alula d68a248292
labirynth m npcs 2021-06-16 23:31:47 +02:00
Alula aa625789ce
<MNA visual / behavior fixes (#26) 2021-06-16 17:31:56 +02:00
Alula b8b0d34406
some cs+ background shit 2021-06-16 17:19:26 +02:00
Alula b779af2c1f
add damage / exp popups 2021-05-05 23:37:11 +02:00
Alula 6aa10ed946
fix few npcs, add fire whirrr 2021-05-05 22:46:07 +02:00
Alula 80a2fc024c
rounding fixes 2021-05-05 20:36:21 +02:00
Alula 4904c165ed
Merge branch 'master' of github.com:alula/doukutsu-rs 2021-05-05 18:35:06 +02:00
Alula d23ad6984e
unfuck physics 2021-05-05 18:34:23 +02:00
Alula 1360794264
a bunch of npc bugfixes 2021-05-05 18:34:14 +02:00
Alula aed30141b4
unfuck already implemented NPCs 2021-05-05 14:04:59 +02:00
alula 8f4aff55b2
Update README.md 2021-05-04 04:27:06 +02:00
Alula ea38f54c74
a bunch of npcs, up to Labirynth B 2021-05-03 01:06:02 +02:00
Alula 7844a4d26f
new rng 2021-05-02 14:26:13 +02:00
Alula ecabff27a8
rework cutscene skipping 2021-05-02 06:06:51 +02:00
Alula ad6a330ae0
make lua function casing match docs 2021-05-02 04:05:21 +02:00
Alula d83f58fe1b
add support for map flags 2021-05-02 04:04:52 +02:00
Alula 4f34e33b57
add skip flags, fix pre-save 'do you want to retry' 2021-05-02 02:09:54 +02:00
Alula 0db2e02181
fix rectangle rendering 2021-05-02 02:08:24 +02:00
Alula 490f02f2fe
stop eating CPU time when window is in background 2021-05-02 02:07:44 +02:00
Alula d6316aa718
fix balfrog 2021-04-28 22:58:07 +02:00
Alula 4d08158427
add missing sound in <IT+ opcode 2021-04-28 22:33:28 +02:00
Alula 27b5d85da7
fix tsc jump behavior (#23) 2021-04-28 22:31:26 +02:00
Alula 8d906536c1
increase size of yes/no box touch area 2021-04-28 21:34:09 +02:00
Alula 65be03261c
make inventory button an one-shot button 2021-04-28 21:33:39 +02:00
Alula 13bbf897dd
intro skip fix 2021-04-28 21:27:35 +02:00
Alula f6426750fd
bump winit to fix some android issues 2021-04-28 21:27:22 +02:00
Alula 753e7304a3
npc layers support 2021-04-28 00:39:31 +02:00
Alula f0780479c2
fix crashes on certain old android devices 2021-04-28 00:39:07 +02:00
Alula 6750cd7ad4
touchscreen / android improvements 2021-04-23 03:55:13 +02:00
Alula a0f0c7c909
change power critter gravity (fixes #15) 2021-04-21 15:53:21 +02:00
Alula f4c11ba326
fix #19 2021-04-21 15:31:06 +02:00
Alula 0b6f9191c2
fix #17 2021-04-21 15:18:17 +02:00
Alula e7792002cb
add inventory 2021-04-21 15:15:57 +02:00
Alula 71577e08b7
lighting thing 2021-04-20 13:43:58 +02:00
Alula edeff2b95b
add few missing methods to hooks 2021-04-20 13:43:58 +02:00
Alula 9a0009101f
fix a tsc compiler bug where # in middle of event was interpreted as start of new one 2021-04-20 13:43:57 +02:00
Alula 662dc2adbf
debugger toggle 2021-04-20 13:43:57 +02:00
Alula a08ea7a86b
opengl/es renderer 2021-04-20 13:43:14 +02:00
Alula 8271920178
revert april fools meme 2021-04-03 22:15:17 +02:00
Alula 347cb25d8b
organya improvements 2021-04-01 01:40:25 +02:00
Alula 9820f4b4f1
april fools 2021-04-01 01:15:03 +02:00
Alula 5efd3f3c92
general cleanup, hooks and android build fix 2021-03-29 23:19:07 +02:00
Alula 334d1530c0
credit more people 2021-03-23 15:25:40 +01:00
Alula aa269377ab
add scaled font rendering 2021-03-23 15:25:26 +01:00
Alula 6a12a9082f
fix npc inaccuracies 2021-03-23 15:25:01 +01:00
Alula af7d7ae744
fix booster anp 2021-03-23 15:06:39 +01:00
Alula 6c74b5517c
add ravil 2021-03-23 15:05:09 +01:00
Alula f5751f6651
fix weapon being desynchronized with player animation 2021-03-23 14:28:51 +01:00
Alula 8973da2840
fix unsoundness and some shitty hacks 2021-03-23 13:51:55 +01:00
Alula fe9fb06b5a fix windows builds 2021-03-23 04:40:02 +01:00
Alula d1d188ac77
intro scene/accuracy bugfixes 2021-03-23 02:53:01 +01:00
Alula 4043830e56
sand zone npcs 2021-03-23 02:52:27 +01:00
Alula c4b32f28ae
remove log spam 2021-03-23 02:52:15 +01:00
Alula f6c9a03126
add multiselect to menu 2021-03-23 02:49:55 +01:00
Alula a0c8cfa26d
minor fixes 2021-03-23 02:49:18 +01:00
Alula b49cc83a5b
reworked player animation system a bit 2021-03-23 02:48:46 +01:00
Alula 539af32722
fix NPC hitboxes being calculated incorrectly 2021-03-22 09:04:19 +01:00
Alula 493ff3a0fb
add air tank bubble 2021-03-22 09:03:40 +01:00
Alula 8a64cfc180
fix TSC handling certain weapon opcodes improperly 2021-03-22 09:01:52 +01:00
Alula 36fd5f8879
bugfixes for certain NPCs, add Curly 2021-03-15 22:11:40 +01:00
Alula 268ecb62bd
add missing inventory/map input handling 2021-03-15 22:11:12 +01:00
Alula 211108674f
add flash effect to current bosses and fix some glitches 2021-03-15 22:10:32 +01:00
Alula b34422ac7f
add flash effect and implement <FLA 2021-03-15 22:10:16 +01:00
Alula 12b2556b40
add a basic npc inspector 2021-03-15 22:08:30 +01:00
Alula 361baeb20d
add netplay feature 2021-03-12 17:55:20 +01:00
Alula ac29d35950
support for custom soundtracks 2021-03-12 17:54:30 +01:00
Alula 9d552eaa1a
fix overflow in smoke npc 2021-03-12 17:53:22 +01:00
Alula f87b791c87
some bullet fixes 2021-03-12 17:53:08 +01:00
Alula ecfcf57847
fix natives on some devices 2021-03-12 17:52:12 +01:00
Alula a1d546215f
weapon refactor + bunch of minor stuff 2021-03-09 15:05:38 +01:00
Alula c0c48783a9
machine gun and pausing 2021-02-26 21:03:35 +01:00
Alula 4f2767c4fe
fix android lighting 2021-02-26 01:02:03 +01:00
Alula c40f870fa5
credit eli 2021-02-24 09:31:21 +01:00
Alula 319289ca67
new android port 2021-02-24 09:28:47 +01:00
390 changed files with 80968 additions and 27058 deletions

View file

@ -1,46 +0,0 @@
version: "0.1.0.{build}-{branch}"
os: Visual Studio 2019
environment:
global:
PROJECT_NAME: doukutsu-rs
matrix:
- channel: stable
target: x86_64-pc-windows-msvc
target_name: win64
job_name: windows-x64
# - channel: stable
# target: i686-pc-windows-msvc
# target_name: win32
# job_name: windows-x32
install:
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
- rustup-init -yv --default-toolchain %channel% --default-host %target%
- set PATH=%PATH%;%USERPROFILE%\.cargo\bin
- rustup update
- rustup default %channel%
- rustc -vV
- cargo -vV
cache:
- '%USERPROFILE%\.cache\sccache -> Cargo.toml'
- '%USERPROFILE%\.cargo -> Cargo.toml'
- 'target -> Cargo.toml'
#test_script:
# - cargo build --verbose --all
# - cargo test --verbose --all --no-fail-fast
build_script:
- set DRS_BUILD_VERSION_OVERRIDE=%APPVEYOR_BUILD_VERSION%
- cargo build --release --bin doukutsu-rs
- mkdir release
- copy target\release\doukutsu-rs.exe release
- cd release
- appveyor DownloadFile https://github.com/doukutsu-rs/game-data/archive/master.zip -FileName ../game-data.zip
- 7z x ../game-data.zip
- rename game-data-master data
- 7z a ../doukutsu-rs_%target_name%.zip *
- appveyor PushArtifact ../doukutsu-rs_%target_name%.zip

View file

@ -0,0 +1,205 @@
name: Bug Report
description: Report a bug or issue with doukutsu-rs
type: "Bug"
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill out this form as completely as possible to help us reproduce and fix the issue.
- type: textarea
id: description
attributes:
label: Issue description
description: A clear and concise description of what the bug is.
placeholder: Describe the issue you're experiencing...
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: Reproduction steps
description: Steps to reproduce the behavior
placeholder: |
1. Open the game and load the attached save file
2. Go to Mimiga Village
3. Do ...
4. See that ... happens
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: What should have happened instead?
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: What **exact** version of doukutsu-rs are you using? For example, "0.102.0-beta7", "0.102.0-733" - you can find it at bottom of the main menu
placeholder: x.xxx.x-xxx
validations:
required: true
- type: dropdown
id: data-files
attributes:
label: Data files used
description: Which Cave Story data files are you using?
options:
- Vanilla Cave Story (1.0.0.6), Japanese
- Vanilla Cave Story (1.0.0.6), AGTP English translation
- Vanilla Cave Story - Another version or translation
- Cave Story+ - Steam version
- Cave Story+ - Epic Games version
- Cave Story+ - GOG version
- Cave Story+ - Humble Bundle DRM-free
- Cave Story+ - Mac App Store version
- Cave Story+ - 2011 Steam version
- Cave Story+ 1.2 - Nintendo Switch version
- Cave Story+ 1.3 - Nintendo Switch version
- Another version not on the list
validations:
required: true
- type: textarea
id: version-details
attributes:
label: Data files details (if applicable)
description: If you selected "Vanilla Cave Story - Another version or translation" or "Another version not on the list" above, please specify which version you're using. Also mention if you have altered data files in any way, such as installing translation mods.
placeholder: Please specify the exact version and any modifications...
validations:
required: false
- type: dropdown
id: platform
attributes:
label: Platform and Operating System
description: What platform and operating system are you using?
options:
- Windows
- Linux
- macOS
- Android
- iOS
- Nintendo Switch Homebrew
- Other (please specify in additional info)
validations:
required: true
- type: textarea
id: device-specs
attributes:
label: Device Model / Specs
description: Please provide your device specifications
placeholder: |
Examples:
- PC, i7-10700K, RTX 3060, 16GB RAM
- MacBook Pro, 14-inch, M3 Pro, 36GB RAM
- Samsung Galaxy S20
- iPhone 15 Pro
- Nintendo Switch OLED
validations:
required: true
- type: textarea
id: system-info
attributes:
label: System Information
description: Please see below for instructions on how to get this information.
placeholder: |
[paste output here, if you're uncomfortable with running commands, just specify everything manually]
Example output:
--- BEGIN SYSTEM INFO ---
OS Version: 15.5 24F74
CPU: Apple M2
RAM: 16384 MB
Manufacturer/Model: Mac14,2
GPUs:
- Apple
--- END SYSTEM INFO ---
render: shell
validations:
required: false
- type: markdown
attributes:
value: |
In case of a PC or Mac, the easiest way to get this is running a command in the command prompt or terminal app and pasting the output here.
For Windows, run the following command in command prompt:
```powershell
powershell.exe -NoProfile -Command "& {Write-Host ''; Write-Host ''; Write-Host '--- BEGIN SYSTEM INFO ---'; $os = Get-CimInstance Win32_OperatingSystem -ErrorAction SilentlyContinue; $cpu = Get-CimInstance Win32_Processor -ErrorAction SilentlyContinue; $computer = Get-CimInstance Win32_ComputerSystem -ErrorAction SilentlyContinue; $gpus = Get-CimInstance Win32_VideoController -ErrorAction SilentlyContinue; Write-Host 'OS Version: $($os.Caption) $($os.OSArchitecture) Build $($os.BuildNumber)'; Write-Host 'CPU: $($cpu.Name)'; Write-Host 'Manufacturer: $($computer.Manufacturer)'; Write-Host 'Model: $($computer.Model)'; Write-Host 'RAM: $($computer.TotalPhysicalMemory / 1MB) MB'; if ($gpus) { $i=1; foreach ($gpu in $gpus) { Write-Host "GPU $($i): $($gpu.Caption)"; $i++ } } else { Write-Host 'GPU: Unknown' }; Write-Host '--- END SYSTEM INFO ---'; Write-Host ''; Write-Host ''}"
```
For Linux, run the following command in terminal and paste the output here:
```bash
printf "\n\n--- BEGIN SYSTEM INFO ---\n"; printf "OS Version: %s\n" "$(lsb_release -d -r -c 2>/dev/null | awk -F':\t' '{print $2}' | paste -s -d' ' || cat /etc/os-release 2>/dev/null | grep "PRETTY_NAME" | awk -F'=' '{print $2}' | tr -d '\"' || echo 'Unknown')"; printf "CPU Architecture: %s\n" "$(uname -m 2>/dev/null || echo 'Unknown')"; printf "CPU Model: %s\n" "$(lscpu 2>/dev/null | grep "Model name" | awk -F': *' '{print $2}' || echo 'Unknown')"; printf "RAM: %s MB\n" "$(grep MemTotal /proc/meminfo 2>/dev/null | awk '{print int($2 / 1024)}' || echo 'Unknown')"; printf "System Manufacturer/Model: %s\n" "$(cat /sys/class/dmi/id/board_vendor 2>/dev/null || echo 'Unknown') $(cat /sys/class/dmi/id/board_name 2>/dev/null || echo 'Unknown')"; printf "GPUs:\n%s\n" "$(lspci -vnn 2>/dev/null | grep -i 'VGA compatible controller\|3D controller' | awk -F': ' '{print " - " $2}' | sed 's/ (rev .*//' || echo ' - Unknown')"; printf "--- END SYSTEM INFO ---\n\n\n"
```
For macOS, run the following command in terminal and paste the output here:
```bash
printf "\n\n--- BEGIN SYSTEM INFO ---\n"; printf "OS Version: %s %s\n" "$(sw_vers -productVersion 2>/dev/null || echo 'Unknown')" "$(sw_vers -buildVersion 2>/dev/null || echo 'Unknown')"; printf "CPU: %s\n" "$(sysctl -n machdep.cpu.brand_string 2>/dev/null || echo 'Unknown')"; printf "RAM: %s MB\n" "$(sysctl -n hw.memsize 2>/dev/null | awk '{print int($1 / (1024*1024))}' || echo 'Unknown')"; printf "Manufacturer/Model: %s\n" "$(system_profiler SPHardwareDataType 2>/dev/null | awk '/Model Identifier/{print $3}' || echo 'Unknown')"; printf "GPUs:\n%s\n" "$(system_profiler SPDisplaysDataType 2>/dev/null | awk '/Chipset Model/{print " - " $3}' | sed 's/ - Unknown//g' || echo ' - Unknown')"; printf "--- END SYSTEM INFO ---\n\n\n"
```
If you're running macOS on non-Apple hardware (Hackintosh), please manually add relevant information.
In case of Android, iOS or Nintendo Switch, you need to fill out it manually.
Android:
```
Android Version: 15
[ROM / OEM UI Type and Version, as best as you can, for example:]
System: OneUI 6.1.1
System: MIUI Global 14.0.4.0(RKOMIXM)
System: Xiaomi HyperOS 1.0.5.0.UNLINXM
System: Google Pixel, Android 15, Security Update October 5, 2024
System: LineageOS 21-20250123-NIGHTLY-marble
```
iOS:
```
iOS Version: 18.5
```
Nintendo Switch:
```
System Version: 20.1.5
Atmosphere Version: 1.9.1
```
- type: textarea
id: screenshots
attributes:
label: Screenshots / Videos
description: If applicable, add screenshots or videos to help explain your problem. You can drag and drop files here.
placeholder: Drag and drop files here or click to upload...
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context about the problem here, such as error messages, logs, or anything else that might be helpful.
placeholder: Any additional information that might help us understand the issue...
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Verification
description: Please confirm the following
options:
- label: "I have searched for existing issues and this is not a duplicate."
required: true
- label: "I understand that 3rd party ports and modifications such as the RetroArch port or Cave Story: Encore are not supported within this repository."
required: true
- label: "I have provided all the requested information to the best of my ability."
required: true

View file

@ -0,0 +1,55 @@
name: Feature Request
description: Suggest a new feature or improvement for doukutsu-rs
type: "Feature"
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a feature! Please fill out this form to help us understand your idea and how it could improve doukutsu-rs.
- type: textarea
id: feature-description
attributes:
label: Feature description
description: A clear and concise description of the feature or improvement you are proposing.
placeholder: Describe the feature you want to see...
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: Why do you want this feature? What problem does it solve or what value does it add?
placeholder: Explain why this feature would be useful...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Possible alternatives or workarounds
description: Have you considered any alternative solutions or workarounds?
placeholder: List any alternatives you've thought of, or say N/A...
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context, mockups, or screenshots about the feature request here.
placeholder: Any extra information, images, or context...
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Verification
description: Please confirm the following
options:
- label: "I have searched for existing issues and feature requests and this is not a duplicate."
required: true
- label: "I have described the feature clearly and provided all relevant information."
required: true

26
.github/ISSUE_TEMPLATE/003-todo.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: Task
description: This is a template for maintainers to use. Please do not submit issues using this template, unless asked by a maintainer.
type: "Task"
body:
- type: markdown
attributes:
value: |
Use this template to create a TO-DO task for the doukutsu-rs project.
- type: textarea
id: plan
attributes:
label: Plan
description: Describe the exact plan for what needs to be implemented or fixed.
placeholder: Describe the specific plan, implementation details, or approach...
validations:
required: true
- type: textarea
id: context
attributes:
label: Context
description: Any additional context, background information, or related issues.
placeholder: Add any relevant context, links to related issues, or background info...
validations:
required: false

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Submit a question, idea or discuss with the community
url: https://github.com/doukutsu-rs/doukutsu-rs/discussions
about: Get help using doukutsu-rs
- name: Join the Discord community
url: https://discord.gg/fbRsNNB
about: Talk with the team

427
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,427 @@
name: CI
on:
push:
branches-ignore:
- cpp-rewrite
- horizon-os
- refactor
paths-ignore:
- ".gitignore"
- ".github/*"
- "**.md"
- "LICENSE"
- "drshorizon/**"
- "res/**"
workflow_dispatch:
release:
types:
- released
defaults:
run:
shell: bash
env:
VERSION: "0.102.0"
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- name: Linux x86_64
os: ubuntu-latest
channel: stable
target: x86_64-unknown-linux-gnu
target_name: linux-x64
arch_name: x86_64
- name: Windows x64
os: windows-latest
channel: stable
target: x86_64-pc-windows-msvc
target_name: windows-x64
arch_name: x86_64
- name: Windows x32
os: windows-latest
channel: stable
target: i686-pc-windows-msvc
target_name: windows-x32
arch_name: i686
- name: macOS x64 (Intel Macs)
os: macos-latest
channel: stable
target: x86_64-apple-darwin
target_name: mac-x64
arch_name: x86_64
- name: macOS ARM64 (M1 Macs)
os: macos-latest
channel: stable
target: aarch64-apple-darwin
target_name: mac-arm64
arch_name: arm64
steps:
- uses: actions/checkout@v4
- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt update
sudo apt install libasound2-dev libudev-dev libgl1-mesa-dev libxext-dev
- name: Set version
id: set_version
run: |
if [ "${{ github.ref_type }}" == "tag" ]; then
echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
echo "channel=stable" >> $GITHUB_OUTPUT
elif [ "${{ github.ref_name }}" == "master" ]; then
echo "version=${{ env.VERSION }}-$((${{ github.run_number }} + 654))" >> $GITHUB_OUTPUT
echo "channel=nightly" >> $GITHUB_OUTPUT
else
echo "version=${{ env.VERSION }}-${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
echo "channel=nightly" >> $GITHUB_OUTPUT
fi
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo
~/.rustup
target
key: ${{ matrix.target_name }}-cargo
- name: Setup rust toolchain
run: |
rustup default ${{ matrix.channel }}
rustup target add ${{ matrix.target }}
rustc -vV
cargo -vV
if [ "${{ runner.os }}" == "macOS" ]; then
cargo install cargo-bundle
fi
- name: Build
run: |
if [ -z "${{ steps.set_version.outputs.version }}" ]; then
echo "version is not set"
exit 1
fi
export DRS_BUILD_VERSION_OVERRIDE="${{ steps.set_version.outputs.version }}"
mkdir release
if [ "${{ runner.os }}" == "macOS" ]; then
CARGO_INCREMENTAL=1 cargo bundle --release --target ${{ matrix.target }}
cp -a ./target/${{ matrix.target }}/release/bundle/osx/doukutsu-rs.app release/doukutsu-rs.app
codesign -s - -f ./release/doukutsu-rs.app/Contents/MacOS/doukutsu-rs
cd release
zip -9r "doukutsu-rs_mac-${{ matrix.arch_name }}.zip" doukutsu-rs.app
rm -rf doukutsu-rs.app
cd ..
elif [ "${{ runner.os }}" == "Windows" ]; then
CARGO_INCREMENTAL=1 cargo build --release --locked --bin doukutsu-rs --target ${{ matrix.target }}
cp ./target/${{ matrix.target }}/release/doukutsu-rs.exe release/doukutsu-rs.${{ matrix.arch_name }}.exe
elif [ "${{ runner.os }}" == "Linux" ]; then
RUSTFLAGS="-C link-args=-s" CARGO_INCREMENTAL=1 cargo build --release --locked --bin doukutsu-rs --target ${{ matrix.target }}
cp -a ./target/${{ matrix.target }}/release/doukutsu-rs release/doukutsu-rs.${{ matrix.arch_name }}.elf
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: doukutsu-rs_${{ matrix.target_name }}
path: ./release/*
if-no-files-found: error
- name: Save cache
if: ${{ github.ref_name == 'master' || github.ref_type == 'tag' }}
uses: actions/cache/save@v4
with:
path: |
~/.cargo
~/.rustup
target
key: ${{ matrix.target_name }}-cargo
build_android:
name: Android build
runs-on: ubuntu-latest
env:
APP_OUTPUTS_DIR: "app/app/build/outputs/apk/release"
strategy:
fail-fast: true
matrix:
include:
- name: Android
os: ubuntu-latest
channel: stable
steps:
- uses: actions/checkout@v4
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: |
~/.cache
~/.cargo
~/.rustup
~/.gradle
app/app/.cxx
app/app/build
drsandroid/target
key: android-cargo
- name: Setup rust toolchain
run: |
rustup default stable
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
rustc -vV
cargo -vV
cargo install cargo-ndk
- name: Install development kits
run: |
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install --package_file=app/app/packages.txt
- name: Set version
id: set_version
run: |
if [ "${{ github.ref_type }}" == "tag" ]; then
echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
echo "channel=stable" >> $GITHUB_OUTPUT
elif [ "${{ github.ref_name }}" == "master" ]; then
echo "version=${{ env.VERSION }}-$((${{ github.run_number }} + 654))" >> $GITHUB_OUTPUT
echo "channel=nightly" >> $GITHUB_OUTPUT
else
echo "version=${{ env.VERSION }}-${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
echo "channel=nightly" >> $GITHUB_OUTPUT
fi
- name: Build
run: |
if [ -z "${{ steps.set_version.outputs.version }}" ]; then
echo "version is not set"
exit 1
fi
export DRS_BUILD_VERSION_OVERRIDE="${{ steps.set_version.outputs.version }}"
cd app
touch local.properties
chmod +x ./gradlew
./gradlew assembleRelease
- name: Sign app
run: |
BUILD_TOOLS=$ANDROID_HOME/build-tools/33.0.0
echo "${{ secrets.ANDROID_SIGNING_KEYSTORE }}" | base64 --decode > keystore.jks
if [ "${{ secrets.ANDROID_SIGNING_KEY_PASS }}" != "" ]; then
$BUILD_TOOLS/apksigner sign --ks ./keystore.jks --ks-key-alias "${{ secrets.ANDROID_SIGNING_ALIAS }}" --ks-pass "pass:${{ secrets.ANDROID_SIGNING_KEYSTORE_PASS }}" --key-pass "pass:${{ secrets.ANDROID_SIGNING_KEY_PASS }}" --out $APP_OUTPUTS_DIR/app-signed.apk $APP_OUTPUTS_DIR/app-release-unsigned.apk
else
$BUILD_TOOLS/apksigner sign --ks ./keystore.jks --ks-key-alias "${{ secrets.ANDROID_SIGNING_ALIAS }}" --ks-pass "pass:${{ secrets.ANDROID_SIGNING_KEYSTORE_PASS }}" --out $APP_OUTPUTS_DIR/app-signed.apk $APP_OUTPUTS_DIR/app-release-unsigned.apk
fi
rm keystore.jks
- name: Prepare artifact
run: |
mkdir release
mv $APP_OUTPUTS_DIR/app-signed.apk release/doukutsu-rs.apk
cp LICENSE ./release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: doukutsu-rs_android
path: ./release/*
if-no-files-found: error
- name: Save cache
if: ${{ github.ref_name == 'master' || github.ref_type == 'tag' }}
uses: actions/cache/save@v4
with:
path: |
~/.cache
~/.cargo
~/.rustup
~/.gradle
app/app/.cxx
app/app/build
drsandroid/target
key: android-cargo
update_metadata:
name: Update metadata
runs-on: ubuntu-latest
if: ${{ github.ref_name == 'master' || github.ref_type == 'tag' }}
needs: [build, build_android]
permissions:
contents: write
env:
CF_ACCESS_KEY_ID: ${{ secrets.CF_ACCESS_KEY_ID }}
CF_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CF_BUCKET_NAME: "doukutsu-rs"
steps:
- uses: actions/checkout@v4
with:
repository: doukutsu-rs/metadata
token: ${{ secrets.METADATA_USER_TOKEN }}
- name: Set version
id: set_version
run: |
if [ "${{ github.ref_type }}" == "tag" ]; then
echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
echo "channel=stable" >> $GITHUB_OUTPUT
elif [ "${{ github.ref_name }}" == "master" ]; then
echo "version=${{ env.VERSION }}-$((${{ github.run_number }} + 654))" >> $GITHUB_OUTPUT
echo "channel=nightly" >> $GITHUB_OUTPUT
else
echo "version=${{ env.VERSION }}-${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
echo "channel=nightly" >> $GITHUB_OUTPUT
fi
mkdir -p releases/${{ steps.set_version.outputs.version }}
- name: Update metadata
id: metadata
run: |
# fail early if ${{ steps.set_version.outputs.* }} is not set
if [ -z "${{ steps.set_version.outputs.channel }}" ]; then
echo "channel is not set"
exit 1
fi
if [ -z "${{ steps.set_version.outputs.version }}" ]; then
echo "version is not set"
exit 1
fi
export FILE="./metadata/${{ steps.set_version.outputs.channel }}.json"
export VERSION="${{ steps.set_version.outputs.version }}"
if [ "${{ needs.build.result }}" == "success" ]; then
node ./metadata.js --os linux --arch x86_64 --version $VERSION --commit $GITHUB_SHA --link https://nightly.link/doukutsu-rs/doukutsu-rs/actions/runs/${{ github.run_id }}/doukutsu-rs_linux-x64.zip $FILE
node ./metadata.js --os windows --arch x86_64 --version $VERSION --commit $GITHUB_SHA --link https://nightly.link/doukutsu-rs/doukutsu-rs/actions/runs/${{ github.run_id }}/doukutsu-rs_windows-x64.zip $FILE
node ./metadata.js --os windows --arch i686 --version $VERSION --commit $GITHUB_SHA --link https://nightly.link/doukutsu-rs/doukutsu-rs/actions/runs/${{ github.run_id }}/doukutsu-rs_windows-x32.zip $FILE
node ./metadata.js --os macos --arch x64 --version $VERSION --commit $GITHUB_SHA --link https://nightly.link/doukutsu-rs/doukutsu-rs/actions/runs/${{ github.run_id }}/doukutsu-rs_mac-x64.zip $FILE
node ./metadata.js --os macos --arch arm64 --version $VERSION --commit $GITHUB_SHA --link https://nightly.link/doukutsu-rs/doukutsu-rs/actions/runs/${{ github.run_id }}/doukutsu-rs_mac-arm64.zip $FILE
fi
if [ "${{ needs.build_android.result }}" == "success" ]; then
node ./metadata.js --os android --version $VERSION --commit $GITHUB_SHA --link https://nightly.link/doukutsu-rs/doukutsu-rs/actions/runs/${{ github.run_id }}/doukutsu-rs_android.zip $FILE
fi
mkdir -p release-binaries
echo "file=$FILE" >> "$GITHUB_OUTPUT"
# Windows x32 build
- name: Download Windows x32 artifact
if: ${{ needs.build.result == 'success' }}
uses: actions/download-artifact@v4
with:
name: doukutsu-rs_windows-x32
path: temp-windows-x32
- name: Process Windows x32 build
if: ${{ needs.build.result == 'success' }}
run: |
node ./uploadBuild.js update --channel ${{ steps.set_version.outputs.channel }} --version "${{ steps.set_version.outputs.version }}" --platform windows --arch i686 --commit $GITHUB_SHA --file "temp-windows-x32/doukutsu-rs.i686.exe"
cp ./temp-windows-x32/doukutsu-rs.i686.exe "./release-binaries/doukutsu-rs_windows_${{ steps.set_version.outputs.version }}.i686.exe"
# Windows x64 build
- name: Download Windows x64 artifact
if: ${{ needs.build.result == 'success' }}
uses: actions/download-artifact@v4
with:
name: doukutsu-rs_windows-x64
path: temp-windows-x64
- name: Process Windows x64 build
if: ${{ needs.build.result == 'success' }}
run: |
node ./uploadBuild.js update --channel ${{ steps.set_version.outputs.channel }} --version "${{ steps.set_version.outputs.version }}" --platform windows --arch x86_64 --commit $GITHUB_SHA --file "temp-windows-x64/doukutsu-rs.x86_64.exe"
cp ./temp-windows-x64/doukutsu-rs.x86_64.exe "./release-binaries/doukutsu-rs_windows_${{ steps.set_version.outputs.version }}.x86_64.exe"
# Linux x64 build
- name: Download Linux x64 artifact
if: ${{ needs.build.result == 'success' }}
uses: actions/download-artifact@v4
with:
name: doukutsu-rs_linux-x64
path: temp-linux-x64
- name: Process Linux x64 build
if: ${{ needs.build.result == 'success' }}
run: |
node ./uploadBuild.js update --channel ${{ steps.set_version.outputs.channel }} --version "${{ steps.set_version.outputs.version }}" --platform linux --arch x86_64 --commit $GITHUB_SHA --file "temp-linux-x64/doukutsu-rs.x86_64.elf"
cp ./temp-linux-x64/doukutsu-rs.x86_64.elf "./release-binaries/doukutsu-rs_linux_${{ steps.set_version.outputs.version }}.x86_64.elf"
# macOS x64 build
- name: Download macOS x64 artifact
if: ${{ needs.build.result == 'success' }}
uses: actions/download-artifact@v4
with:
name: doukutsu-rs_mac-x64
path: temp-mac-x64
- name: Process macOS x64 build
if: ${{ needs.build.result == 'success' }}
run: |
node ./uploadBuild.js update --channel ${{ steps.set_version.outputs.channel }} --version "${{ steps.set_version.outputs.version }}" --platform macos --arch x86_64 --commit $GITHUB_SHA --file "temp-mac-x64/doukutsu-rs_mac-x86_64.zip"
cp ./temp-mac-x64/doukutsu-rs_mac-x86_64.zip "./release-binaries/doukutsu-rs_macos_${{ steps.set_version.outputs.version }}.x86_64.zip"
# macOS ARM64 build
- name: Download macOS ARM64 artifact
if: ${{ needs.build.result == 'success' }}
uses: actions/download-artifact@v4
with:
name: doukutsu-rs_mac-arm64
path: temp-mac-arm64
- name: Process macOS ARM64 build
if: ${{ needs.build.result == 'success' }}
run: |
node ./uploadBuild.js update --channel ${{ steps.set_version.outputs.channel }} --version "${{ steps.set_version.outputs.version }}" --platform macos --arch arm64 --commit $GITHUB_SHA --file "temp-mac-arm64/doukutsu-rs_mac-arm64.zip"
cp ./temp-mac-arm64/doukutsu-rs_mac-arm64.zip "./release-binaries/doukutsu-rs_macos_${{ steps.set_version.outputs.version }}.arm64.zip"
# Android build
- name: Download Android artifact
if: ${{ needs.build_android.result == 'success' }}
uses: actions/download-artifact@v4
with:
name: doukutsu-rs_android
path: temp-android
- name: Process Android build
if: ${{ needs.build_android.result == 'success' }}
run: |
node ./uploadBuild.js update --channel ${{ steps.set_version.outputs.channel }} --version "${{ steps.set_version.outputs.version }}" --platform android --arch universal --commit $GITHUB_SHA --file "temp-android/doukutsu-rs.apk"
cp ./temp-android/doukutsu-rs.apk "./release-binaries/doukutsu-rs_android_${{ steps.set_version.outputs.version }}.universal.apk"
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
if: ${{ github.ref_type == 'tag' }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release-binaries/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Upload metadata
run: |
git config user.name ${{ vars.METADATA_USER_NAME }}
git config user.email ${{ vars.METADATA_USER_EMAIL }}
git add ${{ steps.metadata.outputs.file }}
git commit -m "Update ${{ steps.set_version.outputs.channel }} builds metadata(CI)"
git push

View file

@ -1,224 +0,0 @@
name: Release
on: [push]
jobs:
build-linux-x86_64:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libasound2-dev libudev-dev pkg-config
- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-stable-cargo-registry
restore-keys: |
${{ runner.os }}-stable-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-stable-cargo-index
restore-keys: |
${{ runner.os }}-stable-cargo-index-
- name: Cache Cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-stable-target
restore-keys: |
${{ runner.os }}-stable-target
- name: Checkout sources
uses: actions/checkout@v2
- name: Checkout data files
uses: actions/checkout@v2
with:
repository: doukutsu-rs/game-data
path: data
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Build
run: cargo build --all --release && strip target/release/doukutsu-rs
- name: Copy executable to root directory
run: cp target/release/doukutsu-rs doukutsu-rs.x86_64
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: doukutsu-rs_linux_x86_64
path: |
doukutsu-rs.x86_64
data
!data/README.md
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
doukutsu-rs.x86_64
data
!data/.git
!data/README.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-windows-x86:
runs-on: windows-latest
steps:
- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-stable-cargo-registry
restore-keys: |
${{ runner.os }}-stable-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-stable-cargo-index
restore-keys: |
${{ runner.os }}-stable-cargo-index-
- name: Cache Cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-stable-target
restore-keys: |
${{ runner.os }}-stable-target
- name: Checkout sources
uses: actions/checkout@v2
- name: Checkout data files
uses: actions/checkout@v2
with:
repository: doukutsu-rs/game-data
path: data
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: i686-pc-windows-msvc
default: true
override: true
- name: Build
run: cargo build --target i686-pc-windows-msvc --all --release
- name: Copy executable to root directory
run: cp target/i686-pc-windows-msvc/release/doukutsu-rs.exe doukutsu-rs.exe
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: doukutsu-rs_windows_x86
path: |
doukutsu-rs.exe
data
!data/.git
!data/README.md
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
doukutsu-rs.exe
data
!data/README.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-windows-x64:
runs-on: windows-latest
steps:
- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-stable-cargo-registry
restore-keys: |
${{ runner.os }}-stable-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-stable-cargo-index
restore-keys: |
${{ runner.os }}-stable-cargo-index-
- name: Cache Cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-stable-target
restore-keys: |
${{ runner.os }}-stable-target
- name: Checkout sources
uses: actions/checkout@v2
- name: Checkout data files
uses: actions/checkout@v2
with:
repository: doukutsu-rs/game-data
path: data
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Build
run: cargo build --all --release
- name: Copy executable to root directory
run: cp target/release/doukutsu-rs.exe doukutsu-rs.exe
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: doukutsu-rs_windows_x64
path: |
doukutsu-rs.exe
data
!data/.git
!data/README.md
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
doukutsu-rs.exe
data
!data/README.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

55
.gitignore vendored
View file

@ -2,17 +2,64 @@
.vscode/
# Cave Story (copyrighted) data files
data/
/data/
# Generated by Cargo
# will have compiled files and executables
debug/
target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# Shader binary files
*.dksh
# These are backup files generated by rustfmt
**/*.rs.bk
# cave story saves
Profile.dat*
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
*.log
3rdparty/

57
AUTHORS.md Normal file
View file

@ -0,0 +1,57 @@
# doukutsu-rs Contributors
This file recognizes the people who have made meaningful contributions to doukutsu-rs through code, bug fixes, features, and other improvements.
Contributors are listed based on their level of involvement, with a focus on those who have made 5 or more commits or contributed substantial features. This list doesn't represent legal copyright - check the git log for detailed code authorship.
All GitHub profiles are linked for easy reference.
## Active Maintainers
These contributors actively maintain the project and review contributions:
**[alula](https://github.com/alula)**
**[dawndus](https://github.com/dawndus)**
**[jozsefsallai](https://github.com/jozsefsallai)**
**[biroder](https://github.com/biroder)**
## Regular Contributors
Contributors with multiple commits or major feature work:
**[periwinkle9](https://github.com/periwinkle9)**
**[DrGlaucous](https://github.com/DrGlaucous)**
**[khang06](https://github.com/khang06)**
**[mokurin000](https://github.com/mokurin000)**
**[JakeV-1](https://github.com/JakeV-1)**
## Other Contributors
People who have made valuable contributions to the codebase:
**[beholdnec](https://github.com/beholdnec)**
**[GiantBlargg](https://github.com/GiantBlargg)**
**[tranzystorekk](https://github.com/tranzystorekk)**
**[IruzzArcana](https://github.com/IruzzArcana)**
**[M0REKZ](https://github.com/M0REKZ)**
**[vrmiguel](https://github.com/vrmiguel)**
**[tulilirockz](https://github.com/tulilirockz)**
## Artwork & Design
**[@Daedliy](https://twitter.com/Daedliy)** - Original "Crab Sue" character design and sketch-style doukutsu-rs logo
**[AppleHair](https://github.com/AppleHair)** - New cute "Crab Sue" icon art for all platforms
## Built Upon
doukutsu-rs incorporates and builds upon these external works:
**[ggez](https://github.com/ggez/ggez)** - Original framework that doukutsu-rs was built on; a derivative of it's VFS implementation and other components remain in the codebase
**[Clownacy](https://github.com/Clownacy)** - Implementation concepts from CSE2-Enhanced and Cave Story Mod Loader
**[LunarLambda](https://github.com/doukutsu-rs/organism)** - Organism Rust Organya sound format player library, enhanced and integrated into doukutsu-rs
**[Zoroyoshi](http://z.apps.atjp.jp/k12x10/)** - k12x10 public domain bitmap font (current built-in font)
**[/efont/ Shinonome](http://openlab.ring.gr.jp/efont/shinonome/)** - Shinonome Public domain bitmap font family (used in early 2020 versions)
---
_See the full list of all code contributors on [GitHub](https://github.com/doukutsu-rs/doukutsu-rs/graphs/contributors)._

2836
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,88 +1,114 @@
[package]
authors = ["Alula"]
edition = "2018"
name = "doukutsu-rs"
version = "0.1.0"
description = "A re-implementation of Cave Story (Doukutsu Monogatari) engine"
version = "0.102.0"
authors = ["Alula", "dawnDus"]
edition = "2021"
rust-version = "1.65"
#[lib]
#crate-type = ["lib", "cdylib"]
[lib]
crate-type = ["lib"]
[package.metadata.android]
android_version = 29
target_sdk_version = 28
min_sdk_version = 26
build_targets = ["aarch64-linux-android"]
package_name = "io.github.doukutsu_rs.android"
apk_label = "doukutsu-rs"
opengles_version = [3, 1]
fullscreen = true
orientation = "sensorLandscape"
permission = [
{ name = "android.permission.READ_EXTERNAL_STORAGE" },
{ name = "android.permission.WRITE_EXTERNAL_STORAGE" }
]
application_metadatas = [
{ name = "android:hardwareAccelerated", value = "true" },
{ name = "android:requestLegacyExternalStorage", value = "true" }
]
[[bin]]
name = "doukutsu-rs"
path = "src/main.rs"
test = false
bench = false
required-features = ["exe"]
[profile.release]
lto = 'thin'
panic = 'abort'
# This is intentional. Enabling LTO inflates build times and does not provide us any significant benefits.
lto = "off"
panic = "abort"
split-debuginfo = "packed"
[profile.dev.package."*"]
opt-level = 3
overflow-checks = false
codegen-units = 256
[profile.dev.build-override]
opt-level = 1
[profile.release.build-override]
opt-level = 1
[package.metadata.bundle]
name = "doukutsu-rs"
identifier = "io.github.doukutsu_rs"
icon = ["res/macos/16x16.png", "res/macos/16x16@2x.png", "res/macos/32x32.png", "res/macos/32x32@2x.png", "res/macos/128x128.png", "res/macos/128x128@2x.png", "res/macos/256x256.png", "res/macos/256x256@2x.png", "res/macos/512x512.png", "res/macos/512x512@2x.png"]
version = "0.102.0"
resources = ["data"]
copyright = "Copyright (c) 2020-2023 doukutsu-rs contributors"
category = "Game"
osx_minimum_system_version = "10.12"
[features]
default = ["scripting", "backend-sdl", "ogg-playback"]
default = ["default-base", "backend-sdl", "render-opengl", "exe", "webbrowser", "discord-rpc"]
default-base = ["ogg-playback"]
ogg-playback = ["lewton"]
backend-sdl = ["sdl2"]
backend-gfx = ["winit", "imgui-gfx-renderer", "imgui-winit-support"]
scripting = ["lua-ffi"]
backend-sdl = ["sdl2", "sdl2-sys"]
backend-glutin = ["winit", "glutin", "render-opengl"]
backend-horizon = []
render-opengl = []
discord-rpc = ["discord-rich-presence"]
netplay = ["serde_cbor"]
editor = []
exe = []
android = []
[dependencies]
bitvec = "0.20"
#glutin = { path = "./3rdparty/glutin/glutin", optional = true }
#winit = { path = "./3rdparty/winit", optional = true, default_features = false, features = ["x11"] }
#sdl2 = { path = "./3rdparty/rust-sdl2", optional = true, features = ["unsafe_textures", "bundled", "static-link"] }
#sdl2-sys = { path = "./3rdparty/rust-sdl2/sdl2-sys", optional = true, features = ["bundled", "static-link"] }
#cpal = { path = "./3rdparty/cpal" }
byteorder = "1.4"
clap = { version = "4.5.40", default_features = false, features = ["std", "help", "usage", "error-context", "cargo", "derive"] }
case_insensitive_hashmap = "1.0.0"
chrono = "0.4"
cpal = "0.13"
chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
cpal = { git = "https://github.com/doukutsu-rs/cpal", rev = "ce731c58b7f4759a0f4007b392e2b7f4716a347c" }
directories = "3"
imgui = "0.7.0"
imgui-gfx-renderer = { version = "0.7.0", optional = true }
imgui-winit-support = { version = "0.7.0", default-features = false, features = ["winit-24"], optional = true }
image = { version = "0.23", default-features = false, features = ["png", "bmp"] }
discord-rich-presence = { version = "0.2", optional = true }
downcast = "0.11"
encoding_rs = "0.8.33"
fern = "0.6.2"
glutin = { git = "https://github.com/doukutsu-rs/glutin.git", rev = "2dd95f042e6e090d36f577cbea125560dd99bd27", optional = true, default_features = false, features = ["x11"] }
imgui = { git = "https://github.com/imgui-rs/imgui-rs.git", rev = "5d771a83b82c5cc3dd58cca3f969d900369262e6" }
image = { version = "0.24", default-features = false, features = ["png", "bmp"] }
itertools = "0.10"
lazy_static = "1.4.0"
lewton = { version = "0.10.2", optional = true }
lazy_static = "1.4"
lewton = { version = "0.10", optional = true }
log = "0.4"
lua-ffi = { git = "https://github.com/doukutsu-rs/lua-ffi.git", rev = "1ef3caf772d72068297ddf75df06fd2ef8c1daab", optional = true }
lru = "0.6.0"
num-derive = "0.3.2"
num-traits = "0.2.12"
paste = "1.0.0"
pretty_env_logger = "0.4.0"
sdl2 = { version = "0.34", optional = true, features = ["unsafe_textures", "bundled", "static-link"] }
num-derive = "0.3"
num-traits = "0.2"
open = "3.2"
paste = "1.0"
pelite = { version = ">=0.9.2", default-features = false, features = ["std"] }
sdl2 = { git = "https://github.com/doukutsu-rs/rust-sdl2.git", rev = "244ae85833cff4f97ab4b58331741be20e422bd7", optional = true, features = ["unsafe_textures", "bundled", "static-link"] }
sdl2-sys = { git = "https://github.com/doukutsu-rs/rust-sdl2.git", rev = "244ae85833cff4f97ab4b58331741be20e422bd7", optional = true, features = ["bundled", "static-link"] }
rc-box = "1.2.0"
serde = { version = "1", features = ["derive"] }
serde_derive = "1"
serde_yaml = "0.8"
strum = "0.20"
strum_macros = "0.20"
# remove and replace when drain_filter is in stable
serde_cbor = { version = "0.11", optional = true }
serde_json = "1.0"
strum = "0.24"
strum_macros = "0.24"
# remove and replace with extract_if, when our MSRV is 1.87
vec_mut_scan = "0.4"
webbrowser = "0.5.5"
winit = { version = "0.24", features = ["serde"], optional = true }
webbrowser = { version = "0.8.6", optional = true }
winit = { git = "https://github.com/doukutsu-rs/winit.git", rev = "878f206d19af01b0977277929eee5e32667453c0", optional = true, default_features = false, features = ["x11"] }
xmltree = "0.10"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["winuser"] }
[target.'cfg(target_os = "windows")'.build-dependencies]
winres = "0.1"
[target.'cfg(target_os = "macos")'.dependencies]
objc = "0.2"
[target.'cfg(target_os = "android")'.dependencies]
ndk = "0.3"
ndk-glue = "0.3"
jni = "0.19"
ndk = "0.7"
ndk-glue = "0.7"
ndk-sys = "0.4"
jni = "0.20"
[target.'cfg(target_os = "horizon")'.dependencies]
#deko3d = { path = "./3rdparty/deko3d" }
deko3d = { git = "https://github.com/doukutsu-rs/deko3d-rs", branch = "master" }

22
LICENSE
View file

@ -1,7 +1,21 @@
Copyright 2020 Alula
MIT/doukutsu-rs License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Copyright 2020 doukutsu-rs contributors.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
The Software cannot be redistributed bundled with data files taken from any commercial port
released by Nicalis Inc. without their explicit permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

248
README.md
View file

@ -1,52 +1,244 @@
# doukutsu-rs
![doukutsu-rs](./res/sue_crab_banner_github.png)
![Release](https://github.com/doukutsu-rs/doukutsu-rs/workflows/Release/badge.svg)
[Download latest Nightly builds](https://github.com/doukutsu-rs/doukutsu-rs/actions) (Requires being logged in to GitHub)
A re-implementation of Cave Story (Doukutsu Monogatari) engine written in [Rust](https://www.rust-lang.org/).
**The project is still incomplete and not fully playable yet.** [Click here to see the current status of the project](https://github.com/doukutsu-rs/doukutsu-rs/issues/10).
A fully playable re-implementation of the Cave Story (Doukutsu Monogatari) engine written
in [Rust](https://www.rust-lang.org/).
[Join the Discord server](https://discord.gg/fbRsNNB)
[![CI](https://github.com/doukutsu-rs/doukutsu-rs/actions/workflows/ci.yml/badge.svg?branch=master)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master?preview)
- Get stable/beta builds from
- [get.doukutsu.rs](https://get.doukutsu.rs)
- [GitHub Releases](https://github.com/doukutsu-rs/doukutsu-rs/releases)
- [Flatpak](https://flathub.org/apps/io.github.doukutsu_rs.doukutsu-rs) (Linux only)
- [Get nightly builds](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master?preview) (recommended for now, has latest fixes and improvements)
Permalinks to latest builds from `master` branch:
- [Windows (64-bit)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_windows-x64.zip)
- [Windows (32-bit)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_windows-x32.zip)
- [macOS (Intel, 64-bit, 10.14+)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_mac-x64.zip)
- [macOS (Apple M1, 11.0+)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_mac-arm64.zip)
- [Linux (64-bit)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_linux-x64.zip)
- [Android (armv7/arm64/x86)](https://nightly.link/doukutsu-rs/doukutsu-rs/workflows/ci/master/doukutsu-rs_android.zip)
> [!NOTE]
> macOS note: If you get a `"doukutsu-rs" can't be opened` message, right-click doukutsu-rs.app and click open.
> [!NOTE]
> If you get issues with Epic Games Store version, scroll down for instructions.
#### Data files
This repository does not contain any copyrighted files.
In order to work doukutsu-rs needs to be paired with supported data files. This repository does not contain any data
files.
For better user experience, pre-built binaries are distributed with slightly modified freeware game files.
doukutsu-rs works fine with freeware data files or [NXEngine(-evo)](https://github.com/nxengine/nxengine-evo) or from a
supported copy of [Cave Story+](https://www.nicalis.com/games/cavestory+).
*doukutsu-rs* should work fine with pre-extracted and tweaked data files from [this repository](https://github.com/doukutsu-rs/game-data), [NXEngine(-evo)](https://github.com/nxengine/nxengine-evo) extracted freeware data files and [Cave Story+](https://www.nicalis.com/games/cavestory+) data files.
<details>
<summary>How to set up data files on Android</summary>
If your phone has an app called **"Files"**:
Vanilla Cave Story does not work yet because some important data files have been embedded inside the executable. and we don't have a loader/extractor implemented yet.
1. Launch this app.
2. Press **☰** on the top left corner.
3. Tap on **"doukutsu-rs game data"**.
4. Copy your game data files to the opened folder.
##### Where to get them?
If your phone does not have this app:
1. Install the **"Material Files"** app from *Hai Zhang* and launch it([Google Play](https://play.google.com/store/apps/details?id=me.zhanghai.android.files) | [F-Droid](https://f-droid.org/en/packages/me.zhanghai.android.files/) | [Github Releases](https://github.com/zhanghai/MaterialFiles/releases)).
2. Press **☰** on the top left corner.
3. Press **"+ Add storage"**.
4. In the window that pops up, press **"External storage"**.
5. Press **☰** on the top left corner.
6. Tap on **"doukutsu-rs game data"**.
7. Press the large blue button at the bottom labelled **"USE THIS FOLDER"**.
8. Then click on **☰** in the top left corner again and open.
9. Tap on **"files"** above **"+ Add storage"**.
10. Copy your game data files to the opened folder.
</details>
#### Supported game editions and data file acquisition guides
**Freeware**
- https://github.com/doukutsu-rs/game-data - Freeware game data distributed with CI builds, based on those two below.
- ~~https://github.com/Clownacy/CSE2/archive/enhanced.zip - copy `game_english/data` from archive to the runtime directory (place you run the executable from, usually project root)~~
- https://github.com/nxengine/nxengine-evo/releases/download/v2.6.4/NXEngine-v2.6.4-Win32.zip - copy `NXEngine-evo-2.6.4-xxx/data` from the archive to runtime directory
doukutsu-rs works out of the box when it's placed in the same directory as the original Doukutsu.exe executable. On the initial
startup, doukutsu-rs will automatically extract the additional resources that are embedded in the vanilla game into the `data`
directory. Until that is done, both doukutsu-rs and the vanilla executable have to exist in the directory.
<details>
<summary>Example root directory</summary>
![example root directory with doukutsu-rs and vanilla Cave Story](https://i.imgur.com/3dJ7WMB.png)
</details>
**Cave Story+**
- PC release (Steam) - (Tested only with Steam version, both Windows and Linux builds) Copy `data` folder from installation directory ([guide for Steam](https://steamcommunity.com/sharedfiles/filedetails/?id=760447682)) to the runtime directory.
- PC release (EGS) - (Untested, but the game is essentially the same as Steam release) Same thing as with Steam version.
- Switch release - (Tested once, no guarantee to work) You need a hacked Switch and physical release. Google should help you.
doukutsu-rs can be used as drop-in replacement for `CaveStory+.exe`. No modifications to game files are needed.
#### Mandatory screenshots
**Original version (first released in 2011 on Steam)** - expand for instructions
**Freeware data files:**
<details>
<summary>Steam release (Win/Mac/Linux)</summary>
![Japanese Freeware](https://i.imgur.com/eZ0V5rK.png)
The `data` folder is in the same place across all platforms.
**Cave Story+ data files:**
If you want to use doukutsu-rs as a substitute for Mac version of Cave Story+ (which at moment of writing doesn't work
on 10.15+ anymore), do the following:
![CS+ with enhanced graphics](https://i.imgur.com/YaPAs70.png)
1. Find the doukutsu-rs executable:
- In AppVeyor builds, it's in `doukutsu-rs.app/Contents/MacOS/doukutsu-rs`
- In your own builds, it's in `target/(release|debug)/doukutsu-rs`
2. Open Steam Library, select `Cave Story+`, press the `Manage` button (gear icon) and select `Properties...`
3. Select `Local Files` and press `Browse...`.
4. Open the `Cave Story+.app` bundle and navigate to `Contents/MacOS` directory.
5. Rename the `Cave Story+` executable to something else or delete it.
6. Copy the doukutsu-rs executable and rename it to `Cave Story+`.
7. Launch the game from Steam and enjoy!
![image](https://user-images.githubusercontent.com/53099651/155904982-eb6032d8-7a4d-4af7-ae6f-b69041ecfaa4.png)
</details>
> [!WARNING]
> **EPIC GAMES STORE VERSION WARNING**
>
> Nicalis for some reason ships a stray `opengl32.dll` DLL from Windows 7 with the Epic Games Store copies of Cave Story+.
>
> However as the game is 32-bit and the dll is 64-bit it has no effect on the original version, but as it's a core Windows DLL and doukutsu-rs ships 64-bit builds and uses OpenGL, it's makes the game crash on startup.
>
> The fix is to simply delete `opengl32.dll`, as it's not used anyway.
<details>
<summary>Epic Games Store</summary>
Check your default installation directory.
![image](https://user-images.githubusercontent.com/53099651/155905035-0080eace-bd98-4cf5-9628-c98334ea768c.png)
</details>
<details>
<summary>GOG</summary>
Check your default installation directory.
![image](https://user-images.githubusercontent.com/53099651/155906494-1e53f174-f12f-41be-ab53-8745cdf735b5.png)
</details>
<details>
<summary>Humble Bundle</summary>
The archive from Humble Bundle contains the necessary `data` folder, in the same folder as `CaveStory+.exe`.
![image](https://user-images.githubusercontent.com/96957561/156861929-7fa03951-442b-4277-b673-474189411103.png)
</details>
<details>
<summary>WiiWare</summary>
1. [Dump Your WiiWare `.wad`](https://wii.guide/dump-wads.html)
2. [Extract and decompress the `data` folder](https://docs.google.com/document/d/1hDNDgNl0cUDlFOQ_BUOq3QCGb7S0xfUxRoob-hfM-DY)
Example of a [valid uncompressed `data` folder](https://user-images.githubusercontent.com/53099651/159585593-43fead24-b041-48f4-8332-be50d712310d.png)
</details>
**Remastered version (first released in 2017 on Switch)**
> [!NOTE]
> This version is **incompatible** with saves from the original version.
>
> Interchanging the save files may result in spawning in wrong locations, softlocks, graphical glitches, or other issues.
<details>
<summary>Nintendo Switch</summary>
Extract the `data` folder (contained in `romfs`) from your console using tool such as [nxdumptool](https://github.com/DarkMatterCore/nxdumptool).
**Important notes:**
- doukutsu-rs doesn't rely on the original ROM or executable, you just need the data files, go to `RomFS options` menu to just extract the files to SD card so you don't need to do any extra steps.
- Ensure you're dumping the files **with update included** (`Use update/DLC` option), as 1.0 isn't supported.
**Nintendo Switch homebrew port specific info**
If you're running the homebrew port (drshorizon.nro) on your Switch, you can avoid the dumping step, doukutsu-rs will
automatically detect and mount the data files if you run it over Cave Story+ in Title Override mode (hold `R` while starting CS+ and launch d-rs from hbmenu).
You can put your own data files in `/switch/doukutsu-rs/data` directory on SD Card, which will be overlayed over RomFS if
you run it in setup described above.
</details>
#### Controls
Same controls as the default for freeware and Cave Story+ keyboard.
To change, use the control customization menu or edit `doukutsu-rs\data\settings.json` within your user directory.
| | P1 | P2 |
| ------------------------- | --------- | --------- |
| Movement | `← ↑ ↓ →` | `, L . /` |
| Jump | `Z` | `B` |
| Shoot | `X` | `N` |
| Cycle Weapon | `A and S` | `G and H` |
| Inventory / Skip cutscene | `Q` | `T` |
| Map | `W` | `Y` |
| Strafe | `LShift` | `RShift` |
- `Alt + Enter` - Toggle Fullscreen
- `F2` (While paused) - Quick Restart
#### Screenshots
<details>
<summary>Freeware</summary>
![JP Freeware 2](https://user-images.githubusercontent.com/53099651/155924461-c63afc93-a41f-4cfd-ac9f-8f021cebcb04.png)
![Toroko Fight Freeware](https://user-images.githubusercontent.com/53099651/155924215-d492907a-ed0e-4323-bd46-61745b8fb32a.png)
![No Lighting Freeware](https://user-images.githubusercontent.com/53099651/155923814-621cf29e-bb20-4680-a96d-f049aaef1f88.png)
</details>
<details>
<summary>Original CS+</summary>
![CS+ Sand Zone](https://user-images.githubusercontent.com/53099651/155923620-db230077-0df5-4de4-b086-be6b4dcbc6df.png)
![CS+ Showoff Outer Wall](https://user-images.githubusercontent.com/53099651/155920013-3967cd03-8d69-4fc5-8f1d-fe659ff2e953.png)
![CS+ Challenge](https://user-images.githubusercontent.com/53099651/155919381-7e8159a0-a7cf-461a-8be2-2ce864631299.png)
</details>
<details>
<summary>Remastered CS+</summary>
![Balcony Switch](https://user-images.githubusercontent.com/53099651/155918810-063c0f06-2d48-485f-8367-6337525deab7.png)
![Dogs Switch](https://github.com/doukutsu-rs/doukutsu-rs/assets/6276139/30ba01ae-375d-4488-98c4-98e3e8c7f187)
![Almond Switch](https://github.com/doukutsu-rs/doukutsu-rs/assets/6276139/42d4b6a3-4fc5-4aaf-9535-462c4c484dc7)
![Hell Switch](https://user-images.githubusercontent.com/53099651/155918602-62268274-c529-41c2-a87e-0c31e7874b94.png)
</details>
#### Credits
- Studio Pixel/Nicalis for Cave Story
- [Cave Story Tribute Site](https://cavestory.org) - has lots of useful resources related to the game.
- [CSE2](https://github.com/Clownacy/CSE2) - widescreen fixes, more readable reference for game logic, mutual help in various things.
- [LunarLambda for organism](https://gitdab.com/LunarLambda/organism) - which is being used by us as `.org` playback engine.
- Studio Pixel/Nicalis for Cave Story
- [AppleHair](https://github.com/AppleHair) - icon redesign for all platforms(`crabsue-icon`).
- [@Daedily](https://twitter.com/Daedliy) - brand artwork (Icon / Banner / Server), screenshots for this guide.
- [ggez](https://github.com/ggez/ggez) - parts of it are used in `crate::framework`, notably the VFS code.
- [Clownacy](https://github.com/Clownacy) - widescreen camera code.
- [LunarLambda for organism](https://github.com/doukutsu-rs/organism) - used as basis for our Organya playback engine.
- [Zoroyoshi](http://z.apps.atjp.jp/k12x10/) - k12x10 font we use as built-in font.

234
app/.gitignore vendored Normal file
View file

@ -0,0 +1,234 @@
# Created by https://www.toptal.com/developers/gitignore/api/androidstudio,gradle,android
# Edit at https://www.toptal.com/developers/gitignore?templates=androidstudio,gradle,android
### Android ###
# Built application files
*.apk
*.aar
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
### Android Patch ###
gen-external-apklibs
output.json
# Replacement of .externalNativeBuild directories introduced
# with Android Studio 3.5.
### Gradle ###
.gradle
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Cache of project
.gradletasknamecache
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
### Gradle Patch ###
**/build/
### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.
# Built application files
# Files for the ART/Dalvik VM
# Java class files
# Generated files
# Gradle files
# Signing files
.signing/
# Local configuration file (sdk path, etc)
# Proguard folder generated by Eclipse
# Log Files
# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
*.ipr
*~
*.swp
# Keystore files
*.jks
*.keystore
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Android Patch
# External native build folder generated in Android Studio 2.2 and later
# NDK
obj/
*.so
# IntelliJ IDEA
*.iws
/out/
# User-specific configurations
.idea/caches/
.idea/libraries/
.idea/shelf/
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/jarRepositories.xml
# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.war
*.ear
# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
hs_err_pid*
## Plugin-specific files:
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Mongo Explorer plugin
.idea/mongoSettings.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### AndroidStudio Patch ###
!/gradle/wrapper/gradle-wrapper.jar
# End of https://www.toptal.com/developers/gitignore/api/androidstudio,gradle,android
app/release/

1
app/app/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

148
app/app/build.gradle Normal file
View file

@ -0,0 +1,148 @@
plugins {
id 'com.android.application'
id 'com.github.willir.rust.cargo-ndk-android'
}
android {
namespace "io.github.doukutsu_rs"
/**
* NOTE: If you want to change the versions of packages required for the build
* (e.g. build tools, compile SDK, NDK) or add new ones,
* make the appropriate changes in packages.txt. Otherwise CI could break.
*/
compileSdkVersion 33
buildToolsVersion "33.0.0"
ndkVersion "25.2.9519653"
defaultConfig {
applicationId "io.github.doukutsu_rs"
minSdkVersion 24
targetSdkVersion 33
versionCode 3
versionName "0.102.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'arm64-v8a'
stl = "c++_shared"
}
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_shared"
}
}
def documentsAuthorityValue = applicationId + ".documents"
manifestPlaceholders = [documentsAuthority: documentsAuthorityValue]
buildConfigField "String",
"DOCUMENTS_AUTHORITY",
"\"${documentsAuthorityValue}\""
resValue "string", "app_name", "doukutsu-rs"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
stl = "c++_shared"
}
packagingOptions {
resources {
excludes += "**/DebugProbesKt.bin"
}
}
}
debug {
applicationIdSuffix ".debug"
resValue "string", "app_name", "doukutsu-rs (debug)"
jniDebuggable true
renderscriptDebuggable true
def documentsAuthorityValue =
android.defaultConfig.applicationId + applicationIdSuffix + ".documents"
manifestPlaceholders = [documentsAuthority: documentsAuthorityValue]
buildConfigField "String",
"DOCUMENTS_AUTHORITY",
"\"${documentsAuthorityValue}\""
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
}
}
packagingOptions {
jniLibs {
excludes += "**/dummy.so"
}
}
}
dependencies {
implementation 'androidx.annotation:annotation:1.5.0'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.core:core:1.9.0'
implementation 'com.google.android.material:material:1.8.0'
}
println("cargo target: ${project.buildDir.getAbsolutePath()}/rust-target")
println("ndk dir: ${android.ndkDirectory}")
cargoNdk {
librariesNames = ["libdrsandroid.so"]
module = "../drsandroid/"
extraCargoEnv = ["ANDROID_NDK_HOME": android.ndkDirectory]
extraCargoBuildArguments = []
verbose = true
buildTypes {
release {
buildType = "release"
extraCargoBuildArguments = ["--locked"]
targets = [
"arm64",
"arm",
"x86",
"x86_64"
]
}
debug {
buildType = "debug"
targets = [
"arm64"
]
}
}
}
tasks.whenTaskAdded { task ->
if (task.name == 'javaPreCompileDebug') {
task.dependsOn 'buildCargoNdkDebug'
}
if (task.name == 'javaPreCompileRelease') {
task.dependsOn 'buildCargoNdkRelease'
}
}

3
app/app/packages.txt Normal file
View file

@ -0,0 +1,3 @@
ndk;25.2.9519653
build-tools;33.0.0
platforms;android-33

21
app/app/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:appCategory="game"
android:description="@string/app_description"
android:extractNativeLibs="true"
android:icon="@mipmap/ic_launcher"
android:isGame="true"
android:label="@string/app_name"
android:resizeableActivity="false"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Doukutsurs">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:label="@string/app_name"
android:launchMode="standard"
android:screenOrientation="sensorLandscape"
android:theme="@style/Theme.Doukutsurs.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".DownloadActivity"
android:label="Download"
android:screenOrientation="sensorLandscape"
android:theme="@style/Theme.Doukutsurs.NoActionBar" />
<activity
android:name=".GameActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:launchMode="standard"
android:screenOrientation="sensorLandscape">
<meta-data
android:name="android.app.lib_name"
android:value="drsandroid" />
</activity>
<provider
android:name=".DoukutsuDocumentsProvider"
android:authorities="${applicationId}.documents"
android:exported="true"
android:grantUriPermissions="true"
android:permission="android.permission.MANAGE_DOCUMENTS">
<intent-filter>
<action android:name="android.content.action.DOCUMENTS_PROVIDER" />
</intent-filter>
</provider>
</application>
</manifest>

View file

@ -0,0 +1,53 @@
# Sets the minimum version of CMake required to build your native library.
# This ensures that a certain set of CMake features is available to
# your build.
project(doukutsu-rs)
cmake_minimum_required(VERSION 3.18)
# Copy shared STL files to Android Studio output directory so they can be
# packaged in the APK.
# Usage:
#
# find_package(ndk-stl REQUIRED)
#
# or
#
# find_package(ndk-stl REQUIRED PATHS ".")
#if(NOT ${ANDROID_STL} MATCHES "_shared")
# return()
#endif()
function(configure_shared_stl lib_path so_base)
message("Configuring STL ${so_base} for ${ANDROID_ABI}")
configure_file(
"${ANDROID_NDK}/toolchains/llvm/prebuilt/${ANDROID_HOST_TAG}/sysroot/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/lib${so_base}.so"
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${so_base}.so"
COPYONLY)
endfunction()
if("${ANDROID_STL}" STREQUAL "libstdc++")
# The default minimal system C++ runtime library.
elseif("${ANDROID_STL}" STREQUAL "gabi++_shared")
# The GAbi++ runtime (shared).
message(FATAL_ERROR "gabi++_shared was not configured by ndk-stl package")
elseif("${ANDROID_STL}" STREQUAL "stlport_shared")
# The STLport runtime (shared).
configure_shared_stl("stlport" "stlport_shared")
elseif("${ANDROID_STL}" STREQUAL "gnustl_shared")
# The GNU STL (shared).
configure_shared_stl("gnu-libstdc++/4.9" "gnustl_shared")
elseif("${ANDROID_STL}" STREQUAL "c++_shared")
# The LLVM libc++ runtime (static).
configure_shared_stl("llvm-libc++" "c++_shared")
else()
message(FATAL_ERROR "STL configuration ANDROID_STL=${ANDROID_STL} is not supported")
endif()
# Specifies a library name, specifies whether the library is STATIC or
# SHARED, and provides relative paths to the source code. You can
# define multiple libraries by adding multiple add_library() commands,
# and CMake builds them for you. When you build your app, Gradle
# automatically packages shared libraries with your APK.
add_library(dummy SHARED dummy.cpp)

View file

@ -0,0 +1,2 @@
void drs_dummy_export() {
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

View file

@ -0,0 +1,16 @@
package io.github.doukutsu_rs;
import android.app.Activity;
import android.view.Window;
import androidx.core.view.WindowCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.core.view.WindowInsetsControllerCompat;
public class ActivityUtils {
public static void hideSystemBars(Activity activity) {
Window window = activity.getWindow();
WindowInsetsControllerCompat windowInsetsController =
WindowCompat.getInsetsController(window, window.getDecorView());
windowInsetsController.hide(WindowInsetsCompat.Type.systemBars());
}
}

View file

@ -0,0 +1,355 @@
package io.github.doukutsu_rs;
import android.content.ContentResolver;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.database.MatrixCursor.RowBuilder;
import android.net.Uri;
import android.os.Build;
import android.os.CancellationSignal;
import android.os.ParcelFileDescriptor;
import android.provider.DocumentsContract;
import android.provider.DocumentsContract.Document;
import android.provider.DocumentsContract.Path;
import android.provider.DocumentsContract.Root;
import android.provider.DocumentsProvider;
import android.util.Log;
import android.webkit.MimeTypeMap;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.Files;
import java.util.LinkedList;
import static android.os.Build.VERSION.SDK_INT;
public class DoukutsuDocumentsProvider extends DocumentsProvider {
private final static String[] DEFAULT_ROOT_PROJECTION =
new String[]{
Root.COLUMN_DOCUMENT_ID,
Root.COLUMN_ROOT_ID,
Root.COLUMN_ICON,
Root.COLUMN_TITLE,
Root.COLUMN_MIME_TYPES,
Root.COLUMN_AVAILABLE_BYTES,
Root.COLUMN_FLAGS
};
private final static String[] DEFAULT_DOCUMENT_PROJECTION =
new String[]{
Document.COLUMN_DOCUMENT_ID,
Document.COLUMN_DISPLAY_NAME,
Document.COLUMN_SIZE,
Document.COLUMN_LAST_MODIFIED,
Document.COLUMN_MIME_TYPE,
Document.COLUMN_FLAGS
};
@Override
public Cursor queryRoots(String[] projection) throws FileNotFoundException {
File file = getContext().getFilesDir();
String id = file.getAbsolutePath();
Log.d(DoukutsuDocumentsProvider.class.getName(), "files dir location: " + id);
MatrixCursor result = new MatrixCursor(projection != null ?
projection : DEFAULT_ROOT_PROJECTION);
RowBuilder row = result.newRow();
row.add(Root.COLUMN_DOCUMENT_ID, id);
row.add(Root.COLUMN_ROOT_ID, id);
row.add(Root.COLUMN_ICON, R.mipmap.ic_launcher);
row.add(Root.COLUMN_TITLE,
getContext().getString(R.string.app_name));
row.add(Root.COLUMN_MIME_TYPES, "*/*");
row.add(Root.COLUMN_AVAILABLE_BYTES, file.getFreeSpace());
row.add(Root.COLUMN_FLAGS, Root.FLAG_SUPPORTS_IS_CHILD | Root.FLAG_SUPPORTS_CREATE);
return result;
}
@Override
public Cursor queryDocument(String documentId, String[] projection) throws FileNotFoundException {
MatrixCursor result = new MatrixCursor(projection != null ? projection : DEFAULT_DOCUMENT_PROJECTION);
Log.d("dupa", "queryDocument: " + documentId);
pushFile(result, new File(documentId));
return result;
}
@Override
public Cursor queryChildDocuments(String parentDocumentId, String[] projection, String sortOrder) throws FileNotFoundException {
MatrixCursor result = new MatrixCursor(projection != null ? projection : DEFAULT_DOCUMENT_PROJECTION);
File root = new File(parentDocumentId);
Log.d("dupa", "doc id:" + parentDocumentId);
if (!root.exists()) {
Log.d("dupa", "no such file");
throw new FileNotFoundException("No such file: " + root.getAbsolutePath());
}
if (!root.isDirectory()) {
Log.d("dupa", "not a directory");
return null;
}
File[] files = root.listFiles();
if (files != null) {
for (File file : files) {
pushFile(result, file);
}
}
result.setNotificationUri(getContext().getContentResolver(), DocumentsContract.buildDocumentUri(BuildConfig.DOCUMENTS_AUTHORITY, parentDocumentId));
return result;
}
@Override
public ParcelFileDescriptor openDocument(String documentId, String mode, @Nullable CancellationSignal signal) throws FileNotFoundException {
File file = new File(documentId);
int imode = ParcelFileDescriptor.parseMode(mode);
return ParcelFileDescriptor.open(file, imode);
}
@Override
public String createDocument(String parentDocumentId, String mimeType, String displayName) throws FileNotFoundException {
File file = new File(parentDocumentId, displayName);
if (file.exists()) {
int nextId = 1;
while (file.exists()) {
// maybe let's put the id before extension?
file = new File(parentDocumentId, String.format("%s (%d)", displayName, nextId));
++nextId;
}
}
try {
if (mimeType != null && mimeType.equals(Document.MIME_TYPE_DIR)) {
if (!file.mkdir()) {
throw new FileNotFoundException("Couldn't create directory: " + file.getAbsolutePath());
}
} else {
if (!file.createNewFile()) {
throw new FileNotFoundException("Couldn't create file: " + file.getAbsolutePath());
}
}
} catch (IOException e) {
throw new FileNotFoundException("Couldn't create file: " + e.getMessage());
}
Uri uri = DocumentsContract.buildDocumentUri(BuildConfig.DOCUMENTS_AUTHORITY, file.getParent());
if (SDK_INT >= Build.VERSION_CODES.R) {
getContext().getContentResolver().notifyChange(uri, null, ContentResolver.NOTIFY_INSERT);
} else {
getContext().getContentResolver().notifyChange(uri, null);
}
return file.getAbsolutePath();
}
@Override
public void deleteDocument(String documentId) throws FileNotFoundException {
File file = new File(documentId);
if (!file.exists()) {
throw new FileNotFoundException("Couldn't find file: " + file.getAbsolutePath());
}
deleteRecursive(file);
Uri uri = DocumentsContract.buildDocumentUri(BuildConfig.DOCUMENTS_AUTHORITY, file.getParent());
if (SDK_INT >= Build.VERSION_CODES.R) {
getContext().getContentResolver().notifyChange(uri, null, ContentResolver.NOTIFY_DELETE);
} else {
getContext().getContentResolver().notifyChange(uri, null);
}
}
@Override
@RequiresApi(Build.VERSION_CODES.O)
public Path findDocumentPath(@Nullable String parentDocumentId, String childDocumentId) throws FileNotFoundException {
if (parentDocumentId == null) {
parentDocumentId = getContext().getFilesDir().getAbsolutePath();
}
File childFile = new File(childDocumentId);
if (!childFile.exists()) {
throw new FileNotFoundException(childFile.getAbsolutePath()+" doesn't exist");
} else if (!isChildDocument(parentDocumentId, childDocumentId)) {
throw new FileNotFoundException(childDocumentId+" is not child of "+parentDocumentId);
}
LinkedList<String> path = new LinkedList<>();
while (childFile != null && isChildDocument(parentDocumentId, childFile.getAbsolutePath())) {
path.addFirst(childFile.getAbsolutePath());
childFile = childFile.getParentFile();
}
return new Path(parentDocumentId, path);
}
@Override
public String getDocumentType(String documentId) throws FileNotFoundException {
File file = new File(documentId);
if (!file.exists()) {
throw new FileNotFoundException("Couldn't find file: " + file.getAbsolutePath());
} else if (file.isDirectory()) {
return Document.MIME_TYPE_DIR;
} else if (file.isFile()) {
return getMimeType(file.getAbsolutePath());
}
return null;
}
@Override
public boolean onCreate() {
return true;
}
@Override
public boolean isChildDocument(String parentDocumentId, String documentId) {
return documentId.startsWith(parentDocumentId);
}
@Override
public String renameDocument(String documentId, String displayName) throws FileNotFoundException {
File file = new File(documentId);
if (!file.exists()) {
throw new FileNotFoundException("Couldn't find file: " + file.getAbsolutePath());
}
File newPath = new File(file.getParentFile().getAbsolutePath() + "/" + displayName);
try {
if (SDK_INT >= Build.VERSION_CODES.O) {
Files.move(file.toPath(), newPath.toPath());
} else {
if (!file.renameTo(newPath)) {
throw new IOException("Couldn't rename file: " + file.getAbsolutePath());
}
}
} catch (IOException e) {
throw new FileNotFoundException(e.getMessage());
}
Uri uri = DocumentsContract.buildDocumentUri(BuildConfig.DOCUMENTS_AUTHORITY, file.getParent());
if (SDK_INT >= Build.VERSION_CODES.R) {
getContext().getContentResolver().notifyChange(uri, null, ContentResolver.NOTIFY_UPDATE);
} else {
getContext().getContentResolver().notifyChange(uri, null);
}
return newPath.getAbsolutePath();
}
@Override
public void removeDocument(String documentId, String parentDocumentId) throws FileNotFoundException {
deleteDocument(documentId);
}
private static void deleteRecursive(File file) {
if (file.isDirectory()) {
File[] files = file.listFiles();
if (files != null) {
for (File f : files) {
if (SDK_INT >= Build.VERSION_CODES.O) {
if (!Files.isSymbolicLink(f.toPath())) {
deleteRecursive(f);
}
} else {
try {
if (!f.getAbsolutePath().equals(f.getCanonicalPath())) {
deleteRecursive(f);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
file.delete();
}
private static String getMimeType(String url) {
String type = null;
String extension = MimeTypeMap.getFileExtensionFromUrl(url.toLowerCase());
if (extension != null) {
switch (extension) {
case "pbm":
type = "image/bmp";
break;
case "yml":
type = "text/x-yaml";
break;
default:
type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
break;
}
}
if (type == null) {
type = "application/octet-stream";
}
return type;
}
private void pushFile(MatrixCursor result, File file) throws FileNotFoundException {
if (!file.exists()) {
throw new FileNotFoundException("Couldn't find file: " + file.getAbsolutePath());
}
String mimeType = "application/octet-stream";
int flags = 0;
if (file.isDirectory()) {
mimeType = Document.MIME_TYPE_DIR;
if (file.canWrite()) {
flags |= Document.FLAG_DIR_SUPPORTS_CREATE;
}
} else if (file.isFile()) {
mimeType = getMimeType(file.getAbsolutePath());
if (file.canWrite()) {
flags |= Document.FLAG_SUPPORTS_WRITE;
}
}
if (file.getParentFile().canWrite()) {
flags |= Document.FLAG_SUPPORTS_DELETE | Document.FLAG_SUPPORTS_RENAME;
}
RowBuilder row = result.newRow();
row.add(Document.COLUMN_DOCUMENT_ID, file.getAbsolutePath());
row.add(Document.COLUMN_DISPLAY_NAME, file.getName());
row.add(Document.COLUMN_SIZE, file.length());
row.add(Document.COLUMN_LAST_MODIFIED, file.lastModified());
row.add(Document.COLUMN_FLAGS, flags);
row.add(Document.COLUMN_MIME_TYPE, mimeType);
row.add(Document.COLUMN_ICON, R.mipmap.ic_launcher);
}
}

View file

@ -0,0 +1,201 @@
package io.github.doukutsu_rs;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class DownloadActivity extends AppCompatActivity {
private TextView txtProgress;
private ProgressBar progressBar;
private DownloadThread downloadThread;
private String basePath;
private Handler handler = new Handler();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_download);
txtProgress = findViewById(R.id.txtProgress);
progressBar = findViewById(R.id.progressBar);
ActivityUtils.hideSystemBars(this);
basePath = getFilesDir().getAbsolutePath() + "/";
downloadThread = new DownloadThread();
downloadThread.start();
}
@Override
protected void onDestroy() {
super.onDestroy();
downloadThread.interrupt();
}
private class DownloadThread extends Thread {
private final ArrayList<DownloadEntry> urls = new ArrayList<>();
private final ArrayList<String> filesWhitelist = new ArrayList<>();
@Override
public void run() {
this.filesWhitelist.add("data/");
this.filesWhitelist.add("Doukutsu.exe");
// DON'T SET `true` VALUE FOR TRANSLATIONS
this.urls.add(new DownloadEntry(R.string.download_entries_base, "https://www.cavestory.org/downloads/cavestoryen.zip", true));
for (DownloadEntry entry : this.urls) {
this.download(entry);
}
}
private void download(DownloadEntry downloadEntry) {
HttpURLConnection connection = null;
try {
URL url = new URL(downloadEntry.url);
connection = (HttpURLConnection) url.openConnection();
connection.connect();
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
throw new IllegalStateException(getString(R.string.download_status_error_http, connection.getResponseCode()));
}
int fileLength = connection.getContentLength();
if (fileLength == 0) {
handler.post(() -> progressBar.setIndeterminate(true));
}
byte[] zipFile;
{
InputStream input = new BufferedInputStream(connection.getInputStream());
ByteArrayOutputStream output = new ByteArrayOutputStream();
int downloadedLast = 0;
int downloaded = 0;
byte[] buffer = new byte[4096];
int count;
long last = System.currentTimeMillis();
while ((count = input.read(buffer)) != -1) {
downloaded += count;
output.write(buffer, 0, count);
long now = System.currentTimeMillis();
if (last + 1000 >= now) {
int speed = (int) ((downloaded - downloadedLast) / 1024.0);
String text = (fileLength > 0)
? getString(R.string.download_status_downloading, downloadEntry.name, downloaded * 100 / fileLength, downloaded / 1024, fileLength / 1024, speed)
: getString(R.string.download_status_downloading_null, downloadEntry.name, downloaded / 1024, speed);
handler.post(() -> txtProgress.setText(text));
downloadedLast = downloaded;
last = now;
}
}
output.flush();
zipFile = output.toByteArray();
output.close();
}
new File(basePath).mkdirs();
this.unpack(zipFile, downloadEntry.isBase);
handler.post(() -> txtProgress.setText(getString(R.string.download_status_done)));
handler.post(() -> {
Intent intent = new Intent(DownloadActivity.this, GameActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
DownloadActivity.this.finish();
});
} catch (Exception e) {
handler.post(() -> {
if (txtProgress != null)
txtProgress.setText(e.getMessage());
});
e.printStackTrace();
} finally {
if (connection != null) connection.disconnect();
}
}
private void unpack(byte[] zipFile, boolean isBase) throws IOException {
ZipInputStream in = new ZipInputStream(new ByteArrayInputStream(zipFile));
ZipEntry entry;
byte[] buffer = new byte[4096];
while ((entry = in.getNextEntry()) != null) {
String entryName = entry.getName();
// strip prefix
if (entryName.startsWith("CaveStory/")) {
entryName = entryName.substring("CaveStory/".length());
}
if (!this.entryInWhitelist(entryName)) {
continue;
}
final String s = entryName;
handler.post(() -> txtProgress.setText(
getString(R.string.download_status_unpacking, s)
));
if (entry.isDirectory()) {
new File(basePath + entryName).mkdirs();
} else {
try (FileOutputStream fos = new FileOutputStream(basePath + entryName)) {
int count;
while ((count = in.read(buffer)) != -1) {
fos.write(buffer, 0, count);
}
}
}
in.closeEntry();
}
}
private boolean entryInWhitelist(String entry) {
for (String file : this.filesWhitelist) {
if (entry.startsWith(file)) {
return true;
}
}
return false;
}
}
private class DownloadEntry {
public String name; //e.g. "Polish translation", "Base data files"
public String url;
public boolean isBase = false;
DownloadEntry(String name, String url, boolean isBase) {
this.name = name;
this.url = url;
this.isBase = isBase;
}
DownloadEntry(int name, String url, boolean isBase) {
this.name = getString(name);
this.url = url;
this.isBase = isBase;
}
}
}

View file

@ -0,0 +1,118 @@
package io.github.doukutsu_rs;
import android.app.NativeActivity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.content.res.Configuration;
import android.hardware.SensorManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.DocumentsContract;
import android.view.OrientationEventListener;
import android.view.WindowInsets;
import android.widget.Toast;
import java.io.File;
import static android.os.Build.VERSION.SDK_INT;
public class GameActivity extends NativeActivity {
private int[] displayInsets = new int[]{0, 0, 0, 0};
private OrientationEventListener listener;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityUtils.hideSystemBars(this);
listener = new OrientationEventListener(this, SensorManager.SENSOR_DELAY_UI) {
@Override
public void onOrientationChanged(int orientation) {
GameActivity.this.updateCutouts();
}
};
if (listener.canDetectOrientation()) {
listener.enable();
} else {
listener = null;
}
}
@Override
protected void onDestroy() {
super.onDestroy();
if (listener != null) {
listener.disable();
listener = null;
}
}
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
this.updateCutouts();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
this.updateCutouts();
}
private void updateCutouts() {
this.displayInsets[0] = 0;
this.displayInsets[1] = 0;
this.displayInsets[2] = 0;
this.displayInsets[3] = 0;
WindowInsets insets = getWindow().getDecorView().getRootWindowInsets();
if (insets != null) {
this.displayInsets[0] = Math.max(this.displayInsets[0], insets.getStableInsetLeft());
this.displayInsets[1] = Math.max(this.displayInsets[1], insets.getStableInsetTop());
this.displayInsets[2] = Math.max(this.displayInsets[2], insets.getStableInsetRight());
this.displayInsets[3] = Math.max(this.displayInsets[3], insets.getStableInsetBottom());
} else {
return;
}
if (SDK_INT >= Build.VERSION_CODES.P) {
android.view.DisplayCutout cutout = insets.getDisplayCutout();
if (cutout != null) {
this.displayInsets[0] = Math.max(this.displayInsets[0], cutout.getSafeInsetLeft());
this.displayInsets[1] = Math.max(this.displayInsets[0], cutout.getSafeInsetTop());
this.displayInsets[2] = Math.max(this.displayInsets[0], cutout.getSafeInsetRight());
this.displayInsets[3] = Math.max(this.displayInsets[0], cutout.getSafeInsetBottom());
}
}
}
public void openDir(String path) {
Uri uri = DocumentsContract.buildDocumentUri(BuildConfig.DOCUMENTS_AUTHORITY, path);
File file = new File(path);
if (!file.isDirectory()) {
Toast.makeText(getApplicationContext(), R.string.dir_not_found, Toast.LENGTH_LONG).show();
return;
}
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setDataAndType(uri, DocumentsContract.Document.MIME_TYPE_DIR);
intent.setFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION | Intent.FLAG_GRANT_PREFIX_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
try {
startActivity(intent);
} catch(ActivityNotFoundException e) {
Toast.makeText(getApplicationContext(), R.string.no_app_found_to_open_dir, Toast.LENGTH_LONG).show();
}
}
}

View file

@ -0,0 +1,51 @@
package io.github.doukutsu_rs;
import android.app.AlertDialog;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import java.io.File;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ActivityUtils.hideSystemBars(this);
File f = new File(getFilesDir().getAbsolutePath() + "/data/");
String[] list = f.list();
if (!f.exists() || (list != null && list.length == 0)) {
messageBox(getString(R.string.missing_data_title), getString(R.string.missing_data_desc), () -> {
Intent intent = new Intent(this, DownloadActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
this.finish();
}, this::launchGame);
} else {
launchGame();
}
}
private void launchGame() {
Intent intent = new Intent(this, GameActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
this.finish();
}
private void messageBox(String title, String message, Runnable yesCallback, Runnable noCallback) {
this.runOnUiThread(() -> {
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle(title);
alert.setMessage(message);
alert.setPositiveButton(android.R.string.yes, (dialog, whichButton) -> yesCallback.run());
alert.setNegativeButton(android.R.string.no, (dialog, whichButton) -> noCallback.run());
alert.setCancelable(false);
alert.show();
});
}
}

View file

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="@color/ic_launcher_background"
android:pathData="M0,0h108v108h-108z" />
</vector>

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".DownloadActivity">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:layout_marginStart="32dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/txtTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/download_title"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Display1" />
<TextView
android:id="@+id/txtProgress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="..."
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/icon_sue_background"/>
<foreground android:drawable="@mipmap/icon_sue_foreground"/>
</adaptive-icon>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/icon_sue_background"/>
<foreground android:drawable="@mipmap/icon_sue_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Doukutsurs" parent="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen">
<item name="android:windowLayoutInDisplayCutoutMode">
shortEdges
</item>
</style>
</resources>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>

View file

@ -0,0 +1,3 @@
<resources>
<dimen name="fab_margin">16dp</dimen>
</resources>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FD7F44</color>
<color name="icon_sue_background">#FD7F44</color>
</resources>

View file

@ -0,0 +1,20 @@
<resources>
<string name="app_description">A faithful and open-source remake of Cave Story engine written in Rust.</string>
<string name="missing_data_title">Missing data files</string>
<string name="missing_data_desc">No data files found, would you like to download them?</string>
<string name="download_title">Downloading game data</string>
<string name="download_status_error_http">Bad HTTP response code: %d</string>
<!-- Downloading {entry_name}… {progress}% ({downloaded_size}/{total_size} KiB, {speed} KiB/s) -->
<string name="download_status_downloading">Downloading %1$s… %2$d%% (%3$d/%4$d KiB, %5$d KiB/s)</string>
<string name="download_status_downloading_null">Downloading %1$s… --%% (%2$d KiB, %3$d KiB/s)</string>
<string name="download_status_unpacking">Unpacking: %s</string>
<string name="download_status_done">Done!</string>
<!-- Look {entry_name} on 9th line -->
<string name="download_entries_base">base game files</string>
<string name="dir_not_found">Dir not found</string>
<string name="no_app_found_to_open_dir">No app found to open dir</string>
</resources>

View file

@ -0,0 +1,15 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Doukutsurs" parent="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen">
</style>
<style name="Theme.Doukutsurs.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.Doukutsurs.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="Theme.Doukutsurs.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
</resources>

28
app/build.gradle Normal file
View file

@ -0,0 +1,28 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.android.tools.build:gradle:7.3.1"
classpath "gradle.plugin.com.github.willir.rust:plugin:0.3.4"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

17
app/gradle.properties Normal file
View file

@ -0,0 +1,17 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true

BIN
app/gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View file

@ -0,0 +1,6 @@
#Wed Feb 17 23:16:31 CET 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

172
app/gradlew vendored Executable file
View file

@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

84
app/gradlew.bat vendored Normal file
View file

@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

2
app/settings.gradle Normal file
View file

@ -0,0 +1,2 @@
rootProject.name = "doukutsu-rs"
include ':app'

37
build.rs Normal file
View file

@ -0,0 +1,37 @@
use std::env;
#[cfg(target_os = "windows")]
extern crate winres;
fn main() {
// let dest = PathBuf::from(&env::var("OUT_DIR").unwrap());
let target = env::var("TARGET").unwrap_or_else(|e| panic!("{}", e));
println!("cargo:rerun-if-changed=build.rs");
#[cfg(target_os = "windows")]
if target.contains("windows") {
let mut res = winres::WindowsResource::new();
res.set_icon("res/crabsue-icon.ico");
res.compile().unwrap();
if target.contains("i686") {
// hack
println!("cargo:rustc-link-arg=/FORCE:MULTIPLE");
println!("cargo:rustc-link-lib=shlwapi");
}
}
if target.contains("darwin") {
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.15");
println!("cargo:rustc-link-arg=-weak_framework");
println!("cargo:rustc-link-arg=GameController");
println!("cargo:rustc-link-arg=-weak_framework");
println!("cargo:rustc-link-arg=CoreHaptics");
}
if target.contains("android") {
println!("cargo:rustc-link-lib=dylib=GLESv2");
println!("cargo:rustc-link-lib=dylib=EGL");
}
}

2756
drsandroid/Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

20
drsandroid/Cargo.toml Normal file
View file

@ -0,0 +1,20 @@
[package]
name = "drsandroid"
description = "doukutsu-rs targeted for Android"
version = "0.1.0"
edition = "2021"
[profile.release]
opt-level = 3
lto = "off"
codegen-units = 256
incremental = true
[lib]
crate-type = ["cdylib"]
[dependencies]
ndk = "0.7"
ndk-glue = "0.7"
ndk-sys = "0.4"
doukutsu-rs = { path = "../", default-features = false, features = ["default-base", "backend-glutin", "webbrowser"] }

11
drsandroid/src/lib.rs Normal file
View file

@ -0,0 +1,11 @@
#[cfg(target_os = "android")]
#[cfg_attr(target_os = "android", ndk_glue::main())]
pub fn android_main() {
let resource_dir = std::path::PathBuf::from(ndk_glue::native_activity().internal_data_path().to_string_lossy().to_string());
std::env::set_current_dir(&resource_dir).unwrap();
let options = doukutsu_rs::game::LaunchOptions::default();
doukutsu_rs::game::init(options).unwrap();
}

9
drshorizon/.cargo/config Normal file
View file

@ -0,0 +1,9 @@
[build]
target = ["aarch64-nintendo-switch"]
[target.aarch64-nintendo-switch]
cc = {path = "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc"}
cxx = {path = "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++"}
ar = "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-ar"
ranlib = {path = "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-ranlib"}
linker = "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc"

1674
drshorizon/Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

31
drshorizon/Cargo.toml Normal file
View file

@ -0,0 +1,31 @@
[package]
name = "drshorizon"
description = "doukutsu-rs targeted for Nintendo Switch"
version = "0.1.0"
edition = "2021"
[profile.release]
opt-level = 3
codegen-units = 256
incremental = true
[profile.dev]
opt-level = 3
lto = "off"
overflow-checks = false
codegen-units = 256
incremental = true
[profile.dev.package."*"]
opt-level = 3
overflow-checks = false
incremental = true
[profile.dev.package."doukutsu-rs"]
opt-level = 3
overflow-checks = false
codegen-units = 256
incremental = true
[dependencies]
doukutsu-rs = { path = "../", default-features = false, features = ["default-base", "backend-horizon"] }

3
drshorizon/README.md Normal file
View file

@ -0,0 +1,3 @@
Experimental.
ld script and .specs taken from devkitPro

View file

@ -0,0 +1,45 @@
{
"arch": "aarch64",
"data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
"dynamic-linking": true,
"disable-redzone": true,
"env": "newlib",
"executables": true,
"exe-suffix": ".elf",
"features": "+a57,+strict-align,+crc,+crypto",
"has-rpath": false,
"has-thread-local": false,
"linker": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc",
"linker-flavor": "gcc",
"llvm-target": "aarch64-unknown-none",
"max-atomic-width": 128,
"no-default-libraries": false,
"os": "horizon",
"panic-strategy": "abort",
"position-independent-executables": true,
"pre-link-args": {
"gcc": [
"-fPIC",
"-specs",
"aarch64_nintendo_switch.specs",
"-T",
"aarch64_nintendo_switch.ld",
"-L",
"/opt/devkitpro/portlibs/switch/lib",
"-L",
"/opt/devkitpro/libnx/lib",
"-I",
"/opt/devkitpro/libnx/include"
]
},
"relocation-model": "pic",
"requires-uwtable": true,
"target-c-int-width": "32",
"target-endian": "little",
"target-family": [
"unix"
],
"target-pointer-width": "64",
"trap-unreachable": true,
"vendor": "nintendo"
}

View file

@ -0,0 +1,200 @@
OUTPUT_ARCH(aarch64)
ENTRY(_start)
PHDRS
{
code PT_LOAD FLAGS(5) /* Read | Execute */;
rodata PT_LOAD FLAGS(4) /* Read */;
data PT_LOAD FLAGS(6) /* Read | Write */;
dyn PT_DYNAMIC;
}
SECTIONS
{
/* =========== CODE section =========== */
PROVIDE(__start__ = 0x0);
. = __start__;
__code_start = . ;
.text :
{
HIDDEN(__text_start = .);
KEEP (*(.crt0))
*(.text.unlikely .text.*_unlikely .text.unlikely.*)
*(.text.exit .text.exit.*)
*(.text.startup .text.startup.*)
*(.text.hot .text.hot.*)
*(.text .stub .text.* .gnu.linkonce.t.*)
. = ALIGN(8);
} :code
.init :
{
KEEP( *(.init) )
. = ALIGN(8);
} :code
.plt :
{
*(.plt)
*(.iplt)
. = ALIGN(8);
} :code
.fini :
{
KEEP( *(.fini) )
. = ALIGN(8);
} :code
/* =========== RODATA section =========== */
. = ALIGN(0x1000);
__rodata_start = . ;
.nx-module-name : { KEEP (*(.nx-module-name)) } :rodata
.rodata :
{
*(.rodata .rodata.* .gnu.linkonce.r.*)
. = ALIGN(8);
} :rodata
.eh_frame_hdr : { __eh_frame_hdr_start = .; *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) __eh_frame_hdr_end = .; } :rodata
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } :rodata
.gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } :rodata
.gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } : rodata
HIDDEN(__dynamic_start = .);
.dynamic : { *(.dynamic) } :rodata :dyn
.dynsym : { *(.dynsym) } :rodata
.dynstr : { *(.dynstr) } :rodata
.rela.dyn : { *(.rela.*) } :rodata
.interp : { *(.interp) } :rodata
.hash : { *(.hash) } :rodata
.gnu.hash : { *(.gnu.hash) } :rodata
.gnu.version : { *(.gnu.version) } :rodata
.gnu.version_d : { *(.gnu.version_d) } :rodata
.gnu.version_r : { *(.gnu.version_r) } :rodata
.note.gnu.build-id : { *(.note.gnu.build-id) } :rodata
/* =========== DATA section =========== */
. = ALIGN(0x1000);
__data_start = . ;
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } :data
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } :data
.gnu_extab : ONLY_IF_RW { *(.gnu_extab*) } : data
.exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } :data
.tdata ALIGN(8) :
{
__tdata_lma = .;
*(.tdata .tdata.* .gnu.linkonce.td.*)
. = ALIGN(8);
__tdata_lma_end = .;
} :data
.tbss ALIGN(8) :
{
*(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
. = ALIGN(8);
} :data
.preinit_array ALIGN(8) :
{
PROVIDE (__preinit_array_start = .);
KEEP (*(.preinit_array))
PROVIDE (__preinit_array_end = .);
} :data
.init_array ALIGN(8) :
{
PROVIDE (__init_array_start = .);
KEEP( *(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)) )
KEEP( *(.init_array .ctors) )
PROVIDE (__init_array_end = .);
} :data
.fini_array ALIGN(8) :
{
PROVIDE (__fini_array_start = .);
KEEP( *(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)) )
KEEP( *(.fini_array .dtors) )
PROVIDE (__fini_array_end = .);
} :data
__got_start__ = .;
.got : { *(.got) *(.igot) } :data
.got.plt : { *(.got.plt) *(.igot.plt) } :data
__got_end__ = .;
.data ALIGN(8) :
{
*(.data .data.* .gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
} :data
__bss_start__ = .;
.bss ALIGN(8) :
{
HIDDEN(__bss_start = .);
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(8);
/* Reserve space for the TLS segment of the main thread */
__tls_start = .;
. += + SIZEOF(.tdata) + SIZEOF(.tbss);
__tls_end = .;
HIDDEN(__bss_end = .);
} :data
__bss_end__ = .;
__end__ = ABSOLUTE(.) ;
. = ALIGN(0x1000);
__argdata__ = ABSOLUTE(.) ;
/* ==================
==== Metadata ====
================== */
/* Discard sections that difficult post-processing */
/DISCARD/ : { *(.group .comment .note) }
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
}

View file

@ -0,0 +1,8 @@
%rename link old_link
*link:
%(old_link) -pie --no-dynamic-linker --spare-dynamic-tags=0 -z text -z nodynamic-undefined-weak --build-id=sha1 --nx-module-name
*startfile:
crti%O%s crtbegin%O%s --require-defined=main

5
drshorizon/build.rs Normal file
View file

@ -0,0 +1,5 @@
fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rustc-link-lib=dylib=nx");
}

33
drshorizon/build_debug.sh Executable file
View file

@ -0,0 +1,33 @@
#!/bin/bash
cd "$(dirname "$0")" || exit
set -e
DARK_GRAY=$(tput setaf 8)
YELLOW=$(tput bold)$(tput setaf 3)
RESET=$(tput sgr0)
function message() {
echo "${DARK_GRAY}----${RESET} ${YELLOW}$*${RESET}"
}
message "Compiling shaders..."
uam -s vert -o ../src/framework/shaders/deko3d/vertex_basic.dksh ../src/framework/shaders/deko3d/vertex_basic.glsl
uam -s frag -o ../src/framework/shaders/deko3d/fragment_textured.dksh ../src/framework/shaders/deko3d/fragment_textured.glsl
uam -s frag -o ../src/framework/shaders/deko3d/fragment_color.dksh ../src/framework/shaders/deko3d/fragment_color.glsl
message "Building crate..."
rustup run rust-switch cargo build -Z build-std=core,alloc,std,panic_abort --target aarch64-nintendo-switch.json
rm -f target/aarch64-nintendo-switch/debug/drshorizon.nro
rm -f target/aarch64-nintendo-switch/debug/drshorizon.nacp
message "Creating NACP..."
nacptool --create 'doukutsu-rs' 'doukutsu-rs contributors' '0.102.0' target/aarch64-nintendo-switch/debug/drshorizon.nacp
message "Running elf2nro..."
elf2nro target/aarch64-nintendo-switch/debug/drshorizon.elf target/aarch64-nintendo-switch/debug/drshorizon.nro \
--icon=../res/crabsue-icon.jpg \
--nacp=target/aarch64-nintendo-switch/debug/drshorizon.nacp
message "done!"

33
drshorizon/build_release.sh Executable file
View file

@ -0,0 +1,33 @@
#!/bin/bash
cd "$(dirname "$0")" || exit
set -e
DARK_GRAY=$(tput setaf 8)
YELLOW=$(tput bold)$(tput setaf 3)
RESET=$(tput sgr0)
function message() {
echo "${DARK_GRAY}----${RESET} ${YELLOW}$*${RESET}"
}
message "Compiling shaders..."
uam -s vert -o ../src/framework/shaders/deko3d/vertex_basic.dksh ../src/framework/shaders/deko3d/vertex_basic.glsl
uam -s frag -o ../src/framework/shaders/deko3d/fragment_textured.dksh ../src/framework/shaders/deko3d/fragment_textured.glsl
uam -s frag -o ../src/framework/shaders/deko3d/fragment_color.dksh ../src/framework/shaders/deko3d/fragment_color.glsl
message "Building crate..."
rustup run rust-switch cargo build -Z build-std=core,alloc,std,panic_abort --target aarch64-nintendo-switch.json --release
rm -f target/aarch64-nintendo-switch/release/drshorizon.nro
rm -f target/aarch64-nintendo-switch/release/drshorizon.nacp
message "Creating NACP..."
nacptool --create 'doukutsu-rs' 'doukutsu-rs contributors' '0.102.0' target/aarch64-nintendo-switch/release/drshorizon.nacp
message "Running elf2nro..."
elf2nro target/aarch64-nintendo-switch/release/drshorizon.elf target/aarch64-nintendo-switch/release/drshorizon.nro \
--icon=../res/crabsue-icon.jpg \
--nacp=target/aarch64-nintendo-switch/release/drshorizon.nacp
message "done!"

47
drshorizon/src/main.rs Normal file
View file

@ -0,0 +1,47 @@
//#![feature(restricted_std)]
#[repr(C)]
pub struct PrintConsole {}
#[repr(C)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub enum ApmCpuBoostMode {
Normal = 0,
FastLoad = 1,
}
extern "C" {
fn consoleInit(unk: *mut PrintConsole) -> *mut PrintConsole;
fn consoleUpdate(unk: *mut PrintConsole);
fn socketInitialize(unk: *const std::ffi::c_void) -> u32;
fn nxlinkConnectToHost(redir_stdout: bool, redir_stderr: bool) -> i32;
fn appletSetCpuBoostMode(mode: ApmCpuBoostMode) -> u32;
static __text_start: u32;
}
fn main() {
unsafe {
// if socketInitialize(std::ptr::null()) == 0 {
// nxlinkConnectToHost(true, true);
// }
// appletSetCpuBoostMode(ApmCpuBoostMode::FastLoad);
std::env::set_var("RUST_BACKTRACE", "full");
println!("__text_start = {:#x}", (&__text_start) as *const _ as usize);
let options = doukutsu_rs::game::LaunchOptions::default();
let result = doukutsu_rs::game::init(options);
if let Err(e) = result {
println!("Initialization error: {}", e);
loop {
std::thread::sleep(std::time::Duration::from_millis(100));
}
}
}
}

51
drshorizon/symbolize.js Normal file
View file

@ -0,0 +1,51 @@
// <reference types="node" />
const readline = require('readline');
const childProcess = require('child_process');
const rl = readline.createInterface({
input: process.stdin,
terminal: false
});
let textStart = 0;
const textStartRegex = /__text_start = 0x([0-9a-f]+)/i;
let symbolize = false;
if (process.argv.length <= 2) {
console.error('Usage: node symbolize.js <path to ELF file>');
process.exit(1);
}
const elfPath = process.argv[2];
rl.on('line', (line) => {
if (textStart === 0) {
const match = textStartRegex.exec(line);
if (match) {
textStart = parseInt(match[1], 16);
}
}
if (line.includes("stack backtrace:")) {
symbolize = true;
}
if (symbolize) {
const match = /0x([0-9a-f]+) - \<unknown\>/.exec(line);
if (match) {
const addr = parseInt(match[1], 16);
const relative = addr - textStart;
// run addr2line on the address
const addr2line = childProcess.spawnSync('addr2line', ['-e', elfPath, '-j', '.text', '-f', '-C', '0x' + relative.toString(16)]);
if (addr2line.status === 0) {
const output = addr2line.stdout.toString();
const lines = output.split('\n');
const [func, file] = lines;
line = line.replace(match[0], `0x${addr.toString(16)} - ${func} (${file})`);
}
}
}
console.log(line);
});

View file

@ -0,0 +1,113 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "JSON schema for doukutsu-rs .dskinmeta files.",
"type": "object",
"properties": {
"name": {
"description": "Name of the skin.",
"type": "string"
},
"description": {
"description": "Optional description of the skin.",
"type": "string"
},
"author": {
"description": "Optional author of the skin.",
"type": "string"
},
"gunOffsetX": {
"description": "Weapon offset from center in X axis.",
"type": "number",
"minimum": -32768,
"maximum": 32767
},
"gunOffsetY": {
"description": "Weapon offset from center in Y axis.",
"type": "number",
"minimum": -32768,
"maximum": 32767
},
"frameSizeWidth": {
"description": "Width of skin animation frame.",
"type": "number",
"minimum": 0,
"maximum": 256
},
"frameSizeHeight": {
"description": "Height of skin animation frame.",
"type": "number",
"minimum": 0,
"maximum": 256
},
"hitBox": {
"description": "Hit box of the skin. A [front, up, back, down] tuple specifying offsets from center in pixels (as in 1/16 of vanilla tile size, 0x200 as internal fix9 number).",
"type": "array",
"minItems": 4,
"maxItems": 4,
"items": [
{
"type": "number",
"minimum": 0,
"maximum": 65535
},
{
"type": "number",
"minimum": 0,
"maximum": 65535
},
{
"type": "number",
"minimum": 0,
"maximum": 65535
},
{
"type": "number",
"minimum": 0,
"maximum": 65535
}
]
},
"displayBox": {
"description": "Display box of the skin. A [front, up, back, down] tuple specifying offsets from center in pixels (as in 1/16 of vanilla tile size, 0x200 as internal fix9 number).",
"type": "array",
"minItems": 4,
"maxItems": 4,
"items": [
{
"type": "number",
"minimum": 0,
"maximum": 65535
},
{
"type": "number",
"minimum": 0,
"maximum": 65535
},
{
"type": "number",
"minimum": 0,
"maximum": 65535
},
{
"type": "number",
"minimum": 0,
"maximum": 65535
}
]
},
"custom": {
"description": "This field contains an optional object, meant for storing additional metadata not covered by this specification. Any keys with names that are unrecognized by application which is currently parsing the file must be ignored. To avoid value conflicts, we suggest attaching a prefix to every custom key eg. \"d-rs__gun_hitbox\".",
"type": "object"
},
"version": {
"type": "number",
"enum": [
1
]
}
},
"required": [
"name",
"version"
]
}

View file

@ -0,0 +1,33 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "JSON schema for texture sizes",
"type": "object",
"properties": {
"sizes": {
"description": "List of textures and their sizes to prevent accidental scaling being applied",
"type": "object",
"patternProperties": {
"^.*$": {
"description": "Location and Width/Height of texture",
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": [
{
"type": "number",
"minimum": 0,
"maximum": 65535
},
{
"type": "number",
"minimum": 0,
"maximum": 65535
}
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}

View file

@ -0,0 +1 @@
curl -o ./src/data/builtin/gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt

BIN
res/crabsue-icon.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
res/crabsue-icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

BIN
res/crabsue-icon.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Some files were not shown because too many files have changed in this diff Show more