Bump copywrong years to 2025, make use of the new settings macros, bump

game version
This commit is contained in:
blitzdoughnuts 2025-01-09 16:10:24 -05:00
parent 509b3e572f
commit dfe192e195
5 changed files with 29 additions and 24 deletions

View file

@ -4,7 +4,7 @@ A walking simulator / interactive story about a cat who seems to be dealing with
It's a public domain, free software game that puts you into the shoes of Lukifer Dredd, who must navigate his way through his day while having to put up with certain oddities across his area that seem to impede him. Meet your worries, meet your demons, meet yourself.
**NOTE: This game is still in alpha!** Things seen in alpha builds may be modified or removed later, and not all intended content is included.
**NOTE: This game is still in development!** Things seen in these builds may change or be removed later, and not everything is in here.
Made with love and hatred by blitzdoughnuts, author of [LUDICRITAL](https://ludicrital.neocities.org) and professional lunatic.
@ -13,12 +13,12 @@ Made with love and hatred by blitzdoughnuts, author of [LUDICRITAL](https://ludi
- Completely free (as in freedom)! Code and assets are CC0 (public domain) with an additional wavier of IP rights, see DOCS/LICENSES.txt for extra details.
- Anti-commercial! No microtransactions, advertising, or capitalist intent here, it already gives us enough of a headache.
- Game code is independent from the platforms, allowing for relatively easy porting! Current platforms include:
- Windows (SDL2, Raylib)
- GNU/Linux (SDL2, SAF)
- Window$ (tested: SDL2, Raylib)
- GNU/Linux (tested: SDL2, Raylib, SAF)
- Compilation is clean! Just a C compiler, a handful of libraries, and optionally the build script are needed.
- Uses ONLY integer math, to drop any floating point dependencies and to piss off sane programmers! :D
- Low hardware demands! All (at least most) code is optimal and small, even including frontends.
- Made with free software! Vim (previously Notepad++) for code editing, LibreSprite for drawing, and the GNU and Tiny C compilers for GNU/Linux and Windows respectively.
- Low hardware demands! Hopefully all (at least most) code is optimal and small, even including frontends.
- 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.
@ -52,7 +52,7 @@ Note that ``make.sh`` supports compiler flags as a 2nd argument, so you may do,
## Known Bugs, Issues, and Mishaps
As the game is work in progress (0.2.0a as of writing), there's bound to be bugs and simple incompleteness around.
As the game is work in progress (0.3.1a as of writing), there's bound to be bugs and simple incompleteness around.
# Bugs
- RayLib and SAF are behind the SDL2 frontend, and have improper compatibility. May cause issues.
@ -61,9 +61,7 @@ As the game is work in progress (0.2.0a as of writing), there's bound to be bugs
- The keyboard status function on SDL2 always throws a warning due to the NULL given as a pointer parameter. May cause issues.
# Mishaps
- Lukifer preserves his horizontal momentun while airborne. (not a concern; jumping's gone)
- Holding left and right simultaneously causes Lukifer to walk in place.
- Reversing the IDLE1 animation incorrectly loops.
- The IDLE1 animation played in reverse loops erroneously.
- SDL2 SPECIFIC:
- Demo playback might not find the EOF of the demo correctly
- Demos don't account for things like game settings, player position and status, and game vars like the level and the Interactibles within.
@ -73,7 +71,6 @@ As the game is work in progress (0.2.0a as of writing), there's bound to be bugs
## Ideas for What You Can Do
Considering that Wake to Hell is free software, it's no surprise that you may be able to find great use out of this, especially in creative ways.
- Play it, edit it, break it
- Record it, (quick) review it
- Improve in-game features

7
game.h
View file

@ -3,7 +3,7 @@ GAME.H
This file defines SPECIFICALLY the game logic, completely separate from any libraries.
Drawing and handling of sprites happens in the main_[platform].c file.
Licensed under CC0, public domain, 2023-2024
Licensed under CC0, public domain, 2023-2025
Made by blitzdoughnuts
*/
@ -28,7 +28,6 @@ Made by blitzdoughnuts
#define MISC_PAUSEMUSIC 0
#define MISC_RESUMEMUSIC 1
#define MISC_STOPMUSIC 2
#define MISC_TOGGLEFF 3 // DEPRECATED
#define MISC_EXITGAME 127
#ifndef CAM_BOUNDS
@ -38,7 +37,7 @@ Made by blitzdoughnuts
#define INTER_LIMIT 32 // how many interactibles can be on a level at a time?
#define WINTITLE "Wake to Hell"
#define VERSION_NUMBER "0.3.0a"
#define VERSION_NUMBER "0.3.1a"
#define WTH_keyPressed(keyvalue) (input_keys & keyvalue) && !(input_prevkeys & keyvalue)
// easy way to check if a key was down but NOT held, saves space for comment rambling
@ -595,7 +594,7 @@ void step() {
if (plr.flags & FLAG_FLIPPED) plr.flags ^= FLAG_FLIPPED;
};
if ((plr.flags & FLAG_GROUNDED) && !(input_keys & KEY_LEFT) && !(input_keys & KEY_RIGHT)) { // seems erroneous
if ((plr.flags & FLAG_GROUNDED) && ((!(input_keys & KEY_LEFT) && !(input_keys & KEY_RIGHT)) || (input_keys & KEY_LEFT) && (input_keys & KEY_RIGHT))) { // seems erroneous
// if idle, set HSP to 0, AND
// set sprite to idle, check idle animations
plr.hsp = 0;

View file

@ -1,7 +1,7 @@
/*
DEPRECATED Raylib frontend for the game
Licensed under CC0, public domain, 2023-2024
Licensed under CC0, public domain, 2023-2025
Made by blitzdoughnuts
*/

View file

@ -1,7 +1,7 @@
/*
RUTHLESSLY minimal SAF frontend for the game
Licensed under CC0, public domain, 2023-2024
Licensed under CC0, public domain, 2023-2025
Made by blitzdoughnuts
*/
@ -16,6 +16,8 @@ Made by blitzdoughnuts
#define HEIGHT 64
#define GAME_FPS 25
#define WTH_NOOPTIONS // FORCED on SAF, since options hardly have use on this platform
#include "constants.h"
#include "game.h"

View file

@ -1,7 +1,7 @@
/*
SDL2 frontend for the game
SDL2 frontend for Wake to Hell
Licensed under CC0, public domain, 2023-2024
Licensed under CC0, public domain, 2023-2025
Made by blitzdoughnuts
*/
@ -38,7 +38,7 @@ static const char str_off[] = "OFF";
static const char str_exit[] = "Exit";
static const char str_savegamename[] = "WTH_SaveGame.bin";
#ifndef WTHOPTS_SDL_NOMIXER
#ifndef WTH_NOSOUND
#include <SDL2/SDL_mixer.h>
Mix_Music *music[3];
@ -60,7 +60,7 @@ SDL_Renderer *render;
SDL_Window *win;
uint8_t running;
uint8_t renderFlags;
uint8_t renderFlags; // flags to tell SDL2 what to draw, modified by signalDraw()
void drawSprite(SDL_Texture *sprite, int x, int y) {
dspdest_rect = (SDL_Rect){x, y, 0, 0};
@ -157,6 +157,7 @@ void drawTextString(const char *stuff, int x, int y, uint8_t color) {
void signalMisc(uint8_t signal) {
switch (signal)
{
#ifndef WTH_NOSOUND
case MISC_PAUSEMUSIC: case MISC_RESUMEMUSIC: case MISC_STOPMUSIC:
if (!(options[0] & WTHOPTS_DOSONG)) break;
switch (signal)
@ -166,6 +167,7 @@ void signalMisc(uint8_t signal) {
case MISC_STOPMUSIC: Mix_HaltMusic(); break;
}
break;
#endif
case MISC_EXITGAME:
running = 0;
break;
@ -200,7 +202,6 @@ void signalDraw(uint8_t index) {
switch (index)
{
case DRAW_PLRUPARROW:
//drawSprite(sprites[WTH_SPR_UPARROW], plr.x - 20 - cam.x, plr.y - 150 - cam.y);
renderFlags ^= 1;
break;
case DRAW_CHECK2XSIZE:
@ -218,30 +219,36 @@ void signalDraw(uint8_t index) {
// inline the simple stuff
static inline void signalPlaySFX(uint8_t signal) {
#ifndef WTHOPTS_SDL_NOMIXER
#ifndef WTH_NOSOUND
Mix_PlayChannel(-1, sfx[signal], 0);
#endif
};
static inline void signalPlayMUS(uint8_t signal) {
#ifndef WTHOPTS_SDL_NOMIXER
#ifndef WTH_NOSOUND
if (options[0] & WTHOPTS_DOSONG) Mix_PlayMusic(music[signal], -1);
#endif
};
void saveGame() {
#ifndef WTH_NOOPTIONS
DaSave = fopen(str_savegamename,"w");
fwrite(&options, 1, 2, DaSave);
fclose(DaSave);
#endif
};
void loadGame() {
#ifndef WTH_NOOPTIONS
if (!(DaSave = fopen(str_savegamename,"r"))) {
options[0] = DEFAULT_OPTIONS;
return;
};
fread(&options, 1, 2, DaSave);
fclose(DaSave);
#else
options[0] = DEFAULT_OPTIONS;
#endif
};
void draw() {
@ -449,7 +456,7 @@ void keys() {
LoadInRoom();
};
if (DEBUG_pressed(4)) {
evel++;
level++;
LoadInRoom();
};