224 lines
7.8 KiB
C
224 lines
7.8 KiB
C
/*
|
|
Constants definition file for Wake to Hell
|
|
|
|
Licensed under CC0, public domain, 2023-2025
|
|
Made by blitzdoughnuts
|
|
*/
|
|
|
|
// interactible types
|
|
#define INTERTYPE_TRIGGER 0
|
|
#define INTERTYPE_DOOR 1
|
|
#define INTERTYPE_ARTIFACT 2
|
|
#define INTERTYPE_MOVETRACK 3
|
|
#define INTERTYPE_COAT 4
|
|
#define INTERTYPE_MOVEBLOCK 5
|
|
#define INTERTYPE_BOOK 6
|
|
#define INTERTYPE_STAIRS 7
|
|
#define INTERTYPE_DOORSLAM 8
|
|
#define INTERTYPE_GESTURE 253
|
|
#define INTERTYPE_DECOR 254
|
|
#define INTERTYPE_YOU 255
|
|
|
|
// rooms
|
|
#define ROOM_TEST 255
|
|
#define ROOM_HOUSE 0
|
|
#define ROOM_OUTDOORS 1
|
|
#define ROOM_STREETS 2
|
|
#define ROOM_HOSPITAL 3
|
|
#define ROOM_H_PATIENTS 4
|
|
#define ROOM_H_HAMIE 5
|
|
#define ROOM_H_RICHIE 6
|
|
#define ROOM_H_DARK 7
|
|
#define ROOM_YOU 8
|
|
#define ROOM_BAR 63
|
|
|
|
// artifacts
|
|
#define ARTIFACT_BADGE 0 // lime badge
|
|
#define ARTIFACT_MIRROR 1 // hand mirror
|
|
#define ARTIFACT_DONUT 2// mysterious doughnuts
|
|
#define ARTIFACT_KNIFE 3 // blood-stained knife
|
|
|
|
// input keys
|
|
#define KEY_UP 1
|
|
#define KEY_DOWN 1 << 1
|
|
#define KEY_LEFT 1 << 2
|
|
#define KEY_RIGHT 1 << 3
|
|
#define KEY_GESTURE 1 << 4
|
|
#define KEY_ATTACK 1 << 5
|
|
#define KEY_MENU 1 << 6
|
|
|
|
// menu indexes
|
|
#define MINDEX_MAIN 0
|
|
#define MINDEX_OPTIONS 1
|
|
#define MINDEX_XOPTIONS 2
|
|
|
|
// ootions flags
|
|
#define WTHOPTS_NOFADE 1 // disables fade
|
|
#define WTHOPTS_DEVCAM 1 << 1 // a toggle for the free camera
|
|
#define WTHOPTS_DOSONG 1 << 2 // toggles music
|
|
|
|
// flags
|
|
#define FLAG_GROUNDED 1 // on ground?
|
|
#define FLAG_CANTMOVE 1 << 1 // disables voluntary movement (revokes player control)
|
|
#define FLAG_NOPHYS 1 << 2 // disables velocity
|
|
#define FLAG_FLIPPED 1 << 3 // left if on, right if off
|
|
#define FLAG_STEPDEBOUNCE 1 << 4 // for player, flag to not spam step sounds on a frame
|
|
#define FLAG_HASCOAT 1 << 5 // for player: does the player have the coat?
|
|
#define FLAG_HALTANIM 1 << 6 // stops animations from looping
|
|
#define FLAG_REVERSEANIM 1 << 7 // animations play backwards (frames go backward from max)
|
|
#define INTER_ACTIVE 1 << 7 // for interactibles; is this interactible active?
|
|
|
|
// game flags
|
|
#define FLAG_HAMIEBOOK 1 // player has read Hamie's photobook?
|
|
#define FLAG_LIMEBOOK 1 << 1 // player has read the hospital handbook?
|
|
#define FLAG_MUG 1 << 2 // player drank the mug?
|
|
#define FLAG_LOCKCAM 1 << 6 // lock the camera at a given position (freecam ignores this)
|
|
|
|
// player states
|
|
#define PSTATE_NORMAL 0
|
|
#define PSTATE_SLEEPING 1
|
|
#define PSTATE_CUTSCENE 2
|
|
#define PSTATE_STAIRSUP 3
|
|
|
|
// game states
|
|
#define GSTATE_MENU 0
|
|
#define GSTATE_PLAYING 1
|
|
#define GSTATE_PAUSED 2
|
|
#define GSTATE_BOOK 3
|
|
|
|
#define FADE_NONE 0
|
|
#define FADE_OUT 1
|
|
#define FADE_IN 2
|
|
|
|
// sprite numbers and lengths
|
|
#define WTH_PLR_SPRCOUNT 10
|
|
#define WTH_PLR_IDLE_SPR 0
|
|
#define WTH_PLR_IDLE_LEN 1
|
|
#define WTH_PLR_IDLE1_SPR 4
|
|
#define WTH_PLR_IDLE1_LEN 3
|
|
#define WTH_PLR_WALK_SPR 1
|
|
#define WTH_PLR_WALK_LEN 4
|
|
#define WTH_PLR_DOOR_SPR 2
|
|
#define WTH_PLR_DOOR_LEN 2
|
|
#define WTH_PLR_SLEEP_SPR 3
|
|
#define WTH_PLR_SLEEP_LEN 0
|
|
#define WTH_PLR_UPSTAIR1_SPR 5
|
|
#define WTH_PLR_UPSTAIR1_LEN 2
|
|
#define WTH_PLR_UPSTAIR2_SPR 6
|
|
#define WTH_PLR_UPSTAIR2_LEN 4
|
|
#define WTH_PLR_DNSTAIR1_SPR 7
|
|
#define WTH_PLR_DNSTAIR1_LEN 2
|
|
#define WTH_PLR_DNSTAIR2_SPR 8
|
|
#define WTH_PLR_DNSTAIR2_LEN 3
|
|
#define WTH_PLR_SPOOKED_SPR 9
|
|
#define WTH_PLR_SPOOKED_LEN 30
|
|
|
|
// player sprites
|
|
#define WTH_SPRCOUNT 27
|
|
#define WTH_SPR_MENU 0
|
|
#define WTH_SPR_MENUBUTTONS 1
|
|
#define WTH_SPR_FONTMAP 2
|
|
#define WTH_SPR_UPARROW 3
|
|
#define WTH_SPR_OPTMENU 4
|
|
#define WTH_SPR_BG_STREET 5
|
|
#define WTH_SPR_BG_HOUSE 6
|
|
#define WTH_SPR_BG_OUTDOORS 7
|
|
#define WTH_SPR_BG_HOSPITAL 8
|
|
#define WTH_SPR_BG_HOS_PATIENTS 9
|
|
#define WTH_SPR_BG_HOS_HAMIE 10
|
|
#define WTH_SPR_BG_HOS_RICHIE 11
|
|
#define WTH_SPR_BG_BAR 12
|
|
#define WTH_SPR_BG_BAROUT 13
|
|
#define WTH_SPR_COATRACK 14
|
|
#define WTH_SPR_DOOR 15
|
|
#define WTH_SPR_STAIRS 16
|
|
#define WTH_SPR_ARTIFACTS 17
|
|
#define WTH_SPR_YOU 18
|
|
#define WTH_SPR_DECOR_MAILBOX 19
|
|
#define WTH_SPR_DECOR_BED 20
|
|
#define WTH_SPR_DECOR_HATRACK 21
|
|
#define WTH_SPR_DECOR_BARSTOOL 22
|
|
#define WTH_SPR_DECOR_TARGET 23
|
|
#define WTH_SPR_DECOR_BURNING 24
|
|
#define WTH_SPR_BOOK_HAMIE 25
|
|
#define WTH_SPR_READ_HAMIE 26
|
|
|
|
// sound effect indexes
|
|
#define WTH_SFX_STEP 0
|
|
#define WTH_SFX_JUMP 1
|
|
#define WTH_SFX_SLAM 2
|
|
#define WTH_SFX_COAT 3
|
|
#define WTH_SFX_DOOR_OPEN 4
|
|
#define WTH_SFX_DOOR_CLOSE 5
|
|
#define WTH_SFX_ARTIFACT_BADGE 6
|
|
#define WTH_SFX_ARTIFACT_MIRROR 7
|
|
#define WTH_SFX_ARTIFACT_DONUT 8
|
|
#define WTH_SFX_ARTIFACT_KNIFE 9
|
|
#define WTH_SFX_PAGE_OPEN 10
|
|
#define WTH_SFX_PAGE_CLOSE 11
|
|
|
|
// unorganized
|
|
#define SUBPIXELUNIT_ACCURACY 32
|
|
|
|
#if GAME_FPS > 30
|
|
#define ANIM_SPEED 6
|
|
#define PRE_GRAVITY SUBPIXELUNIT_ACCURACY >> 2
|
|
#define WALK_SPEED SUBPIXELUNIT_ACCURACY / 8
|
|
#define WALK_SPEEDLIMIT 3
|
|
#else
|
|
#define ANIM_SPEED 3
|
|
#define PRE_GRAVITY SUBPIXELUNIT_ACCURACY >> 1
|
|
#define WALK_SPEED SUBPIXELUNIT_ACCURACY / 4
|
|
#define WALK_SPEEDLIMIT 6
|
|
#endif
|
|
|
|
#define MUS_NMARE 0
|
|
#define MUS_BAR 1
|
|
#define MUS_CRC 2
|
|
|
|
#define WTH_BOOK_HAMIE_LEN 2
|
|
|
|
#define GROUNDLEVEL 200
|
|
|
|
// Gesture interactions with INTERTYPE_GESTUREs
|
|
// Basically flavor text
|
|
#define GESTURE_INVALID 0
|
|
#define GESTURESTR_INVALID "There's nothing interesting here."
|
|
#define GESTURE_BED 1
|
|
#define GESTURESTR_BED "Most people wouldn't want to sleep on a piled up blanket. I do, though."
|
|
#define GESTURE_COMPUTER 2
|
|
#define GESTURESTR_COMPUTER "I don't really do much with this. Most of the stuff I see on the... \"Internet\" is just mindless political blabber."
|
|
#define GESTURE_BADGE 3
|
|
#define GESTURESTR_BADGE "Aha, my Limetown Hospital badge! Sometimes I wonder why I feel such a strong connection with this thing."
|
|
#define GESTURE_MIRROR 4
|
|
#define GESTURESTR_MIRROR "Now I can look into my eyes, my soul, and see just how cracked it is. Maybe even something behind me..."
|
|
#define GESTURE_DONUT 5
|
|
#define GESTURESTR_DONUT "What is a donut doing here? It may not be safe to eat, considering I have no clue how long it's been sitting here."
|
|
#define GESTURE_KNIFE 6
|
|
#define GESTURESTR_KNIFE "Some blades are meant for precision. This is more like a weapon. The blood's somehow not dry."
|
|
#define GESTURE_YOU 7
|
|
#define GESTURESTR_YOU "This guy gives me some serious... uh... I'm not even sure how to describe it. I just feel very weird around him."
|
|
#define GESTURE_STOOL 8
|
|
#define GESTURESTR_STOOL "I've had too much social turmoil for a day, where can a man find a bartender around here?" // may not be used, Gesturing with a stool can let you sit on it
|
|
#define GESTURE_RECEPTIONIST 9
|
|
#define GESTURESTR_RECEPTIONIST "God, I hate the world I live in... If only my psychiatry experience could help me figure out why I do." // receptionist desk
|
|
#define GESTURE_OUTDOORS 10
|
|
#define GESTURESTR_OUTDOORS "Why is the sky red? It's not even dawn."
|
|
#define GESTURE_BURNING 11
|
|
#define GESTURESTR_BURNING "..."
|
|
#define GESTURE_GASOLINE 12
|
|
#define GESTURESTR_GASOLINE "Such an unsustaiable fuel, but it hurts the worst."
|
|
#define GESTURE_MAIL 13
|
|
#define GESTURESTR_MAIL "No news is good news."
|
|
#define GESTURE_COMPUTER2 14
|
|
#define GESTURESTR_COMPUTER2 "Ah, I remember Richie toyed with this thing all the time. Well, when nothing was happening."
|
|
#define GESTURE_NEWS1 15
|
|
#define GESTURESTR_NEWS1 "A newspaper? \"Floridian Reptilians Make Parades Around Town Square, Demand Attention and Special Treatment\"... I thought we stopped doing things like that ages ago."
|
|
#define GESTURE_NEWS2 16
|
|
#define GESTURESTR_NEWS2 "Another newspaper. \"Corporate CEO Found Missing In Midst Of Robot Outbreak\". Seems outlandish. Whatever place this is supposed to be, they're definitely not going in the right direction as a group." // aka GESTURESTR_GENERICPOLITICALLYCHARGEDMESSAGE
|
|
#define GESTURE_NEWS3 17
|
|
#define GESTURESTR_NEWS3 "Oh hey, more news. \"Florida Hospitals At All Time Low, Injury-Related Deaths Increase Tenfold\". Sounds like a job for me if this place was still in action."
|
|
|
|
static const char str_on[] = "ON";
|
|
static const char str_off[] = "OFF";
|
|
static const char str_exit[] = "Exit";
|