Optimize map rendering and implement dynamic fog of war
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
#include "tiles.h"
|
#include "tiles.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
|
||||||
#define MAP_SIZE 7
|
#define MAP_SIZE 15
|
||||||
|
|
||||||
uint8_t maze[MAP_SIZE][MAP_SIZE];
|
uint8_t maze[MAP_SIZE][MAP_SIZE];
|
||||||
static uint8_t map_buffer[32 * 32];
|
static uint8_t map_buffer[32 * 32];
|
||||||
@@ -37,9 +37,9 @@ static void generate_maze(void) {
|
|||||||
// Clear maze (all 0/walls)
|
// Clear maze (all 0/walls)
|
||||||
memset(maze, 0, sizeof(maze));
|
memset(maze, 0, sizeof(maze));
|
||||||
|
|
||||||
// Stack for backtracking (3x3 grid has 9 odd cells max)
|
// Stack for backtracking (7x7 grid of odd cells has 49 cells max)
|
||||||
uint8_t stack_x[9];
|
uint8_t stack_x[49];
|
||||||
uint8_t stack_y[9];
|
uint8_t stack_y[49];
|
||||||
uint8_t stack_ptr = 0;
|
uint8_t stack_ptr = 0;
|
||||||
|
|
||||||
// Start at (1, 1)
|
// Start at (1, 1)
|
||||||
@@ -59,7 +59,7 @@ static void generate_maze(void) {
|
|||||||
nx[count] = cx; ny[count] = cy - 2; count++;
|
nx[count] = cx; ny[count] = cy - 2; count++;
|
||||||
}
|
}
|
||||||
// Down
|
// Down
|
||||||
if (cy <= 3 && maze[cy + 2][cx] == 0) {
|
if (cy <= MAP_SIZE - 4 && maze[cy + 2][cx] == 0) {
|
||||||
nx[count] = cx; ny[count] = cy + 2; count++;
|
nx[count] = cx; ny[count] = cy + 2; count++;
|
||||||
}
|
}
|
||||||
// Left
|
// Left
|
||||||
@@ -67,7 +67,7 @@ static void generate_maze(void) {
|
|||||||
nx[count] = cx - 2; ny[count] = cy; count++;
|
nx[count] = cx - 2; ny[count] = cy; count++;
|
||||||
}
|
}
|
||||||
// Right
|
// Right
|
||||||
if (cx <= 3 && maze[cy][cx + 2] == 0) {
|
if (cx <= MAP_SIZE - 4 && maze[cy][cx + 2] == 0) {
|
||||||
nx[count] = cx + 2; ny[count] = cy; count++;
|
nx[count] = cx + 2; ny[count] = cy; count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,15 +98,35 @@ static void generate_maze(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void draw_map(void) {
|
static void draw_map(uint8_t center_x, uint8_t center_y) {
|
||||||
// Fill entire map with tile index 0 (completely black empty tile)
|
// Fill entire map with tile index 0 (completely black empty tile)
|
||||||
memset(map_buffer, 0, sizeof(map_buffer));
|
memset(map_buffer, 0, sizeof(map_buffer));
|
||||||
|
|
||||||
// Draw logical map path tiles
|
int8_t start_x = center_x - 3;
|
||||||
for (int8_t ly = 0; ly < MAP_SIZE; ly++) {
|
if (start_x < 0) start_x = 0;
|
||||||
for (int8_t lx = 0; lx < MAP_SIZE; lx++) {
|
int8_t end_x = center_x + 3;
|
||||||
|
if (end_x >= MAP_SIZE) end_x = MAP_SIZE - 1;
|
||||||
|
|
||||||
|
int8_t start_y = center_y - 3;
|
||||||
|
if (start_y < 0) start_y = 0;
|
||||||
|
int8_t end_y = center_y + 3;
|
||||||
|
if (end_y >= MAP_SIZE) end_y = MAP_SIZE - 1;
|
||||||
|
|
||||||
|
// Draw logical map path tiles in the visible 7x7 window
|
||||||
|
for (int8_t ly = start_y; ly <= end_y; ly++) {
|
||||||
|
for (int8_t lx = start_x; lx <= end_x; lx++) {
|
||||||
if (maze[ly][lx] == 1) {
|
if (maze[ly][lx] == 1) {
|
||||||
// Centering math for 7x7 map on 32x32 background map
|
// Calculate Chebyshev distance to center
|
||||||
|
int8_t dx = lx - center_x;
|
||||||
|
int8_t dy = ly - center_y;
|
||||||
|
if (dx < 0) dx = -dx;
|
||||||
|
if (dy < 0) dy = -dy;
|
||||||
|
int8_t dist = (dx > dy) ? dx : dy;
|
||||||
|
|
||||||
|
// Hide tiles at distance > 3 (Fog of War)
|
||||||
|
if (dist > 3) continue;
|
||||||
|
|
||||||
|
// Centering math for 15x15 map on 32x32 background map
|
||||||
int8_t iso_x = (lx - ly) * 2 + 12;
|
int8_t iso_x = (lx - ly) * 2 + 12;
|
||||||
int8_t iso_y = (lx + ly) * 1 + 2;
|
int8_t iso_y = (lx + ly) * 1 + 2;
|
||||||
|
|
||||||
@@ -120,7 +140,16 @@ static void draw_map(void) {
|
|||||||
uint8_t has_br = (lx < MAP_SIZE - 1 && maze[ly][lx + 1] == 1);
|
uint8_t has_br = (lx < MAP_SIZE - 1 && maze[ly][lx + 1] == 1);
|
||||||
|
|
||||||
uint8_t mask = (has_tl ? 1 : 0) | (has_tr ? 2 : 0) | (has_bl ? 4 : 0) | (has_br ? 8 : 0);
|
uint8_t mask = (has_tl ? 1 : 0) | (has_tr ? 2 : 0) | (has_bl ? 4 : 0) | (has_br ? 8 : 0);
|
||||||
uint8_t v = is_alt ? (16 + mask) : mask;
|
|
||||||
|
// Determine variation style based on lighting distance
|
||||||
|
uint8_t v;
|
||||||
|
if (dist == 3) {
|
||||||
|
// Darker variants (Tile 1 Dark starting at 32, Tile 2 Dark starting at 48)
|
||||||
|
v = is_alt ? (48 + mask) : (32 + mask);
|
||||||
|
} else {
|
||||||
|
// Normal variants
|
||||||
|
v = is_alt ? (16 + mask) : mask;
|
||||||
|
}
|
||||||
|
|
||||||
for (uint8_t y = 0; y < 2; y++) {
|
for (uint8_t y = 0; y < 2; y++) {
|
||||||
for (uint8_t x = 0; x < 4; x++) {
|
for (uint8_t x = 0; x < 4; x++) {
|
||||||
@@ -175,7 +204,7 @@ void engine_init(void) {
|
|||||||
set_bkg_data(0, tiles_TILE_COUNT, tiles_tiles);
|
set_bkg_data(0, tiles_TILE_COUNT, tiles_tiles);
|
||||||
set_sprite_data(0, player_TILE_COUNT, player_tiles);
|
set_sprite_data(0, player_TILE_COUNT, player_tiles);
|
||||||
|
|
||||||
draw_map();
|
draw_map(player_lx, player_ly);
|
||||||
update_camera();
|
update_camera();
|
||||||
update_player_sprite();
|
update_player_sprite();
|
||||||
}
|
}
|
||||||
@@ -212,6 +241,11 @@ void engine_update(uint8_t keys, uint8_t prev_keys) {
|
|||||||
// Update walk animation frame (alternate frame every 4 ticks)
|
// Update walk animation frame (alternate frame every 4 ticks)
|
||||||
update_player_sprite();
|
update_player_sprite();
|
||||||
|
|
||||||
|
// Update visible tiles (fog of war center) mid-way through movement
|
||||||
|
if (move_progress == 8) {
|
||||||
|
draw_map(target_lx, target_ly);
|
||||||
|
}
|
||||||
|
|
||||||
if (move_progress == 16) {
|
if (move_progress == 16) {
|
||||||
is_moving = 0;
|
is_moving = 0;
|
||||||
player_lx = target_lx;
|
player_lx = target_lx;
|
||||||
@@ -224,6 +258,9 @@ void engine_update(uint8_t keys, uint8_t prev_keys) {
|
|||||||
scroll_y = final_py - 72;
|
scroll_y = final_py - 72;
|
||||||
move_bkg(scroll_x, scroll_y);
|
move_bkg(scroll_x, scroll_y);
|
||||||
|
|
||||||
|
// Draw map at final coordinates
|
||||||
|
draw_map(player_lx, player_ly);
|
||||||
|
|
||||||
// Set player to idle stand frame
|
// Set player to idle stand frame
|
||||||
update_player_sprite();
|
update_player_sprite();
|
||||||
}
|
}
|
||||||
|
|||||||
+73
-37
@@ -10,58 +10,94 @@ PALETTE = [
|
|||||||
0, 0, 0 # 3
|
0, 0, 0 # 3
|
||||||
] + [0] * (256 * 3 - 12)
|
] + [0] * (256 * 3 - 12)
|
||||||
|
|
||||||
def draw_autotile(draw, y_offset, is_alt, mask):
|
def draw_autotile(draw, y_offset, is_alt, mask, is_dark=False):
|
||||||
# Determine the neighbor fill color
|
# Determine the neighbor fill color
|
||||||
# Tile 1 (Normal, is_alt=False) neighbors should match Tile 2 (Alt) body color: 1 (Light Gray)
|
# Tile 1 (Normal, is_alt=False) neighbors should match Tile 2 (Alt) body color: 1 (Light Gray)
|
||||||
# Tile 2 (Alt, is_alt=True) neighbors should match Tile 1 (Normal) body color: 0 (White)
|
# Tile 2 (Alt, is_alt=True) neighbors should match Tile 1 (Normal) body color: 0 (White)
|
||||||
neighbor_color = 0 if is_alt else 1
|
if not is_dark:
|
||||||
|
neighbor_color = 0 if is_alt else 1
|
||||||
# 4 corners
|
|
||||||
# Bit 0 (1): Top-Left
|
tl_color = neighbor_color if (mask & 1) else 3
|
||||||
# Bit 1 (2): Top-Right
|
tr_color = neighbor_color if (mask & 2) else 3
|
||||||
# Bit 2 (4): Bottom-Left
|
dl_color = neighbor_color if (mask & 4) else 3
|
||||||
# Bit 3 (8): Bottom-Right
|
dr_color = neighbor_color if (mask & 8) else 3
|
||||||
|
|
||||||
tl_color = neighbor_color if (mask & 1) else 3
|
# Draw corners
|
||||||
tr_color = neighbor_color if (mask & 2) else 3
|
draw.polygon([(0, y_offset), (15, y_offset), (0, y_offset + 7)], fill=tl_color)
|
||||||
dl_color = neighbor_color if (mask & 4) else 3
|
draw.polygon([(16, y_offset), (31, y_offset), (31, y_offset + 7)], fill=tr_color)
|
||||||
dr_color = neighbor_color if (mask & 8) else 3
|
draw.polygon([(0, y_offset + 8), (0, y_offset + 15), (15, y_offset + 15)], fill=dl_color)
|
||||||
|
draw.polygon([(31, y_offset + 8), (31, y_offset + 15), (16, y_offset + 15)], fill=dr_color)
|
||||||
# Draw corners
|
|
||||||
draw.polygon([(0, y_offset), (15, y_offset), (0, y_offset + 7)], fill=tl_color)
|
# Draw the main diamond shape on top
|
||||||
draw.polygon([(16, y_offset), (31, y_offset), (31, y_offset + 7)], fill=tr_color)
|
points = [(15, y_offset), (31, y_offset + 7), (16, y_offset + 15), (0, y_offset + 8)]
|
||||||
draw.polygon([(0, y_offset + 8), (0, y_offset + 15), (15, y_offset + 15)], fill=dl_color)
|
inner = [(15, y_offset + 4), (27, y_offset + 7), (16, y_offset + 11), (4, y_offset + 8)]
|
||||||
draw.polygon([(31, y_offset + 8), (31, y_offset + 15), (16, y_offset + 15)], fill=dr_color)
|
|
||||||
|
if not is_alt:
|
||||||
# Draw the main diamond shape on top
|
# Tile 1: Normal floor (body is White, inner is Light Gray)
|
||||||
points = [(15, y_offset), (31, y_offset + 7), (16, y_offset + 15), (0, y_offset + 8)]
|
draw.polygon(points, fill=0, outline=2)
|
||||||
inner = [(15, y_offset + 4), (27, y_offset + 7), (16, y_offset + 11), (4, y_offset + 8)]
|
draw.polygon(inner, fill=1, outline=2)
|
||||||
|
else:
|
||||||
if not is_alt:
|
# Tile 2: Alt floor (body is Light Gray, inner is White)
|
||||||
# Tile 1: Normal floor (body is White, inner is Light Gray)
|
draw.polygon(points, fill=1, outline=2)
|
||||||
draw.polygon(points, fill=0, outline=2)
|
draw.polygon(inner, fill=0, outline=2)
|
||||||
draw.polygon(inner, fill=1, outline=2)
|
|
||||||
else:
|
else:
|
||||||
# Tile 2: Alt floor (body is Light Gray, inner is White)
|
# Darker version: Shift colors down
|
||||||
draw.polygon(points, fill=1, outline=2)
|
# White (0) -> Light Gray (1)
|
||||||
draw.polygon(inner, fill=0, outline=2)
|
# Light Gray (1) -> Dark Gray (2)
|
||||||
|
# Dark Gray (2) -> Black (3)
|
||||||
|
# Black (3) -> Black (3)
|
||||||
|
neighbor_color = 1 if is_alt else 2
|
||||||
|
|
||||||
|
tl_color = neighbor_color if (mask & 1) else 3
|
||||||
|
tr_color = neighbor_color if (mask & 2) else 3
|
||||||
|
dl_color = neighbor_color if (mask & 4) else 3
|
||||||
|
dr_color = neighbor_color if (mask & 8) else 3
|
||||||
|
|
||||||
|
# Draw corners
|
||||||
|
draw.polygon([(0, y_offset), (15, y_offset), (0, y_offset + 7)], fill=tl_color)
|
||||||
|
draw.polygon([(16, y_offset), (31, y_offset), (31, y_offset + 7)], fill=tr_color)
|
||||||
|
draw.polygon([(0, y_offset + 8), (0, y_offset + 15), (15, y_offset + 15)], fill=dl_color)
|
||||||
|
draw.polygon([(31, y_offset + 8), (31, y_offset + 15), (16, y_offset + 15)], fill=dr_color)
|
||||||
|
|
||||||
|
# Draw the main diamond shape on top
|
||||||
|
points = [(15, y_offset), (31, y_offset + 7), (16, y_offset + 15), (0, y_offset + 8)]
|
||||||
|
inner = [(15, y_offset + 4), (27, y_offset + 7), (16, y_offset + 11), (4, y_offset + 8)]
|
||||||
|
|
||||||
|
if not is_alt:
|
||||||
|
# Tile 1 Dark: body is Light Gray (1), inner is Dark Gray (2), outline is Black (3)
|
||||||
|
draw.polygon(points, fill=1, outline=3)
|
||||||
|
draw.polygon(inner, fill=2, outline=3)
|
||||||
|
else:
|
||||||
|
# Tile 2 Dark: body is Dark Gray (2), inner is Light Gray (1), outline is Black (3)
|
||||||
|
draw.polygon(points, fill=2, outline=3)
|
||||||
|
draw.polygon(inner, fill=1, outline=3)
|
||||||
|
|
||||||
def generate_tiles():
|
def generate_tiles():
|
||||||
# 32 variants total:
|
# 64 variants total:
|
||||||
# 0..15: Tile 1 (Normal Floor) with masks 0..15
|
# 0..15: Tile 1 (Normal Floor) with masks 0..15
|
||||||
# 16..31: Tile 2 (Alt Floor) with masks 0..15
|
# 16..31: Tile 2 (Alt Floor) with masks 0..15
|
||||||
# Height is 8 pixels (black spacer) + 32 variants * 16 pixels = 520 pixels
|
# 32..47: Tile 1 Dark (Normal Floor Dark) with masks 0..15
|
||||||
img = Image.new("P", (32, 520), 3)
|
# 48..63: Tile 2 Dark (Alt Floor Dark) with masks 0..15
|
||||||
|
# Height is 8 pixels (black spacer) + 64 variants * 16 pixels = 1032 pixels
|
||||||
|
img = Image.new("P", (32, 1032), 3)
|
||||||
img.putpalette(PALETTE)
|
img.putpalette(PALETTE)
|
||||||
draw = ImageDraw.Draw(img)
|
draw = ImageDraw.Draw(img)
|
||||||
|
|
||||||
# Draw Tile 1 variants (start at y=8)
|
# Draw Tile 1 variants (start at y=8)
|
||||||
for mask in range(16):
|
for mask in range(16):
|
||||||
draw_autotile(draw, 8 + mask * 16, False, mask)
|
draw_autotile(draw, 8 + mask * 16, False, mask, False)
|
||||||
|
|
||||||
# Draw Tile 2 variants (start at y=8 + 256 = 264)
|
# Draw Tile 2 variants (start at y=264)
|
||||||
for mask in range(16):
|
for mask in range(16):
|
||||||
draw_autotile(draw, 264 + mask * 16, True, mask)
|
draw_autotile(draw, 264 + mask * 16, True, mask, False)
|
||||||
|
|
||||||
|
# Draw Tile 1 Dark variants (start at y=520)
|
||||||
|
for mask in range(16):
|
||||||
|
draw_autotile(draw, 520 + mask * 16, False, mask, True)
|
||||||
|
|
||||||
|
# Draw Tile 2 Dark variants (start at y=776)
|
||||||
|
for mask in range(16):
|
||||||
|
draw_autotile(draw, 776 + mask * 16, True, mask, True)
|
||||||
|
|
||||||
img.save("tiles.png")
|
img.save("tiles.png")
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -48,7 +48,7 @@ def main():
|
|||||||
print(f"Detected {glitch_count} rendering glitches (black cutouts/gaps) inside the floor map.")
|
print(f"Detected {glitch_count} rendering glitches (black cutouts/gaps) inside the floor map.")
|
||||||
|
|
||||||
# Save the marked-up image to the artifacts directory
|
# Save the marked-up image to the artifacts directory
|
||||||
output_path = '/home/enne2/.gemini/antigravity-ide/brain/eebf5acd-ae2e-41bb-858e-6a4a5ca41897/analyzed_tiles.png'
|
output_path = '/home/enne2/.gemini/antigravity-ide/brain/dd9e728a-93c4-49f8-90b6-3f72fcc47f04/analyzed_tiles.png'
|
||||||
cv2.imwrite(output_path, markup)
|
cv2.imwrite(output_path, markup)
|
||||||
print(f"Saved analysis markup to: {output_path}")
|
print(f"Saved analysis markup to: {output_path}")
|
||||||
|
|
||||||
|
|||||||
+25
-9
@@ -1,24 +1,40 @@
|
|||||||
from pyboy import PyBoy
|
from pyboy import PyBoy
|
||||||
from pyboy.utils import WindowEvent
|
from pyboy.utils import WindowEvent
|
||||||
|
|
||||||
|
def get_symbol_address(symbol_name):
|
||||||
|
try:
|
||||||
|
with open('hello_iso.noi', 'r') as f:
|
||||||
|
for line in f:
|
||||||
|
parts = line.strip().split()
|
||||||
|
if len(parts) >= 3 and parts[0] == 'DEF' and parts[1] == symbol_name:
|
||||||
|
return int(parts[2], 16)
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
raise ValueError(f"Symbol {symbol_name} not found in hello_iso.noi")
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
pyboy = PyBoy('hello_iso.gb', window='null', cgb=False)
|
pyboy = PyBoy('hello_iso.gb', window='null', cgb=False)
|
||||||
# Let the game boot and generate the maze
|
# Let the game boot and generate the maze
|
||||||
for _ in range(60 * 2):
|
for _ in range(60 * 2):
|
||||||
pyboy.tick()
|
pyboy.tick()
|
||||||
|
|
||||||
|
# Dynamically look up addresses
|
||||||
|
player_lx_addr = get_symbol_address('_player_lx')
|
||||||
|
player_ly_addr = get_symbol_address('_player_ly')
|
||||||
|
maze_addr = get_symbol_address('_maze')
|
||||||
|
|
||||||
# Read player position from RAM
|
# Read player position from RAM
|
||||||
# player_lx at 0xC4F4, player_ly at 0xC4F5
|
lx = pyboy.memory[player_lx_addr]
|
||||||
lx = pyboy.memory[0xC4F4]
|
ly = pyboy.memory[player_ly_addr]
|
||||||
ly = pyboy.memory[0xC4F5]
|
|
||||||
print(f"Initial player coordinates in RAM: lx={lx}, ly={ly}")
|
print(f"Initial player coordinates in RAM: lx={lx}, ly={ly}")
|
||||||
|
|
||||||
# Read maze array from RAM (7x7 starting at 0xC0B1)
|
# Read maze array from RAM (15x15 starting at maze_addr)
|
||||||
|
map_size = 15
|
||||||
maze = []
|
maze = []
|
||||||
for y in range(7):
|
for y in range(map_size):
|
||||||
row = []
|
row = []
|
||||||
for x in range(7):
|
for x in range(map_size):
|
||||||
val = pyboy.memory[0xC0B1 + y * 7 + x]
|
val = pyboy.memory[maze_addr + y * map_size + x]
|
||||||
row.append(val)
|
row.append(val)
|
||||||
maze.append(row)
|
maze.append(row)
|
||||||
|
|
||||||
@@ -42,7 +58,7 @@ def main():
|
|||||||
pyboy.send_input(WindowEvent.RELEASE_ARROW_DOWN)
|
pyboy.send_input(WindowEvent.RELEASE_ARROW_DOWN)
|
||||||
for _ in range(30):
|
for _ in range(30):
|
||||||
pyboy.tick()
|
pyboy.tick()
|
||||||
print(f"Player coordinates after DOWN: lx={pyboy.memory[0xC4F4]}, ly={pyboy.memory[0xC4F5]}")
|
print(f"Player coordinates after DOWN: lx={pyboy.memory[player_lx_addr]}, ly={pyboy.memory[player_ly_addr]}")
|
||||||
|
|
||||||
# Try pressing Right (Down-Right)
|
# Try pressing Right (Down-Right)
|
||||||
print("\nSimulating pressing RIGHT...")
|
print("\nSimulating pressing RIGHT...")
|
||||||
@@ -51,7 +67,7 @@ def main():
|
|||||||
pyboy.send_input(WindowEvent.RELEASE_ARROW_RIGHT)
|
pyboy.send_input(WindowEvent.RELEASE_ARROW_RIGHT)
|
||||||
for _ in range(30):
|
for _ in range(30):
|
||||||
pyboy.tick()
|
pyboy.tick()
|
||||||
print(f"Player coordinates after RIGHT: lx={pyboy.memory[0xC4F4]}, ly={pyboy.memory[0xC4F5]}")
|
print(f"Player coordinates after RIGHT: lx={pyboy.memory[player_lx_addr]}, ly={pyboy.memory[player_ly_addr]}")
|
||||||
|
|
||||||
pyboy.stop()
|
pyboy.stop()
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const palette_color_t tiles_palettes[32] = {
|
|||||||
RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0)
|
RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t tiles_tiles[528] = {
|
const uint8_t tiles_tiles[1040] = {
|
||||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xf8,0xfe,0xe0,0xf8,0x80,0xe3,
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xf8,0xfe,0xe0,0xf8,0x80,0xe3,
|
||||||
0xfe,0xff,0xf8,0xfe,0xe0,0xf8,0x80,0xe0,0x00,0x83,0x03,0x1c,0x1f,0x60,0x7f,0x80,
|
0xfe,0xff,0xf8,0xfe,0xe0,0xf8,0x80,0xe0,0x00,0x83,0x03,0x1c,0x1f,0x60,0x7f,0x80,
|
||||||
@@ -51,11 +51,43 @@ const uint8_t tiles_tiles[528] = {
|
|||||||
0x30,0xce,0x0e,0x31,0x03,0x0c,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x30,0xce,0x0e,0x31,0x03,0x0c,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0xe0,0xe0,0x1e,0x7e,0x81,0x1f,0x60,0x07,0x18,0x01,0x06,0x00,0x01,
|
0x00,0x00,0x00,0xe0,0xe0,0x1e,0x7e,0x81,0x1f,0x60,0x07,0x18,0x01,0x06,0x00,0x01,
|
||||||
0x00,0x01,0x01,0x06,0x07,0x38,0x3e,0xc1,0xf8,0x06,0xe0,0x18,0x80,0x60,0x00,0x80,
|
0x00,0x01,0x01,0x06,0x07,0x38,0x3e,0xc1,0xf8,0x06,0xe0,0x18,0x80,0x60,0x00,0x80,
|
||||||
0x38,0xc6,0xe0,0x18,0x80,0x60,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
0x38,0xc6,0xe0,0x18,0x80,0x60,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xf8,0xff,0xe3,
|
||||||
|
0xff,0xff,0xff,0xfe,0xff,0xf8,0xff,0xe0,0xff,0x83,0xfc,0x1f,0xe0,0x7f,0x80,0xff,
|
||||||
|
0xff,0xff,0xff,0x7f,0xff,0x1f,0xff,0x07,0xff,0x81,0x7f,0xf8,0x07,0xff,0x00,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0x8f,0x7f,0xf3,
|
||||||
|
0xfe,0xcf,0xff,0xf1,0xff,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0x00,0xff,0xe0,0xff,0xfe,0x1f,0xff,0x81,0xff,0xe0,0xff,0xf8,0xff,0xfe,0xff,0xff,
|
||||||
|
0x01,0xff,0x07,0xfe,0x3f,0xf8,0xff,0xc1,0xff,0x07,0xff,0x1f,0xff,0x7f,0xff,0xff,
|
||||||
|
0xff,0xc7,0xff,0x1f,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x01,0xff,0x07,0xfe,0x1f,0xf8,0x7f,0xe3,
|
||||||
|
0x01,0xff,0x07,0xfe,0x1f,0xf8,0x7f,0xe0,0xff,0x83,0xfc,0x1f,0xe0,0x7f,0x80,0xff,
|
||||||
|
0x80,0xff,0xe0,0x7f,0xf8,0x1f,0xfe,0x07,0xff,0x81,0x7f,0xf8,0x07,0xff,0x00,0xff,
|
||||||
|
0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xc0,0xff,0xf0,0x3f,0xfc,0x8f,0x7f,0xf3,
|
||||||
|
0xfe,0xcf,0x3f,0xf1,0x0f,0xfc,0x03,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,
|
||||||
|
0x00,0xff,0xe0,0xff,0xfe,0x1f,0xff,0x81,0x7f,0xe0,0x1f,0xf8,0x07,0xfe,0x01,0xff,
|
||||||
|
0x01,0xff,0x07,0xfe,0x3f,0xf8,0xff,0xc1,0xfe,0x07,0xf8,0x1f,0xe0,0x7f,0x80,0xff,
|
||||||
|
0xfe,0xc7,0xf8,0x1f,0xe0,0x7f,0x80,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xf8,0xff,0xe3,0xff,
|
||||||
|
0xff,0xff,0xfe,0xff,0xf8,0xff,0xe0,0xff,0x83,0xff,0x1f,0xfc,0x7f,0xe0,0xff,0x80,
|
||||||
|
0xff,0xff,0x7f,0xff,0x1f,0xff,0x07,0xff,0x81,0xff,0xf8,0x7f,0xff,0x07,0xff,0x00,
|
||||||
|
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0x8f,0xff,0xf3,0x7f,
|
||||||
|
0xcf,0xfe,0xf1,0xff,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0xff,0x00,0xff,0xe0,0x1f,0xfe,0x81,0xff,0xe0,0xff,0xf8,0xff,0xfe,0xff,0xff,0xff,
|
||||||
|
0xff,0x01,0xfe,0x07,0xf8,0x3f,0xc1,0xff,0x07,0xff,0x1f,0xff,0x7f,0xff,0xff,0xff,
|
||||||
|
0xc7,0xff,0x1f,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||||
|
0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x01,0xfe,0x07,0xf8,0x1f,0xe3,0x7f,
|
||||||
|
0xff,0x01,0xfe,0x07,0xf8,0x1f,0xe0,0x7f,0x83,0xff,0x1f,0xfc,0x7f,0xe0,0xff,0x80,
|
||||||
|
0xff,0x80,0x7f,0xe0,0x1f,0xf8,0x07,0xfe,0x81,0xff,0xf8,0x7f,0xff,0x07,0xff,0x00,
|
||||||
|
0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0xc0,0x3f,0xf0,0x8f,0xfc,0xf3,0x7f,
|
||||||
|
0xcf,0xfe,0xf1,0x3f,0xfc,0x0f,0xff,0x03,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,
|
||||||
|
0xff,0x00,0xff,0xe0,0x1f,0xfe,0x81,0xff,0xe0,0x7f,0xf8,0x1f,0xfe,0x07,0xff,0x01,
|
||||||
|
0xff,0x01,0xfe,0x07,0xf8,0x3f,0xc1,0xff,0x07,0xfe,0x1f,0xf8,0x7f,0xe0,0xff,0x80,
|
||||||
|
0xc7,0xfe,0x1f,0xf8,0x7f,0xe0,0xff,0x80,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const unsigned char tiles_map[260] = {
|
const unsigned char tiles_map[516] = {
|
||||||
0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,
|
||||||
0x01,0x02,0x03,0x04,
|
0x01,0x02,0x03,0x04,
|
||||||
0x05,0x06,0x07,0x08,
|
0x05,0x06,0x07,0x08,
|
||||||
@@ -121,4 +153,68 @@ const unsigned char tiles_map[260] = {
|
|||||||
0x1d,0x1e,0x1f,0x20,
|
0x1d,0x1e,0x1f,0x20,
|
||||||
0x19,0x1a,0x1b,0x1c,
|
0x19,0x1a,0x1b,0x1c,
|
||||||
0x1d,0x1e,0x1f,0x20,
|
0x1d,0x1e,0x1f,0x20,
|
||||||
|
0x21,0x22,0x23,0x24,
|
||||||
|
0x25,0x26,0x27,0x28,
|
||||||
|
0x29,0x2a,0x23,0x24,
|
||||||
|
0x25,0x26,0x27,0x28,
|
||||||
|
0x21,0x22,0x2b,0x2c,
|
||||||
|
0x25,0x26,0x27,0x28,
|
||||||
|
0x29,0x2a,0x2b,0x2c,
|
||||||
|
0x25,0x26,0x27,0x28,
|
||||||
|
0x21,0x22,0x23,0x24,
|
||||||
|
0x2d,0x2e,0x27,0x28,
|
||||||
|
0x29,0x2a,0x23,0x24,
|
||||||
|
0x2d,0x2e,0x27,0x28,
|
||||||
|
0x21,0x22,0x2b,0x2c,
|
||||||
|
0x2d,0x2e,0x27,0x28,
|
||||||
|
0x29,0x2a,0x2b,0x2c,
|
||||||
|
0x2d,0x2e,0x27,0x28,
|
||||||
|
0x21,0x22,0x23,0x24,
|
||||||
|
0x25,0x26,0x2f,0x30,
|
||||||
|
0x29,0x2a,0x23,0x24,
|
||||||
|
0x25,0x26,0x2f,0x30,
|
||||||
|
0x21,0x22,0x2b,0x2c,
|
||||||
|
0x25,0x26,0x2f,0x30,
|
||||||
|
0x29,0x2a,0x2b,0x2c,
|
||||||
|
0x25,0x26,0x2f,0x30,
|
||||||
|
0x21,0x22,0x23,0x24,
|
||||||
|
0x2d,0x2e,0x2f,0x30,
|
||||||
|
0x29,0x2a,0x23,0x24,
|
||||||
|
0x2d,0x2e,0x2f,0x30,
|
||||||
|
0x21,0x22,0x2b,0x2c,
|
||||||
|
0x2d,0x2e,0x2f,0x30,
|
||||||
|
0x29,0x2a,0x2b,0x2c,
|
||||||
|
0x2d,0x2e,0x2f,0x30,
|
||||||
|
0x31,0x32,0x33,0x34,
|
||||||
|
0x35,0x36,0x37,0x38,
|
||||||
|
0x39,0x3a,0x33,0x34,
|
||||||
|
0x35,0x36,0x37,0x38,
|
||||||
|
0x31,0x32,0x3b,0x3c,
|
||||||
|
0x35,0x36,0x37,0x38,
|
||||||
|
0x39,0x3a,0x3b,0x3c,
|
||||||
|
0x35,0x36,0x37,0x38,
|
||||||
|
0x31,0x32,0x33,0x34,
|
||||||
|
0x3d,0x3e,0x37,0x38,
|
||||||
|
0x39,0x3a,0x33,0x34,
|
||||||
|
0x3d,0x3e,0x37,0x38,
|
||||||
|
0x31,0x32,0x3b,0x3c,
|
||||||
|
0x3d,0x3e,0x37,0x38,
|
||||||
|
0x39,0x3a,0x3b,0x3c,
|
||||||
|
0x3d,0x3e,0x37,0x38,
|
||||||
|
0x31,0x32,0x33,0x34,
|
||||||
|
0x35,0x36,0x3f,0x40,
|
||||||
|
0x39,0x3a,0x33,0x34,
|
||||||
|
0x35,0x36,0x3f,0x40,
|
||||||
|
0x31,0x32,0x3b,0x3c,
|
||||||
|
0x35,0x36,0x3f,0x40,
|
||||||
|
0x39,0x3a,0x3b,0x3c,
|
||||||
|
0x35,0x36,0x3f,0x40,
|
||||||
|
0x31,0x32,0x33,0x34,
|
||||||
|
0x3d,0x3e,0x3f,0x40,
|
||||||
|
0x39,0x3a,0x33,0x34,
|
||||||
|
0x3d,0x3e,0x3f,0x40,
|
||||||
|
0x31,0x32,0x3b,0x3c,
|
||||||
|
0x3d,0x3e,0x3f,0x40,
|
||||||
|
0x39,0x3a,0x3b,0x3c,
|
||||||
|
0x3d,0x3e,0x3f,0x40,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,18 +12,18 @@
|
|||||||
#define tiles_TILE_W 8
|
#define tiles_TILE_W 8
|
||||||
#define tiles_TILE_H 8
|
#define tiles_TILE_H 8
|
||||||
#define tiles_WIDTH 32
|
#define tiles_WIDTH 32
|
||||||
#define tiles_HEIGHT 520
|
#define tiles_HEIGHT 1032
|
||||||
#define tiles_TILE_COUNT 33
|
#define tiles_TILE_COUNT 65
|
||||||
#define tiles_PALETTE_COUNT 8
|
#define tiles_PALETTE_COUNT 8
|
||||||
#define tiles_COLORS_PER_PALETTE 4
|
#define tiles_COLORS_PER_PALETTE 4
|
||||||
#define tiles_TOTAL_COLORS 32
|
#define tiles_TOTAL_COLORS 32
|
||||||
#define tiles_MAP_ATTRIBUTES 0
|
#define tiles_MAP_ATTRIBUTES 0
|
||||||
extern const unsigned char tiles_map[260];
|
extern const unsigned char tiles_map[516];
|
||||||
#define tiles_map_attributes tiles_map
|
#define tiles_map_attributes tiles_map
|
||||||
|
|
||||||
BANKREF_EXTERN(tiles)
|
BANKREF_EXTERN(tiles)
|
||||||
|
|
||||||
extern const palette_color_t tiles_palettes[32];
|
extern const palette_color_t tiles_palettes[32];
|
||||||
extern const uint8_t tiles_tiles[528];
|
extern const uint8_t tiles_tiles[1040];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user