Giter Site home page Giter Site logo

cave-story-mod-loader's Introduction

= NOTICE OF DEPRECATION =
This project is no longer being worked on.

While I will try to fix any remaining bugs in this project, I will not be
expanding it with new features.


= readme.txt =
This is a DLL mod loader for the 2004 Windows version of Cave Story.
Also included in this repo are some mods.

Everything is designed to be compiled with MinGW-w64 in an MSYS2 environment.
https://www.msys2.org/


Dependencies:

sdl_controller_input requires SDL2 (available on MSYS2's Pacman).

https://www.libsdl.org/


The Makefile is designed to link all libraries statically, so their respective
dependencies apply as well.


More info here:
https://www.cavestory.org/forums/threads/dll-mod-loader-ogg-music-mod.13879/

cave-story-mod-loader's People

Contributors

clownacy avatar gabrielravier avatar leo40git avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cave-story-mod-loader's Issues

Remastered music

Any possibility to play Cave Story with remastered music and/or graphics from Cave Story+?

Beetle/Basu spawning is not ideal

The Beetle spawner object in Egg Corridor spawns a Beetle off-screen when Quote touches it. The problem here is that, because of the wider screen, these enemies spawn in places they're not meant to, like inside the Igor boss arena.

What I'm wondering is exactly how to fix this... should I 'fix' the map file so spawners are in better locations, or should I edit the spawner's code so it spawns the Beetle before Quote actually touches it? There's no way to get 100% vanilla behaviour.

Igor holding Sue in Egg Corridor disappears on screen

I have an idea to fix all or most of the character spawning / despawning on screen during cutscenes:
put black bands on screen to get the 4/3 resolution during cutscenes. That would look cool too, like the letterbox effect in other games even though the letterbox is supposed to be used on the top and bottom of the screen. The only problem with that would be the HUD: either hide it or make sure it's always fully covered by the black bands.

window.rect is wrong

When you change the screen resolution the information saved to window.rect is wrong. I suggest a way to toggle a modified window.rect writing system, or a way to disable writing to window.rect.

Fullscreen doesn't work

I already have something in the works, but I'll get to that in a bit.

This issue here is that Cave Story relies on the monitor supporting its selected resolution to run in fullscreen properly. This works for 640x480, but not for 800x480. When the monitor doesn't support the resolution, it doesn't stretch the output image to fill the screen: rather, it just displays it at its native size, resulting in a tiny window in the middle of your monitor (or, at least, that's how mine handles it).

My idea for a solution is ditching true fullscreen, and instead using borderless-fullscreen. This is surprisingly easy to do, and in fact I already have a quick-and-dirty PoC that works great.

How do I compile this

So I've tried using MSYS2 to compile this but I keep getting a bunch of linker errors.

$ make
src/mod_loader_bootstrapper/main.c: In function 'DllMain':
src/mod_loader_bootstrapper/main.c:96:63: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   96 |                         const unsigned int relative_address = (unsigned int)&ASM_LoadDLLModLoader - (0x412429 + 5);
      |                                                               ^
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DirectSoundCaptureCreate: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DirectSoundCaptureCreate8: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DirectSoundCaptureEnumerateA: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DirectSoundCaptureEnumerateW: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DirectSoundCreate: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DirectSoundCreate8: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DirectSoundEnumerateA: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DirectSoundEnumerateW: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DirectSoundFullDuplexCreate: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DllCanUnloadNow: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_DllGetClassObject: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export New_GetDeviceID: symbol not found
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x1): undefined reference to `_LoadDLLModLoader'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0xe): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x15): undefined reference to `_Original_DirectSoundCreate'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x15): relocation truncated to fit: R_X86_64_32S against undefined symbol `_Original_DirectSoundCreate'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x1a): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x21): undefined reference to `_Original_DirectSoundEnumerateA'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x21): relocation truncated to fit: R_X86_64_32S against undefined symbol `_Original_DirectSoundEnumerateA'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x26): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x2d): undefined reference to `_Original_DirectSoundEnumerateW'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x2d): relocation truncated to fit: R_X86_64_32S against undefined symbol `_Original_DirectSoundEnumerateW'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x32): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x39): undefined reference to `_Original_DllCanUnloadNow'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x39): relocation truncated to fit: R_X86_64_32S against undefined symbol `_Original_DllCanUnloadNow'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x3e): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x45): undefined reference to `_Original_DllGetClassObject'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x45): relocation truncated to fit: R_X86_64_32S against undefined symbol `_Original_DllGetClassObject'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x4a): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x51): undefined reference to `_Original_DirectSoundCaptureCreate'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x51): relocation truncated to fit: R_X86_64_32S against undefined symbol `_Original_DirectSoundCaptureCreate'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x56): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x5d): undefined reference to `_Original_DirectSoundCaptureEnumerateA'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x5d): relocation truncated to fit: R_X86_64_32S against undefined symbol `_Original_DirectSoundCaptureEnumerateA'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x62): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x69): undefined reference to `_Original_DirectSoundCaptureEnumerateW'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x69): relocation truncated to fit: R_X86_64_32S against undefined symbol `_Original_DirectSoundCaptureEnumerateW'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x6e): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x75): undefined reference to `_Original_GetDeviceID'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x75): relocation truncated to fit: R_X86_64_32S against undefined symbol `_Original_GetDeviceID'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x7a): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x81): undefined reference to `_Original_DirectSoundFullDuplexCreate'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x81): relocation truncated to fit: R_X86_64_32S against undefined symbol `_Original_DirectSoundFullDuplexCreate'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x86): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x8d): undefined reference to `_Original_DirectSoundCreate8'
obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x8d): additional relocation overflows omitted from the output
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x92): undefined reference to `_LoadDSound'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.text+0x99): undefined reference to `_Original_DirectSoundCaptureCreate8'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x0): undefined reference to `Init_New_DirectSoundCaptureCreate8'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x8): undefined reference to `Init_New_DirectSoundCreate8'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x10): undefined reference to `Init_New_DirectSoundFullDuplexCreate'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x18): undefined reference to `Init_New_GetDeviceID'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x20): undefined reference to `Init_New_DirectSoundCaptureEnumerateW'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x28): undefined reference to `Init_New_DirectSoundCaptureEnumerateA'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x30): undefined reference to `Init_New_DirectSoundCaptureCreate'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x38): undefined reference to `Init_New_DllGetClassObject'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x40): undefined reference to `Init_New_DllCanUnloadNow'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x48): undefined reference to `Init_New_DirectSoundEnumerateW'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x50): undefined reference to `Init_New_DirectSoundEnumerateA'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.data+0x58): undefined reference to `Init_New_DirectSoundCreate'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/mod_loader_bootstrapper/main.o:main.c:(.rdata$.refptr.ASM_LoadDLLModLoader[.refptr.ASM_LoadDLLModLoader]+0x0): undefined reference to `ASM_LoadDLLModLoader'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:126: bin/dsound.dll] Error 1

How do I fix this?

Toroko spawns on-screen in Reservoir

This probably only applies to 21:9. Not really sure how to fix this, unless I feel like scripting an entire scenario, where Toroko comes through the door, and walks up to the hill.

User-mappable buttons in WASD and SDL2 mods

This should be easy, really. From the user's point of view, there should just be a 'settings.txt' that looks like this:

jump = z
shoot = x
up = up
down = down
left = left
right = right

...Actually, now that I think about it, virtual vs. physical key locations will be tricky. I can just see the flood of '';' doesn't actually use ';'' issues already.

Well, this won't be an issue for controllers anyway... or will it? I guess I can just force XInput button names.

Or maybe even SDL2's own keycodes. They're not something I can just expect the user the know, however, so I may need to add comment support first.

<TIMG doesn't work

The Graphics Enhancement Pack seems to be what's breaking it. I'll probably have to write my own TIMG hack, that actually plays nice with it.

Fix NICE Ogg music

Somewhere, the Org file redirection is interfering with NICE's Ogg playback.

Undead Core's mini-cores disappear on-screen

(This bug is present in the 3DS port, by the way. Heh.)

In the cutscene right before the Undead Core fight, the stationary 'mini-cores' despawn while on-screen. They're normally off-screen in 4:3. Obviously I can't just not let them despawn, so I guess I'll have to either move them a little, or make their disappearing a little more presentable (maybe some dust clouds?).

Custom start, loop and end points

This will allow the Cave Story Arranged playlist to work without messing with files (since A. I'm pretty sure all songs fade instead of looping perfectly and B. the jingles + Game Over tracks are squished into one file), and could also be potentially useful for other songs.

Fix credits

I need to change the clip rect's right side, and I think the maps need adjusting.

Make RMU actually resume the music

SDL2_mixer sucks: it doesn't let you get the time of the currently-playing song, nor does it let two songs be loaded at once.

Manually playing the music with DirectSound is a nightmare, and bares haunting similarities to programming for the Mega CD's PCM chip, so I don't want to go with that option, either (not to mention, DirectSound is legacy, only supported by a software emulator...).

Add toggleable bugfixes to the mod loader

These will be built into the mod loader itself. They will be enabled via settings. Mods will be able to override these settings, in the event that they depend on a particular bugfix (the WASD and SDL2 controller mods require the door input masking bug be fixed, for example).

  • Door input masking bug
  • Teleporter menu transparency bug
  • window.rect window size bug
  • window.rect bad 'push window on-screen' priority bug
  • Out-of-bound tile drawing bug

Horrible graphics bug when increasing sprite resolution

doukutsu_2018-10-02_02-57-49
doukutsu_2018-10-02_02-57-54

This is taken using the pre-patched English v1.0.0.6 of the game found on the tribute site without any other modifications being applied other than what came with the Mod Loader. This happened with increasing the sprite resolution from 1 to 2.

Add Ogg SFX

Self-explanitory. Apparently this is a feature in NICE.

Monster X spawns on-screen

There's an invisible object in the level that spawns that boss when Quote touches it. It needs moving.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.