Compare commits
2 Commits
a443d09b3d
...
1f80d22e72
Author | SHA1 | Date | |
---|---|---|---|
1f80d22e72 | |||
ab4d133820 |
4
Makefile
4
Makefile
@ -54,11 +54,11 @@ gen/%.cpp: gen/%.hpp $(GEN_PYTHON_SOURCE)
|
|||||||
|
|
||||||
res/%.2bpp: pokered/%.png
|
res/%.2bpp: pokered/%.png
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
python tools/png_to_nbpp.py 2 $@ $<
|
python tools/png_to_nbpp.py $< 2 $@
|
||||||
|
|
||||||
res/gfx/sprites/%.2bpp: pokered/gfx/sprites/%.png
|
res/gfx/sprites/%.2bpp: pokered/gfx/sprites/%.png
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
python tools/png_to_nbpp_sprite.py 2 $@ $<
|
python tools/png_to_nbpp_sprite.py $< 2 $@
|
||||||
|
|
||||||
%.2bpp.h:
|
%.2bpp.h:
|
||||||
$(BUILD_BINARY_H)
|
$(BUILD_BINARY_H)
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
/*
|
|
||||||
data/tilesets/ledge_tiles.asm
|
|
||||||
; player direction, tile player standing on, ledge tile, input required
|
|
||||||
db SPRITE_FACING_DOWN, $2C, $37, D_DOWN
|
|
||||||
db SPRITE_FACING_DOWN, $39, $36, D_DOWN
|
|
||||||
db SPRITE_FACING_DOWN, $39, $37, D_DOWN
|
|
||||||
db SPRITE_FACING_LEFT, $2C, $27, D_LEFT
|
|
||||||
db SPRITE_FACING_LEFT, $39, $27, D_LEFT
|
|
||||||
db SPRITE_FACING_RIGHT, $2C, $0D, D_RIGHT
|
|
||||||
db SPRITE_FACING_RIGHT, $2C, $1D, D_RIGHT
|
|
||||||
db SPRITE_FACING_RIGHT, $39, $0D, D_RIGHT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "actor.hpp"
|
|
||||||
|
|
||||||
struct ledge_tile_t {
|
|
||||||
enum actor_t::direction direction;
|
|
||||||
uint8_t actor;
|
|
||||||
uint8_t collision;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const ledge_tile_t ledge_tiles[] = {
|
|
||||||
{actor_t::down, 0x2c, 0x37},
|
|
||||||
{actor_t::down, 0x39, 0x36},
|
|
||||||
{actor_t::down, 0x39, 0x37},
|
|
||||||
{actor_t::left, 0x2c, 0x27},
|
|
||||||
{actor_t::left, 0x39, 0x27},
|
|
||||||
{actor_t::right, 0x2c, 0x0d},
|
|
||||||
{actor_t::right, 0x2c, 0x1d},
|
|
||||||
{actor_t::right, 0x39, 0x0d},
|
|
||||||
};
|
|
||||||
|
|
||||||
constexpr uint8_t ledge_tiles_length = (sizeof (ledge_tiles)) / (sizeof (ledge_tile_t));
|
|
@ -47,14 +47,13 @@ def debug(buf, bpp):
|
|||||||
if (row % 8 == 7):
|
if (row % 8 == 7):
|
||||||
print()
|
print()
|
||||||
|
|
||||||
bpp = int(sys.argv[1])
|
in_path = sys.argv[1]
|
||||||
out_path = sys.argv[2]
|
bpp = int(sys.argv[2])
|
||||||
assert len(sys.argv) >= 4, sys.argv
|
out_path = sys.argv[3]
|
||||||
|
|
||||||
|
im = Image.open(in_path)
|
||||||
|
buf = convert(im, bpp)
|
||||||
|
if 'NBPP_DEBUG' in os.environ:
|
||||||
|
debug(buf, bpp)
|
||||||
with open(out_path, 'wb') as f:
|
with open(out_path, 'wb') as f:
|
||||||
for in_path in sys.argv[3:]:
|
f.write(buf)
|
||||||
im = Image.open(in_path)
|
|
||||||
buf = convert(im, bpp)
|
|
||||||
if 'NBPP_DEBUG' in os.environ:
|
|
||||||
debug(buf, bpp)
|
|
||||||
f.write(buf)
|
|
||||||
|
@ -56,14 +56,13 @@ def debug(buf, bpp):
|
|||||||
if (row % cell_height == (cell_height - 1)):
|
if (row % cell_height == (cell_height - 1)):
|
||||||
print()
|
print()
|
||||||
|
|
||||||
bpp = int(sys.argv[1])
|
in_path = sys.argv[1]
|
||||||
out_path = sys.argv[2]
|
bpp = int(sys.argv[2])
|
||||||
assert len(sys.argv) >= 4, sys.argv
|
out_path = sys.argv[3]
|
||||||
|
|
||||||
|
im = Image.open(in_path)
|
||||||
|
buf = convert(im, bpp)
|
||||||
|
if 'NBPP_DEBUG' in os.environ:
|
||||||
|
debug(buf, bpp)
|
||||||
with open(out_path, 'wb') as f:
|
with open(out_path, 'wb') as f:
|
||||||
for in_path in sys.argv[3:]:
|
f.write(buf)
|
||||||
im = Image.open(in_path)
|
|
||||||
buf = convert(im, bpp)
|
|
||||||
if 'NBPP_DEBUG' in os.environ:
|
|
||||||
debug(buf, bpp)
|
|
||||||
f.write(buf)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user