diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-07-17 08:06:56 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-07-17 08:06:56 +0100 |
commit | 20d95a3a156b8d903581d76359522ef9cd51e492 (patch) | |
tree | 7196ebb3567689f20a4b58335228b8258b038d5c | |
parent | da4ab66aa33add78cbd721f0130d716af3f33590 (diff) | |
download | gold-mine-run-20d95a3a156b8d903581d76359522ef9cd51e492.tar.gz gold-mine-run-20d95a3a156b8d903581d76359522ef9cd51e492.zip |
Trim spritesheet
Remove some unused space
-rw-r--r-- | data/sprites.png | bin | 27214 -> 27357 bytes | |||
-rw-r--r-- | src/bat.c | 16 | ||||
-rw-r--r-- | src/bones.c | 16 | ||||
-rw-r--r-- | src/effect.c | 16 | ||||
-rw-r--r-- | src/game.c | 12 | ||||
-rw-r--r-- | src/menu.c | 12 | ||||
-rw-r--r-- | src/old.c | 16 | ||||
-rw-r--r-- | src/pickup.c | 80 | ||||
-rw-r--r-- | src/player.c | 24 | ||||
-rw-r--r-- | src/snake.c | 16 | ||||
-rw-r--r-- | src/tmonster.c | 16 |
11 files changed, 112 insertions, 112 deletions
diff --git a/data/sprites.png b/data/sprites.png Binary files differindex 3dff0e7..88acf2e 100644 --- a/data/sprites.png +++ b/data/sprites.png @@ -17,16 +17,16 @@ static const Rect frames[2 * 4] = { /* right */ - { 64, 32, 144, 144 }, - { 80, 32, 144, 144 }, - { 96, 32, 144, 144 }, - { 80, 32, 144, 144 }, + { 64, 32, 144, 112 }, + { 80, 32, 144, 112 }, + { 96, 32, 144, 112 }, + { 80, 32, 144, 112 }, /* left */ - { 64, 32, 144, 144 }, - { 80, 32, 144, 144 }, - { 96, 32, 144, 144 }, - { 80, 32, 144, 144 }, + { 64, 32, 144, 112 }, + { 80, 32, 144, 112 }, + { 96, 32, 144, 112 }, + { 80, 32, 144, 112 }, }; void bat_init(Entity *e) diff --git a/src/bones.c b/src/bones.c index 8891534..c2b3a67 100644 --- a/src/bones.c +++ b/src/bones.c @@ -13,16 +13,16 @@ static const Rect frames[2 * 4] = { /* right */ - { 0, 96, 144, 144 }, - { 16, 96, 144, 144 }, - { 0, 96, 144, 144 }, - { 32, 96, 144, 144 }, + { 0, 96, 144, 112 }, + { 16, 96, 144, 112 }, + { 0, 96, 144, 112 }, + { 32, 96, 144, 112 }, /* left */ - { 48, 96, 144, 144 }, - { 64, 96, 144, 144 }, - { 48, 96, 144, 144 }, - { 80, 96, 144, 144 }, + { 48, 96, 144, 112 }, + { 64, 96, 144, 112 }, + { 48, 96, 144, 112 }, + { 80, 96, 144, 112 }, }; void bones_init(Entity *e) diff --git a/src/effect.c b/src/effect.c index e9ee55e..751b316 100644 --- a/src/effect.c +++ b/src/effect.c @@ -11,16 +11,16 @@ static const Rect frames[2 * 4] = { - { 96, 16, 144, 144 }, - { 112, 16, 144, 144 }, - { 128, 16, 144, 144 }, + { 96, 16, 144, 112 }, + { 112, 16, 144, 112 }, + { 128, 16, 144, 112 }, /* not used */ - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 } + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 } }; void effect_out_new(uint16_t x, uint16_t y) @@ -67,8 +67,8 @@ static void hud_render() if (hud & HUD_ALL) { - Rect src = { 128, 32, 144, 144}; - Rect dst = { 4, 0, 16, 16}; + Rect src = { 128, 32, 144, 112 }; + Rect dst = { 4, 0, 16, 16 }; /* lives */ blitrc(binary_sprites_start, &src, &dst); @@ -123,10 +123,10 @@ static void hud_render() static const Rect intro_frames[WALK_CYCLE_FRAMES] = { /* walk cycle */ - { 0, 0, 144, 144 }, - { 16, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 32, 0, 144, 144 }, + { 0, 0, 144, 112 }, + { 16, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 32, 0, 144, 112 }, }; static void run_intro() @@ -42,12 +42,12 @@ static const char *names[CAST_LEN] = { /* sprites for the cast */ static const Rect sprites[CAST_LEN] = { - { 0, 0, 144, 144 }, - { 0, 32, 144, 144 }, - { 64, 32, 144, 144 }, - { 0, 80, 144, 144 }, - { 0, 96, 144, 144 }, - { 80, 48, 144, 144 }, + { 0, 0, 144, 112 }, + { 0, 32, 144, 112 }, + { 64, 32, 144, 112 }, + { 0, 80, 144, 112 }, + { 0, 96, 144, 112 }, + { 80, 48, 144, 112 }, }; static void render_cast() @@ -16,16 +16,16 @@ static const Rect frames[2 * 4] = { /* right */ - { 0, 80, 144, 144 }, - { 16, 80, 144, 144 }, - { 0, 80, 144, 144 }, - { 32, 80, 144, 144 }, + { 0, 80, 144, 112 }, + { 16, 80, 144, 112 }, + { 0, 80, 144, 112 }, + { 32, 80, 144, 112 }, /* left */ - { 48, 80, 144, 144 }, - { 64, 80, 144, 144 }, - { 48, 80, 144, 144 }, - { 80, 80, 144, 144 }, + { 48, 80, 144, 112 }, + { 64, 80, 144, 112 }, + { 48, 80, 144, 112 }, + { 80, 80, 144, 112 }, }; void old_init(Entity *e) diff --git a/src/pickup.c b/src/pickup.c index fe7d15e..3e10b58 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -28,79 +28,79 @@ typedef enum static const Rect frames_in[2 * 4] = { - { 96, 16, 144, 144 }, - { 128, 16, 144, 144 }, - { 112, 16, 144, 144 }, + { 96, 16, 144, 112 }, + { 128, 16, 144, 112 }, + { 112, 16, 144, 112 }, /* not used */ - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 } + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 } }; static const Rect frames[2 * 4] = { /* time */ - { 80, 16, 144, 144 }, + { 80, 16, 144, 112 }, /* pickaxe */ - { 64, 16, 144, 144 }, + { 64, 16, 144, 112 }, /* gold key */ - { 32, 16, 144, 144 }, + { 32, 16, 144, 112 }, /* siver key */ - { 48, 16, 144, 144 }, + { 48, 16, 144, 112 }, /* not used */ - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 } + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 } }; static const Rect frames_bonus0[2 * 4] = { - { 0, 48, 144, 144 }, - { 16, 48, 144, 144 }, - { 32, 48, 144, 144 }, - { 48, 48, 144, 144 }, + { 0, 48, 144, 112 }, + { 16, 48, 144, 112 }, + { 32, 48, 144, 112 }, + { 48, 48, 144, 112 }, /* not used */ - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 } + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 } }; static const Rect frames_bonus1[2 * 4] = { - { 0, 64, 144, 144 }, - { 16, 64, 144, 144 }, - { 32, 64, 144, 144 }, - { 48, 64, 144, 144 }, + { 0, 64, 144, 112 }, + { 16, 64, 144, 112 }, + { 32, 64, 144, 112 }, + { 48, 64, 144, 112 }, /* not used */ - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 } + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 } }; static const Rect frames_bonus2[2 * 4] = { - { 64, 64, 144, 144 }, - { 80, 64, 144, 144 }, - { 96, 64, 144, 144 }, - { 112, 64, 144, 144 }, + { 64, 64, 144, 112 }, + { 80, 64, 144, 112 }, + { 96, 64, 144, 112 }, + { 112, 64, 144, 112 }, /* not used */ - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 } + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 } }; static const Rect *frames_bonuses[] = diff --git a/src/player.c b/src/player.c index a64f5d0..24231c5 100644 --- a/src/player.c +++ b/src/player.c @@ -40,29 +40,29 @@ static const Rect frames[2][6] = { { /* walk cycle */ - { 0, 0, 144, 144 }, - { 16, 0, 144, 144 }, - { 0, 0, 144, 144 }, - { 32, 0, 144, 144 }, + { 0, 0, 144, 112 }, + { 16, 0, 144, 112 }, + { 0, 0, 144, 112 }, + { 32, 0, 144, 112 }, /* jump */ - { 48, 0, 144, 144 }, + { 48, 0, 144, 112 }, /* dying */ - { 128, 0, 144, 144 }, + { 128, 0, 144, 112 }, }, { /* walk cycle */ - { 64, 0, 144, 144 }, - { 80, 0, 144, 144 }, - { 64, 0, 144, 144 }, - { 96, 0, 144, 144 }, + { 64, 0, 144, 112 }, + { 80, 0, 144, 112 }, + { 64, 0, 144, 112 }, + { 96, 0, 144, 112 }, /* jump */ - { 112, 0, 144, 144 }, + { 112, 0, 144, 112 }, /* dying */ - { 128, 0, 144, 144 }, + { 128, 0, 144, 112 }, }, }; diff --git a/src/snake.c b/src/snake.c index 549edb8..c5ab448 100644 --- a/src/snake.c +++ b/src/snake.c @@ -11,18 +11,18 @@ static const Rect frames[2 * 4] = { /* right */ - { 0, 32, 144, 144 }, - { 16, 32, 144, 144 }, + { 0, 32, 144, 112 }, + { 16, 32, 144, 112 }, /* not used */ - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, /* left */ - { 32, 32, 144, 144 }, - { 48, 32, 144, 144 }, + { 32, 32, 144, 112 }, + { 48, 32, 144, 112 }, /* not used */ - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 } + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 } }; void snake_init(Entity *e) diff --git a/src/tmonster.c b/src/tmonster.c index 9f3c618..491decb 100644 --- a/src/tmonster.c +++ b/src/tmonster.c @@ -16,20 +16,20 @@ static const Rect frames[2 * 4] = { /* right */ - { 96, 16, 144, 144 }, - { 80, 48, 144, 144 }, + { 96, 16, 144, 112 }, + { 80, 48, 144, 112 }, /* not used */ - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 }, + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 }, /* left */ - { 96, 16, 144, 144 }, - { 96, 48, 144, 144 }, + { 96, 16, 144, 112 }, + { 96, 48, 144, 112 }, /* not used */ - { 0, 0, 144, 144 }, - { 0, 0, 144, 144 } + { 0, 0, 144, 112 }, + { 0, 0, 144, 112 } }; void tmonster_init(Entity *e) |