Rename WTHOPTS_SDL_NOMIXER, rename config.h to settings.h, deprecate old
door sounds, fix make.sh not using a proper integer for autorun, add tracker music cover of Lucid Nightmares
This commit is contained in:
parent
455378c207
commit
bc8e015447
8 changed files with 29 additions and 22 deletions
|
@ -21,7 +21,7 @@ signalPlaySFX(index) and signalPlayMUS(index) play a sound or change music to th
|
|||
## Macros
|
||||
|
||||
WTHOPTS\_NOOPTIONSMENU disables the options menu and makes it inaccessible in-game.
|
||||
WTHOPTS\_SDL\_NOMIXER disables loading SDL2 Mixer, and removes it as a dependency. Also removes audio for SDL2.
|
||||
WTH\_NOSOUND disables all audio. This is mainly used by the frontends to avoid loading unnecessary code.
|
||||
|
||||
## Save file bits
|
||||
|
||||
|
|
BIN
NMARE.xm
Normal file
BIN
NMARE.xm
Normal file
Binary file not shown.
9
game.h
9
game.h
|
@ -8,7 +8,7 @@ Made by blitzdoughnuts
|
|||
*/
|
||||
|
||||
#include "constants.h"
|
||||
#include "config.h"
|
||||
#include "settings.h"
|
||||
|
||||
#define ACHIEVE_BEATME 1
|
||||
#define ACHIEVE_NOCOAT 1 << 1
|
||||
|
@ -109,7 +109,6 @@ uint8_t addObject(int nx, int ny, uint8_t objType) {
|
|||
};
|
||||
#endif
|
||||
uint8_t index = interacts_count;
|
||||
if (objType == INTERTYPE_ARTIFACT && (plr.artifacts & (1 << interacts[index].vars[0]))) return 0; // is it an artifact the player already has? don't bother existing
|
||||
for (uint8_t i = 0; i < 7; i++) {
|
||||
interacts[index].vars[i] = 0;
|
||||
};
|
||||
|
@ -163,9 +162,13 @@ static inline void LoadInRoom() {
|
|||
addObject(246,200,INTERTYPE_COAT);
|
||||
addObject(-48,218,INTERTYPE_DECOR);
|
||||
interacts[2].vars[0] = WTH_SPR_DECOR_BED;
|
||||
addObject(0, 0, INTERTYPE_MOVEBLOCK);
|
||||
addObject(-360, 0, INTERTYPE_MOVEBLOCK);
|
||||
addObject(615, GROUNDLEVEL, INTERTYPE_DOOR);
|
||||
interacts[4].vars[0] = ROOM_OUTDOORS;
|
||||
if (!(plr.artifacts & (1 << ARTIFACT_KNIFE))) {
|
||||
addObject(-156, 140, INTERTYPE_ARTIFACT);
|
||||
interacts[5].vars[0] = ARTIFACT_KNIFE;
|
||||
};
|
||||
break;
|
||||
case ROOM_OUTDOORS: // outside of house
|
||||
addObject(-76, GROUNDLEVEL, INTERTYPE_DOOR);
|
||||
|
|
35
main_sdl.c
35
main_sdl.c
|
@ -516,26 +516,27 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
if ((SDL_NumJoysticks() > 0)) controllerinput = SDL_JoystickOpen(0);
|
||||
|
||||
#ifndef WTHOPTS_SDL_NOMIXER
|
||||
#ifndef WTH_NOSOUND
|
||||
if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 1, 2048) != 0)
|
||||
puts("The game couldn't find a usable audio system. Check your audio devices!");
|
||||
else {
|
||||
music[0] = Mix_LoadMUS("NMARE.xm");
|
||||
music[1] = Mix_LoadMUS("CRIMSON.it");
|
||||
music[2] = Mix_LoadMUS("SHOPKEEP.mod");
|
||||
|
||||
music[0] = Mix_LoadMUS("NMARE.mid"); // note: Fluidsynth MIDIs take up lots of memory
|
||||
music[1] = Mix_LoadMUS("CRIMSON.it");
|
||||
music[2] = Mix_LoadMUS("SHOPKEEP.mod");
|
||||
|
||||
sfx[0] = Mix_LoadWAV("sfx/step.wav");
|
||||
sfx[1] = Mix_LoadWAV("sfx/jump.wav");
|
||||
sfx[2] = Mix_LoadWAV("sfx/slam.wav");
|
||||
sfx[3] = Mix_LoadWAV("sfx/coatpickup.wav");
|
||||
sfx[4] = Mix_LoadWAV("sfx/dooropen.wav");
|
||||
sfx[5] = Mix_LoadWAV("sfx/doorclose.wav");
|
||||
sfx[6] = Mix_LoadWAV("sfx/artifact_badge.wav");
|
||||
sfx[7] = Mix_LoadWAV("sfx/artifact_mirror.wav");
|
||||
sfx[8] = Mix_LoadWAV("sfx/artifact_donut.wav");
|
||||
sfx[9] = Mix_LoadWAV("sfx/artifact_knife.wav");
|
||||
sfx[10] = Mix_LoadWAV("sfx/paperopen.wav");
|
||||
sfx[11] = Mix_LoadWAV("sfx/paperclose.wav");
|
||||
sfx[0] = Mix_LoadWAV("sfx/step.wav");
|
||||
sfx[1] = Mix_LoadWAV("sfx/jump.wav");
|
||||
sfx[2] = Mix_LoadWAV("sfx/slam.wav");
|
||||
sfx[3] = Mix_LoadWAV("sfx/coatpickup.wav");
|
||||
sfx[4] = Mix_LoadWAV("sfx/dooropen.wav");
|
||||
sfx[5] = Mix_LoadWAV("sfx/doorclose.wav");
|
||||
sfx[6] = Mix_LoadWAV("sfx/artifact_badge.wav");
|
||||
sfx[7] = Mix_LoadWAV("sfx/artifact_mirror.wav");
|
||||
sfx[8] = Mix_LoadWAV("sfx/artifact_donut.wav");
|
||||
sfx[9] = Mix_LoadWAV("sfx/artifact_knife.wav");
|
||||
sfx[10] = Mix_LoadWAV("sfx/paperopen.wav");
|
||||
sfx[11] = Mix_LoadWAV("sfx/paperclose.wav");
|
||||
};
|
||||
#endif
|
||||
|
||||
SDL_SetRenderDrawColor(render, 0, 0x01, 0x90, 255);
|
||||
|
|
2
make.sh
2
make.sh
|
@ -17,7 +17,7 @@ if [ $1 = "sdl" ]; then
|
|||
# These are here so swapping to static compilation is easier
|
||||
|
||||
$COMPILER main_sdl.c -std=c99 $SDL_LINK $SDLMIXER_LINK $SDLIMAGE_LINK -O1 -Wall -Wextra $2 -o WakeToHell
|
||||
if [ AUTORUN > 0 ]; then
|
||||
if [ $AUTORUN -ne 0 ]; then
|
||||
./WakeToHell
|
||||
fi
|
||||
elif [ $1 = "saf" ]; then
|
||||
|
|
|
@ -4,3 +4,6 @@
|
|||
// Default settings for the game to fall back to. Also applies when
|
||||
// the options menu is inaccessible.
|
||||
#define DEFAULT_OPTIONS (WTHOPTS_DOSONG | WTHOPTS_2XSIZE | WTHOPTS_FULLSC)
|
||||
|
||||
#define WIDTH 480
|
||||
#define HEIGHT 270
|
Loading…
Reference in a new issue