Update and export MENU.png, update a bunch of stuff???
BIN
ASSETS/MENU.ase
|
@ -88,6 +88,7 @@ SDL2:
|
|||
- https://freesound.org/people/Pfannkuchn/sounds/342873/ (sounds similar to doorclose.wav, has different pitch)
|
||||
- Make font properly spaced (DONE)
|
||||
- Remake Lucid Nightmares as a tracker module? It'll sound consistent across many platforms and won't be as expensive as WAV, OGG nor MIDI if on Fluidsynth (TRYING)
|
||||
- Try using Fluidsynth directly instead of SDL2 Mixer? It may remove some bloat
|
||||
|
||||
- Smooth out the level change from the changeroom trigger object (at least don't jar the camera back to default position)
|
||||
- Add idle animations for Lukifer
|
||||
|
|
|
@ -21,7 +21,7 @@ Made with love and hatred by blitzdoughnuts, author of [LUDICRITAL](https://ludi
|
|||
- Made with free software! Vim (previously Notepad++) for code editing, LibreSprite for drawing, and the GNU and Tiny C compilers for GNU/Linux and Window$ respectively.
|
||||
- Contains psychological horror themes and, in tandem, borderline philosophical questions. *Woohoo...*
|
||||
- Has cats!
|
||||
- Kept simple, stupid! File I/O is not a dependency, it is configurable in either the config.h or the save file, it avoids overcomplicated methods as much as it can, and it is platform agnostic. Doesn't matter if you're on a PC or a bowl of oatmeal; just enjoy the damn game.
|
||||
- Kept simple, stupid! File I/O is not a dependency, the game is configurable in settings.h, it avoids overcomplicated methods as much as it can, and it is platform agnostic. Doesn't matter if you're on a PC or a bowl of oatmeal; just enjoy the damn game.
|
||||
|
||||
Much kudos to [Anarch](https://codeberg.org/drummyfish/Anarch/) by drummyfish for this section's inspiration.
|
||||
|
||||
|
|
46
game.h
|
@ -20,16 +20,12 @@ Made by blitzdoughnuts
|
|||
#define DRAW_PLRUPARROW 1
|
||||
#define DRAW_PLRDNARROW 2
|
||||
|
||||
#define DRAW_CHECK2XSIZE 64
|
||||
#define DRAW_CHECKFULLSC 65
|
||||
|
||||
// misc calls
|
||||
// misc calls, mainly for frontends
|
||||
#define MISC_PAUSEMUSIC 0
|
||||
#define MISC_RESUMEMUSIC 1
|
||||
#define MISC_STOPMUSIC 2
|
||||
#define MISC_GESTURE 3 // the frontend decides what happens when Lukifer gestures
|
||||
#define MISC_NEWROOM 4
|
||||
#define MISC_EXITGAME 127
|
||||
|
||||
#ifndef CAM_BOUNDS
|
||||
#define CAM_BOUNDS 160 // border size of camera from both directions
|
||||
|
@ -188,17 +184,14 @@ static inline void LoadInRoom() {
|
|||
addObject(-100, 0, INTERTYPE_MOVEBLOCK);
|
||||
break;
|
||||
case ROOM_STREETS:
|
||||
addObject(1920, 0, INTERTYPE_DOOR);
|
||||
interacts[0].vars[0] = ROOM_H_ENT;
|
||||
addObject(1920, GROUNDLEVEL, INTERTYPE_DOOR);
|
||||
interacts[0].vars[0] = ROOM_HOSPITAL;
|
||||
addObject(555, 82, INTERTYPE_DECOR);
|
||||
interacts[1].vars[0] = WTH_SPR_BG_BAROUT;
|
||||
addObject(768, GROUNDLEVEL, INTERTYPE_DOOR);
|
||||
interacts[2].vars[0] = ROOM_BAR;
|
||||
interacts[2].vars[2] = 1;
|
||||
break;
|
||||
case ROOM_H_ENT:
|
||||
interacts[ addObject(270, GROUNDLEVEL, INTERTYPE_DOOR) ].vars[0] = ROOM_HOSPITAL;
|
||||
break;
|
||||
case ROOM_HOSPITAL:
|
||||
/* if you DON'T have all the artifacts, allow exiting of the room
|
||||
TODO: cutscene of the door slamming */
|
||||
|
@ -211,6 +204,8 @@ static inline void LoadInRoom() {
|
|||
addObject(-20, GROUNDLEVEL, INTERTYPE_DOOR);
|
||||
interacts[2].vars[0] = ROOM_H_ENT;
|
||||
interacts[2].vars[2] = 1;
|
||||
} else {
|
||||
addObject(-20, GROUNDLEVEL, INTERTYPE_DOORSLAM);
|
||||
};
|
||||
break;
|
||||
case ROOM_H_PATIENTS:
|
||||
|
@ -271,9 +266,6 @@ static inline void changeRoom(uint8_t input, uint8_t startAtInter) {
|
|||
void interact_step(WTH_Interactible *REF) {
|
||||
if (!(REF->flags & INTER_ACTIVE)) return;
|
||||
switch (REF->objID) {
|
||||
case INTERTYPE_TRIGGER:
|
||||
|
||||
break;
|
||||
case INTERTYPE_DOOR:
|
||||
/* flag 1 is the entering door state,
|
||||
flag 2 is if the door is open
|
||||
|
@ -471,6 +463,14 @@ void interact_step(WTH_Interactible *REF) {
|
|||
plr.hsp = plr.hsp_sub = 0;
|
||||
};
|
||||
break;
|
||||
case INTERTYPE_DOORSLAM:
|
||||
if (REF->flags & 1 << 1) break;
|
||||
if (plr.x > REF->x + 320) {
|
||||
plr.state = PSTATE_CUTSCENE;
|
||||
REF->flags ^= 1 << 1;
|
||||
//TODO: game flag for triggering the door slam cutscene?
|
||||
};
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -497,6 +497,7 @@ void start() {
|
|||
loadGame();
|
||||
};
|
||||
|
||||
uint8_t running = 1;
|
||||
void step() {
|
||||
switch (GAME_STATE)
|
||||
{
|
||||
|
@ -533,7 +534,7 @@ void step() {
|
|||
#ifndef WTHCOMPILER_NOOPTIONSMENU
|
||||
case 1: menu.menuindex = 1; menu.menuselect = 0; menu.menulimit = 3; break;
|
||||
#endif
|
||||
case 2: signalMisc(MISC_EXITGAME); break;
|
||||
case 2: running = 0; break;
|
||||
}
|
||||
#ifndef WTHCOMPILER_NOOPTIONSMENU
|
||||
};
|
||||
|
@ -646,6 +647,14 @@ void step() {
|
|||
};
|
||||
};
|
||||
break;
|
||||
case PSTATE_CUTSCENE:
|
||||
switch (level)
|
||||
{
|
||||
case ROOM_HOSPITAL:
|
||||
WTH_PRINT("Lukifer jumps as the door slams behind him.");
|
||||
break;
|
||||
};
|
||||
break;
|
||||
case PSTATE_SLEEPING: default:
|
||||
plr.animindex = WTH_PLR_SLEEP_SPR;
|
||||
plr.animflimit = WTH_PLR_SLEEP_LEN;
|
||||
|
@ -667,7 +676,6 @@ void step() {
|
|||
case ROOM_OUTDOORS:
|
||||
if (plr.x >= 1920) {
|
||||
int camdiff = cam_x - plr.x;
|
||||
WTH_PRINT("%i", camdiff);
|
||||
changeRoom(ROOM_STREETS, 0);
|
||||
cam_x = plr.x + camdiff;
|
||||
};
|
||||
|
@ -675,12 +683,12 @@ void step() {
|
|||
case ROOM_STREETS:
|
||||
// wrap the player around the level if they go too far
|
||||
if (plr.x < -960) {
|
||||
plr.x = 2400;
|
||||
cam_x += 2400 + 960;
|
||||
plr.x = 2600;
|
||||
cam_x += 2600 + 960;
|
||||
};
|
||||
if (plr.x > 2400) {
|
||||
if (plr.x > 2600) {
|
||||
plr.x = -960;
|
||||
cam_x -= 2400 + 960;
|
||||
cam_x -= 2600 + 960;
|
||||
};
|
||||
break;
|
||||
};
|
||||
|
|
|
@ -85,7 +85,6 @@ SDL_Window *win;
|
|||
|
||||
SDL_Event event;
|
||||
|
||||
uint8_t running;
|
||||
uint8_t renderFlags; // flags to tell SDL2 what to draw, modified by signalDraw()
|
||||
|
||||
void drawSprite(SDL_Texture *sprite, int x, int y) {
|
||||
|
@ -228,9 +227,6 @@ void signalMisc(uint8_t signal) {
|
|||
break;
|
||||
};
|
||||
break;
|
||||
case MISC_EXITGAME:
|
||||
running = 0;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -694,9 +690,8 @@ int main(int argc, char *argv[]) {
|
|||
if (argc > 1) {
|
||||
for (uint8_t i = 1; i < argc; i++) {
|
||||
if (argv[i][0] == '-' && argv[i][1] == 'h' && !argv[i][2]) { // HELP
|
||||
printf(REALGAMETITLE);
|
||||
printf(REALGAMETITLE " (SDL2)");
|
||||
puts(" by blitzdoughnuts");
|
||||
puts("SDL2 version");
|
||||
puts("This program is FREE SOFTWARE, licensed under the Creative Commons Zero plus a waiver of remaining rights. You should have gotten licensing information with the packaged game or source repository.\nSee readme.txt for more information.");
|
||||
return 0;
|
||||
};
|
||||
|
@ -801,8 +796,6 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
running = 1;
|
||||
start();
|
||||
signalDraw(DRAW_CHECK2XSIZE);
|
||||
signalDraw(DRAW_CHECKFULLSC);
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_set_main_loop(gameLoop, 0, 1);
|
||||
#else
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
gameplay */
|
||||
//#define WTH_LOOPOBJS
|
||||
|
||||
#define WTH_DEBUG // Enable debugging options that show variables and other details
|
||||
//#define WTH_DEBUG // Enable debugging options that show variables and other details
|
||||
//#define WTH_NOOPTIONS // Disable the Options menu and use the DEFAULT_OPTIONS macro
|
||||
//#define WTH_DEMOS // Enable demo recording on frontends that support it
|
||||
//#define WTH_NOSOUND // Disable audio on frontends that use it
|
||||
|
|
BIN
sprites/MENU.png
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4.7 KiB |