Cleanup
This commit is contained in:
parent
9b572190de
commit
0c97d554ae
46
README.md
46
README.md
|
@ -132,26 +132,7 @@ The archive from Humble Bundle contains the necessary `data` folder, in the same
|
||||||
<details>
|
<details>
|
||||||
<summary>WiiWare</summary>
|
<summary>WiiWare</summary>
|
||||||
|
|
||||||
Tools required:
|
Extract the `.wad` in order to get valid [Cave Story assets](https://user-images.githubusercontent.com/53099651/159585593-43fead24-b041-48f4-8332-be50d712310d.png)
|
||||||
* [ShowMiiWads](https://github.com/WiiDatabase/showmiiwads-mod/releases/tag/v1.5.2)
|
|
||||||
* [QuickBMS](http://aluigi.altervista.org/papers/quickbms.zip)
|
|
||||||
* A full version WiiWare `.wad` ([Extraction guide](https://wii.guide/dump-wads.html))
|
|
||||||
* This `script.bms`:
|
|
||||||
```
|
|
||||||
get name FILENAME
|
|
||||||
get zsize asize
|
|
||||||
comtype lz77wii
|
|
||||||
clog name 0 zsize zsize
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Run ShowMiiWads and open the folder containing your `.wad`.
|
|
||||||
2. Right click the `.wad` and hit `Extract` > `To Folder` and choose an output folder.
|
|
||||||
3. Now go to `Tools` > `Unpack u8 Archive`, find your and select `00000002.app` and choose an output folder.
|
|
||||||
4. Run QuickBMS with the following command, changing each path to where `script.bms` and `.app` output are located
|
|
||||||
```
|
|
||||||
quickbms.exe -D script_path\script.bms input_path\00000002_app_OUT\data output_path\data
|
|
||||||
```
|
|
||||||
5. Verify `output_path\data` folder contains valid [Cave Story assets](https://user-images.githubusercontent.com/53099651/159585593-43fead24-b041-48f4-8332-be50d712310d.png)
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
@ -164,19 +145,7 @@ Interchanging the save files may result in spawning in wrong locations, softlock
|
||||||
<details>
|
<details>
|
||||||
<summary>Nintendo Switch</summary>
|
<summary>Nintendo Switch</summary>
|
||||||
|
|
||||||
(Only 1.2+ has been tested, earlier versions may not work properly due to lack of 2P/Original Graphics support.)
|
Extract the `data` folder directly from the ROM.
|
||||||
|
|
||||||
Your interest is only in `data` directory placed in romfs.
|
|
||||||
|
|
||||||
Requires a hackable/modchipped console. If you got your Switch early, it's likely that it's hackable so give it a shot -
|
|
||||||
just be very careful to not get your console banned. There's tons of guides you can easily find online so we won't cover
|
|
||||||
it there.
|
|
||||||
|
|
||||||
You can dump the ROM (or just dump the romfs directly but it's just a bit slow so we recommend doing it on PC instead)
|
|
||||||
using [nxdumptool](https://github.com/DarkMatterCore/nxdumptool).
|
|
||||||
|
|
||||||
Once you got the keys and ROM dumped you can use the romfs extraction feature in Ryujinx or yuzu emulators to grab the
|
|
||||||
data files.
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
@ -185,8 +154,6 @@ data files.
|
||||||
Same controls as the default for freeware and Cave Story+ keyboard.
|
Same controls as the default for freeware and Cave Story+ keyboard.
|
||||||
|
|
||||||
To change, edit `doukutsu-rs\data\settings.json` within your user directory.
|
To change, edit `doukutsu-rs\data\settings.json` within your user directory.
|
||||||
<details>
|
|
||||||
<summary>Default Controls</summary>
|
|
||||||
|
|
||||||
| | P1 | P2 |
|
| | P1 | P2 |
|
||||||
|--------------|-----------|-----------|
|
|--------------|-----------|-----------|
|
||||||
|
@ -198,16 +165,9 @@ To change, edit `doukutsu-rs\data\settings.json` within your user directory.
|
||||||
| Map | `W` | `Y` |
|
| Map | `W` | `Y` |
|
||||||
| Strafe | `LShift` | `RShift` |
|
| Strafe | `LShift` | `RShift` |
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Extra Features</summary>
|
|
||||||
|
|
||||||
- `Alt + Enter` - Toggle Fullscreen
|
- `Alt + Enter` - Toggle Fullscreen
|
||||||
- `F2` (While paused) - Quick Restart
|
- `F2` (While paused) - Quick Restart
|
||||||
- `F3 - F12` - Debug keys
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
#### Screenshots
|
#### Screenshots
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ use crate::framework::backend::{BackendTexture, SpriteBatchCommand};
|
||||||
use crate::framework::context::Context;
|
use crate::framework::context::Context;
|
||||||
use crate::framework::error::GameResult;
|
use crate::framework::error::GameResult;
|
||||||
use crate::graphics;
|
use crate::graphics;
|
||||||
|
use crate::input::touch_controls::TouchControlType;
|
||||||
use crate::player::Player;
|
use crate::player::Player;
|
||||||
use crate::scripting::tsc::text_script::TextScriptExecutionState;
|
use crate::scripting::tsc::text_script::TextScriptExecutionState;
|
||||||
use crate::shared_game_state::{Language, SharedGameState};
|
use crate::shared_game_state::{Language, SharedGameState};
|
||||||
|
@ -87,8 +88,11 @@ impl MapSystem {
|
||||||
stage: &Stage,
|
stage: &Stage,
|
||||||
players: [&Player; 2],
|
players: [&Player; 2],
|
||||||
) -> GameResult {
|
) -> GameResult {
|
||||||
|
let touch_rect = Rect::new_size(0, 0, state.canvas_size.0 as isize, state.canvas_size.1 as isize);
|
||||||
|
|
||||||
if state.textscript_vm.state == TextScriptExecutionState::MapSystem {
|
if state.textscript_vm.state == TextScriptExecutionState::MapSystem {
|
||||||
if self.state == MapSystemState::Hidden {
|
if self.state == MapSystemState::Hidden {
|
||||||
|
state.touch_controls.control_type = TouchControlType::None;
|
||||||
state.control_flags.set_control_enabled(false);
|
state.control_flags.set_control_enabled(false);
|
||||||
self.state = MapSystemState::FadeInBox(0);
|
self.state = MapSystemState::FadeInBox(0);
|
||||||
}
|
}
|
||||||
|
@ -139,7 +143,10 @@ impl MapSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
for player in &players {
|
for player in &players {
|
||||||
if player.controller.trigger_jump() || player.controller.trigger_shoot() {
|
if player.controller.trigger_jump()
|
||||||
|
|| player.controller.trigger_shoot()
|
||||||
|
|| state.touch_controls.consume_click_in(touch_rect)
|
||||||
|
{
|
||||||
self.state = MapSystemState::FadeOutBox(8);
|
self.state = MapSystemState::FadeOutBox(8);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -147,7 +154,10 @@ impl MapSystem {
|
||||||
}
|
}
|
||||||
MapSystemState::Visible => {
|
MapSystemState::Visible => {
|
||||||
for player in &players {
|
for player in &players {
|
||||||
if player.controller.trigger_jump() || player.controller.trigger_shoot() {
|
if player.controller.trigger_jump()
|
||||||
|
|| player.controller.trigger_shoot()
|
||||||
|
|| state.touch_controls.consume_click_in(touch_rect)
|
||||||
|
{
|
||||||
self.state = MapSystemState::FadeOutBox(8);
|
self.state = MapSystemState::FadeOutBox(8);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,10 @@ use crate::framework::graphics::BlendMode;
|
||||||
use crate::framework::keyboard::ScanCode;
|
use crate::framework::keyboard::ScanCode;
|
||||||
use crate::framework::render_opengl::{GLContext, OpenGLRenderer};
|
use crate::framework::render_opengl::{GLContext, OpenGLRenderer};
|
||||||
use crate::framework::ui::init_imgui;
|
use crate::framework::ui::init_imgui;
|
||||||
|
use crate::graphics::VSyncMode;
|
||||||
use crate::Game;
|
use crate::Game;
|
||||||
use crate::GameError::RenderError;
|
use crate::GameError::RenderError;
|
||||||
use crate::GAME_SUSPENDED;
|
use crate::GAME_SUSPENDED;
|
||||||
use crate::graphics::VSyncMode;
|
|
||||||
|
|
||||||
pub struct SDL2Backend {
|
pub struct SDL2Backend {
|
||||||
context: Sdl,
|
context: Sdl,
|
||||||
|
@ -256,6 +256,7 @@ impl BackendEventLoop for SDL2EventLoop {
|
||||||
Event::KeyDown { scancode: Some(scancode), repeat, keymod, .. } => {
|
Event::KeyDown { scancode: Some(scancode), repeat, keymod, .. } => {
|
||||||
if let Some(drs_scan) = conv_scancode(scancode) {
|
if let Some(drs_scan) = conv_scancode(scancode) {
|
||||||
if !repeat {
|
if !repeat {
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
state.process_debug_keys(drs_scan);
|
state.process_debug_keys(drs_scan);
|
||||||
|
|
||||||
if keymod.intersects(keyboard::Mod::RALTMOD | keyboard::Mod::LALTMOD)
|
if keymod.intersects(keyboard::Mod::RALTMOD | keyboard::Mod::LALTMOD)
|
||||||
|
@ -365,7 +366,8 @@ impl BackendEventLoop for SDL2EventLoop {
|
||||||
*user_data = Rc::into_raw(refs) as *mut c_void;
|
*user_data = Rc::into_raw(refs) as *mut c_void;
|
||||||
}
|
}
|
||||||
|
|
||||||
let gl_context = GLContext { gles2_mode: false, is_sdl: true, get_proc_address, swap_buffers, user_data, ctx };
|
let gl_context =
|
||||||
|
GLContext { gles2_mode: false, is_sdl: true, get_proc_address, swap_buffers, user_data, ctx };
|
||||||
|
|
||||||
return Ok(Box::new(OpenGLRenderer::new(gl_context, UnsafeCell::new(imgui))));
|
return Ok(Box::new(OpenGLRenderer::new(gl_context, UnsafeCell::new(imgui))));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -26,12 +26,12 @@ bitfield! {
|
||||||
pub right, set_right: 1;
|
pub right, set_right: 1;
|
||||||
pub up, set_up: 2;
|
pub up, set_up: 2;
|
||||||
pub down, set_down: 3;
|
pub down, set_down: 3;
|
||||||
pub map, set_map: 4;
|
pub map, _: 4;
|
||||||
pub inventory, set_inventory: 5;
|
pub inventory, set_inventory: 5;
|
||||||
pub jump, set_jump: 6;
|
pub jump, set_jump: 6;
|
||||||
pub shoot, set_shoot: 7;
|
pub shoot, set_shoot: 7;
|
||||||
pub next_weapon, set_next_weapon: 8;
|
pub next_weapon, _: 8;
|
||||||
pub prev_weapon, set_prev_weapon: 9;
|
pub prev_weapon, _: 9;
|
||||||
pub pause, set_pause: 10;
|
pub pause, set_pause: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,6 @@ mod map;
|
||||||
mod menu;
|
mod menu;
|
||||||
mod mod_list;
|
mod mod_list;
|
||||||
mod mod_requirements;
|
mod mod_requirements;
|
||||||
#[cfg(feature = "netplay")]
|
|
||||||
mod netplay;
|
|
||||||
mod npc;
|
mod npc;
|
||||||
mod physics;
|
mod physics;
|
||||||
mod player;
|
mod player;
|
||||||
|
|
|
@ -13,6 +13,7 @@ pub mod pause_menu;
|
||||||
pub mod save_select_menu;
|
pub mod save_select_menu;
|
||||||
pub mod settings_menu;
|
pub mod settings_menu;
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub enum MenuEntry {
|
pub enum MenuEntry {
|
||||||
Hidden,
|
Hidden,
|
||||||
|
|
|
@ -29,7 +29,7 @@ impl ModRequirements {
|
||||||
Ok(ModRequirements::default())
|
Ok(ModRequirements::default())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn upgrade(mut self) -> Self {
|
fn upgrade(self) -> Self {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
pub mod packets;
|
|
||||||
pub mod server;
|
|
||||||
pub mod server_config;
|
|
|
@ -1,8 +0,0 @@
|
||||||
#[derive(serde::Serialize, serde::Deserialize)]
|
|
||||||
#[serde(tag = "i")]
|
|
||||||
pub enum DRSPacket {
|
|
||||||
#[serde(rename = "\x01")]
|
|
||||||
Ping(u16),
|
|
||||||
#[serde(rename = "\x02")]
|
|
||||||
Pong(u16),
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
use tokio::net::UdpSocket;
|
|
||||||
use crate::framework::error::GameResult;
|
|
||||||
use crate::netplay::server_config::ServerConfiguration;
|
|
||||||
|
|
||||||
pub struct Server {
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Server {
|
|
||||||
pub fn start(config: ServerConfiguration) -> GameResult<Server> {
|
|
||||||
let context = ServerContext::new(config);
|
|
||||||
|
|
||||||
|
|
||||||
Ok(Server {
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct ServerContext {
|
|
||||||
config: ServerConfiguration,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ServerContext {
|
|
||||||
pub fn new(config: ServerConfiguration) -> ServerContext {
|
|
||||||
ServerContext {
|
|
||||||
config
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn run(self) {
|
|
||||||
let socket = UdpSocket::bind(&self.config.bind_to).await.unwrap();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
#[derive(serde::Serialize, serde::Deserialize)]
|
|
||||||
pub struct ServerConfiguration {
|
|
||||||
#[serde(default = "default_bind")]
|
|
||||||
pub bind_to: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
// 'RS' = 0x5253 = 21075
|
|
||||||
fn default_bind() -> String {
|
|
||||||
"0.0.0.0:21075".to_string()
|
|
||||||
}
|
|
|
@ -20,7 +20,6 @@ use crate::rng::RNG;
|
||||||
use crate::shared_game_state::SharedGameState;
|
use crate::shared_game_state::SharedGameState;
|
||||||
|
|
||||||
mod player_hit;
|
mod player_hit;
|
||||||
pub mod player_list;
|
|
||||||
pub mod skin;
|
pub mod skin;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, FromPrimitive)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, FromPrimitive)]
|
||||||
|
|
|
@ -10,7 +10,7 @@ bitfield! {
|
||||||
pub struct PlayerSkinFlags(u16);
|
pub struct PlayerSkinFlags(u16);
|
||||||
impl Debug;
|
impl Debug;
|
||||||
|
|
||||||
pub supports_color, set_supports_color: 0;
|
pub supports_color, _: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||||
|
|
|
@ -284,6 +284,7 @@ impl SharedGameState {
|
||||||
|
|
||||||
constants.load_locales(ctx)?;
|
constants.load_locales(ctx)?;
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "android"))]
|
||||||
if filesystem::exists(ctx, "/base/lighting.tbl") {
|
if filesystem::exists(ctx, "/base/lighting.tbl") {
|
||||||
info!("Cave Story+ (Switch) data files detected.");
|
info!("Cave Story+ (Switch) data files detected.");
|
||||||
ctx.size_hint = (854, 480);
|
ctx.size_hint = (854, 480);
|
||||||
|
|
Loading…
Reference in New Issue