Skip to content

Commit

Permalink
Kill all existing graphics/etc
Browse files Browse the repository at this point in the history
  • Loading branch information
potatolain committed Apr 27, 2019
1 parent fc15b83 commit 26d51c2
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
Binary file modified graphics/sprites.chr
Binary file not shown.
Binary file modified graphics/tiles.chr
Binary file not shown.
2 changes: 1 addition & 1 deletion guide/section_2/changing_the_hud.md
Expand Up @@ -132,7 +132,7 @@ screenBuffer[i++] = MSB(NAMETABLE_A + HUD_KEY_START) | NT_UPD_HORZ;
screenBuffer[i++] = LSB(NAMETABLE_A + HUD_KEY_START);
screenBuffer[i++] = 2;
screenBuffer[i++] = HUD_TILE_KEY;
screenBuffer[i++] = HUD_TILE_NUMBER + playerKeyCount;
screenBuffer[i++] = HUD_TILE_NUMBER + playerlifePreserverCount;
screenBuffer[i++] = NT_UPD_EOF;
set_vram_update(screenBuffer);
Expand Down
Binary file modified sound/music/music.bin
Binary file not shown.
Binary file modified sound/music/music.ftm
Binary file not shown.
Binary file modified sound/music/samples.bin
Binary file not shown.
8 changes: 4 additions & 4 deletions source/configuration/game_info.c
@@ -1,6 +1,6 @@
// A bunch of information about your game - used on the title screen, as well as
// the credits, and anywhere else you fancy!
const unsigned char gameName[] = "Quirk's Adventure";
const unsigned char gameAuthor[] = "YOU!";
const unsigned char gameAuthorContact[] = "Tweet at us! @your_twitter";
const unsigned char currentYear[] = "2018";
const unsigned char gameName[] = "Depths";
const unsigned char gameAuthor[] = "@cppchriscpp";
const unsigned char gameAuthorContact[] = "A Ludum Dare 44 Game";
const unsigned char currentYear[] = "2019";
2 changes: 1 addition & 1 deletion source/globals.c
Expand Up @@ -9,7 +9,7 @@ ZEROPAGE_DEF(unsigned char, i);
ZEROPAGE_DEF(unsigned char, j);

ZEROPAGE_DEF(unsigned char, playerHealth);
ZEROPAGE_DEF(unsigned char, playerKeyCount);
ZEROPAGE_DEF(unsigned char, playerlifePreserverCount);
ZEROPAGE_DEF(unsigned char, playerMaxHealth);
ZEROPAGE_DEF(unsigned char, gameState);
ZEROPAGE_DEF(unsigned char, currentWorldId);
Expand Down
2 changes: 1 addition & 1 deletion source/globals.h
Expand Up @@ -11,7 +11,7 @@ ZEROPAGE_EXTERN(unsigned char, gameState);
ZEROPAGE_EXTERN(unsigned char, i);
ZEROPAGE_EXTERN(unsigned char, j);
ZEROPAGE_EXTERN(unsigned char, playerHealth);
ZEROPAGE_EXTERN(unsigned char, playerKeyCount);
ZEROPAGE_EXTERN(unsigned char, playerlifePreserverCount);
ZEROPAGE_EXTERN(unsigned char, playerMaxHealth);
ZEROPAGE_EXTERN(unsigned char, currentWorldId);

Expand Down
2 changes: 1 addition & 1 deletion source/graphics/hud.c
Expand Up @@ -46,7 +46,7 @@ void update_hud(void) {
screenBuffer[i++] = LSB(NAMETABLE_A + HUD_KEY_START);
screenBuffer[i++] = 2;
screenBuffer[i++] = HUD_TILE_KEY;
screenBuffer[i++] = HUD_TILE_NUMBER + playerKeyCount;
screenBuffer[i++] = HUD_TILE_NUMBER + playerlifePreserverCount;


screenBuffer[i++] = NT_UPD_EOF;
Expand Down
2 changes: 1 addition & 1 deletion source/menus/title.c
Expand Up @@ -20,7 +20,7 @@ void draw_title_screen(void) {
oam_clear();


put_str(NTADR_A(7, 5), gameName);
put_str(NTADR_A(12, 5), gameName);

put_str(NTADR_A(2, 26), gameAuthorContact);

Expand Down
2 changes: 1 addition & 1 deletion source/sprites/map_sprites.h
Expand Up @@ -3,7 +3,7 @@
#define NO_SPRITE_HIT 255

// Maximum number of keys to let the player pick up.
#define MAX_KEY_COUNT 9
#define MAX_LIFE_PRESERVER_COUNT 9

// We make our 16x16 sprites a little bit smaller than they appear, so collisions with them are
// less likely. This makes getting hit by enemies less likely. This is only for collisions with
Expand Down
8 changes: 4 additions & 4 deletions source/sprites/player.c
Expand Up @@ -311,8 +311,8 @@ void handle_player_sprite_collision(void) {
}
break;
case SPRITE_TYPE_KEY:
if (playerKeyCount < MAX_KEY_COUNT) {
playerKeyCount++;
if (playerlifePreserverCount < MAX_LIFE_PRESERVER_COUNT) {
playerlifePreserverCount++;
currentMapSpriteData[(currentMapSpriteIndex) + MAP_SPRITE_DATA_POS_TYPE] = SPRITE_TYPE_OFFSCREEN;

sfx_play(SFX_KEY, SFX_CHANNEL_3);
Expand Down Expand Up @@ -365,8 +365,8 @@ void handle_player_sprite_collision(void) {
break;
case SPRITE_TYPE_LOCKED_DOOR:
// First off, do you have a key? If so, let's just make this go away...
if (playerKeyCount > 0) {
playerKeyCount--;
if (playerlifePreserverCount > 0) {
playerlifePreserverCount--;
currentMapSpriteData[(currentMapSpriteIndex) + MAP_SPRITE_DATA_POS_TYPE] = SPRITE_TYPE_OFFSCREEN;

// Mark the door as gone, so it doesn't come back.
Expand Down

0 comments on commit 26d51c2

Please sign in to comment.