Compare commits
3 Commits
1f80d22e72
...
a443d09b3d
Author | SHA1 | Date | |
---|---|---|---|
a443d09b3d | |||
d12e49aa16 | |||
fde161dabf |
4
Makefile
4
Makefile
@ -54,11 +54,11 @@ gen/%.cpp: gen/%.hpp $(GEN_PYTHON_SOURCE)
|
||||
|
||||
res/%.2bpp: pokered/%.png
|
||||
@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
|
||||
@mkdir -p $(dir $@)
|
||||
python tools/png_to_nbpp_sprite.py $< 2 $@
|
||||
python tools/png_to_nbpp_sprite.py 2 $@ $<
|
||||
|
||||
%.2bpp.h:
|
||||
$(BUILD_BINARY_H)
|
||||
|
35
ledge_tiles.hpp
Normal file
35
ledge_tiles.hpp
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
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,13 +47,14 @@ def debug(buf, bpp):
|
||||
if (row % 8 == 7):
|
||||
print()
|
||||
|
||||
in_path = sys.argv[1]
|
||||
bpp = int(sys.argv[2])
|
||||
out_path = sys.argv[3]
|
||||
bpp = int(sys.argv[1])
|
||||
out_path = sys.argv[2]
|
||||
assert len(sys.argv) >= 4, sys.argv
|
||||
|
||||
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:
|
||||
f.write(buf)
|
||||
for in_path in sys.argv[3:]:
|
||||
im = Image.open(in_path)
|
||||
buf = convert(im, bpp)
|
||||
if 'NBPP_DEBUG' in os.environ:
|
||||
debug(buf, bpp)
|
||||
f.write(buf)
|
||||
|
@ -56,13 +56,14 @@ def debug(buf, bpp):
|
||||
if (row % cell_height == (cell_height - 1)):
|
||||
print()
|
||||
|
||||
in_path = sys.argv[1]
|
||||
bpp = int(sys.argv[2])
|
||||
out_path = sys.argv[3]
|
||||
bpp = int(sys.argv[1])
|
||||
out_path = sys.argv[2]
|
||||
assert len(sys.argv) >= 4, sys.argv
|
||||
|
||||
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:
|
||||
f.write(buf)
|
||||
for in_path in sys.argv[3:]:
|
||||
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