Fix backgrounds to make them fit room boundaries, render Bar background
and some decor, fix the player not warping to a door in the room over after entering a door with a defined object to warp to, add some debug functions
BIN
ASSETS/plr.ase
|
@ -63,7 +63,8 @@ As the game is work in progress (0.2.0a as of writing), there's bound to be bugs
|
|||
# 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 causes a loop until Lukifer walks
|
||||
- Reversing the IDLE1 animation incorrectly loops.
|
||||
- When going into a door that is supposed to take you to another object in the next room, Lukifer appears at the position of that object index from the room he came from instead of the next room over.
|
||||
- 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.
|
||||
|
|
BIN
SHOPKEEP.mod
25
constants.h
|
@ -109,17 +109,18 @@ Made by blitzdoughnuts
|
|||
#define WTH_SPR_BG_HOUSE 6
|
||||
#define WTH_SPR_BG_OUTDOORS 7
|
||||
#define WTH_SPR_BG_HOSPITAL 8
|
||||
#define WTH_SPR_COATRACK 9
|
||||
#define WTH_SPR_DOOR 10
|
||||
#define WTH_SPR_ARTIFACTS 11
|
||||
#define WTH_SPR_YOU 12
|
||||
#define WTH_SPR_DECOR_MAILBOX 13
|
||||
#define WTH_SPR_DECOR_BED 14
|
||||
#define WTH_SPR_DECOR_HATRACK 15
|
||||
#define WTH_SPR_DECOR_BARSTOOL 16
|
||||
#define WTH_SPR_DECOR_TARGET 17
|
||||
#define WTH_SPR_BOOK_HAMIE 18
|
||||
#define WTH_SPR_READ_HAMIE 19
|
||||
#define WTH_SPR_BG_BAR 9
|
||||
#define WTH_SPR_COATRACK 10
|
||||
#define WTH_SPR_DOOR 11
|
||||
#define WTH_SPR_ARTIFACTS 112
|
||||
#define WTH_SPR_YOU 13
|
||||
#define WTH_SPR_DECOR_MAILBOX 14
|
||||
#define WTH_SPR_DECOR_BED 15
|
||||
#define WTH_SPR_DECOR_HATRACK 16
|
||||
#define WTH_SPR_DECOR_BARSTOOL 17
|
||||
#define WTH_SPR_DECOR_TARGET 18
|
||||
#define WTH_SPR_BOOK_HAMIE 19
|
||||
#define WTH_SPR_READ_HAMIE 20
|
||||
|
||||
// sound effect indexes
|
||||
#define WTH_SFX_STEP 0
|
||||
|
@ -180,3 +181,5 @@ Made by blitzdoughnuts
|
|||
#define GESTURESTR_BURNING "..."
|
||||
#define GESTURE_GASOLINE 12
|
||||
#define GESTURESTR_GASOLINE "It isn't hard to put two and two together here now."
|
||||
#define GESTURE_MAIL 13
|
||||
#define GESTURESTR_MAIL "No news is good news."
|
||||
|
|
140
game.h
|
@ -87,7 +87,7 @@ uint8_t level; // all rooms, 256 is overkill but overkill is what's needed
|
|||
uint8_t fade, fademode; // fade variables, basically alpha
|
||||
uint8_t fadespeed;
|
||||
|
||||
char *gestures[13] = {
|
||||
char *gestures[14] = {
|
||||
GESTURESTR_INVALID,
|
||||
GESTURESTR_BED,
|
||||
GESTURESTR_COMPUTER,
|
||||
|
@ -100,7 +100,8 @@ char *gestures[13] = {
|
|||
GESTURESTR_RECEPTIONIST,
|
||||
GESTURESTR_OUTDOORS,
|
||||
GESTURESTR_BURNING,
|
||||
GESTURESTR_GASOLINE
|
||||
GESTURESTR_GASOLINE,
|
||||
GESTURESTR_MAIL
|
||||
};
|
||||
|
||||
uint8_t options[3];
|
||||
|
@ -113,7 +114,7 @@ void saveGame();
|
|||
void loadGame();
|
||||
|
||||
uint8_t addObject(int nx, int ny, uint8_t objType) {
|
||||
#ifdef WTHCOMPILER_DEBUG
|
||||
#ifdef WTH_DEBUG
|
||||
if (interacts_count >= INTER_LIMIT) {
|
||||
printf("addObject: Tried adding object over the limit!");
|
||||
return 0;
|
||||
|
@ -128,24 +129,24 @@ uint8_t addObject(int nx, int ny, uint8_t objType) {
|
|||
interacts[index].objID = objType;
|
||||
interacts[index].flags ^= INTER_ACTIVE;
|
||||
interacts_count++;
|
||||
|
||||
|
||||
// OBJECT INIT CODE
|
||||
switch (objType)
|
||||
{
|
||||
case INTERTYPE_DOOR:
|
||||
// open door if it spawns over the player
|
||||
if (plr.x >= interacts[index].x - 40 && plr.x < interacts[index].x + 40) interacts[index].flags ^= 1 << 2;
|
||||
break;
|
||||
case INTERTYPE_YOU:
|
||||
interacts[index].vars[2] = WTH_PLR_IDLE_LEN;
|
||||
break;
|
||||
}
|
||||
|
||||
/// printf("\nCreated object number %i at (%i, %i) of object type %i", index, interacts[index].x, interacts[index].y, interacts[index].objID);
|
||||
#ifdef WTH_DEBUG
|
||||
printf("\nCreated object number %i at (%i, %i) of object type %i\n", index, interacts[index].x, interacts[index].y, interacts[index].objID);
|
||||
#endif
|
||||
return index;
|
||||
};
|
||||
|
||||
static inline void LoadInRoom() {
|
||||
for (uint8_t i = 0; i < interacts_count; i++) {
|
||||
printf("Wiped Interactible %i\n", i);
|
||||
if ((interacts[i].flags & INTER_ACTIVE)) {
|
||||
interacts[i].flags = 0;
|
||||
};
|
||||
|
@ -177,10 +178,11 @@ static inline void LoadInRoom() {
|
|||
addObject(-360, 0, INTERTYPE_MOVEBLOCK);
|
||||
addObject(615, GROUNDLEVEL, INTERTYPE_DOOR);
|
||||
interacts[4].vars[0] = ROOM_OUTDOORS;
|
||||
addObject(408, GROUNDLEVEL, INTERTYPE_GESTURE);
|
||||
interacts[4].vars[2] = 1;
|
||||
addObject(438, GROUNDLEVEL, INTERTYPE_GESTURE);
|
||||
interacts[5].vars[0] = GESTURE_COMPUTER;
|
||||
if (!(plr.artifacts & (1 << ARTIFACT_KNIFE))) {
|
||||
addObject(-156, 140, INTERTYPE_ARTIFACT);
|
||||
addObject(-194, 140, INTERTYPE_ARTIFACT);
|
||||
interacts[6].vars[0] = ARTIFACT_KNIFE;
|
||||
};
|
||||
break;
|
||||
|
@ -192,13 +194,16 @@ static inline void LoadInRoom() {
|
|||
interacts[1].vars[0] = ROOM_STREETS;
|
||||
addObject(64,GROUNDLEVEL - 100,INTERTYPE_DECOR);
|
||||
interacts[2].vars[0] = WTH_SPR_DECOR_MAILBOX;
|
||||
addObject(128,GROUNDLEVEL,INTERTYPE_GESTURE);
|
||||
interacts[3].vars[0] = GESTURE_MAIL;
|
||||
addObject(-100, 0, INTERTYPE_MOVEBLOCK);
|
||||
break;
|
||||
case ROOM_STREETS: // endless streets
|
||||
addObject(plr.x, 0, INTERTYPE_MOVETRACK);
|
||||
interacts[0].vars[1] = ROOM_H_ENT;
|
||||
addObject(1200, GROUNDLEVEL, INTERTYPE_DOOR);
|
||||
interacts[1].vars[0] = 61;
|
||||
addObject(752, GROUNDLEVEL, INTERTYPE_DOOR);
|
||||
interacts[1].vars[0] = ROOM_BAR;
|
||||
interacts[1].vars[2] = 1;
|
||||
break;
|
||||
case ROOM_H_ENT: // hospital door
|
||||
interacts[ addObject(270, GROUNDLEVEL, INTERTYPE_DOOR) ].vars[0] = ROOM_HOSPITAL;
|
||||
|
@ -206,7 +211,11 @@ static inline void LoadInRoom() {
|
|||
case ROOM_HOSPITAL: // hospital main lobby (badge artifact)
|
||||
// if you DON'T have all the artifacts, allow exiting of the room
|
||||
// TO-DO: cutscene of the door slamming
|
||||
if (!(plr.artifacts >= 15)) interacts[ addObject(-20, GROUNDLEVEL, INTERTYPE_DOOR) ].vars[0] = 10;
|
||||
if (!(plr.artifacts >= 15)) {
|
||||
addObject(-20, GROUNDLEVEL, INTERTYPE_DOOR);
|
||||
interacts[0].vars[0] = ROOM_H_ENT;
|
||||
interacts[0].vars[2] = 1;
|
||||
};
|
||||
break;
|
||||
case ROOM_H_PATIENTS:
|
||||
addObject(0, 0, INTERTYPE_MOVEBLOCK);
|
||||
|
@ -217,10 +226,15 @@ static inline void LoadInRoom() {
|
|||
addObject(50, GROUNDLEVEL, INTERTYPE_DOOR);
|
||||
interacts[0].vars[0] = ROOM_STREETS;
|
||||
interacts[0].vars[2] = 2;
|
||||
for (uint8_t i = 1; i < 5; i++) {
|
||||
addObject(32 + (32 * i),GROUNDLEVEL,INTERTYPE_DECOR);
|
||||
for (uint8_t i = 1; i < 9; i += 2) {
|
||||
addObject(106 + (56 * i-2),GROUNDLEVEL - 100,INTERTYPE_DECOR);
|
||||
interacts[i].vars[0] = WTH_SPR_DECOR_BARSTOOL;
|
||||
addObject(interacts[i].x + 75,GROUNDLEVEL,INTERTYPE_GESTURE);
|
||||
interacts[i+1].vars[0] = GESTURE_STOOL;
|
||||
};
|
||||
addObject(650, GROUNDLEVEL, INTERTYPE_MOVEBLOCK);
|
||||
interacts[9].flags ^= 1;
|
||||
addObject(-64, GROUNDLEVEL, INTERTYPE_MOVEBLOCK);
|
||||
break;
|
||||
/*
|
||||
case 7: // hos. hallway to/from patient rooms
|
||||
|
@ -239,10 +253,14 @@ static inline void changeRoom(uint8_t input, uint8_t startAtInter) {
|
|||
cam.y = 0;
|
||||
plr.hsp = plr.vsp = plr.hsp_sub = plr.vsp_sub = 0;
|
||||
if (plr.flags & FLAG_CANTMOVE) plr.flags ^= FLAG_CANTMOVE;
|
||||
if (startAtInter > 0) {
|
||||
plr.x = interacts[startAtInter - 1].x;
|
||||
};
|
||||
LoadInRoom();
|
||||
if (startAtInter > 0) {
|
||||
puts("Changing player pos (startAtInter)");
|
||||
plr.x = interacts[startAtInter - 1].x;
|
||||
|
||||
// open door if it spawns over the player
|
||||
if (interacts[startAtInter-1].objID == INTERTYPE_DOOR && plr.x >= interacts[startAtInter-1].x - 40 && plr.x < interacts[startAtInter-1].x + 40) interacts[startAtInter-1].flags ^= 1 << 2;
|
||||
};
|
||||
};
|
||||
|
||||
void interact_step(WTH_Interactible *REF) {
|
||||
|
@ -484,7 +502,11 @@ void step() {
|
|||
fade = 255;
|
||||
fademode = FADE_IN;
|
||||
fadespeed = 2;
|
||||
#ifdef WTH_DEBUG
|
||||
changeRoom(DEBUG_STARTROOM, 0);
|
||||
#else
|
||||
changeRoom(0, 0);
|
||||
#endif
|
||||
break;
|
||||
#ifndef WTHCOMPILER_NOOPTIONSMENU
|
||||
case 1: menu.menuindex = 1; menu.menuselect = 0; menu.menulimit = 5; break;
|
||||
|
@ -525,10 +547,15 @@ void step() {
|
|||
break;
|
||||
};
|
||||
};
|
||||
if (!found) puts(gestures[0]);
|
||||
if (!found) {
|
||||
if (level == ROOM_OUTDOORS) puts(gestures[GESTURE_OUTDOORS]);
|
||||
else puts(gestures[GESTURE_INVALID]);
|
||||
};
|
||||
};
|
||||
|
||||
if ((input_keys & KEY_LEFT) && plr.hsp > -3) {
|
||||
// maybe there's a way to "merge" the walking code in a way that reduces
|
||||
// the redundant animation and flag changes?
|
||||
if (((input_keys & KEY_LEFT) && !(input_keys & KEY_RIGHT)) && plr.hsp > -3) {
|
||||
plr.hsp_sub -= SUBPIXELUNIT_ACCURACY / 8;
|
||||
plr.animindex = WTH_PLR_WALK_SPR;
|
||||
plr.animflimit = WTH_PLR_WALK_LEN;
|
||||
|
@ -537,7 +564,7 @@ void step() {
|
|||
if (plr.hsp > 0) plr.hsp = 0;
|
||||
if (!(plr.flags & FLAG_FLIPPED)) plr.flags ^= FLAG_FLIPPED;
|
||||
};
|
||||
if ((input_keys & KEY_RIGHT) && plr.hsp < 3) {
|
||||
if (((input_keys & KEY_RIGHT) && !(input_keys & KEY_LEFT)) && plr.hsp < 3) {
|
||||
plr.hsp_sub += SUBPIXELUNIT_ACCURACY / 8;
|
||||
plr.animindex = WTH_PLR_WALK_SPR;
|
||||
plr.animflimit = WTH_PLR_WALK_LEN;
|
||||
|
@ -546,7 +573,8 @@ void step() {
|
|||
if (plr.hsp < 0) plr.hsp = 0;
|
||||
if (plr.flags & FLAG_FLIPPED) plr.flags ^= FLAG_FLIPPED;
|
||||
};
|
||||
if (!(input_keys & KEY_LEFT) && !(input_keys & KEY_RIGHT) && (plr.flags & FLAG_GROUNDED)) { // seems erroneous
|
||||
|
||||
if ((plr.flags & FLAG_GROUNDED) && !(input_keys & KEY_LEFT) && !(input_keys & KEY_RIGHT)) { // seems erroneous
|
||||
plr.hsp = 0;
|
||||
if (!(plr.flags & FLAG_REVERSEANIM)) {
|
||||
if (plr.animindex != WTH_PLR_IDLE_SPR && plr.animindex != WTH_PLR_IDLE1_SPR) {
|
||||
|
@ -565,44 +593,44 @@ void step() {
|
|||
};
|
||||
} else if (plr.animframe == 0) plr.flags ^= FLAG_REVERSEANIM;
|
||||
};
|
||||
};
|
||||
|
||||
if (!(plr.flags & FLAG_NOPHYS)) {
|
||||
if (!(plr.flags & FLAG_GROUNDED)) {
|
||||
plr.vsp_sub += PRE_GRAVITY;
|
||||
}
|
||||
if (plr.y > GROUNDLEVEL || plr.y + plr.vsp > GROUNDLEVEL) {
|
||||
if (!(plr.flags & FLAG_NOPHYS)) {
|
||||
if (!(plr.flags & FLAG_GROUNDED)) {
|
||||
plr.flags |= FLAG_GROUNDED;
|
||||
plr.vsp_sub += PRE_GRAVITY;
|
||||
}
|
||||
if (plr.y > GROUNDLEVEL || plr.y + plr.vsp > GROUNDLEVEL) {
|
||||
if (!(plr.flags & FLAG_GROUNDED)) {
|
||||
plr.flags |= FLAG_GROUNDED;
|
||||
};
|
||||
plr.vsp = 0;
|
||||
plr.vsp_sub = 0;
|
||||
plr.y = GROUNDLEVEL;
|
||||
};
|
||||
// if the calc messes up at long distances, try changing it to an int
|
||||
if (plr.vsp_sub > SUBPIXELUNIT_ACCURACY) {
|
||||
int16_t calc = (plr.vsp_sub / SUBPIXELUNIT_ACCURACY);
|
||||
plr.vsp += calc;
|
||||
plr.vsp_sub -= SUBPIXELUNIT_ACCURACY * calc;
|
||||
};
|
||||
if (plr.vsp_sub < 0) {
|
||||
int16_t calc = (plr.vsp_sub / SUBPIXELUNIT_ACCURACY);
|
||||
plr.vsp -= calc;
|
||||
plr.vsp_sub += SUBPIXELUNIT_ACCURACY * calc;
|
||||
};
|
||||
plr.vsp = 0;
|
||||
plr.vsp_sub = 0;
|
||||
plr.y = GROUNDLEVEL;
|
||||
};
|
||||
// if the calc messes up at long distances, try changing it to an int
|
||||
if (plr.vsp_sub > SUBPIXELUNIT_ACCURACY) {
|
||||
int16_t calc = (plr.vsp_sub / SUBPIXELUNIT_ACCURACY);
|
||||
plr.vsp += calc;
|
||||
plr.vsp_sub -= SUBPIXELUNIT_ACCURACY * calc;
|
||||
};
|
||||
if (plr.vsp_sub < 0) {
|
||||
int16_t calc = (plr.vsp_sub / SUBPIXELUNIT_ACCURACY);
|
||||
plr.vsp -= calc;
|
||||
plr.vsp_sub += SUBPIXELUNIT_ACCURACY * calc;
|
||||
};
|
||||
|
||||
if (plr.hsp_sub > SUBPIXELUNIT_ACCURACY) {
|
||||
int16_t calc = (plr.hsp_sub / SUBPIXELUNIT_ACCURACY);
|
||||
plr.hsp += calc;
|
||||
plr.hsp_sub -= SUBPIXELUNIT_ACCURACY * calc;
|
||||
if (plr.hsp_sub > SUBPIXELUNIT_ACCURACY) {
|
||||
int16_t calc = (plr.hsp_sub / SUBPIXELUNIT_ACCURACY);
|
||||
plr.hsp += calc;
|
||||
plr.hsp_sub -= SUBPIXELUNIT_ACCURACY * calc;
|
||||
};
|
||||
if (plr.hsp_sub < 0) {
|
||||
int16_t calc = (plr.hsp_sub / SUBPIXELUNIT_ACCURACY);
|
||||
plr.hsp += calc;
|
||||
plr.hsp_sub -= SUBPIXELUNIT_ACCURACY * calc; // HOW does this make ANY logical sense to work properly
|
||||
};
|
||||
plr.x += plr.hsp;
|
||||
plr.y += plr.vsp;
|
||||
};
|
||||
if (plr.hsp_sub < 0) {
|
||||
int16_t calc = (plr.hsp_sub / SUBPIXELUNIT_ACCURACY);
|
||||
plr.hsp += calc;
|
||||
plr.hsp_sub -= SUBPIXELUNIT_ACCURACY * calc; // HOW does this make ANY logical sense to work properly
|
||||
};
|
||||
plr.x += plr.hsp;
|
||||
plr.y += plr.vsp;
|
||||
};
|
||||
break;
|
||||
case PSTATE_SLEEPING: default:
|
||||
|
|
33
main_sdl.c
|
@ -49,7 +49,7 @@ Mix_Chunk *sfx[12];
|
|||
SDL_Texture *wintext;
|
||||
|
||||
SDL_Texture *plrsprites[10];
|
||||
SDL_Texture *sprites[21];
|
||||
SDL_Texture *sprites[22];
|
||||
|
||||
SDL_Rect dspdest_rect; // this is the DESTINATION, aka screen position
|
||||
SDL_Rect fade_rect; // used for fading in/out
|
||||
|
@ -78,9 +78,10 @@ static const char str_wintitle[] = WINTITLE; // it's only here to cut down redun
|
|||
#endif
|
||||
|
||||
#ifdef WTH_DEBUG
|
||||
uint8_t DEBUG_keys;
|
||||
uint8_t DEBUG_lastkeys;
|
||||
uint16_t DEBUG_keys;
|
||||
uint16_t DEBUG_lastkeys;
|
||||
uint8_t DEBUG_objSel;
|
||||
SDL_Texture *DEBUG_sprites[2];
|
||||
#endif
|
||||
|
||||
void drawRepeatingSprite(SDL_Texture *sprite, int x, int y) {
|
||||
|
@ -269,7 +270,7 @@ void draw() {
|
|||
drawRepeatingSprite(sprites[WTH_SPR_BG_STREET], -cam.x, -cam.y);
|
||||
break;
|
||||
case ROOM_HOUSE:
|
||||
drawSprite(sprites[WTH_SPR_BG_HOUSE], -90 - cam.x - 75, -cam.y);
|
||||
drawSprite(sprites[WTH_SPR_BG_HOUSE], -456 - cam.x - 75, -cam.y);
|
||||
break;
|
||||
case ROOM_OUTDOORS:
|
||||
drawRepeatingSprite(sprites[WTH_SPR_BG_OUTDOORS], -cam.x / 2, -cam.y);
|
||||
|
@ -277,6 +278,9 @@ void draw() {
|
|||
case ROOM_HOSPITAL:
|
||||
drawSprite(sprites[WTH_SPR_BG_HOSPITAL], -45 - cam.x, -cam.y);
|
||||
break;
|
||||
case ROOM_BAR:
|
||||
drawSprite(sprites[WTH_SPR_BG_BAR], -250 - cam.x, -cam.y);
|
||||
break;
|
||||
};
|
||||
|
||||
for (uint8_t i = 0; i < interacts_count; i++) {
|
||||
|
@ -306,7 +310,7 @@ void draw() {
|
|||
break;
|
||||
#ifdef WTH_DEBUG
|
||||
case INTERTYPE_GESTURE:
|
||||
drawSprite(sprites[20], (interacts[i].x - 75) - cam.x, (interacts[i].y - 100) - cam.y);
|
||||
drawSprite(DEBUG_sprites[0], (interacts[i].x - 75) - cam.x, (interacts[i].y - 100) - cam.y);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
@ -320,10 +324,10 @@ void draw() {
|
|||
case ROOM_TEST: drawTextString("Test Room", 0, 0, 0); break;
|
||||
case ROOM_HOUSE: drawTextString("House", 0, 0, 0); break;
|
||||
case ROOM_OUTDOORS: drawTextString("Outside of House", 0, 0, 0); break;
|
||||
case 3: drawTextString("Endless Sidewalk", 0, 0, 0); break;
|
||||
case 4: drawTextString("Hospital Entrance", 0, 0, 0); break;
|
||||
case 5: drawTextString("Hospital Lobby", 0, 0, 0); break;
|
||||
case 11: drawTextString("Bar", 0, 0, 0); break;
|
||||
case ROOM_STREETS: drawTextString("Endless Sidewalk", 0, 0, 0); break;
|
||||
case ROOM_H_ENT: drawTextString("Hospital Entrance", 0, 0, 0); break;
|
||||
case ROOM_HOSPITAL: drawTextString("Hospital Lobby", 0, 0, 0); break;
|
||||
case ROOM_BAR: drawTextString("Bar", 0, 0, 0); break;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -389,7 +393,7 @@ void keys() {
|
|||
if (keystates[SDL_SCANCODE_D]) xtrakeys |= KEY_RIGHT;
|
||||
if (keystates[SDL_SCANCODE_W]) xtrakeys |= KEY_UP;
|
||||
if (keystates[SDL_SCANCODE_S]) xtrakeys |= KEY_DOWN;
|
||||
if (keystates[SDL_SCANCODE_X]) xtrakeys |= KEY_ATTACK;
|
||||
if (keystates[SDL_SCANCODE_LSHIFT]) xtrakeys |= KEY_ATTACK;
|
||||
|
||||
if (controllerinput) {
|
||||
printf("Registering controller input...\n");
|
||||
|
@ -425,6 +429,8 @@ void keys() {
|
|||
if (keystates[SDL_SCANCODE_END]) DEBUG_keys ^= 16;
|
||||
if (keystates[SDL_SCANCODE_INSERT]) DEBUG_keys ^= 32;
|
||||
if (keystates[SDL_SCANCODE_PAGEUP]) DEBUG_keys ^= 64;
|
||||
if (keystates[SDL_SCANCODE_PAGEDOWN]) DEBUG_keys ^= 128;
|
||||
if (keystates[SDL_SCANCODE_TAB]) DEBUG_keys ^= 256;
|
||||
|
||||
#define DEBUG_pressed(key) ((DEBUG_keys ^ key) && !(DEBUG_lastkeys ^ key))
|
||||
if (DEBUG_pressed(1)) addObject(
|
||||
|
@ -458,6 +464,9 @@ void keys() {
|
|||
interacts[DEBUG_objSel].x += 16;
|
||||
printf("%i\n", interacts[DEBUG_objSel].x);
|
||||
};
|
||||
if (DEBUG_pressed(256)) {
|
||||
options[0] ^= WTHOPTS_DEVCAM;
|
||||
};
|
||||
|
||||
DEBUG_lastkeys = DEBUG_keys;
|
||||
DEBUG_keys = 0;
|
||||
|
@ -568,16 +577,18 @@ int main(int argc, char *argv[]) {
|
|||
sprites[WTH_SPR_BG_HOUSE] = IMG_LoadTexture(render, "sprites/bg_house.png");
|
||||
sprites[WTH_SPR_BG_OUTDOORS] = IMG_LoadTexture(render, "sprites/bg_outdoors.png");
|
||||
sprites[WTH_SPR_BG_HOSPITAL] = IMG_LoadTexture(render, "sprites/bg_hospital.png");
|
||||
sprites[WTH_SPR_BG_BAR] = IMG_LoadTexture(render, "sprites/bg_bar.png");
|
||||
sprites[WTH_SPR_COATRACK] = IMG_LoadTexture(render, "sprites/coatrack.png");
|
||||
sprites[WTH_SPR_DOOR] = IMG_LoadTexture(render, "sprites/door.png");
|
||||
sprites[WTH_SPR_ARTIFACTS] = IMG_LoadTexture(render, "sprites/artifacts.png");
|
||||
sprites[WTH_SPR_YOU] = IMG_LoadTexture(render, "sprites/you_idle.png");
|
||||
sprites[WTH_SPR_DECOR_BED] = IMG_LoadTexture(render, "sprites/bed.png");
|
||||
sprites[WTH_SPR_DECOR_MAILBOX] = IMG_LoadTexture(render, "sprites/decor_mailbox.png");
|
||||
sprites[WTH_SPR_DECOR_BARSTOOL] = IMG_LoadTexture(render, "sprites/decor_barstool.png");
|
||||
sprites[WTH_SPR_DECOR_HATRACK] = IMG_LoadTexture(render, "sprites/decor_hatrack.png");
|
||||
sprites[WTH_SPR_BOOK_HAMIE] = IMG_LoadTexture(render, "sprites/book.png");
|
||||
sprites[WTH_SPR_READ_HAMIE] = IMG_LoadTexture(render, "sprites/read_hamie.png");
|
||||
sprites[20] = IMG_LoadTexture(render, "sprites/DEBUG_gesture.png");
|
||||
DEBUG_sprites[0] = IMG_LoadTexture(render, "sprites/DEBUG_gesture.png");
|
||||
|
||||
running = 1;
|
||||
SDL_Event event;
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
#define HEIGHT 270
|
||||
#endif
|
||||
|
||||
// starting room for WTH_DEBUG
|
||||
#define DEBUG_STARTROOM ROOM_HOUSE
|
||||
|
||||
// Uncomment these to enable these COMPILE-TIME options.
|
||||
// Recompile the game to put these in effect!
|
||||
|
||||
|
|
BIN
sprites/bg_BARHOUSE.png
Normal file
After Width: | Height: | Size: 598 B |
BIN
sprites/bg_bar.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 4.1 KiB |
BIN
sprites/decor_barstool.png
Normal file
After Width: | Height: | Size: 564 B |
BIN
sprites/decor_scrap.png
Normal file
After Width: | Height: | Size: 821 B |
BIN
sprites/decor_target.png
Normal file
After Width: | Height: | Size: 893 B |
BIN
sprites/decor_trespass.png
Normal file
After Width: | Height: | Size: 985 B |