From 53c2fa722f7b54fe0d40a805d382387ee2199878 Mon Sep 17 00:00:00 2001 From: shweet Date: Fri, 30 Aug 2024 04:06:16 -0400 Subject: [PATCH] last commit fucked up the windows build apparently? great, let's try this --- src/game/input/control.c | 2 ++ src/game/input/control.h | 7 ++++--- src/game/resource/RESOURCE_COMMON.h | 15 ++++++++------- src/game/state/level/LEVEL_COMMON.h | 2 +- src/game/state/state.c | 2 ++ src/game/state/state.h | 2 ++ 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/game/input/control.c b/src/game/input/control.c index 2ab365f..d7ba3e1 100644 --- a/src/game/input/control.c +++ b/src/game/input/control.c @@ -54,8 +54,10 @@ control_tick(Control* self, Input* input) if (input->keyboard.current[KEYBOARD_KEY_M]) self->current[CONTROL_MUTE] = true; + /* if (input->keyboard.current[KEYBOARD_KEY_RCTRL] || input->keyboard.current[KEYBOARD_KEY_LCTRL]) self->current[CONTROL_CHEAT] = true; + */ } bool diff --git a/src/game/input/control.h b/src/game/input/control.h index ed23a87..4b24ef9 100644 --- a/src/game/input/control.h +++ b/src/game/input/control.h @@ -2,7 +2,8 @@ #include "input.h" -#define CONTROL_COUNT CONTROL_CHEAT + 1 +#define CONTROL_COUNT CONTROL_MUTE + 1 +//#define CONTROL_COUNT CONTROL_CHEAT + 1 typedef enum ControlType { CONTROL_NONE, @@ -21,8 +22,8 @@ typedef enum ControlType CONTROL_PAUSE, CONTROL_RETRY, CONTROL_ESCAPE, - CONTROL_MUTE, - CONTROL_CHEAT + CONTROL_MUTE//, + //CONTROL_CHEAT } ControlType; typedef struct Control diff --git a/src/game/resource/RESOURCE_COMMON.h b/src/game/resource/RESOURCE_COMMON.h index 941fe62..18596b7 100644 --- a/src/game/resource/RESOURCE_COMMON.h +++ b/src/game/resource/RESOURCE_COMMON.h @@ -91,7 +91,7 @@ typedef enum TextureType TEXTURE_CUTSCENE_FINAL_SCENE_THIRTEEN, TEXTURE_ENDING, TEXTURE_ENDING_TWO, - TEXTURE_ENDING_THREE, + TEXTURE_ENDING_THREE } TextureType; static const char* TEXTURE_PATHS[TEXTURE_COUNT] = @@ -157,7 +157,7 @@ static const char* TEXTURE_PATHS[TEXTURE_COUNT] = "res/gfx/cutscene/c06s13.png", "res/gfx/cutscene/ending.png", "res/gfx/cutscene/ending2.png", - "res/gfx/cutscene/ending3.png", + "res/gfx/cutscene/ending3.png" }; #define FONT_COUNT FONT_BIG + 1 @@ -182,7 +182,8 @@ static const u32 FONT_SIZES[FONT_COUNT] = 48 }; -#define SOUND_COUNT (SOUND_CHEAT + 1) +#define SOUND_COUNT (SOUND_CANCEL + 1) +//#define SOUND_COUNT (SOUND_CHEAT + 1) #define SOUND_BURP_COUNT 3 #define SOUND_GURGLE_COUNT 3 #define SOUND_LUNGE_COUNT 3 @@ -222,8 +223,8 @@ typedef enum SoundType SOUND_EXTEND, SOUND_FORESIGHT, SOUND_INVIGORATE, - SOUND_CANCEL, - SOUND_CHEAT + SOUND_CANCEL//, + //SOUND_CHEAT } SoundType; static const char* SOUND_PATHS[SOUND_COUNT] = @@ -261,8 +262,8 @@ static const char* SOUND_PATHS[SOUND_COUNT] = "res/sound/extend.ogg", "res/sound/foresight.ogg", "res/sound/invigorate.ogg", - "res/sound/cancel.ogg", - "res/sound/cheat.ogg", + "res/sound/cancel.ogg"//, + //"res/sound/cheat.ogg" }; #define MUSIC_COUNT MUSIC_VICTORY + 1 diff --git a/src/game/state/level/LEVEL_COMMON.h b/src/game/state/level/LEVEL_COMMON.h index a8deb73..a3625e9 100644 --- a/src/game/state/level/LEVEL_COMMON.h +++ b/src/game/state/level/LEVEL_COMMON.h @@ -19,7 +19,7 @@ #include "../../ecs/entity/visual/entity_text_disappearing.h" #include "../../ecs/entity/visual/entity_text_queue_entry.h" -static const vec4 LEVEL_SUNSET_COLOR = {0.15f, 0.10f, 0.10f, 1.0f}; +static const vec4 LEVEL_SUNSET_COLOR = {0.35f, 0.20f, 0.20f, 1.0f}; #define LEVEL_TUTORIAL_TEXT_COUNT 3 diff --git a/src/game/state/state.c b/src/game/state/state.c index c05861f..959c751 100644 --- a/src/game/state/state.c +++ b/src/game/state/state.c @@ -195,12 +195,14 @@ state_tick(State* self) if (self->states.title.isLevelSelected) _state_set(self, STATE_CUTSCENE_ONE + self->states.title.levelSelected); + /* if (control_released(self->ecs->control, CONTROL_CHEAT)) { memcpy(self->levelData, LEVEL_DATA_CHEAT, sizeof(LEVEL_DATA_CHEAT)); sound_play(&self->ecs->resources->sounds[SOUND_CHEAT]); _state_set(self, STATE_TITLE); } + */ break; case STATE_CUTSCENE_ONE: diff --git a/src/game/state/state.h b/src/game/state/state.h index 4ca868e..c5b2af2 100644 --- a/src/game/state/state.h +++ b/src/game/state/state.h @@ -402,6 +402,7 @@ static const LevelData LEVEL_DATA_DEFAULT[LEVEL_COUNT] = }, }; +/* static const LevelData LEVEL_DATA_CHEAT[LEVEL_COUNT] = { { @@ -430,6 +431,7 @@ static const LevelData LEVEL_DATA_CHEAT[LEVEL_COUNT] = .time = -1 }, }; +*/ void state_change(State* self, StateType type); void state_init(State* self, ECS* ecs, StateType type);