Refactoring: Project structure, sprite stairs & fog masks rendering fix
This commit is contained in:
+106
@@ -0,0 +1,106 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /enemy.png -c /enemy.c -sw 16 -sh 16 -bpp 2 -noflip -keep_palette_order -sp 0x10
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
BANKREF(enemy)
|
||||
|
||||
const palette_color_t enemy_palettes[32] = {
|
||||
RGB8(224,248,207), RGB8(134,192,108), RGB8( 48,104, 80), RGB8( 7, 24, 33),
|
||||
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),
|
||||
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),
|
||||
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),
|
||||
RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0)
|
||||
};
|
||||
|
||||
const uint8_t enemy_tiles[512] = {
|
||||
0x07,0x07,0x08,0x0f,0x17,0x18,0x1f,0x12,0x1c,0x13,0x3f,0x23,0x2e,0x31,0x17,0x18,
|
||||
0x09,0x0e,0x09,0x0e,0x04,0x07,0x04,0x07,0x05,0x06,0x0b,0x0d,0x06,0x06,0x00,0x00,
|
||||
0xc0,0xc0,0x20,0xe0,0xd0,0x30,0xf0,0x50,0x70,0x90,0xf0,0x90,0xf8,0x18,0xfc,0x04,
|
||||
0xf8,0x08,0xf0,0x30,0xc0,0x40,0xc0,0x40,0xc0,0x40,0x80,0x80,0x00,0x00,0x00,0x00,
|
||||
0x07,0x07,0x08,0x0f,0x17,0x18,0x1f,0x12,0x1c,0x13,0x1f,0x13,0x2e,0x31,0x27,0x38,
|
||||
0x13,0x1c,0x09,0x0e,0x04,0x07,0x04,0x07,0x05,0x06,0x02,0x03,0x01,0x01,0x00,0x00,
|
||||
0xc0,0xc0,0x20,0xe0,0xd0,0x30,0xf0,0x50,0x70,0x90,0xf0,0x90,0xf8,0x18,0xfc,0x04,
|
||||
0xf8,0x08,0xf0,0x30,0xc0,0x40,0xc0,0x40,0xc0,0x40,0xc0,0x40,0x80,0x80,0x00,0x00,
|
||||
0x03,0x03,0x04,0x07,0x0b,0x0c,0x0f,0x0a,0x0e,0x09,0x0f,0x09,0x1f,0x18,0x3f,0x20,
|
||||
0x1f,0x10,0x0f,0x0c,0x03,0x02,0x03,0x02,0x03,0x02,0x01,0x01,0x00,0x00,0x00,0x00,
|
||||
0xe0,0xe0,0x10,0xf0,0xe8,0x18,0xf8,0x48,0x38,0xc8,0xfc,0xc4,0x74,0x8c,0xe8,0x18,
|
||||
0x90,0x70,0x90,0x70,0x20,0xe0,0x20,0xe0,0xa0,0x60,0xd0,0xb0,0x60,0x60,0x00,0x00,
|
||||
0x03,0x03,0x04,0x07,0x0b,0x0c,0x0f,0x0a,0x0e,0x09,0x0f,0x09,0x1f,0x18,0x3f,0x20,
|
||||
0x1f,0x10,0x0f,0x0c,0x03,0x02,0x03,0x02,0x03,0x02,0x03,0x02,0x01,0x01,0x00,0x00,
|
||||
0xe0,0xe0,0x10,0xf0,0xe8,0x18,0xf8,0x48,0x38,0xc8,0xf8,0xc8,0x74,0x8c,0xe4,0x1c,
|
||||
0xc8,0x38,0x90,0x70,0x20,0xe0,0x20,0xe0,0xa0,0x60,0x40,0xc0,0x80,0x80,0x00,0x00,
|
||||
0x03,0x03,0x04,0x07,0x0b,0x0c,0x0f,0x08,0x0f,0x08,0x0f,0x08,0x1f,0x18,0x3f,0x20,
|
||||
0x1f,0x10,0x0f,0x0c,0x03,0x02,0x03,0x02,0x03,0x02,0x01,0x01,0x00,0x00,0x00,0x00,
|
||||
0xe0,0xe0,0x10,0xf0,0xe8,0x18,0xf8,0x08,0xf8,0x08,0xf8,0x08,0xe8,0x18,0xd0,0x30,
|
||||
0x90,0x70,0x90,0x70,0x20,0xe0,0x20,0xe0,0xa0,0x60,0xd0,0xb0,0x60,0x60,0x00,0x00,
|
||||
0x03,0x03,0x04,0x07,0x0b,0x0c,0x0f,0x08,0x0f,0x08,0x0f,0x08,0x1f,0x18,0x3f,0x20,
|
||||
0x1f,0x10,0x0f,0x0c,0x03,0x02,0x03,0x02,0x03,0x02,0x03,0x02,0x01,0x01,0x00,0x00,
|
||||
0xe0,0xe0,0x10,0xf0,0xe8,0x18,0xf8,0x08,0xf8,0x08,0xf8,0x08,0xe8,0x18,0xd0,0x30,
|
||||
0x90,0x70,0x90,0x70,0x20,0xe0,0x20,0xe0,0xa0,0x60,0x40,0xc0,0x80,0x80,0x00,0x00,
|
||||
0x07,0x07,0x08,0x0f,0x17,0x18,0x1f,0x10,0x1f,0x10,0x1f,0x10,0x17,0x18,0x0b,0x0c,
|
||||
0x09,0x0e,0x09,0x0e,0x04,0x07,0x04,0x07,0x05,0x06,0x0b,0x0d,0x06,0x06,0x00,0x00,
|
||||
0xc0,0xc0,0x20,0xe0,0xd0,0x30,0xf0,0x10,0xf0,0x10,0xf0,0x10,0xf8,0x18,0xfc,0x04,
|
||||
0xf8,0x08,0xf0,0x30,0xc0,0x40,0xc0,0x40,0xc0,0x40,0x80,0x80,0x00,0x00,0x00,0x00,
|
||||
0x07,0x07,0x08,0x0f,0x17,0x18,0x1f,0x10,0x1f,0x10,0x1f,0x10,0x17,0x18,0x0b,0x0c,
|
||||
0x09,0x0e,0x09,0x0e,0x04,0x07,0x04,0x07,0x05,0x06,0x02,0x03,0x01,0x01,0x00,0x00,
|
||||
0xc0,0xc0,0x20,0xe0,0xd0,0x30,0xf0,0x10,0xf0,0x10,0xf0,0x10,0xf8,0x18,0xfc,0x04,
|
||||
0xf8,0x08,0xf0,0x30,0xc0,0x40,0xc0,0x40,0xc0,0x40,0xc0,0x40,0x80,0x80,0x00,0x00
|
||||
};
|
||||
|
||||
const metasprite_t enemy_metasprite0[] = {
|
||||
METASPR_ITEM(-8, -8, 0, S_PAL(0) | S_PALETTE),
|
||||
METASPR_ITEM(0, 8, 2, S_PAL(0) | S_PALETTE),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t enemy_metasprite1[] = {
|
||||
METASPR_ITEM(-8, -8, 4, S_PAL(0) | S_PALETTE),
|
||||
METASPR_ITEM(0, 8, 6, S_PAL(0) | S_PALETTE),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t enemy_metasprite2[] = {
|
||||
METASPR_ITEM(-8, -8, 8, S_PAL(0) | S_PALETTE),
|
||||
METASPR_ITEM(0, 8, 10, S_PAL(0) | S_PALETTE),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t enemy_metasprite3[] = {
|
||||
METASPR_ITEM(-8, -8, 12, S_PAL(0) | S_PALETTE),
|
||||
METASPR_ITEM(0, 8, 14, S_PAL(0) | S_PALETTE),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t enemy_metasprite4[] = {
|
||||
METASPR_ITEM(-8, -8, 16, S_PAL(0) | S_PALETTE),
|
||||
METASPR_ITEM(0, 8, 18, S_PAL(0) | S_PALETTE),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t enemy_metasprite5[] = {
|
||||
METASPR_ITEM(-8, -8, 20, S_PAL(0) | S_PALETTE),
|
||||
METASPR_ITEM(0, 8, 22, S_PAL(0) | S_PALETTE),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t enemy_metasprite6[] = {
|
||||
METASPR_ITEM(-8, -8, 24, S_PAL(0) | S_PALETTE),
|
||||
METASPR_ITEM(0, 8, 26, S_PAL(0) | S_PALETTE),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t enemy_metasprite7[] = {
|
||||
METASPR_ITEM(-8, -8, 28, S_PAL(0) | S_PALETTE),
|
||||
METASPR_ITEM(0, 8, 30, S_PAL(0) | S_PALETTE),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t* const enemy_metasprites[8] = {
|
||||
enemy_metasprite0, enemy_metasprite1, enemy_metasprite2, enemy_metasprite3, enemy_metasprite4, enemy_metasprite5, enemy_metasprite6, enemy_metasprite7
|
||||
};
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /enemy.png -c /enemy.c -sw 16 -sh 16 -bpp 2 -noflip -keep_palette_order -sp 0x10
|
||||
|
||||
#ifndef METASPRITE_enemy_H
|
||||
#define METASPRITE_enemy_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
#define enemy_TILE_ORIGIN 0
|
||||
#define enemy_TILE_W 8
|
||||
#define enemy_TILE_H 16
|
||||
#define enemy_WIDTH 16
|
||||
#define enemy_HEIGHT 16
|
||||
#define enemy_TILE_COUNT 32
|
||||
#define enemy_PALETTE_COUNT 8
|
||||
#define enemy_COLORS_PER_PALETTE 4
|
||||
#define enemy_TOTAL_COLORS 32
|
||||
#define enemy_PIVOT_X 8
|
||||
#define enemy_PIVOT_Y 8
|
||||
#define enemy_PIVOT_W 16
|
||||
#define enemy_PIVOT_H 16
|
||||
extern const metasprite_t* const enemy_metasprites[8];
|
||||
|
||||
BANKREF_EXTERN(enemy)
|
||||
|
||||
extern const palette_color_t enemy_palettes[32];
|
||||
extern const uint8_t enemy_tiles[512];
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,170 @@
|
||||
#include "enemy_logic.h"
|
||||
#include "globals.h"
|
||||
#include "render.h" // For update_stamina_display
|
||||
#include <gb/gb.h>
|
||||
|
||||
// Tile graphics required for metasprites
|
||||
#include "player.h"
|
||||
#include "enemy.h"
|
||||
|
||||
/**
|
||||
* Gestisce l'intelligenza artificiale (AI) e il rendering del nemico (il fantasma).
|
||||
*
|
||||
* Sviluppo & Scelte Architetturali:
|
||||
* 1. Cooldown System: Il fantasma fa "passi" esatti sulla griglia proprio come il giocatore.
|
||||
* Tuttavia, se si muovesse a ogni frame, sarebbe impossibile scappare.
|
||||
* Abbiamo implementato un timer di `enemy_cooldown` (60 frame = 1 secondo) di pausa
|
||||
* tra un passo e l'altro. Il giocatore cammina/salta più velocemente, creando una
|
||||
* tensione in cui devi pianificare i tuoi balzi per seminarlo.
|
||||
* 2. Pathfinding (Ricerca del Percorso): Invece di usare A* (A-Star) che consumerebbe
|
||||
* troppa RAM e CPU per un Game Boy a 8-bit, il fantasma usa una logica "Greedy".
|
||||
* Calcola la distanza al quadrato verso il giocatore per ciascuna delle 4 direzioni
|
||||
* valide (muri permettendo). Sceglie la direzione che *minimizza* questa distanza.
|
||||
* Non essendo A*, può incastrarsi in vicoli ciechi a forma di "U", che è esattamente
|
||||
* una debolezza voluta per permettere al giocatore di seminarlo usando il level design.
|
||||
* 3. Collisione Pixel-Perfect: Anche se logica e pathfinding sono su griglia (Grid-Based),
|
||||
* la Morte scatta solo se i *pixel* fisici a schermo dei due sprite si sovrappongono.
|
||||
*/
|
||||
void update_enemy_logic(void) {
|
||||
// 1. Aggiorna l'interpolazione del movimento visivo del fantasma
|
||||
if (enemy_is_moving) {
|
||||
enemy_move_progress++;
|
||||
if (enemy_move_progress == 16) {
|
||||
// Movimento completato
|
||||
enemy_is_moving = 0;
|
||||
enemy_lx = enemy_target_lx;
|
||||
enemy_ly = enemy_target_ly;
|
||||
// Imposta una pausa di 1 secondo prima del prossimo passo (Bilanciamento difficoltà)
|
||||
enemy_cooldown = 60;
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Decrementa il timer di riposo se non si sta muovendo
|
||||
if (enemy_cooldown > 0) {
|
||||
enemy_cooldown--;
|
||||
}
|
||||
|
||||
// 3. AI PATHFINDING: Calcola il prossimo passo se è pronto a muoversi
|
||||
if (!enemy_is_moving && enemy_cooldown == 0) {
|
||||
// Calcola Distanza di Chebyshev logica dal giocatore per sapere se siamo "vicini"
|
||||
int8_t dx = (int8_t)player_lx - (int8_t)enemy_lx;
|
||||
int8_t dy = (int8_t)player_ly - (int8_t)enemy_ly;
|
||||
int8_t abs_dx = (dx < 0) ? -dx : dx;
|
||||
int8_t abs_dy = (dy < 0) ? -dy : dy;
|
||||
int8_t dist = (abs_dx > abs_dy) ? abs_dx : abs_dy;
|
||||
|
||||
// L'AI "si sveglia" e inizia a inseguirti solo se è entro 2 celle di distanza
|
||||
// (cioè è entrato nel tuo cono visivo di nebbia)
|
||||
if (dist <= 2) {
|
||||
int8_t best_nx = enemy_lx;
|
||||
int8_t best_ny = enemy_ly;
|
||||
|
||||
// Inizializza con la distanza Euclidea al QUADRATO (x^2 + y^2) corrente.
|
||||
// Non usiamo la radice quadrata (sqrt) perché è un calcolo pesantissimo su Game Boy.
|
||||
// Il quadrato della distanza conserva le proporzioni perfette per il confronto (min_dist).
|
||||
int16_t min_dist_sq = (int16_t)dx * dx + (int16_t)dy * dy;
|
||||
|
||||
// Controllo 1: Direzione Down-Right (+1 X)
|
||||
if (enemy_lx + 1 < MAP_SIZE && maze[enemy_ly][enemy_lx + 1] == 1) {
|
||||
int8_t ndx = (int8_t)player_lx - (int8_t)(enemy_lx + 1);
|
||||
int8_t ndy = (int8_t)player_ly - (int8_t)enemy_ly;
|
||||
int16_t d_sq = (int16_t)ndx * ndx + (int16_t)ndy * ndy;
|
||||
if (d_sq < min_dist_sq) { min_dist_sq = d_sq; best_nx = enemy_lx + 1; best_ny = enemy_ly; }
|
||||
}
|
||||
// Controllo 2: Direzione Down-Left (+1 Y)
|
||||
if (enemy_ly + 1 < MAP_SIZE && maze[enemy_ly + 1][enemy_lx] == 1) {
|
||||
int8_t ndx = (int8_t)player_lx - (int8_t)enemy_lx;
|
||||
int8_t ndy = (int8_t)player_ly - (int8_t)(enemy_ly + 1);
|
||||
int16_t d_sq = (int16_t)ndx * ndx + (int16_t)ndy * ndy;
|
||||
if (d_sq < min_dist_sq) { min_dist_sq = d_sq; best_nx = enemy_lx; best_ny = enemy_ly + 1; }
|
||||
}
|
||||
// Controllo 3: Direzione Up-Left (-1 X)
|
||||
if (enemy_lx > 0 && maze[enemy_ly][enemy_lx - 1] == 1) {
|
||||
int8_t ndx = (int8_t)player_lx - (int8_t)(enemy_lx - 1);
|
||||
int8_t ndy = (int8_t)player_ly - (int8_t)enemy_ly;
|
||||
int16_t d_sq = (int16_t)ndx * ndx + (int16_t)ndy * ndy;
|
||||
if (d_sq < min_dist_sq) { min_dist_sq = d_sq; best_nx = enemy_lx - 1; best_ny = enemy_ly; }
|
||||
}
|
||||
// Controllo 4: Direzione Up-Right (-1 Y)
|
||||
if (enemy_ly > 0 && maze[enemy_ly - 1][enemy_lx] == 1) {
|
||||
int8_t ndx = (int8_t)player_lx - (int8_t)enemy_lx;
|
||||
int8_t ndy = (int8_t)player_ly - (int8_t)(enemy_ly - 1);
|
||||
int16_t d_sq = (int16_t)ndx * ndx + (int16_t)ndy * ndy;
|
||||
if (d_sq < min_dist_sq) { min_dist_sq = d_sq; best_nx = enemy_lx; best_ny = enemy_ly - 1; }
|
||||
}
|
||||
|
||||
// Se abbiamo trovato un percorso migliore (Strictly closer)
|
||||
if (best_nx != (int8_t)enemy_lx || best_ny != (int8_t)enemy_ly) {
|
||||
enemy_is_moving = 1;
|
||||
enemy_move_progress = 0;
|
||||
enemy_start_lx = enemy_lx;
|
||||
enemy_start_ly = enemy_ly;
|
||||
enemy_target_lx = best_nx;
|
||||
enemy_target_ly = best_ny;
|
||||
|
||||
// Preparazione coordinate pixel hardware per l'interpolazione fluida
|
||||
enemy_start_px = (enemy_start_lx - enemy_start_ly) * 16 + 96;
|
||||
enemy_start_py = (enemy_start_lx + enemy_start_ly) * 8 + 16;
|
||||
enemy_target_px = (enemy_target_lx - enemy_target_ly) * 16 + 96;
|
||||
enemy_target_py = (enemy_target_lx + enemy_target_ly) * 8 + 16;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 4. RENDERING DEL NEMICO (Telecamera relativa)
|
||||
// Recuperiamo i pixel assoluti
|
||||
int16_t enemy_px, enemy_py;
|
||||
if (enemy_is_moving) {
|
||||
enemy_px = enemy_start_px + (((enemy_target_px - enemy_start_px) * (int16_t)enemy_move_progress) >> 4);
|
||||
enemy_py = enemy_start_py + (((enemy_target_py - enemy_start_py) * (int16_t)enemy_move_progress) >> 4);
|
||||
} else {
|
||||
enemy_px = (enemy_lx - enemy_ly) * 16 + 96;
|
||||
enemy_py = (enemy_lx + enemy_ly) * 8 + 16;
|
||||
}
|
||||
|
||||
// Il motore renderizza lo sfondo scrollando, ma gli SPRITE devono essere disegnati a mano.
|
||||
// Togliamo il valore di scroll della telecamera (scroll_x, scroll_y) dalla posizione assoluta.
|
||||
// +24 e +16 sono offset per l'allineamento hardware OAM del Game Boy per le griglie 16x16.
|
||||
int16_t enemy_screen_x = ((enemy_px - scroll_x) & 255) + 24;
|
||||
int16_t enemy_screen_y = ((enemy_py - scroll_y) & 255) + 16;
|
||||
|
||||
// Mostriamo lo sprite solo se è all'interno della griglia logica visibile (distanza <= 2)
|
||||
int8_t edx = (int8_t)player_lx - (int8_t)enemy_lx;
|
||||
int8_t edy = (int8_t)player_ly - (int8_t)enemy_ly;
|
||||
if (edx < 0) edx = -edx;
|
||||
if (edy < 0) edy = -edy;
|
||||
uint8_t ep_dist = (edx > edy) ? edx : edy;
|
||||
|
||||
// Il limite x=168 e y=152 assicura di nascondere gli sprite appena fuori dai bordi fisici
|
||||
if (ep_dist <= 2 && enemy_screen_x >= -8 && enemy_screen_x <= 168 && enemy_screen_y >= -8 && enemy_screen_y <= 152) {
|
||||
// Disegna il metasprite del Fantasma usando gli offset di memoria generati in enemy.h
|
||||
move_metasprite(enemy_metasprites[0], player_TILE_COUNT, 4, enemy_screen_x, enemy_screen_y);
|
||||
} else {
|
||||
// Nasconde lo sprite spostandolo a coordinate (0,0) offscreen
|
||||
move_metasprite(enemy_metasprites[0], player_TILE_COUNT, 4, 0, 0);
|
||||
}
|
||||
|
||||
// 5. COLLISIONE FATALE (Player Hitbox check)
|
||||
// Per calcolare esattamente il game over, usiamo la posizione *Pixel* di entrambi.
|
||||
int16_t p_px = is_moving ? (start_px + (((target_px - start_px) * (int16_t)move_progress) >> 4)) : ((player_lx - player_ly) * 16 + 96);
|
||||
int16_t p_py = is_moving ? (start_py + (((target_py - start_py) * (int16_t)move_progress) >> 4)) : ((player_lx + player_ly) * 8 + 16);
|
||||
|
||||
int16_t dx_collision = p_px - enemy_px;
|
||||
int16_t dy_collision = p_py - enemy_py;
|
||||
if (dx_collision < 0) dx_collision = -dx_collision;
|
||||
if (dy_collision < 0) dy_collision = -dy_collision;
|
||||
|
||||
// Se i pixel centrali sono vicini (X < 12 e Y < 6), scatena il GAME OVER
|
||||
if (dx_collision < 12 && dy_collision < 6) {
|
||||
game_over = 1; // 1 = Defeat
|
||||
game_over_timer = 45; // Fermo immagine drammatico per 45 frame (~0.7s) prima del menu nero
|
||||
update_stamina_display(); // Aggiornando con game_over=1 l'HUD scompare istantaneamente
|
||||
|
||||
// Esegue il Sound Effect della cattura: Suono profondo a caduta (Slide Down) sul Canale 1
|
||||
NR10_REG = 0x1E; // sweep register: shift down
|
||||
NR11_REG = 0x10; // 25% duty cycle
|
||||
NR12_REG = 0xF3; // volume alto, calo rapido (envelope decrease)
|
||||
NR13_REG = 0x00; // frequenza bassa
|
||||
NR14_REG = 0xC6; // trigger
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef ENEMY_LOGIC_H
|
||||
#define ENEMY_LOGIC_H
|
||||
|
||||
/**
|
||||
* ==========================================
|
||||
* ENEMY ARTIFICIAL INTELLIGENCE
|
||||
* ==========================================
|
||||
* Handles the logic for the ghost enemy that chases the player through the maze.
|
||||
*/
|
||||
|
||||
// Call every frame during gameplay
|
||||
void update_enemy_logic(void);
|
||||
|
||||
#endif
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
#include <gb/gb.h>
|
||||
#include <gbdk/font.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <rand.h>
|
||||
|
||||
#include "engine.h"
|
||||
#include "globals.h"
|
||||
#include "maze.h"
|
||||
#include "sound.h"
|
||||
#include "render.h"
|
||||
#include "player_logic.h"
|
||||
#include "enemy_logic.h"
|
||||
|
||||
// Generated by png2asset
|
||||
#include "tiles.h"
|
||||
#include "player.h"
|
||||
#include "enemy.h"
|
||||
#include "gameover.h"
|
||||
#include "victory.h"
|
||||
#include "stamina.h"
|
||||
#include "title_bg.h"
|
||||
#ifdef USE_SPRITE_STAIRS
|
||||
#include "stairs_sprite.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Inizializza la schermata del titolo
|
||||
*/
|
||||
void title_init(void) {
|
||||
// Nasconde tutti gli sprite (sia personaggio che HUD)
|
||||
for (uint8_t i = 0; i < 40; i++) move_sprite(i, 0, 0);
|
||||
|
||||
// Carica l'immagine di sfondo del titolo
|
||||
set_bkg_data(0, title_bg_TILE_COUNT, title_bg_tiles);
|
||||
set_bkg_tiles(0, 0, title_bg_WIDTH / 8, title_bg_HEIGHT / 8, title_bg_map);
|
||||
|
||||
// Configura la palette standard B/N
|
||||
BGP_REG = 0xE4;
|
||||
|
||||
// Centra lo scroll della telecamera in alto a sinistra (0,0)
|
||||
move_bkg(0, 0);
|
||||
|
||||
// Inizializza l'Audio Hardware del Game Boy
|
||||
NR52_REG = 0x80; // Accende il chip audio
|
||||
NR50_REG = 0x77; // Volume master al massimo
|
||||
NR51_REG = 0xFF; // Abilita l'output stereo su tutti i canali
|
||||
|
||||
// Avvia la musica del titolo riavviando il sequencer
|
||||
sound_reset_music_state();
|
||||
remove_VBL(play_music_tick);
|
||||
add_VBL(play_music_tick);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loop di aggiornamento della schermata del titolo (non fa nulla, la pressione di START è gestita in main.c)
|
||||
*/
|
||||
void title_update(uint8_t keys, uint8_t prev_keys) {
|
||||
// Vuoto. La musica continua in background via Interrupt (VBL)
|
||||
}
|
||||
|
||||
/**
|
||||
* Inizializza l'engine per la fase di Gameplay.
|
||||
* Qui viene orchestrata la "nascita" di un nuovo livello.
|
||||
*/
|
||||
void engine_init(void) {
|
||||
SPRITES_8x16; // Imposta la modalità Sprite Alti (16 pixel invece di 8)
|
||||
|
||||
// Hard reset Audio
|
||||
NR52_REG = 0x80;
|
||||
NR50_REG = 0x77;
|
||||
NR51_REG = 0xFF;
|
||||
|
||||
// Carica il font testuale di sistema (IBM)
|
||||
font_init();
|
||||
font_t ibm_font = font_load(font_ibm);
|
||||
font_set(ibm_font);
|
||||
|
||||
// Avvia il sequencer per la musica In-Game "Eerie pulse"
|
||||
sound_reset_music_state();
|
||||
remove_VBL(play_music_tick);
|
||||
add_VBL(play_music_tick);
|
||||
|
||||
// Usa il registro divisore hardware (DIV_REG) per seedare l'RNG. Garantisce labirinti diversi ogni volta.
|
||||
initrand(DIV_REG);
|
||||
|
||||
// DELEGA LA GENERAZIONE: Chiede al modulo maze.c di creare l'array della mappa
|
||||
generate_maze();
|
||||
|
||||
// Imposta le palette (DMG compatibile)
|
||||
OBP0_REG = 0xE4; // Palette Normale (Nero, Grigio Scuro, Grigio Chiaro, Bianco)
|
||||
OBP1_REG = 0x1B; // Palette Invertita (per il fantasma: bianco, grigio scuro, nero)
|
||||
BGP_REG = 0xE4; // Palette Background
|
||||
|
||||
// Carica in memoria VRAM la grafica di Tiles e Sprite
|
||||
set_bkg_data(0, tiles_TILE_COUNT, tiles_tiles);
|
||||
set_sprite_data(0, player_TILE_COUNT, player_tiles);
|
||||
set_sprite_data(player_TILE_COUNT, enemy_TILE_COUNT, enemy_tiles);
|
||||
set_sprite_data(player_TILE_COUNT + enemy_TILE_COUNT, gameover_TILE_COUNT, gameover_tiles);
|
||||
set_sprite_data(player_TILE_COUNT + enemy_TILE_COUNT + gameover_TILE_COUNT, victory_TILE_COUNT, victory_tiles);
|
||||
set_sprite_data(player_TILE_COUNT + enemy_TILE_COUNT + gameover_TILE_COUNT + victory_TILE_COUNT, stamina_TILE_COUNT * 2, stamina_tiles);
|
||||
#ifdef USE_SPRITE_STAIRS
|
||||
set_sprite_data(player_TILE_COUNT + enemy_TILE_COUNT + gameover_TILE_COUNT + victory_TILE_COUNT + stamina_TILE_COUNT * 2, stairs_sprite_TILE_COUNT, stairs_sprite_tiles);
|
||||
#endif
|
||||
|
||||
// SPAWN DEL GIOCATORE
|
||||
player_lx = 1;
|
||||
player_ly = 1;
|
||||
// Fallback di sicurezza: Cerca la prima casella libera se 1,1 è occupato (teoricamente impossibile col DFS)
|
||||
if (maze[player_ly][player_lx] == 0) {
|
||||
uint8_t found = 0;
|
||||
for (uint8_t y = 1; y < MAP_SIZE - 1; y++) {
|
||||
for (uint8_t x = 1; x < MAP_SIZE - 1; x++) {
|
||||
if (maze[y][x] == 1) {
|
||||
player_lx = x;
|
||||
player_ly = y;
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found) break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_SPRITE_STAIRS
|
||||
// HARDCODE STAIRS FOR TESTING
|
||||
stairs_lx = player_lx + 1;
|
||||
stairs_ly = player_ly;
|
||||
maze[stairs_ly][stairs_lx] = 2;
|
||||
#endif
|
||||
|
||||
// SPAWN DEL NEMICO
|
||||
// Cerca randomicamente un punto lontano almeno 3 celle dal giocatore
|
||||
while (1) {
|
||||
uint8_t rx = rand() % MAP_SIZE;
|
||||
uint8_t ry = rand() % MAP_SIZE;
|
||||
if (maze[ry][rx] == 1) {
|
||||
int8_t dx = (int8_t)rx - (int8_t)player_lx;
|
||||
int8_t dy = (int8_t)ry - (int8_t)player_ly;
|
||||
if (dx < 0) dx = -dx;
|
||||
if (dy < 0) dy = -dy;
|
||||
int8_t dist = (dx > dy) ? dx : dy;
|
||||
if (dist >= 3) {
|
||||
enemy_lx = rx;
|
||||
enemy_ly = ry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reset Variabili di Gameplay
|
||||
enemy_is_moving = 0;
|
||||
enemy_cooldown = 60;
|
||||
game_over = 0;
|
||||
stamina = 100;
|
||||
stamina_recharge_timer = 0;
|
||||
is_jumping = 0;
|
||||
is_moving = 0;
|
||||
|
||||
// Richiama render.c per forzare un disegno iniziale della scena
|
||||
draw_map(player_lx, player_ly);
|
||||
update_camera();
|
||||
update_player_sprite();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loop Principale di Aggiornamento del Gioco (chiamato ad ogni Frame ~60 FPS).
|
||||
* Questo metodo funge da "Direttore d'Orchestra", delegando i compiti ai moduli specializzati.
|
||||
*/
|
||||
void engine_update(uint8_t keys, uint8_t prev_keys) {
|
||||
|
||||
// --- GESTIONE STATO DI FINE GIOCO (Sconfitta o Vittoria) ---
|
||||
if (game_over) {
|
||||
if (game_over_timer > 0) {
|
||||
game_over_timer--;
|
||||
// Quando scade il timer drammatico...
|
||||
if (game_over_timer == 0) {
|
||||
// ...Svuota lo schermo
|
||||
memset(map_buffer, 0, sizeof(map_buffer));
|
||||
set_bkg_tiles(0, 0, 32, 32, map_buffer);
|
||||
|
||||
// Imposta i timer audio per far iniziare la musica finale dal modulo sound.c
|
||||
// La musica verrà suonata dall'interrupt play_music_tick in background.
|
||||
if (game_over == 1) {
|
||||
// Start gameover sequence state
|
||||
// gameover_music_timer/step are handled in play_music_tick inside sound.c automatically
|
||||
// We just trigger a starting dramatic beat.
|
||||
NR21_REG = 0x80;
|
||||
NR22_REG = 0xF3;
|
||||
NR23_REG = 0x2C;
|
||||
NR24_REG = 0x84;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Dopo il timer, disegna i metasprite di VITTORIA o GAME OVER fissi in mezzo allo schermo
|
||||
if (game_over == 1) {
|
||||
move_metasprite(gameover_metasprites[0], player_TILE_COUNT + enemy_TILE_COUNT, 8, 88, 120);
|
||||
} else if (game_over == 2) {
|
||||
move_metasprite(victory_metasprites[0], player_TILE_COUNT + enemy_TILE_COUNT + gameover_TILE_COUNT, 8, 88, 120);
|
||||
}
|
||||
|
||||
// Il giocatore rimane visibile al centro, il nemico scompare se vinto o appare se sconfitto.
|
||||
update_player_sprite();
|
||||
|
||||
int16_t enemy_px = (enemy_lx - enemy_ly) * 16 + 96;
|
||||
int16_t enemy_py = (enemy_lx + enemy_ly) * 8 + 16;
|
||||
int16_t enemy_screen_x = ((enemy_px - scroll_x) & 255) + 24;
|
||||
int16_t enemy_screen_y = ((enemy_py - scroll_y) & 255) + 16;
|
||||
|
||||
int8_t edx = (int8_t)player_lx - (int8_t)enemy_lx;
|
||||
int8_t edy = (int8_t)player_ly - (int8_t)enemy_ly;
|
||||
if (edx < 0) edx = -edx;
|
||||
if (edy < 0) edy = -edy;
|
||||
uint8_t ep_dist = (edx > edy) ? edx : edy;
|
||||
|
||||
if (game_over == 1 && ep_dist <= 2 && enemy_screen_x >= -8 && enemy_screen_x <= 168 && enemy_screen_y >= -8 && enemy_screen_y <= 152) {
|
||||
move_metasprite(enemy_metasprites[0], player_TILE_COUNT, 4, enemy_screen_x, enemy_screen_y);
|
||||
} else {
|
||||
move_metasprite(enemy_metasprites[0], player_TILE_COUNT, 4, 0, 0);
|
||||
}
|
||||
|
||||
// Attende la pressione di START per riavviare
|
||||
if ((keys & J_START) && !(prev_keys & J_START)) {
|
||||
// Nasconde la grafica testuale e ricarica tutto l'engine
|
||||
move_metasprite(gameover_metasprites[0], player_TILE_COUNT + enemy_TILE_COUNT, 8, 0, 0);
|
||||
move_metasprite(victory_metasprites[0], player_TILE_COUNT + enemy_TILE_COUNT + gameover_TILE_COUNT, 8, 0, 0);
|
||||
engine_init();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// --- GESTIONE DEL LOOP DI GIOCO STANDARD ---
|
||||
|
||||
// 1. DELEGA L'AI DEL NEMICO (se il fantasma si deve muovere, lo calcola qui)
|
||||
update_enemy_logic();
|
||||
|
||||
// 2. DELEGA LA LOGICA DEL GIOCATORE (movimento, tasti, animazioni)
|
||||
update_player_movement(keys, prev_keys);
|
||||
|
||||
// Note: Il rendering effettivo della mappa e della telecamera avviene già all'interno di
|
||||
// update_player_movement durante l'interpolazione del passo (per fluidità sub-tile).
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#ifndef ENGINE_H
|
||||
#define ENGINE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void title_init(void);
|
||||
void title_update(uint8_t keys, uint8_t prev_keys);
|
||||
void engine_init(void);
|
||||
void engine_update(uint8_t keys, uint8_t prev_keys);
|
||||
|
||||
extern uint8_t app_state;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /gameover.png -c /gameover.c -bpp 2 -noflip -keep_palette_order
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
BANKREF(gameover)
|
||||
|
||||
const palette_color_t gameover_palettes[32] = {
|
||||
RGB8(224,248,207), RGB8(134,192,108), RGB8( 48,104, 80), RGB8( 7, 24, 33),
|
||||
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),
|
||||
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),
|
||||
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),
|
||||
RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0)
|
||||
};
|
||||
|
||||
const uint8_t gameover_tiles[320] = {
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xfc,0xfe,0xf8,0xfc,0xf8,0xfd,0xf8,0xfd,
|
||||
0xf8,0xfd,0xf8,0xfc,0xfc,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x1e,0xff,0x0c,0x1e,0x08,0xfd,0xf8,0xfd,0x88,0xfc,
|
||||
0x88,0xdd,0x08,0xdd,0x08,0x1d,0x19,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x79,0xff,0x38,0x7d,0x18,0xbc,0x18,0xbd,0x18,0x3d,
|
||||
0x18,0xbd,0x18,0xbd,0x18,0xbd,0x99,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x98,0xff,0x18,0xbc,0x18,0x3d,0x18,0xbc,0x18,0xbd,
|
||||
0x18,0xbd,0x18,0xbc,0x18,0xbf,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xff,0x0f,0x1f,0x0f,0xff,0x1f,0x3f,0x0f,0xff,
|
||||
0xff,0xff,0x0f,0x1f,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xf8,0xfc,0xf8,0xfd,0xf8,0xfd,0xf8,0xfd,
|
||||
0xf8,0xfd,0xf8,0xfc,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x39,0xff,0x18,0x3d,0x18,0xbd,0x18,0xbd,0x18,0xbd,
|
||||
0x18,0xbd,0x1c,0x3e,0x3e,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x98,0xff,0x18,0xbc,0x18,0xbd,0x18,0xbc,0x18,0xbd,
|
||||
0x18,0xbd,0x38,0x7c,0x78,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x18,0xff,0x08,0x1c,0x08,0xfd,0x18,0x3c,0x08,0xfd,
|
||||
0xf8,0xfd,0x08,0x1d,0x19,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0x1f,0x3f,0x1f,0xbf,0x3f,0x7f,0x1f,0xbf,
|
||||
0x1f,0xbf,0x1f,0xbf,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
|
||||
};
|
||||
|
||||
const metasprite_t gameover_metasprite0[] = {
|
||||
METASPR_ITEM(-8, -40, 0, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 2, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 4, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 6, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 8, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 10, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 12, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 14, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 16, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 18, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t* const gameover_metasprites[1] = {
|
||||
gameover_metasprite0
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /gameover.png -c /gameover.c -bpp 2 -noflip -keep_palette_order
|
||||
|
||||
#ifndef METASPRITE_gameover_H
|
||||
#define METASPRITE_gameover_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
#define gameover_TILE_ORIGIN 0
|
||||
#define gameover_TILE_W 8
|
||||
#define gameover_TILE_H 16
|
||||
#define gameover_WIDTH 80
|
||||
#define gameover_HEIGHT 16
|
||||
#define gameover_TILE_COUNT 20
|
||||
#define gameover_PALETTE_COUNT 8
|
||||
#define gameover_COLORS_PER_PALETTE 4
|
||||
#define gameover_TOTAL_COLORS 32
|
||||
#define gameover_PIVOT_X 40
|
||||
#define gameover_PIVOT_Y 8
|
||||
#define gameover_PIVOT_W 80
|
||||
#define gameover_PIVOT_H 16
|
||||
extern const metasprite_t* const gameover_metasprites[1];
|
||||
|
||||
BANKREF_EXTERN(gameover)
|
||||
|
||||
extern const palette_color_t gameover_palettes[32];
|
||||
extern const uint8_t gameover_tiles[320];
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
#include "globals.h"
|
||||
|
||||
// Define the actual memory storage for all global variables
|
||||
volatile uint8_t game_over = 0;
|
||||
volatile uint8_t game_over_timer = 0;
|
||||
|
||||
uint8_t maze[MAP_SIZE][MAP_SIZE];
|
||||
uint8_t map_buffer[32 * 32];
|
||||
|
||||
uint8_t player_lx = 1;
|
||||
uint8_t player_ly = 1;
|
||||
uint8_t player_dir = 0;
|
||||
uint8_t scroll_x = 0;
|
||||
int8_t scroll_y = 0;
|
||||
|
||||
uint8_t stairs_lx = 0;
|
||||
uint8_t stairs_ly = 0;
|
||||
|
||||
uint8_t is_moving = 0;
|
||||
uint8_t is_jumping = 0;
|
||||
uint8_t move_progress = 0;
|
||||
int8_t start_lx, start_ly;
|
||||
int8_t target_lx, target_ly;
|
||||
int16_t start_px, start_py;
|
||||
int16_t target_px, target_py;
|
||||
|
||||
uint8_t stamina = 100;
|
||||
uint8_t stamina_recharge_timer = 0;
|
||||
|
||||
uint8_t enemy_lx = 0;
|
||||
uint8_t enemy_ly = 0;
|
||||
uint8_t enemy_is_moving = 0;
|
||||
uint8_t enemy_move_progress = 0;
|
||||
int8_t enemy_start_lx, enemy_start_ly;
|
||||
int8_t enemy_target_lx, enemy_target_ly;
|
||||
int16_t enemy_start_px, enemy_start_py;
|
||||
int16_t enemy_target_px, enemy_target_py;
|
||||
uint8_t enemy_cooldown = 0;
|
||||
@@ -0,0 +1,72 @@
|
||||
#ifndef GLOBALS_H
|
||||
#define GLOBALS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* ==========================================
|
||||
* GLOBAL GAME STATE
|
||||
* ==========================================
|
||||
* This file contains all the global variables that are shared across different
|
||||
* logical modules (e.g., rendering, player logic, enemy logic, audio).
|
||||
* We place them here to avoid circular dependencies between modules.
|
||||
*/
|
||||
|
||||
// --- General Application State ---
|
||||
// app_state = 0 means Title Screen, 1 means Gameplay
|
||||
extern uint8_t app_state;
|
||||
|
||||
// game_over = 0 means Playing, 1 means Defeat (Ghost caught you), 2 means Victory (Reached portal)
|
||||
extern volatile uint8_t game_over;
|
||||
// Timer used to delay actions after game over (e.g. before showing text or playing music)
|
||||
extern volatile uint8_t game_over_timer;
|
||||
|
||||
// --- Map Data ---
|
||||
#define MAP_SIZE 7
|
||||
// The generated maze: 0 = Wall, 1 = Floor, 2 = Victory Tile
|
||||
extern uint8_t maze[MAP_SIZE][MAP_SIZE];
|
||||
|
||||
// --- Camera & Rendering ---
|
||||
// Map buffer used to draw the isometric tiles into the Game Boy Background map
|
||||
extern uint8_t map_buffer[32 * 32];
|
||||
// Camera scroll coordinates to keep the player centered
|
||||
extern uint8_t scroll_x;
|
||||
extern int8_t scroll_y;
|
||||
|
||||
extern uint8_t stairs_lx;
|
||||
extern uint8_t stairs_ly;
|
||||
|
||||
// --- Mappa e Entità ---
|
||||
// The generated maze: 0 = Wall, 1 = Floor, 2 = Victory Tile
|
||||
extern uint8_t maze[MAP_SIZE][MAP_SIZE];
|
||||
extern uint8_t player_lx;
|
||||
extern uint8_t player_ly;
|
||||
extern uint8_t player_dir; // 0=DR, 1=DL, 2=UL, 3=UR
|
||||
|
||||
// --- Movement & Physics State ---
|
||||
// Shared variables for interpolated movement (walking/jumping)
|
||||
extern uint8_t is_moving;
|
||||
extern uint8_t is_jumping;
|
||||
extern uint8_t move_progress; // 0 to 16, tracks the sub-tile animation progress
|
||||
extern int8_t start_lx, start_ly;
|
||||
extern int8_t target_lx, target_ly;
|
||||
extern int16_t start_px, start_py;
|
||||
extern int16_t target_px, target_py;
|
||||
|
||||
// --- Stamina System ---
|
||||
// Stamina powers the jump mechanic. 100 = full. Recharges over time.
|
||||
extern uint8_t stamina;
|
||||
extern uint8_t stamina_recharge_timer;
|
||||
|
||||
// --- Enemy State ---
|
||||
extern uint8_t enemy_lx;
|
||||
extern uint8_t enemy_ly;
|
||||
extern uint8_t enemy_is_moving;
|
||||
extern uint8_t enemy_move_progress;
|
||||
extern int8_t enemy_start_lx, enemy_start_ly;
|
||||
extern int8_t enemy_target_lx, enemy_target_ly;
|
||||
extern int16_t enemy_start_px, enemy_start_py;
|
||||
extern int16_t enemy_target_px, enemy_target_py;
|
||||
extern uint8_t enemy_cooldown;
|
||||
|
||||
#endif
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
#include <gb/gb.h>
|
||||
#include "engine.h"
|
||||
|
||||
uint8_t app_state = 0; // 0 = title, 1 = game
|
||||
|
||||
void main(void) {
|
||||
title_init();
|
||||
|
||||
SHOW_BKG;
|
||||
SHOW_SPRITES;
|
||||
DISPLAY_ON;
|
||||
|
||||
uint8_t prev_keys = 0;
|
||||
|
||||
while (1) {
|
||||
wait_vbl_done();
|
||||
uint8_t keys = joypad();
|
||||
|
||||
if (app_state == 0) {
|
||||
title_update(keys, prev_keys);
|
||||
if ((keys & J_START) && !(prev_keys & J_START)) {
|
||||
app_state = 1;
|
||||
engine_init();
|
||||
}
|
||||
} else {
|
||||
engine_update(keys, prev_keys);
|
||||
}
|
||||
|
||||
prev_keys = keys;
|
||||
}
|
||||
}
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
#include "maze.h"
|
||||
#include "globals.h"
|
||||
#include <string.h>
|
||||
#include <rand.h>
|
||||
|
||||
/**
|
||||
* Generates a randomized maze using a Depth-First Search (DFS) algorithm with backtracking.
|
||||
*
|
||||
* Sviluppo & Scelte Architetturali:
|
||||
* 1. Perché DFS? Questo algoritmo è perfetto per labirinti garantendo che ogni cella sia
|
||||
* raggiungibile partendo dall'inizio (nessuna isola irraggiungibile).
|
||||
* 2. Il labirinto è una griglia MAP_SIZE x MAP_SIZE in cui le celle dispari (es. 1,1 o 3,3)
|
||||
* sono le stanze, mentre le celle pari sono i muri divisori. Il DFS scava i muri saltando
|
||||
* di 2 in 2 e abbattendo il muro in mezzo.
|
||||
* 3. Abbiamo aggiunto una fase post-DFS che rimuove casualmente qualche muro rimasto (con
|
||||
* il 15% di probabilità). Questo spezza la struttura "perfetta" del labirinto creando
|
||||
* dei percorsi ciclici (loop). I loop sono vitali in un gioco con un nemico che ti insegue,
|
||||
* permettendo al giocatore di aggirare il nemico scappando in cerchio.
|
||||
* 4. La casella della VITTORIA viene piazzata alla fine. Usiamo la "Distanza di Manhattan"
|
||||
* (somma della distanza X e Y) dalla partenza (1,1) per assicurarci che il traguardo
|
||||
* sia la casella più lontana in assoluto.
|
||||
*/
|
||||
void generate_maze(void) {
|
||||
// 1. Inizializziamo l'intera mappa a 0 (che rappresenta un Muro / Spazio Vuoto)
|
||||
memset(maze, 0, sizeof(maze));
|
||||
|
||||
// Stack array per il backtracking. La griglia 7x7 ha al massimo 49 celle dispari (stanze).
|
||||
uint8_t stack_x[49];
|
||||
uint8_t stack_y[49];
|
||||
uint8_t stack_ptr = 0;
|
||||
|
||||
// Partiamo sempre dalle coordinate (1, 1) in alto a sinistra
|
||||
uint8_t cx = 1;
|
||||
uint8_t cy = 1;
|
||||
maze[cy][cx] = 1; // 1 = Pavimento calpestabile
|
||||
|
||||
while (1) {
|
||||
// Cerchiamo i vicini non visitati a distanza 2 (saltando il muro divisorio)
|
||||
uint8_t nx[4];
|
||||
uint8_t ny[4];
|
||||
uint8_t count = 0;
|
||||
|
||||
// Su
|
||||
if (cy >= 3 && maze[cy - 2][cx] == 0) {
|
||||
nx[count] = cx; ny[count] = cy - 2; count++;
|
||||
}
|
||||
// Giù
|
||||
if (cy <= MAP_SIZE - 4 && maze[cy + 2][cx] == 0) {
|
||||
nx[count] = cx; ny[count] = cy + 2; count++;
|
||||
}
|
||||
// Sinistra
|
||||
if (cx >= 3 && maze[cy][cx - 2] == 0) {
|
||||
nx[count] = cx - 2; ny[count] = cy; count++;
|
||||
}
|
||||
// Destra
|
||||
if (cx <= MAP_SIZE - 4 && maze[cy][cx + 2] == 0) {
|
||||
nx[count] = cx + 2; ny[count] = cy; count++;
|
||||
}
|
||||
|
||||
// Se ci sono vicini validi
|
||||
if (count > 0) {
|
||||
// Scegli una direzione a caso tra quelle disponibili
|
||||
uint8_t dir = rand() % count;
|
||||
|
||||
// Salviamo la cella corrente nello stack per poterci tornare
|
||||
stack_x[stack_ptr] = cx;
|
||||
stack_y[stack_ptr] = cy;
|
||||
stack_ptr++;
|
||||
|
||||
// Abbattiamo il muro nel mezzo (calcolato facendo la media aritmetica delle coordinate)
|
||||
maze[(cy + ny[dir]) / 2][(cx + nx[dir]) / 2] = 1;
|
||||
|
||||
// Spostiamo la posizione corrente sul vicino scelto
|
||||
cx = nx[dir];
|
||||
cy = ny[dir];
|
||||
maze[cy][cx] = 1;
|
||||
}
|
||||
// Se non ci sono vicini, torna indietro prendendo l'ultima cella salvata dallo stack
|
||||
else if (stack_ptr > 0) {
|
||||
stack_ptr--;
|
||||
cx = stack_x[stack_ptr];
|
||||
cy = stack_y[stack_ptr];
|
||||
}
|
||||
// Se lo stack è vuoto, abbiamo visitato tutte le celle: il labirinto è completo!
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// FASE 2: Riapriamo casualmente dei muri per creare percorsi alternativi e loop (15% chance).
|
||||
// Questo è cruciale per la giocabilità: permette al giocatore di aggirare l'inseguitore!
|
||||
for (uint8_t y = 1; y < MAP_SIZE - 1; y++) {
|
||||
for (uint8_t x = 1; x < MAP_SIZE - 1; x++) {
|
||||
if (maze[y][x] == 0) {
|
||||
// Se la casella è un muro che connette orizzontalmente o verticalmente due corridoi
|
||||
if ((maze[y][x - 1] == 1 && maze[y][x + 1] == 1) ||
|
||||
(maze[y - 1][x] == 1 && maze[y + 1][x] == 1)) {
|
||||
// Genera numero casuale tra 0 e 99. Se < 15, trasforma in pavimento.
|
||||
if ((rand() % 100) < 15) {
|
||||
maze[y][x] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FASE 3: Calcoliamo il traguardo (Casella di Vittoria).
|
||||
// Invece della coordinata più lontana, scegliamo un punto casuale
|
||||
// lungo il bordo inferiore del labirinto (y = MAP_SIZE - 2).
|
||||
// Questo permette alla scala di apparire ovunque sul bordo sud.
|
||||
uint8_t valid_x[MAP_SIZE];
|
||||
uint8_t num_valid = 0;
|
||||
|
||||
for (uint8_t x = 1; x < MAP_SIZE - 1; x++) {
|
||||
if (maze[MAP_SIZE - 2][x] == 1) {
|
||||
valid_x[num_valid] = x;
|
||||
num_valid++;
|
||||
}
|
||||
}
|
||||
|
||||
if (num_valid > 0) {
|
||||
uint8_t target_x = valid_x[rand() % num_valid];
|
||||
maze[MAP_SIZE - 2][target_x] = 2;
|
||||
stairs_lx = target_x;
|
||||
stairs_ly = MAP_SIZE - 2;
|
||||
} else {
|
||||
// Fallback estremo se la riga in fondo fosse inaccessibile
|
||||
maze[MAP_SIZE - 2][MAP_SIZE - 2] = 2;
|
||||
stairs_lx = MAP_SIZE - 2;
|
||||
stairs_ly = MAP_SIZE - 2;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
#ifndef MAZE_H
|
||||
#define MAZE_H
|
||||
|
||||
/**
|
||||
* ==========================================
|
||||
* MAZE GENERATION
|
||||
* ==========================================
|
||||
* Handles the logic for creating the procedural level.
|
||||
*/
|
||||
|
||||
void generate_maze(void);
|
||||
|
||||
#endif
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /player.png -c /player.c -sw 16 -sh 16 -bpp 2 -noflip -keep_palette_order
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
BANKREF(player)
|
||||
|
||||
const palette_color_t player_palettes[32] = {
|
||||
RGB8(224,248,207), RGB8(134,192,108), RGB8( 48,104, 80), RGB8( 7, 24, 33),
|
||||
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),
|
||||
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),
|
||||
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),
|
||||
RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0)
|
||||
};
|
||||
|
||||
const uint8_t player_tiles[448] = {
|
||||
0x0f,0x0f,0x10,0x1f,0x27,0x3f,0x2b,0x3c,0x2e,0x39,0x2f,0x39,0x2f,0x38,0x2f,0x39,
|
||||
0x1f,0x1c,0x2f,0x3f,0x28,0x3f,0x38,0x2f,0x3c,0x3f,0x0a,0x0e,0x1e,0x1e,0x1e,0x1e,
|
||||
0xf0,0xf0,0x08,0xf8,0xe4,0xfc,0xd4,0x3c,0xd4,0x3c,0xf4,0x3c,0xf4,0x1c,0xf4,0xfc,
|
||||
0xf8,0x38,0xf4,0xfc,0x14,0xfc,0x1c,0xf4,0x3c,0xfc,0x50,0x70,0x78,0x78,0x78,0x78,
|
||||
0x0f,0x0f,0x10,0x1f,0x27,0x3f,0x2b,0x3c,0x2e,0x39,0x2f,0x39,0x2f,0x38,0x2f,0x39,
|
||||
0x1f,0x1c,0x2f,0x3f,0x28,0x3f,0x38,0x2f,0x3c,0x3f,0x08,0x0c,0x1c,0x1c,0x1c,0x1c,
|
||||
0xf0,0xf0,0x08,0xf8,0xe4,0xfc,0xd4,0x3c,0xd4,0x3c,0xf4,0x3c,0xf4,0x1c,0xf4,0xfc,
|
||||
0xf8,0x38,0xf4,0xfc,0x14,0xfc,0x1c,0xf4,0x3c,0xfc,0x20,0x60,0xe0,0xe0,0xe0,0xe0,
|
||||
0x0f,0x0f,0x10,0x1f,0x27,0x3f,0x2b,0x3c,0x2b,0x3c,0x2f,0x3c,0x2f,0x38,0x2f,0x3f,
|
||||
0x1f,0x1c,0x2f,0x3f,0x28,0x3f,0x38,0x2f,0x3c,0x3f,0x0a,0x0e,0x1e,0x1e,0x1e,0x1e,
|
||||
0xf0,0xf0,0x08,0xf8,0xe4,0xfc,0xd4,0x3c,0x74,0x9c,0xf4,0x9c,0xf4,0x1c,0xf4,0x9c,
|
||||
0xf8,0x38,0xf4,0xfc,0x14,0xfc,0x1c,0xf4,0x3c,0xfc,0x50,0x70,0x78,0x78,0x78,0x78,
|
||||
0x0f,0x0f,0x10,0x1f,0x27,0x3f,0x2b,0x3c,0x2b,0x3c,0x2f,0x3c,0x2f,0x38,0x2f,0x3f,
|
||||
0x1f,0x1c,0x2f,0x3f,0x28,0x3f,0x38,0x2f,0x3c,0x3f,0x04,0x06,0x07,0x07,0x07,0x07,
|
||||
0xf0,0xf0,0x08,0xf8,0xe4,0xfc,0xd4,0x3c,0x74,0x9c,0xf4,0x9c,0xf4,0x1c,0xf4,0x9c,
|
||||
0xf8,0x38,0xf4,0xfc,0x14,0xfc,0x1c,0xf4,0x3c,0xfc,0x10,0x30,0x38,0x38,0x38,0x38,
|
||||
0x0f,0x0f,0x10,0x1f,0x27,0x3f,0x20,0x3f,0x20,0x3f,0x20,0x3f,0x20,0x3f,0x20,0x3f,
|
||||
0x1f,0x1f,0x2f,0x3f,0x28,0x3f,0x38,0x2f,0x3c,0x3f,0x0a,0x0e,0x1e,0x1e,0x1e,0x1e,
|
||||
0xf0,0xf0,0x08,0xf8,0xe4,0xfc,0x04,0xfc,0x04,0xfc,0x04,0xfc,0x04,0xfc,0x04,0xfc,
|
||||
0xf8,0xf8,0xf4,0xfc,0x14,0xfc,0x1c,0xf4,0x3c,0xfc,0x50,0x70,0x78,0x78,0x78,0x78,
|
||||
0x0f,0x0f,0x10,0x1f,0x27,0x3f,0x20,0x3f,0x20,0x3f,0x20,0x3f,0x20,0x3f,0x20,0x3f,
|
||||
0x1f,0x1f,0x2f,0x3f,0x28,0x3f,0x38,0x2f,0x3c,0x3f,0x04,0x06,0x07,0x07,0x07,0x07,
|
||||
0xf0,0xf0,0x08,0xf8,0xe4,0xfc,0x04,0xfc,0x04,0xfc,0x04,0xfc,0x04,0xfc,0x04,0xfc,
|
||||
0xf8,0xf8,0xf4,0xfc,0x14,0xfc,0x1c,0xf4,0x3c,0xfc,0x10,0x30,0x38,0x38,0x38,0x38,
|
||||
0x0f,0x0f,0x10,0x1f,0x27,0x3f,0x20,0x3f,0x20,0x3f,0x20,0x3f,0x20,0x3f,0x20,0x3f,
|
||||
0x1f,0x1f,0x2f,0x3f,0x28,0x3f,0x38,0x2f,0x3c,0x3f,0x08,0x0c,0x1c,0x1c,0x1c,0x1c,
|
||||
0xf0,0xf0,0x08,0xf8,0xe4,0xfc,0x04,0xfc,0x04,0xfc,0x04,0xfc,0x04,0xfc,0x04,0xfc,
|
||||
0xf8,0xf8,0xf4,0xfc,0x14,0xfc,0x1c,0xf4,0x3c,0xfc,0x20,0x60,0xe0,0xe0,0xe0,0xe0
|
||||
};
|
||||
|
||||
const metasprite_t player_metasprite0[] = {
|
||||
METASPR_ITEM(-8, -8, 0, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 2, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t player_metasprite1[] = {
|
||||
METASPR_ITEM(-8, -8, 4, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 6, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t player_metasprite2[] = {
|
||||
METASPR_ITEM(-8, -8, 8, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 10, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t player_metasprite3[] = {
|
||||
METASPR_ITEM(-8, -8, 12, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 14, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t player_metasprite4[] = {
|
||||
METASPR_ITEM(-8, -8, 16, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 18, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t player_metasprite5[] = {
|
||||
METASPR_ITEM(-8, -8, 20, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 22, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t player_metasprite6[] = {
|
||||
METASPR_ITEM(-8, -8, 16, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 18, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t player_metasprite7[] = {
|
||||
METASPR_ITEM(-8, -8, 24, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 26, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t* const player_metasprites[8] = {
|
||||
player_metasprite0, player_metasprite1, player_metasprite2, player_metasprite3, player_metasprite4, player_metasprite5, player_metasprite6, player_metasprite7
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /player.png -c /player.c -sw 16 -sh 16 -bpp 2 -noflip -keep_palette_order
|
||||
|
||||
#ifndef METASPRITE_player_H
|
||||
#define METASPRITE_player_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
#define player_TILE_ORIGIN 0
|
||||
#define player_TILE_W 8
|
||||
#define player_TILE_H 16
|
||||
#define player_WIDTH 16
|
||||
#define player_HEIGHT 16
|
||||
#define player_TILE_COUNT 28
|
||||
#define player_PALETTE_COUNT 8
|
||||
#define player_COLORS_PER_PALETTE 4
|
||||
#define player_TOTAL_COLORS 32
|
||||
#define player_PIVOT_X 8
|
||||
#define player_PIVOT_Y 8
|
||||
#define player_PIVOT_W 16
|
||||
#define player_PIVOT_H 16
|
||||
extern const metasprite_t* const player_metasprites[8];
|
||||
|
||||
BANKREF_EXTERN(player)
|
||||
|
||||
extern const palette_color_t player_palettes[32];
|
||||
extern const uint8_t player_tiles[448];
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,196 @@
|
||||
#include "player_logic.h"
|
||||
#include "globals.h"
|
||||
#include "render.h"
|
||||
#include <gb/gb.h>
|
||||
#include <string.h>
|
||||
|
||||
// Delayed Auto-Shift variables
|
||||
static uint8_t das_timer = 0;
|
||||
static uint8_t das_active = 0;
|
||||
#define DAS_DELAY 12
|
||||
#define DAS_REPEAT 6
|
||||
|
||||
/**
|
||||
* Gestisce la logica di movimento del giocatore, i salti e le collisioni.
|
||||
*
|
||||
* Sviluppo & Scelte Architetturali:
|
||||
* 1. State Machine Rigida: Se `is_moving` è vero, ignoriamo qualsiasi altro input
|
||||
* finché l'animazione di transizione tra i tile (16 frame) non è completata.
|
||||
* Questo ci assicura un movimento perfettamente a griglia "grid-based", in stile Pokémon o Zelda.
|
||||
* 2. Delayed Auto-Shift (DAS): Come in Tetris, se tieni premuto un tasto direzionale,
|
||||
* c'è un ritardo iniziale (DAS_DELAY) seguito da ripetizioni veloci (DAS_REPEAT).
|
||||
* Questo rende i controlli molto più fluidi e reattivi rispetto a una semplice lettura continua.
|
||||
* 3. Meccanica del Salto: Premendo A+Direzione, il giocatore può saltare *esattamente* 2 celle
|
||||
* più in là. Il codice verifica se la cella intermedia (+1) è un ostacolo (0) e se
|
||||
* la cella di atterraggio (+2) è calpestabile. Consuma 60 di stamina per bilanciare il vantaggio tattico.
|
||||
*/
|
||||
void update_player_movement(uint8_t keys, uint8_t prev_keys) {
|
||||
// --- Gestione della Stamina ---
|
||||
// Ricarica la stamina di 1 punto al secondo (60 frames su Game Boy)
|
||||
stamina_recharge_timer++;
|
||||
if (stamina_recharge_timer >= 60) {
|
||||
stamina_recharge_timer = 0;
|
||||
if (stamina < 100) {
|
||||
stamina++;
|
||||
update_stamina_display();
|
||||
}
|
||||
}
|
||||
|
||||
// --- State Machine: Transizione Animazione ---
|
||||
// Se siamo nel mezzo di uno spostamento tra tile, calcoliamo i pixel interpolati
|
||||
if (is_moving) {
|
||||
move_progress++;
|
||||
|
||||
// Interpolazione lineare (LERP) da start a target
|
||||
int16_t px = start_px + (((target_px - start_px) * (int16_t)move_progress) >> 4); // >> 4 equivale a / 16
|
||||
int16_t py = start_py + (((target_py - start_py) * (int16_t)move_progress) >> 4);
|
||||
|
||||
// Sincronizza la telecamera con i nuovi pixel sub-tile calcolati
|
||||
scroll_x = px - 64;
|
||||
scroll_y = py - 72;
|
||||
move_bkg(scroll_x, scroll_y);
|
||||
|
||||
update_player_sprite();
|
||||
|
||||
// A metà strada (frame 8/16), forziamo un ridisegno della mappa per aggiornare la nebbia (Fog of War)
|
||||
// in modo che il caricamento appaia fluido al giocatore
|
||||
if (move_progress == 8) {
|
||||
draw_map(target_lx, target_ly);
|
||||
}
|
||||
|
||||
// Fine del movimento
|
||||
if (move_progress == 16) {
|
||||
is_moving = 0;
|
||||
is_jumping = 0;
|
||||
player_lx = target_lx;
|
||||
player_ly = target_ly;
|
||||
|
||||
// Snap matematico alla destinazione per prevenire derive dovute ad arrotondamenti
|
||||
int16_t final_px = (player_lx - player_ly) * 16 + 96;
|
||||
int16_t final_py = (player_lx + player_ly) * 8 + 16;
|
||||
scroll_x = final_px - 64;
|
||||
scroll_y = final_py - 72;
|
||||
move_bkg(scroll_x, scroll_y);
|
||||
|
||||
draw_map(player_lx, player_ly);
|
||||
update_player_sprite();
|
||||
|
||||
// Controllo Casella Vittoria (ID 2)
|
||||
if (maze[player_ly][player_lx] == 2) {
|
||||
game_over = 2; // Stato 2 = Vittoria
|
||||
game_over_timer = 30; // Piccolo ritardo prima che la scena cambi
|
||||
update_stamina_display();
|
||||
|
||||
// Effetto dissolvenza: ripulisce tutto lo schermo per mostrare la scritta VITTORIA su sfondo nero
|
||||
memset(map_buffer, 0, sizeof(map_buffer));
|
||||
set_bkg_tiles(0, 0, 32, 32, map_buffer);
|
||||
}
|
||||
}
|
||||
return; // Interrompe qui se stiamo camminando
|
||||
}
|
||||
|
||||
// --- Lettura Controlli (Polling) con DAS ---
|
||||
uint8_t keys_pressed = keys & ~prev_keys; // Tasti premuti ESATTAMENTE in questo frame
|
||||
|
||||
if (keys_pressed) {
|
||||
das_timer = DAS_DELAY;
|
||||
das_active = 1;
|
||||
} else if (keys && das_active) {
|
||||
// Se si tiene premuto un tasto...
|
||||
if (das_timer > 0) {
|
||||
das_timer--;
|
||||
}
|
||||
// Se il timer arriva a 0, emuliamo una pressione ripetuta
|
||||
if (das_timer == 0 && !is_moving) {
|
||||
das_timer = DAS_REPEAT;
|
||||
keys_pressed = keys;
|
||||
}
|
||||
} else {
|
||||
das_active = 0;
|
||||
}
|
||||
|
||||
// Traduzione Input Direzionale in Movimento Logico Grid-Based
|
||||
int8_t move_lx = 0;
|
||||
int8_t move_ly = 0;
|
||||
|
||||
if (keys_pressed & J_RIGHT) {
|
||||
move_lx = 1; player_dir = 0; // Direzione Down-Right
|
||||
} else if (keys_pressed & J_LEFT) {
|
||||
move_lx = -1; player_dir = 2; // Direzione Up-Left
|
||||
} else if (keys_pressed & J_DOWN) {
|
||||
move_ly = 1; player_dir = 1; // Direzione Down-Left
|
||||
} else if (keys_pressed & J_UP) {
|
||||
move_ly = -1; player_dir = 3; // Direzione Up-Right
|
||||
}
|
||||
|
||||
// Se stiamo cercando di muoverci
|
||||
if (move_lx != 0 || move_ly != 0) {
|
||||
// 1. Controllo Salto: Tasto A premuto insieme alla direzione
|
||||
if (keys & J_A) {
|
||||
// Il salto ci scaglia a distanza 2 lungo l'asse
|
||||
int8_t land_lx = player_lx + move_lx * 2;
|
||||
int8_t land_ly = player_ly + move_ly * 2;
|
||||
|
||||
// Verifica che il salto cada all'interno del labirinto
|
||||
if (land_lx >= 0 && land_lx < MAP_SIZE && land_ly >= 0 && land_ly < MAP_SIZE) {
|
||||
// Condizioni del salto:
|
||||
// a) La cella intermedia DEVE essere un muro (maze == 0)
|
||||
// b) La cella di arrivo DEVE essere un pavimento o vittoria (maze == 1 o 2)
|
||||
// c) Devi avere abbastanza stamina (>= 60)
|
||||
if (maze[player_ly + move_ly][player_lx + move_lx] == 0 && (maze[land_ly][land_lx] == 1 || maze[land_ly][land_lx] == 2) && stamina >= 60) {
|
||||
is_moving = 1;
|
||||
is_jumping = 1; // Questo attiva l'arco parabolico in render.c
|
||||
move_progress = 0;
|
||||
stamina -= 60;
|
||||
|
||||
start_lx = player_lx;
|
||||
start_ly = player_ly;
|
||||
target_lx = land_lx;
|
||||
target_ly = land_ly;
|
||||
|
||||
start_px = (start_lx - start_ly) * 16 + 96;
|
||||
start_py = (start_lx + start_ly) * 8 + 16;
|
||||
target_px = (target_lx - target_ly) * 16 + 96;
|
||||
target_py = (target_lx + target_ly) * 8 + 16;
|
||||
|
||||
// Suono Salto (Pitch Sweep Up sul Canale 1)
|
||||
NR10_REG = 0x15;
|
||||
NR11_REG = 0x80;
|
||||
NR12_REG = 0xF3;
|
||||
NR13_REG = 0x00;
|
||||
NR14_REG = 0xC3;
|
||||
|
||||
update_stamina_display();
|
||||
update_player_sprite();
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Se le condizioni di salto falliscono, aggiorna semplicemente il frame per far girare il personaggio
|
||||
update_player_sprite();
|
||||
}
|
||||
// 2. Movimento standard (Camminata)
|
||||
else {
|
||||
int8_t new_lx = player_lx + move_lx;
|
||||
int8_t new_ly = player_ly + move_ly;
|
||||
|
||||
if (new_lx >= 0 && new_lx < MAP_SIZE && new_ly >= 0 && new_ly < MAP_SIZE) {
|
||||
// Se la destinazione è pavimento normale o casella di vittoria
|
||||
if (maze[new_ly][new_lx] == 1 || maze[new_ly][new_lx] == 2) {
|
||||
is_moving = 1;
|
||||
move_progress = 0;
|
||||
start_lx = player_lx;
|
||||
start_ly = player_ly;
|
||||
target_lx = new_lx;
|
||||
target_ly = new_ly;
|
||||
|
||||
start_px = (start_lx - start_ly) * 16 + 96;
|
||||
start_py = (start_lx + start_ly) * 8 + 16;
|
||||
target_px = (target_lx - target_ly) * 16 + 96;
|
||||
target_py = (target_lx + target_ly) * 8 + 16;
|
||||
}
|
||||
}
|
||||
// Qualunque cosa accada, aggiorniamo il frame dello sprite per riflettere la direzione
|
||||
update_player_sprite();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef PLAYER_LOGIC_H
|
||||
#define PLAYER_LOGIC_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* ==========================================
|
||||
* PLAYER CONTROLLER LOGIC
|
||||
* ==========================================
|
||||
* Handles user input, delayed auto-shift (DAS) for movement repeat,
|
||||
* and the logic for walking, jumping, and collision.
|
||||
*/
|
||||
|
||||
// Call every frame during gameplay
|
||||
void update_player_movement(uint8_t keys, uint8_t prev_keys);
|
||||
|
||||
#endif
|
||||
+273
@@ -0,0 +1,273 @@
|
||||
#include "render.h"
|
||||
#include "globals.h"
|
||||
#include <gb/gb.h>
|
||||
#include <string.h>
|
||||
#include "tiles.h"
|
||||
#include "player.h"
|
||||
#include "enemy.h"
|
||||
#include "gameover.h"
|
||||
#include "victory.h"
|
||||
#include "stamina.h"
|
||||
#include "maze.h"
|
||||
#ifdef USE_SPRITE_STAIRS
|
||||
#include "stairs_sprite.h"
|
||||
#endif
|
||||
|
||||
uint8_t get_tile_state(int8_t cx, int8_t cy, int8_t lx, int8_t ly) {
|
||||
if (lx < 0 || lx >= MAP_SIZE || ly < 0 || ly >= MAP_SIZE) return 0;
|
||||
if (maze[ly][lx] == 0) return 0;
|
||||
int8_t dx = lx - cx;
|
||||
int8_t dy = ly - cy;
|
||||
if (dx < 0) dx = -dx;
|
||||
if (dy < 0) dy = -dy;
|
||||
int8_t dist = (dx > dy) ? dx : dy;
|
||||
if (dist > 2) return 0;
|
||||
if (dist == 2) return 2;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Aggiorna l'interfaccia utente (UI) della barra della stamina.
|
||||
*
|
||||
* Sviluppo & Scelte Architetturali:
|
||||
* 1. La UI su Game Boy può essere fatta in Background (HUD window) o tramite Sprite.
|
||||
* Abbiamo scelto gli Sprite (ID da 18 a 22) perché la Window è più difficile da
|
||||
* gestire insieme allo scrolling isometrico fluido.
|
||||
* 2. Gli sprite sono posizionati a coordinate fisiche fisse sullo schermo
|
||||
* (es. 112, 16 per l'angolo in alto a destra). Il move_bkg della telecamera NON li muove!
|
||||
* 3. La barra è lunga 5 segmenti (40 pixel totali). L'algoritmo converte il valore `stamina` (0-100)
|
||||
* in pixel (0-40) e seleziona il tile giusto dal set per mostrare il bordo arrotondato e
|
||||
* il livello di riempimento.
|
||||
*/
|
||||
void update_stamina_display(void) {
|
||||
if (game_over) {
|
||||
// Nasconde la barra spostando gli sprite fuori schermo quando finisce la partita
|
||||
for (uint8_t i = 0; i < 5; i++) {
|
||||
move_sprite(18 + i, 0, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Posizionamento in alto a destra (+8, +16 sono gli offset hardware del Game Boy per gli sprite)
|
||||
move_sprite(18, (uint8_t)(112 + 8), 16);
|
||||
move_sprite(19, (uint8_t)(120 + 8), 16);
|
||||
move_sprite(20, (uint8_t)(128 + 8), 16);
|
||||
move_sprite(21, (uint8_t)(136 + 8), 16);
|
||||
move_sprite(22, (uint8_t)(144 + 8), 16);
|
||||
|
||||
// Convertiamo 0-100% in 0-40 pixels
|
||||
uint16_t temp = (uint16_t)stamina * 40;
|
||||
uint8_t num_pixels = temp / 100;
|
||||
|
||||
// Offset di base nella VRAM dove sono caricati i tile della stamina
|
||||
uint8_t base_tile = player_TILE_COUNT + enemy_TILE_COUNT + gameover_TILE_COUNT + victory_TILE_COUNT; // 44
|
||||
|
||||
for (uint8_t i = 0; i < 5; i++) {
|
||||
uint8_t tile_idx;
|
||||
if (i == 0) {
|
||||
tile_idx = (num_pixels >= 8) ? 11 : 9; // Tappo sinistro pieno (11) o vuoto (9)
|
||||
} else if (i == 4) {
|
||||
tile_idx = (num_pixels >= 40) ? 12 : 10; // Tappo destro pieno (12) o vuoto (10)
|
||||
} else {
|
||||
int8_t seg_px = (int8_t)num_pixels - (i * 8);
|
||||
if (seg_px < 0) seg_px = 0;
|
||||
if (seg_px > 8) seg_px = 8;
|
||||
tile_idx = seg_px; // Segmenti centrali (0..8 px)
|
||||
}
|
||||
|
||||
// Imposta il frame dell'animazione
|
||||
set_sprite_tile(18 + i, base_tile + tile_idx * 2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disegna la porzione visibile del labirinto e applica il sistema "Fog of War".
|
||||
*
|
||||
* Sviluppo & Scelte Architetturali:
|
||||
* 1. Proiezione Isometrica: Convertiamo le coordinate logiche della griglia X,Y
|
||||
* in coordinate schermo isometriche. La formula matematica standard è:
|
||||
* iso_x = (X - Y) * (TileWidth / 2)
|
||||
* iso_y = (X + Y) * (TileHeight / 2)
|
||||
* Questo fa ruotare la mappa di 45 gradi e la schiaccia orizzontalmente.
|
||||
* 2. Distanza di Chebyshev: Usata per la nebbia. Nascondiamo tutti i blocchi che
|
||||
* distano logicamente più di 2 caselle dal centro (`max(|dx|, |dy|)`).
|
||||
* Questo crea un quadrato perfetto di visibilità (5x5) attorno al giocatore,
|
||||
* più leggero da calcolare sul Game Boy rispetto all'Euclidea (che usa la radice quadrata).
|
||||
* 3. Auto-Tiling Mask: Calcoliamo dinamicamente quali muri sono adiacenti alla cella
|
||||
* per disegnare bordi e variazioni grafiche (usando bit masking `(has_tl ? 1 : 0) | ...`).
|
||||
*/
|
||||
void draw_map(uint8_t center_x, uint8_t center_y) {
|
||||
// Svuotiamo l'intero buffer della mappa con l'indice 0 (casella nera vuota)
|
||||
memset(map_buffer, 0, sizeof(map_buffer));
|
||||
|
||||
// Calcoliamo la "finestra" di mappa 5x5 da processare (per ottimizzazione, ignoriamo la mappa intera)
|
||||
int8_t start_x = center_x - 2;
|
||||
if (start_x < 0) start_x = 0;
|
||||
int8_t end_x = center_x + 2;
|
||||
if (end_x >= MAP_SIZE) end_x = MAP_SIZE - 1;
|
||||
|
||||
int8_t start_y = center_y - 2;
|
||||
if (start_y < 0) start_y = 0;
|
||||
int8_t end_y = center_y + 2;
|
||||
if (end_y >= MAP_SIZE) end_y = MAP_SIZE - 1;
|
||||
|
||||
// Processiamo la mappa in DUE passate per risolvere il problema dell'overlapping isometrico.
|
||||
// L'engine disegna da Nord a Sud. I tile a Sud sovrascrivono la metà inferiore dei tile a Nord.
|
||||
// Se disegnassimo le scale nella prima passata, i pavimenti davanti ad esse sovrascriverebbero
|
||||
// i gradini con i loro angoli trasparenti (che sono di colore piatto).
|
||||
// Disegnandole per ultime, le scale sovrascriveranno i pavimenti davanti, e grazie alle maschere
|
||||
// dei propri angoli inferiori, si fonderanno perfettamente con il colore del pavimento.
|
||||
|
||||
// Passata 1: Pavimenti normali
|
||||
for (int8_t ly = start_y; ly <= end_y; ly++) {
|
||||
for (int8_t lx = start_x; lx <= end_x; lx++) {
|
||||
#ifdef USE_SPRITE_STAIRS
|
||||
if (maze[ly][lx] == 1 || maze[ly][lx] == 2) {
|
||||
#else
|
||||
if (maze[ly][lx] == 1) {
|
||||
#endif
|
||||
// Distanza di Chebyshev dal giocatore
|
||||
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;
|
||||
|
||||
if (dist > 2) continue;
|
||||
|
||||
int8_t iso_x = (lx - ly) * 2 + 12;
|
||||
int8_t iso_y = (lx + ly) * 1 + 2;
|
||||
uint8_t is_alt = ((lx + ly) % 2 == 0);
|
||||
|
||||
uint8_t state_tl = get_tile_state(center_x, center_y, lx - 1, ly);
|
||||
uint8_t state_tr = get_tile_state(center_x, center_y, lx, ly - 1);
|
||||
uint8_t mask = state_tl + state_tr * 3;
|
||||
|
||||
uint8_t v;
|
||||
if (dist == 2) {
|
||||
v = is_alt ? (27 + mask) : (18 + mask);
|
||||
} else {
|
||||
v = is_alt ? (9 + mask) : mask;
|
||||
}
|
||||
|
||||
for (uint8_t y = 0; y < 2; y++) {
|
||||
for (uint8_t x = 0; x < 4; x++) {
|
||||
uint8_t target_x = (iso_x + x) & 31;
|
||||
uint8_t target_y = (iso_y + y) & 31;
|
||||
uint8_t src_tile = tiles_map[4 + v * 8 + y * 4 + x];
|
||||
map_buffer[target_y * 32 + target_x] = src_tile;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef USE_SPRITE_STAIRS
|
||||
// Passata 2: Scala della Vittoria (disegnata sempre sopra)
|
||||
for (int8_t ly = start_y; ly <= end_y; ly++) {
|
||||
for (int8_t lx = start_x; lx <= end_x; lx++) {
|
||||
if (maze[ly][lx] == 2) {
|
||||
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;
|
||||
|
||||
if (dist > 2) continue;
|
||||
|
||||
int8_t iso_x = (lx - ly) * 2 + 12;
|
||||
int8_t iso_y = (lx + ly) * 1 + 2;
|
||||
uint8_t is_alt = ((lx + ly) % 2 == 0);
|
||||
|
||||
uint8_t state_tl = get_tile_state(center_x, center_y, lx - 1, ly);
|
||||
uint8_t state_tr = get_tile_state(center_x, center_y, lx, ly - 1);
|
||||
uint8_t state_bl = get_tile_state(center_x, center_y, lx, ly + 1);
|
||||
uint8_t state_br = get_tile_state(center_x, center_y, lx + 1, ly);
|
||||
|
||||
uint16_t mask = state_tl + state_tr * 3 + state_bl * 9 + state_br * 27;
|
||||
|
||||
uint16_t v;
|
||||
if (dist == 2) {
|
||||
v = is_alt ? (36 + 243 + mask) : (36 + 162 + mask);
|
||||
} else {
|
||||
v = is_alt ? (36 + 81 + mask) : (36 + mask);
|
||||
}
|
||||
|
||||
for (uint8_t y = 0; y < 2; y++) {
|
||||
for (uint8_t x = 0; x < 4; x++) {
|
||||
uint8_t target_x = (iso_x + x) & 31;
|
||||
uint8_t target_y = (iso_y + y) & 31;
|
||||
uint8_t src_tile = tiles_map[4 + v * 8 + y * 4 + x];
|
||||
map_buffer[target_y * 32 + target_x] = src_tile;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
update_stamina_display();
|
||||
|
||||
// Ottimizzazione hardware critica: trasferire tutta la mappa (1024 bytes) via set_bkg_tiles
|
||||
// causa lag e sfarfallii (VRAM access). Trasferiamo solo le righe da 2 a 17 (16 righe totali),
|
||||
// che è la porzione visibile del Game Boy (160x144 px) in cui si svolge l'azione.
|
||||
set_bkg_tiles(0, 2, 32, 16, &map_buffer[2 * 32]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Aggiorna il registro scroll hardware della telecamera (SCX, SCY)
|
||||
* calcolando la proiezione isometrica in pixel e centrandola nello schermo (160/2, 144/2).
|
||||
*/
|
||||
void update_camera(void) {
|
||||
// Coordinate fisiche pixel calcolate allo stesso modo del motore grafico
|
||||
int16_t px = (player_lx - player_ly) * 16 + 96;
|
||||
int16_t py = (player_lx + player_ly) * 8 + 16;
|
||||
|
||||
// Centra il pixel px,py in mezzo allo schermo (-64 e -72)
|
||||
scroll_x = px - 64;
|
||||
scroll_y = py - 72;
|
||||
|
||||
// Comando hardware GBDK per scrollare il livello Background
|
||||
move_bkg(scroll_x, scroll_y);
|
||||
|
||||
#ifdef USE_SPRITE_STAIRS
|
||||
// Calcola e posiziona lo sprite delle scale
|
||||
int16_t stairs_px = (stairs_lx - stairs_ly) * 16 + 96;
|
||||
int16_t stairs_py = (stairs_lx + stairs_ly) * 8 + 16;
|
||||
int16_t stairs_screen_x = ((stairs_px - scroll_x) & 255) + 8; // Offset per sprite
|
||||
int16_t stairs_screen_y = ((stairs_py - scroll_y) & 255) + 16;
|
||||
|
||||
int8_t dx = (int8_t)stairs_lx - (int8_t)player_lx;
|
||||
int8_t dy = (int8_t)stairs_ly - (int8_t)player_ly;
|
||||
if (dx < 0) dx = -dx;
|
||||
if (dy < 0) dy = -dy;
|
||||
uint8_t dist = (dx > dy) ? dx : dy;
|
||||
|
||||
// Se le scale sono visibili (dist <= 2), disegnale, altrimenti nascondile
|
||||
if (dist <= 2 && stairs_screen_x >= -32 && stairs_screen_x <= 168 && stairs_screen_y >= -16 && stairs_screen_y <= 152) {
|
||||
move_metasprite(stairs_sprite_metasprites[0], player_TILE_COUNT + enemy_TILE_COUNT + gameover_TILE_COUNT + victory_TILE_COUNT + stamina_TILE_COUNT * 2, 12, stairs_screen_x, stairs_screen_y - 8);
|
||||
} else {
|
||||
move_metasprite(stairs_sprite_metasprites[0], player_TILE_COUNT + enemy_TILE_COUNT + gameover_TILE_COUNT + victory_TILE_COUNT + stamina_TILE_COUNT * 2, 12, 0, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Aggiorna il metasprite 16x16 del giocatore.
|
||||
* Applica l'animazione di camminata o l'arco parabolico per l'altezza del salto.
|
||||
*/
|
||||
void update_player_sprite(void) {
|
||||
// Animazione di camminata (alterna tra due frame a seconda del `move_progress`)
|
||||
uint8_t frame_offset = is_moving ? ((move_progress >> 2) & 1) : 0;
|
||||
|
||||
uint8_t y_offset = 0;
|
||||
if (is_jumping) {
|
||||
// Matematica dell'Arco Parabolico per il salto.
|
||||
// x * (16 - x) crea una curva che sale a 16 px di apice a metà altezza (8 frame).
|
||||
y_offset = (move_progress * (16 - move_progress)) >> 2;
|
||||
}
|
||||
|
||||
// move_metasprite è fornito da png2asset e posiziona multipli sprite hardware insieme
|
||||
// Il giocatore è sempre fisso al centro dello schermo (88, 88). È il mondo (sfondo) a muoversi.
|
||||
move_metasprite(player_metasprites[player_dir * 2 + frame_offset], 0, 0, 88, 88 - y_offset);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef RENDER_H
|
||||
#define RENDER_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* ==========================================
|
||||
* RENDERING & CAMERA SUBSYSTEM
|
||||
* ==========================================
|
||||
* Handles updating visual elements on the screen, including the map background,
|
||||
* stamina bar interface, and the player sprite.
|
||||
*/
|
||||
|
||||
// Draw the isometric map centered around a specific logical tile
|
||||
void draw_map(uint8_t center_x, uint8_t center_y);
|
||||
|
||||
// Update the background camera scroll position to center the player
|
||||
void update_camera(void);
|
||||
|
||||
// Update stamina bar graphics
|
||||
void update_stamina_display(void);
|
||||
|
||||
// Update the player sprite (animation frames, jumping height offset)
|
||||
void update_player_sprite(void);
|
||||
|
||||
#endif
|
||||
+308
@@ -0,0 +1,308 @@
|
||||
#include "sound.h"
|
||||
#include "globals.h"
|
||||
#include <gb/gb.h>
|
||||
|
||||
/**
|
||||
* ==========================================
|
||||
* GAME BOY AUDIO HARDWARE (APU)
|
||||
* ==========================================
|
||||
* Il Game Boy ha 4 canali audio. Noi usiamo:
|
||||
* - Canale 1 (Onda quadra con sweep & envelope): Usato per gli arpeggi rapidi (es. Vittoria).
|
||||
* - Canale 2 (Onda quadra con envelope): Usato per i bassi pulsanti o le melodie tenute.
|
||||
* - Canale 4 (Rumore bianco): Usato per simulare le percussioni (crash o thud) manipolando le frequenze noise.
|
||||
*/
|
||||
|
||||
// --- Variabili di stato interne per i timer musicali ---
|
||||
static volatile uint8_t music_timer = 0;
|
||||
static volatile uint8_t music_step = 0;
|
||||
|
||||
static volatile uint8_t gameover_music_timer = 0;
|
||||
static volatile uint8_t gameover_music_step = 0;
|
||||
|
||||
static volatile uint8_t victory_music_timer = 0;
|
||||
static volatile uint8_t victory_music_step = 0;
|
||||
|
||||
static volatile uint8_t title_music_timer = 0;
|
||||
static volatile uint8_t title_music_step = 0;
|
||||
|
||||
// Note frequencies calculation: (2048 - (131072 / frequency))
|
||||
#define R 0
|
||||
#define N_E2 458
|
||||
#define N_F2 547
|
||||
#define N_G2 742
|
||||
#define N_A2 857
|
||||
#define N_AS2 907
|
||||
#define N_B2 961
|
||||
#define N_C3 1046
|
||||
#define N_CS3 1103
|
||||
#define N_D3 1155
|
||||
#define N_E3 1253
|
||||
#define N_F3 1298
|
||||
#define N_FS3 1340
|
||||
#define N_G3 1380
|
||||
#define N_GS3 1417
|
||||
#define N_A3 1453
|
||||
#define N_AS3 1486
|
||||
#define N_B3 1517
|
||||
#define N_C4 1547
|
||||
#define N_CS4 1575
|
||||
#define N_D4 1602
|
||||
#define N_E4 1651
|
||||
#define N_F4 1673
|
||||
#define N_FS4 1694
|
||||
#define N_G4 1714
|
||||
#define N_GS4 1732
|
||||
#define N_A4 1751
|
||||
#define N_AS4 1767
|
||||
#define N_B4 1783
|
||||
#define N_C5 1798
|
||||
#define N_CS5 1812
|
||||
#define N_D5 1825
|
||||
#define N_E5 1849
|
||||
#define N_F5 1860
|
||||
#define N_FS5 1871
|
||||
#define N_G5 1881
|
||||
#define N_GS5 1890
|
||||
#define N_A5 1899
|
||||
|
||||
// --- Sequences ---
|
||||
|
||||
const uint16_t ch1_seq[128] = {
|
||||
// 1 Dm
|
||||
N_D3, N_A3, N_D4, N_A3, N_D3, N_A3, N_D4, N_A3,
|
||||
// 2 A/C#
|
||||
N_CS3, N_A3, N_CS4, N_A3, N_CS3, N_A3, N_CS4, N_A3,
|
||||
// 3 F/C
|
||||
N_C3, N_A3, N_C4, N_A3, N_C3, N_A3, N_C4, N_A3,
|
||||
// 4 G/B
|
||||
N_B2, N_G3, N_B3, N_G3, N_B2, N_G3, N_B3, N_G3,
|
||||
// 5 Bb
|
||||
N_AS2, N_F3, N_AS3, N_F3, N_AS2, N_F3, N_AS3, N_F3,
|
||||
// 6 F/A
|
||||
N_A2, N_F3, N_A3, N_F3, N_A2, N_F3, N_A3, N_F3,
|
||||
// 7 Gm
|
||||
N_G2, N_D3, N_G3, N_D3, N_G2, N_D3, N_G3, N_D3,
|
||||
// 8 A7
|
||||
N_A2, N_E3, N_A3, N_CS4, N_A2, N_E3, N_A3, N_CS4,
|
||||
// 9 Dm (intensifies: higher arpeggio)
|
||||
N_D3, N_D4, N_F4, N_A4, N_D3, N_D4, N_F4, N_A4,
|
||||
// 10 A/C#
|
||||
N_CS3, N_CS4, N_E4, N_A4, N_CS3, N_CS4, N_E4, N_A4,
|
||||
// 11 F/C
|
||||
N_C3, N_C4, N_F4, N_A4, N_C3, N_C4, N_F4, N_A4,
|
||||
// 12 G/B
|
||||
N_B2, N_B3, N_D4, N_G4, N_B2, N_B3, N_D4, N_G4,
|
||||
// 13 Bb
|
||||
N_AS2, N_AS3, N_D4, N_F4, N_AS2, N_AS3, N_D4, N_F4,
|
||||
// 14 F/A
|
||||
N_A2, N_A3, N_C4, N_F4, N_A2, N_A3, N_C4, N_F4,
|
||||
// 15 Gm
|
||||
N_G2, N_G3, N_AS3, N_D4, N_G2, N_G3, N_AS3, N_D4,
|
||||
// 16 A7 -> Dm resolution
|
||||
N_A2, N_A3, N_CS4, N_E4, N_A2, R, N_D3, R
|
||||
};
|
||||
|
||||
// Victory Arpeggio (fast ascending)
|
||||
const uint16_t victory_seq[16] = {
|
||||
N_C4, N_E4, N_G4, N_C5,
|
||||
N_E5, N_G5, 1950, 1950,
|
||||
N_C5, N_E5, N_G5, 1950,
|
||||
1950, 1950, 1950, R
|
||||
};
|
||||
|
||||
const uint16_t ch2_seq[128] = {
|
||||
// 1 Dm
|
||||
N_F4, R, R, R, N_E4, R, R, R,
|
||||
// 2 A/C#
|
||||
N_E4, R, R, R, N_D4, R, R, R,
|
||||
// 3 F/C
|
||||
N_C4, R, R, R, N_D4, R, N_E4, R,
|
||||
// 4 G/B
|
||||
N_D4, R, R, R, N_F4, R, R, R,
|
||||
// 5 Bb
|
||||
N_D4, R, R, R, N_C4, R, R, R,
|
||||
// 6 F/A
|
||||
N_C4, R, R, R, N_AS3, R, R, R,
|
||||
// 7 Gm
|
||||
N_AS3, R, N_A3, N_AS3, N_C4, R, N_AS3, R,
|
||||
// 8 A7
|
||||
N_A3, R, R, R, R, R, R, R,
|
||||
// 9 Dm
|
||||
N_A4, R, R, R, N_G4, R, N_F4, N_E4,
|
||||
// 10 A/C#
|
||||
N_G4, R, R, R, N_F4, R, N_E4, N_D4,
|
||||
// 11 F/C
|
||||
N_F4, R, R, R, N_E4, R, N_C4, R,
|
||||
// 12 G/B
|
||||
N_D4, R, R, R, N_G4, R, R, R,
|
||||
// 13 Bb
|
||||
N_F4, R, R, R, N_E4, R, N_D4, N_CS4,
|
||||
// 14 F/A
|
||||
N_E4, R, R, R, N_D4, R, N_C4, N_B3,
|
||||
// 15 Gm
|
||||
N_D4, R, R, R, N_C4, R, N_AS3, R,
|
||||
// 16 A7 -> Dm resolution
|
||||
N_A3, R, R, R, R, R, N_D4, R
|
||||
};
|
||||
|
||||
// Eerie pulse note frequencies (96-note sequence for normal gameplay)
|
||||
const uint16_t eerie_reg_vals[] = {
|
||||
// Pattern 1 (A minor)
|
||||
1453, 1546, 1650, 1733, 1754, 1733, 1650, 1546,
|
||||
1453, 1546, 1650, 1733, 1754, 1733, 1650, 1546,
|
||||
1453, 1546, 1650, 1733, 1754, 1733, 1650, 1546,
|
||||
1453, 1546, 1650, 1733, 1754, 1733, 1650, 1546,
|
||||
|
||||
// Pattern 2 (D minor)
|
||||
1303, 1453, 1546, 1650, 1678, 1650, 1546, 1453,
|
||||
1303, 1453, 1546, 1650, 1678, 1650, 1546, 1453,
|
||||
1303, 1453, 1546, 1650, 1678, 1650, 1546, 1453,
|
||||
1303, 1453, 1546, 1650, 1678, 1650, 1546, 1453,
|
||||
|
||||
// Pattern 3 (E7 tension)
|
||||
1369, 1497, 1589, 1709, 1733, 1709, 1589, 1497,
|
||||
1369, 1497, 1589, 1709, 1733, 1709, 1589, 1497,
|
||||
1369, 1497, 1589, 1709, 1733, 1709, 1589, 1497,
|
||||
1369, 1497, 1589, 1709, 1733, 1709, 1589, 1497
|
||||
};
|
||||
|
||||
const uint16_t title_melody[32] = {
|
||||
N_A2, N_E3, N_A3, N_E3, N_C4, N_A3, N_E3, N_A2, // Am
|
||||
N_G2, N_D3, N_G3, N_D3, N_B3, N_G3, N_D3, N_G2, // G
|
||||
N_F2, N_C3, N_F3, N_C3, N_A3, N_F3, N_C3, N_F2, // F
|
||||
N_E2, N_B2, N_E3, N_B2, N_GS3, N_E3, N_B2, N_E2 // E
|
||||
};
|
||||
|
||||
void sound_reset_music_state(void) {
|
||||
music_timer = 0;
|
||||
music_step = 0;
|
||||
gameover_music_timer = 0;
|
||||
gameover_music_step = 0;
|
||||
victory_music_timer = 0;
|
||||
victory_music_step = 0;
|
||||
title_music_timer = 0;
|
||||
title_music_step = 0;
|
||||
}
|
||||
|
||||
static void play_note(uint16_t reg_val) {
|
||||
NR21_REG = 0x80; // 50% duty cycle
|
||||
NR22_REG = 0x73; // volume 7, fade envelope
|
||||
NR23_REG = reg_val & 0xFF;
|
||||
NR24_REG = (reg_val >> 8) | 0x80; // trigger note
|
||||
}
|
||||
|
||||
void play_gameover_step(uint8_t step) {
|
||||
if (step < 128) {
|
||||
uint16_t n1 = ch1_seq[step];
|
||||
if (n1 != R) {
|
||||
NR10_REG = 0x00; // No sweep
|
||||
NR11_REG = 0x80; // 50% duty
|
||||
NR12_REG = 0x73; // volume 7, fast fade for arpeggio pluck
|
||||
NR13_REG = n1 & 0xFF;
|
||||
NR14_REG = (n1 >> 8) | 0x80; // trigger note
|
||||
}
|
||||
|
||||
uint16_t n2 = ch2_seq[step];
|
||||
if (n2 != R) {
|
||||
NR21_REG = 0x80; // 50% duty
|
||||
NR22_REG = 0xA7; // volume 10, long fade for melody sustain
|
||||
NR23_REG = n2 & 0xFF;
|
||||
NR24_REG = (n2 >> 8) | 0x80;
|
||||
}
|
||||
|
||||
// Add dramatic percussion on the first beat of each chord (every 8 steps) using Channel 4 (Noise)
|
||||
if (step % 8 == 0) {
|
||||
NR41_REG = 0x01;
|
||||
NR42_REG = 0xB2; // Volume 11, quick fade
|
||||
// step < 64 gets a lower tympani, step >= 64 gets a crash
|
||||
if (step < 64) {
|
||||
NR43_REG = 0x68; // Low thud freq
|
||||
} else {
|
||||
NR43_REG = 0x42; // Crash freq
|
||||
}
|
||||
NR44_REG = 0x80; // trigger noise
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void play_victory_step(uint8_t step) {
|
||||
if (step < 16) {
|
||||
uint16_t n1 = victory_seq[step];
|
||||
if (n1 != R) {
|
||||
NR10_REG = 0x00;
|
||||
NR11_REG = 0x80; // 50% duty
|
||||
NR12_REG = 0xA7; // bright loud fade
|
||||
NR13_REG = n1 & 0xFF;
|
||||
NR14_REG = (n1 >> 8) | 0x80;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Questo interrupt scatta ogni VBL (Vertical Blanking), ovvero ~60 volte al secondo.
|
||||
* Funziona come un mini "sequencer" audio: in base allo stato del gioco, controlla il timer
|
||||
* e riproduce la nota corrispondente all'interno dell'array della traccia.
|
||||
*/
|
||||
void play_music_tick(void) {
|
||||
if (app_state == 0) { // TITLE SCREEN
|
||||
title_music_timer++;
|
||||
if (title_music_timer >= 30) { // 30 frames per note
|
||||
title_music_timer = 0;
|
||||
uint16_t n = title_melody[title_music_step];
|
||||
NR10_REG = 0;
|
||||
NR11_REG = 0x80;
|
||||
NR12_REG = 0x63; // soft fade
|
||||
NR13_REG = n & 0xFF;
|
||||
NR14_REG = (n >> 8) | 0x80;
|
||||
|
||||
// Add a slow bass note every 4 steps
|
||||
if (title_music_step % 4 == 0) {
|
||||
NR21_REG = 0x80;
|
||||
NR22_REG = 0x77;
|
||||
uint16_t bn = n / 2; // Octave lower (divide frequency logic)
|
||||
NR23_REG = bn & 0xFF;
|
||||
NR24_REG = (bn >> 8) | 0x80;
|
||||
}
|
||||
|
||||
title_music_step++;
|
||||
if (title_music_step >= 32) title_music_step = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (game_over) { // ENDGAME
|
||||
if (game_over_timer == 0) { // Se il ritardo di fine partita è terminato
|
||||
if (game_over == 1) { // Defeat (Ghost)
|
||||
gameover_music_timer++;
|
||||
if (gameover_music_timer >= 10) { // 10 frames per note (~6 notes/sec)
|
||||
gameover_music_timer = 0;
|
||||
if (gameover_music_step < 128) {
|
||||
play_gameover_step(gameover_music_step);
|
||||
gameover_music_step++;
|
||||
}
|
||||
}
|
||||
} else if (game_over == 2) { // Victory (Portal)
|
||||
victory_music_timer++;
|
||||
if (victory_music_timer >= 8) { // faster tempo
|
||||
victory_music_timer = 0;
|
||||
if (victory_music_step < 16) {
|
||||
play_victory_step(victory_music_step);
|
||||
victory_music_step++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// GAMEPLAY
|
||||
music_timer++;
|
||||
if (music_timer >= 20) {
|
||||
music_timer = 0;
|
||||
play_note(eerie_reg_vals[music_step]);
|
||||
music_step++;
|
||||
if (music_step >= 96) {
|
||||
music_step = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
#ifndef SOUND_H
|
||||
#define SOUND_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* ==========================================
|
||||
* AUDIO SYNTHESIS & SEQUENCING
|
||||
* ==========================================
|
||||
* This module manages all sound generation via the Game Boy APU registers.
|
||||
*/
|
||||
|
||||
// Resets internal music state variables
|
||||
void sound_reset_music_state(void);
|
||||
|
||||
// Callbacks to be hooked into the Game Boy VBL (Vertical Blanking) interrupt
|
||||
void play_music_tick(void);
|
||||
|
||||
// Call to manually play a note from the game over / victory sequences
|
||||
void play_gameover_step(uint8_t step);
|
||||
void play_victory_step(uint8_t step);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,36 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /stairs_sprite.png -c /stairs_sprite.c -sw 32 -sh 16 -bpp 2 -noflip -keep_palette_order -spr8x16
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
BANKREF(stairs_sprite)
|
||||
|
||||
const palette_color_t stairs_sprite_palettes[32] = {
|
||||
RGB8(224,248,207), RGB8(134,192,108), RGB8( 48,104, 80), RGB8( 7, 24, 33),
|
||||
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),
|
||||
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),
|
||||
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),
|
||||
RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0)
|
||||
};
|
||||
|
||||
const uint8_t stairs_sprite_tiles[64] = {
|
||||
0x01,0x01,0x07,0x06,0x1f,0x18,0x07,0x06,0x01,0x01,0x06,0x06,0x18,0x18,0x06,0x06,
|
||||
0x01,0x01,0x07,0x06,0x1f,0x18,0x07,0x06,0x01,0x01,0x06,0x06,0x18,0x18,0x06,0x06,
|
||||
0x80,0x80,0xe0,0x60,0xf8,0x18,0xe0,0x60,0x80,0x80,0x60,0x60,0x18,0x18,0x60,0x60,
|
||||
0x80,0x80,0xe0,0x60,0xf8,0x18,0xe0,0x60,0x80,0x80,0x60,0x60,0x18,0x18,0x60,0x60
|
||||
};
|
||||
|
||||
const metasprite_t stairs_sprite_metasprite0[] = {
|
||||
METASPR_ITEM(-8, -8, 0, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 2, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t* const stairs_sprite_metasprites[1] = {
|
||||
stairs_sprite_metasprite0
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /stairs_sprite.png -c /stairs_sprite.c -sw 32 -sh 16 -bpp 2 -noflip -keep_palette_order -spr8x16
|
||||
|
||||
#ifndef METASPRITE_stairs_sprite_H
|
||||
#define METASPRITE_stairs_sprite_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
#define stairs_sprite_TILE_ORIGIN 0
|
||||
#define stairs_sprite_TILE_W 8
|
||||
#define stairs_sprite_TILE_H 16
|
||||
#define stairs_sprite_WIDTH 32
|
||||
#define stairs_sprite_HEIGHT 16
|
||||
#define stairs_sprite_TILE_COUNT 4
|
||||
#define stairs_sprite_PALETTE_COUNT 8
|
||||
#define stairs_sprite_COLORS_PER_PALETTE 4
|
||||
#define stairs_sprite_TOTAL_COLORS 32
|
||||
#define stairs_sprite_PIVOT_X 16
|
||||
#define stairs_sprite_PIVOT_Y 8
|
||||
#define stairs_sprite_PIVOT_W 32
|
||||
#define stairs_sprite_PIVOT_H 16
|
||||
extern const metasprite_t* const stairs_sprite_metasprites[1];
|
||||
|
||||
BANKREF_EXTERN(stairs_sprite)
|
||||
|
||||
extern const palette_color_t stairs_sprite_palettes[32];
|
||||
extern const uint8_t stairs_sprite_tiles[64];
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,69 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /stamina.png -c /stamina.c -bpp 2 -noflip -keep_palette_order
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
BANKREF(stamina)
|
||||
|
||||
const palette_color_t stamina_palettes[32] = {
|
||||
RGB8(224,248,207), RGB8(134,192,108), RGB8( 48,104, 80), RGB8( 7, 24, 33),
|
||||
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),
|
||||
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),
|
||||
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),
|
||||
RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0)
|
||||
};
|
||||
|
||||
const uint8_t stamina_tiles[416] = {
|
||||
0xff,0xff,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0x00,0xff,0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,0x7f,0x00,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0x00,0xff,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0x00,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0x00,0xff,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0x00,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0x00,0xff,0xff,0x0f,0xff,0x0f,0xff,0x0f,0xff,0x0f,0x00,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0x00,0xff,0xff,0x07,0xff,0x07,0xff,0x07,0xff,0x07,0x00,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0x00,0xff,0xff,0x03,0xff,0x03,0xff,0x03,0xff,0x03,0x00,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0x00,0xff,0xff,0x01,0xff,0x01,0xff,0x01,0xff,0x01,0x00,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xff,0xff,0x00,0xff,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0x00,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x7f,0xff,0x00,0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,0x00,0xff,0x7f,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xfe,0xff,0x00,0xff,0xfe,0xff,0xfe,0xff,0xfe,0xff,0xfe,0xff,0x00,0xff,0xfe,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x7f,0xff,0x00,0xff,0x7f,0x80,0x7f,0x80,0x7f,0x80,0x7f,0x80,0x00,0xff,0x7f,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0xfe,0xff,0x00,0xff,0xfe,0x01,0xfe,0x01,0xfe,0x01,0xfe,0x01,0x00,0xff,0xfe,0xff,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
};
|
||||
|
||||
const metasprite_t stamina_metasprite0[] = {
|
||||
METASPR_ITEM(-8, -52, 0, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 2, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 4, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 6, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 8, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 10, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 12, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 14, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 16, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 18, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 20, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 22, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 24, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t* const stamina_metasprites[1] = {
|
||||
stamina_metasprite0
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /stamina.png -c /stamina.c -bpp 2 -noflip -keep_palette_order
|
||||
|
||||
#ifndef METASPRITE_stamina_H
|
||||
#define METASPRITE_stamina_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
#define stamina_TILE_ORIGIN 0
|
||||
#define stamina_TILE_W 8
|
||||
#define stamina_TILE_H 16
|
||||
#define stamina_WIDTH 104
|
||||
#define stamina_HEIGHT 16
|
||||
#define stamina_TILE_COUNT 26
|
||||
#define stamina_PALETTE_COUNT 8
|
||||
#define stamina_COLORS_PER_PALETTE 4
|
||||
#define stamina_TOTAL_COLORS 32
|
||||
#define stamina_PIVOT_X 52
|
||||
#define stamina_PIVOT_Y 8
|
||||
#define stamina_PIVOT_W 104
|
||||
#define stamina_PIVOT_H 16
|
||||
extern const metasprite_t* const stamina_metasprites[1];
|
||||
|
||||
BANKREF_EXTERN(stamina)
|
||||
|
||||
extern const palette_color_t stamina_palettes[32];
|
||||
extern const uint8_t stamina_tiles[416];
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
#include <gb/gb.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "player.h"
|
||||
#include "gameover.h"
|
||||
|
||||
// Define dummy / simple map buffer to clear the screen
|
||||
static uint8_t map_buffer[32 * 32];
|
||||
|
||||
void main(void) {
|
||||
SPRITES_8x16;
|
||||
|
||||
// Set standard palettes
|
||||
OBP0_REG = 0xE4;
|
||||
OBP1_REG = 0x1B;
|
||||
BGP_REG = 0xE4;
|
||||
|
||||
// Clear background (completely black empty tiles)
|
||||
memset(map_buffer, 0, sizeof(map_buffer));
|
||||
set_bkg_tiles(0, 0, 32, 32, map_buffer);
|
||||
|
||||
// Load player and gameover sprite data
|
||||
set_sprite_data(0, player_TILE_COUNT, player_tiles);
|
||||
set_sprite_data(player_TILE_COUNT, gameover_TILE_COUNT, gameover_tiles);
|
||||
|
||||
// Render player sprite at center screen (88, 88)
|
||||
move_metasprite(player_metasprites[0], 0, 0, 88, 88);
|
||||
|
||||
// Render gameover metasprite centered horizontally (88, due to sprite X-offset) and below player (120)
|
||||
move_metasprite(gameover_metasprites[0], player_TILE_COUNT, 8, 88, 120);
|
||||
|
||||
SHOW_SPRITES;
|
||||
SHOW_BKG;
|
||||
DISPLAY_ON;
|
||||
|
||||
// Loop forever
|
||||
while (1) {
|
||||
wait_vbl_done();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
#include <gb/gb.h>
|
||||
#include <gbdk/font.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "tiles.h"
|
||||
|
||||
// Buffer di 32x32 tiles (mappa hardware del Game Boy)
|
||||
uint8_t bkg_buffer[1024];
|
||||
|
||||
void main(void) {
|
||||
// Inizializza il Game Boy
|
||||
DISPLAY_OFF;
|
||||
|
||||
// Carica il tileset in VRAM
|
||||
set_bkg_data(0, tiles_TILE_COUNT, tiles_tiles);
|
||||
|
||||
memset(bkg_buffer, 0, sizeof(bkg_buffer));
|
||||
|
||||
// Disegniamo una griglia 3x3
|
||||
// La griglia e formata da blocchi 4x2 hardware tiles
|
||||
// Il blocco centrale sara le scale (variante 64), il resto pavimenti normali (variante 16)
|
||||
|
||||
// Per avere maschere corrette (nessun bordo nero tra di loro):
|
||||
// La griglia 3x3 sara:
|
||||
// (0,0), (1,0), (2,0)
|
||||
// (0,1), (1,1), (2,1)
|
||||
// (0,2), (1,2), (2,2)
|
||||
|
||||
for (int8_t ly = 0; ly < 3; ly++) {
|
||||
for (int8_t lx = 0; lx < 3; lx++) {
|
||||
|
||||
// Coordinate isometriche
|
||||
int8_t iso_x = (lx - ly) * 2 + 12;
|
||||
int8_t iso_y = (lx + ly) * 1 + 6; // Spostato giu per centrarlo
|
||||
|
||||
uint8_t has_tl = (lx > 0);
|
||||
uint8_t has_tr = (ly > 0);
|
||||
uint8_t has_bl = (ly < 2);
|
||||
uint8_t has_br = (lx < 2);
|
||||
uint8_t mask = (has_tl ? 1 : 0) | (has_tr ? 2 : 0) | (has_bl ? 4 : 0) | (has_br ? 8 : 0);
|
||||
|
||||
uint8_t is_alt = ((lx + ly) % 2 == 0);
|
||||
|
||||
uint8_t v;
|
||||
if (lx == 1 && ly == 1) {
|
||||
// Scale (centro)
|
||||
v = 64 + mask;
|
||||
} else {
|
||||
// Pavimento normale
|
||||
v = is_alt ? (16 + mask) : mask;
|
||||
}
|
||||
|
||||
for (uint8_t y = 0; y < 2; y++) {
|
||||
for (uint8_t x = 0; x < 4; x++) {
|
||||
uint8_t target_x = (iso_x + x) & 31;
|
||||
uint8_t target_y = (iso_y + y) & 31;
|
||||
|
||||
uint8_t src_tile = tiles_map[4 + v * 8 + y * 4 + x];
|
||||
bkg_buffer[target_y * 32 + target_x] = src_tile;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set_bkg_tiles(0, 0, 32, 32, bkg_buffer);
|
||||
|
||||
SHOW_BKG;
|
||||
DISPLAY_ON;
|
||||
|
||||
while(1) {
|
||||
wait_vbl_done();
|
||||
}
|
||||
}
|
||||
+898
@@ -0,0 +1,898 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /tiles.png -c /tiles.c -map -bpp 2 -noflip -keep_palette_order
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
BANKREF(tiles)
|
||||
|
||||
const palette_color_t tiles_palettes[32] = {
|
||||
RGB8(224,248,207), RGB8(134,192,108), RGB8( 48,104, 80), RGB8( 7, 24, 33),
|
||||
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),
|
||||
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),
|
||||
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),
|
||||
RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0)
|
||||
};
|
||||
|
||||
const uint8_t tiles_tiles[2416] = {
|
||||
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,0xfc,0xfc,0xf0,0xf0,0xc0,0xc3,
|
||||
0xff,0xff,0xfc,0xfc,0xf0,0xf0,0xc0,0xc0,0x00,0x03,0x03,0x1c,0x1f,0x60,0x7f,0x80,
|
||||
0xff,0xff,0x3f,0x3f,0x0f,0x0f,0x03,0x03,0x00,0x80,0x80,0x78,0xf8,0x07,0xff,0x00,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0x1f,0x1f,0x07,0x87,0x81,0x71,
|
||||
0x81,0x8e,0xe0,0xe1,0xf8,0xf8,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0x00,0x1f,0xe0,0x01,0x1e,0x00,0x01,0xc0,0xc0,0xf0,0xf0,0xfc,0xfc,0xff,0xff,
|
||||
0xfe,0x01,0xf8,0x06,0xc0,0x38,0x00,0xc0,0x03,0x03,0x0f,0x0f,0x3f,0x3f,0xff,0xff,
|
||||
0x03,0xc3,0x0f,0x0f,0x3f,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x00,0x01,0x01,0x06,0x07,0x38,0x3f,0xc0,0xff,0x01,0xfc,0x04,0xf0,0x10,0xc0,0x43,
|
||||
0x3f,0xc0,0xfc,0x00,0xf0,0x00,0xc0,0x00,0x00,0x03,0x03,0x1c,0x1f,0x60,0x7f,0x80,
|
||||
0xff,0x01,0xfe,0x07,0xf8,0x3f,0xc0,0xff,0x01,0xff,0x04,0xfc,0x10,0xf0,0x40,0xc3,
|
||||
0xc0,0xff,0x00,0xfc,0x00,0xf0,0x00,0xc0,0x00,0x03,0x03,0x1c,0x1f,0x60,0x7f,0x80,
|
||||
0xf0,0x0e,0x3e,0x01,0x0f,0x00,0x03,0x00,0x00,0x80,0x80,0x78,0xf8,0x07,0xff,0x00,
|
||||
0x00,0x00,0x00,0xe0,0xe0,0x1e,0xfe,0x01,0x7f,0x00,0x1f,0x00,0x07,0x80,0x81,0x70,
|
||||
0x0f,0xfe,0x01,0x3f,0x00,0x0f,0x00,0x03,0x00,0x80,0x80,0x78,0xf8,0x07,0xff,0x00,
|
||||
0xff,0x00,0xff,0xe0,0x1f,0xfe,0x01,0xff,0x00,0x7f,0x00,0x1f,0x00,0x87,0x80,0x71,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xf0,0xfc,0xc3,
|
||||
0xff,0xff,0xff,0xfc,0xff,0xf0,0xff,0xc0,0xfc,0x03,0xe0,0x1c,0x80,0x60,0x00,0x80,
|
||||
0xff,0xff,0xff,0x3f,0xff,0x0f,0xff,0x03,0x7f,0x80,0x07,0x78,0x00,0x07,0x00,0x00,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0x1f,0x7f,0x87,0x0f,0x71,
|
||||
0xf0,0x8e,0xfe,0xe1,0xff,0xf8,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x00,0x00,0x00,0xe0,0xe0,0x1e,0xfe,0x01,0xff,0xc0,0xff,0xf0,0xff,0xfc,0xff,0xff,
|
||||
0x00,0x01,0x01,0x06,0x07,0x38,0x3f,0xc0,0xff,0x03,0xff,0x0f,0xff,0x3f,0xff,0xff,
|
||||
0x3f,0xc3,0xff,0x0f,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xfe,0x01,0xf8,0x06,0xc0,0x38,0x00,0xc0,0x01,0x01,0x07,0x04,0x1f,0x10,0x7c,0x43,
|
||||
0x00,0xc0,0x03,0x00,0x0f,0x00,0x3f,0x00,0xfc,0x03,0xe0,0x1c,0x80,0x60,0x00,0x80,
|
||||
0x01,0xff,0x07,0xfe,0x3f,0xf8,0xff,0xc0,0xff,0x01,0xff,0x04,0xff,0x10,0xfc,0x43,
|
||||
0xff,0xc0,0xff,0x00,0xff,0x00,0xff,0x00,0xfc,0x03,0xe0,0x1c,0x80,0x60,0x00,0x80,
|
||||
0x01,0x0e,0xc0,0x01,0xf0,0x00,0xfc,0x00,0x7f,0x80,0x07,0x78,0x00,0x07,0x00,0x00,
|
||||
0xff,0x00,0x1f,0xe0,0x01,0x1e,0x00,0x01,0x80,0x00,0xe0,0x00,0x78,0x80,0x0e,0x70,
|
||||
0xfe,0x0f,0xff,0x01,0xff,0x00,0xff,0x00,0x7f,0x80,0x07,0x78,0x00,0x07,0x00,0x00,
|
||||
0x00,0xff,0xe0,0xff,0xfe,0x1f,0xff,0x01,0xff,0x00,0xff,0x00,0x7f,0x80,0x0f,0x70,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xf0,0xff,0xc3,0xff,
|
||||
0xff,0xff,0xfc,0xff,0xf0,0xff,0xc0,0xff,0x03,0xff,0x1c,0xff,0x60,0xff,0x80,0xff,
|
||||
0xff,0xff,0x3f,0xff,0x0f,0xff,0x03,0xff,0x80,0xff,0x78,0xff,0x07,0xff,0x00,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0x1f,0xff,0x87,0xff,0x71,0xff,
|
||||
0x8e,0xff,0xe1,0xff,0xf8,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x00,0xff,0xe0,0xff,0x1e,0xff,0x01,0xff,0xc0,0xff,0xf0,0xff,0xfc,0xff,0xff,0xff,
|
||||
0x01,0xff,0x06,0xff,0x38,0xff,0xc0,0xff,0x03,0xff,0x0f,0xff,0x3f,0xff,0xff,0xff,
|
||||
0xc3,0xff,0x0f,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x00,0x01,0x01,0x06,0x07,0x38,0x3f,0xc0,0xff,0x01,0xfc,0x07,0xf0,0x1f,0xc3,0x7f,
|
||||
0x3f,0xc0,0xfc,0x03,0xf0,0x0f,0xc0,0x3f,0x03,0xff,0x1c,0xff,0x60,0xff,0x80,0xff,
|
||||
0xff,0x01,0xfe,0x07,0xf8,0x3f,0xc0,0xff,0x01,0xff,0x04,0xff,0x10,0xff,0x43,0xff,
|
||||
0xc0,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x03,0xff,0x1c,0xff,0x60,0xff,0x80,0xff,
|
||||
0xf0,0x0e,0x3e,0xc1,0x0f,0xf0,0x03,0xfc,0x80,0xff,0x78,0xff,0x07,0xff,0x00,0xff,
|
||||
0x00,0x00,0x00,0xe0,0xe0,0x1e,0xfe,0x01,0x7f,0x80,0x1f,0xe0,0x87,0xf8,0x71,0xfe,
|
||||
0x0f,0xfe,0x01,0xff,0x00,0xff,0x00,0xff,0x80,0xff,0x78,0xff,0x07,0xff,0x00,0xff,
|
||||
0xff,0x00,0xff,0xe0,0x1f,0xfe,0x01,0xff,0x00,0xff,0x00,0xff,0x80,0xff,0x70,0xff,
|
||||
0xff,0xff,0xfc,0xff,0xf0,0xff,0xc0,0xff,0x03,0xff,0x1f,0xfc,0x7f,0xe0,0xff,0x80,
|
||||
0xff,0xff,0x3f,0xff,0x0f,0xff,0x03,0xff,0x80,0xff,0xf8,0x7f,0xff,0x07,0xff,0x00,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0x1f,0xff,0x87,0xff,0xf1,0x7f,
|
||||
0x8f,0xfe,0xe1,0xff,0xf8,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0x00,0xff,0xe0,0x1f,0xfe,0x01,0xff,0xc0,0xff,0xf0,0xff,0xfc,0xff,0xff,0xff,
|
||||
0xff,0x01,0xfe,0x07,0xf8,0x3f,0xc0,0xff,0x03,0xff,0x0f,0xff,0x3f,0xff,0xff,0xff,
|
||||
0xfe,0x01,0xf8,0x06,0xc0,0x38,0x00,0xc0,0x01,0x01,0x04,0x07,0x10,0x1f,0x43,0x7f,
|
||||
0x00,0xc0,0x00,0x03,0x00,0x0f,0x00,0x3f,0x03,0xff,0x1f,0xfc,0x7f,0xe0,0xff,0x80,
|
||||
0x01,0xff,0x07,0xfe,0x3f,0xf8,0xff,0xc0,0xff,0x01,0xfc,0x07,0xf0,0x1f,0xc3,0x7f,
|
||||
0xff,0xc0,0xfc,0x03,0xf0,0x0f,0xc0,0x3f,0x03,0xff,0x1f,0xfc,0x7f,0xe0,0xff,0x80,
|
||||
0x01,0x0e,0x00,0xc1,0x00,0xf0,0x00,0xfc,0x80,0xff,0xf8,0x7f,0xff,0x07,0xff,0x00,
|
||||
0xff,0x00,0x1f,0xe0,0x01,0x1e,0x00,0x01,0x00,0x80,0x00,0xe0,0x80,0xf8,0xf0,0x7e,
|
||||
0xfe,0x0f,0x3f,0xc1,0x0f,0xf0,0x03,0xfc,0x80,0xff,0xf8,0x7f,0xff,0x07,0xff,0x00,
|
||||
0x00,0xff,0xe0,0xff,0xfe,0x1f,0xff,0x01,0x7f,0x80,0x1f,0xe0,0x87,0xf8,0xf1,0x7e,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xfc,0xf0,0xf0,0xc0,0xc0,
|
||||
0xff,0xff,0xff,0xfe,0xff,0xf8,0xc7,0xc6,0x01,0x01,0x06,0x06,0x18,0x18,0x06,0x06,
|
||||
0xff,0xff,0xff,0x7f,0xff,0x1f,0xe3,0x63,0x80,0x80,0x60,0x60,0x18,0x18,0x60,0x60,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0x1f,0x1f,0x07,0x07,0x01,0x01,
|
||||
0x80,0x80,0xe0,0xe0,0xf8,0xf8,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x01,0x01,0x07,0x06,0x1f,0x18,0x07,0x06,0xc1,0xc1,0xf6,0xf6,0xf8,0xf8,0xfe,0xfe,
|
||||
0x80,0x80,0xe0,0x60,0xf8,0x18,0xe0,0x60,0x83,0x83,0x6f,0x6f,0x1f,0x1f,0x7f,0x7f,
|
||||
0x03,0x03,0x0f,0x0f,0x3f,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x00,0x01,0x01,0x06,0x07,0x38,0x3f,0xc0,0xff,0x01,0xfc,0x04,0xf0,0x10,0xc0,0x40,
|
||||
0x3f,0xc1,0xff,0x06,0xff,0x18,0xc7,0x06,0x01,0x01,0x06,0x06,0x18,0x18,0x06,0x06,
|
||||
0xff,0x01,0xfe,0x07,0xf8,0x3f,0xc0,0xff,0x01,0xff,0x04,0xfc,0x10,0xf0,0x40,0xc0,
|
||||
0xc1,0xff,0x07,0xfe,0x1f,0xf8,0x07,0xc6,0x01,0x01,0x06,0x06,0x18,0x18,0x06,0x06,
|
||||
0xf0,0x8e,0xfe,0x61,0xff,0x18,0xe3,0x60,0x80,0x80,0x60,0x60,0x18,0x18,0x60,0x60,
|
||||
0x00,0x00,0x00,0xe0,0xe0,0x1e,0xfe,0x01,0x7f,0x00,0x1f,0x00,0x07,0x00,0x01,0x00,
|
||||
0x8f,0xfe,0xe1,0x7f,0xf8,0x1f,0xe0,0x63,0x80,0x80,0x60,0x60,0x18,0x18,0x60,0x60,
|
||||
0xff,0x00,0xff,0xe0,0x1f,0xfe,0x01,0xff,0x00,0x7f,0x00,0x1f,0x00,0x07,0x00,0x01,
|
||||
0x80,0x00,0xe0,0x00,0xf8,0x00,0xfe,0x00,0x7f,0x80,0x07,0x78,0x00,0x07,0x00,0x00,
|
||||
0x01,0x01,0x07,0x06,0x1f,0x18,0x07,0x06,0xc1,0x01,0xf6,0x06,0x78,0x98,0x0e,0x76,
|
||||
0x00,0x80,0x00,0xe0,0x00,0xf8,0x00,0xfe,0x80,0xff,0xf8,0x7f,0xff,0x07,0xff,0x00,
|
||||
0x01,0x01,0x07,0x06,0x1f,0x18,0x07,0x06,0x01,0xc1,0x06,0xf6,0x98,0xf8,0xf6,0x7e,
|
||||
0x80,0x80,0xe0,0x60,0xf8,0x18,0xe0,0x60,0x83,0x80,0x6f,0x60,0x1f,0x18,0x7c,0x63,
|
||||
0x03,0x02,0x0f,0x08,0x3f,0x20,0xff,0x80,0xfc,0x03,0xe0,0x1c,0x80,0x60,0x00,0x80,
|
||||
0x80,0x80,0xe0,0x60,0xf8,0x18,0xe0,0x60,0x80,0x83,0x60,0x6f,0x18,0x1f,0x63,0x7f,
|
||||
0x02,0x03,0x08,0x0f,0x20,0x3f,0x80,0xff,0x03,0xff,0x1f,0xfc,0x7f,0xe0,0xff,0x80,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xf0,0xff,0xc0,
|
||||
0xff,0xff,0xff,0xfe,0xff,0xf8,0xff,0xc6,0xff,0x01,0xfe,0x06,0xf8,0x18,0xfe,0x06,
|
||||
0xff,0xff,0xff,0x7f,0xff,0x1f,0xff,0x63,0xff,0x80,0x7f,0x60,0x1f,0x18,0x7f,0x60,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0x1f,0xff,0x07,0xff,0x01,
|
||||
0xff,0x80,0xff,0xe0,0xff,0xf8,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0x01,0xff,0x06,0xff,0x18,0xff,0x06,0xff,0xc1,0xfe,0xf6,0xf8,0xf8,0xfe,0xfe,
|
||||
0xff,0x80,0xff,0x60,0xff,0x18,0xff,0x60,0xff,0x83,0x7f,0x6f,0x1f,0x1f,0x7f,0x7f,
|
||||
0xff,0x03,0xff,0x0f,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xfe,0x01,0xf8,0x06,0xc0,0x38,0x00,0xc0,0x01,0x01,0x07,0x04,0x1f,0x10,0x7f,0x40,
|
||||
0x01,0xc1,0x07,0x06,0x1f,0x18,0x3f,0x06,0xff,0x01,0xfe,0x06,0xf8,0x18,0xfe,0x06,
|
||||
0x01,0xff,0x07,0xfe,0x3f,0xf8,0xff,0xc0,0xff,0x01,0xff,0x04,0xff,0x10,0xff,0x40,
|
||||
0xff,0xc1,0xff,0x06,0xff,0x18,0xff,0x06,0xff,0x01,0xfe,0x06,0xf8,0x18,0xfe,0x06,
|
||||
0x81,0x8e,0xe0,0x61,0xf8,0x18,0xfc,0x60,0xff,0x80,0x7f,0x60,0x1f,0x18,0x7f,0x60,
|
||||
0xff,0x00,0x1f,0xe0,0x01,0x1e,0x00,0x01,0x80,0x00,0xe0,0x00,0xf8,0x00,0xfe,0x00,
|
||||
0xfe,0x8f,0xff,0x61,0xff,0x18,0xff,0x60,0xff,0x80,0x7f,0x60,0x1f,0x18,0x7f,0x60,
|
||||
0x00,0xff,0xe0,0xff,0xfe,0x1f,0xff,0x01,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,
|
||||
0x7f,0x00,0x1f,0x00,0x07,0x00,0x01,0x00,0x00,0x80,0x80,0x78,0xf8,0x07,0xff,0x00,
|
||||
0xff,0x01,0xff,0x06,0xff,0x18,0xff,0x06,0x3f,0x01,0x0e,0x06,0x18,0x98,0x86,0x76,
|
||||
0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x80,0x7f,0xf8,0x07,0xff,0x00,0xff,
|
||||
0xff,0x01,0xff,0x06,0xff,0x18,0xff,0x06,0xff,0x01,0xfe,0x06,0xf8,0x98,0x7e,0xf6,
|
||||
0xff,0x80,0xff,0x60,0xff,0x18,0xff,0x60,0xfc,0x80,0x70,0x60,0x18,0x18,0x60,0x63,
|
||||
0xfe,0x02,0xf8,0x08,0xe0,0x20,0x80,0x80,0x00,0x03,0x03,0x1c,0x1f,0x60,0x7f,0x80,
|
||||
0xff,0x80,0xff,0x60,0xff,0x18,0xff,0x60,0xff,0x80,0x7f,0x60,0x1f,0x18,0x7f,0x63,
|
||||
0xff,0x02,0xff,0x08,0xff,0x20,0xff,0x80,0xff,0x03,0xfc,0x1f,0xe0,0x7f,0x80,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xf0,0xff,0xc0,0xff,
|
||||
0xff,0xff,0xfe,0xff,0xf8,0xff,0xc6,0xff,0x01,0xff,0x07,0xfe,0x1f,0xf8,0x07,0xfe,
|
||||
0xff,0xff,0x7f,0xff,0x1f,0xff,0x63,0xff,0x80,0xff,0xe0,0x7f,0xf8,0x1f,0xe0,0x7f,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0x1f,0xff,0x07,0xff,0x01,0xff,
|
||||
0x80,0xff,0xe0,0xff,0xf8,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x01,0xff,0x06,0xff,0x18,0xff,0x06,0xff,0xc1,0xff,0xf7,0xfe,0xff,0xf8,0xff,0xfe,
|
||||
0x80,0xff,0x60,0xff,0x18,0xff,0x60,0xff,0x83,0xff,0xef,0x7f,0xff,0x1f,0xff,0x7f,
|
||||
0x03,0xff,0x0f,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x00,0x01,0x01,0x06,0x07,0x38,0x3f,0xc0,0xff,0x01,0xfc,0x07,0xf0,0x1f,0xc0,0x7f,
|
||||
0x3f,0xc1,0xfe,0x07,0xf8,0x1f,0xc6,0x3f,0x01,0xff,0x07,0xfe,0x1f,0xf8,0x07,0xfe,
|
||||
0xff,0x01,0xfe,0x07,0xf8,0x3f,0xc0,0xff,0x01,0xff,0x04,0xff,0x10,0xff,0x40,0xff,
|
||||
0xc1,0xff,0x06,0xff,0x18,0xff,0x06,0xff,0x01,0xff,0x07,0xfe,0x1f,0xf8,0x07,0xfe,
|
||||
0xf0,0x8e,0x7e,0xe1,0x1f,0xf8,0x63,0xfc,0x80,0xff,0xe0,0x7f,0xf8,0x1f,0xe0,0x7f,
|
||||
0x00,0x00,0x00,0xe0,0xe0,0x1e,0xfe,0x01,0x7f,0x80,0x1f,0xe0,0x07,0xf8,0x01,0xfe,
|
||||
0x8f,0xfe,0x61,0xff,0x18,0xff,0x60,0xff,0x80,0xff,0xe0,0x7f,0xf8,0x1f,0xe0,0x7f,
|
||||
0xff,0x00,0xff,0xe0,0x1f,0xfe,0x01,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,
|
||||
0x80,0x7f,0xe0,0x1f,0xf8,0x07,0xfe,0x01,0x7f,0x80,0x07,0x78,0x00,0x07,0x00,0x00,
|
||||
0x01,0xff,0x06,0xff,0x18,0xff,0x06,0xff,0xc1,0x3f,0xf7,0x0e,0x7f,0x98,0x0f,0x76,
|
||||
0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x80,0xff,0xf8,0x7f,0xff,0x07,0xff,0x00,
|
||||
0x01,0xff,0x06,0xff,0x18,0xff,0x06,0xff,0x01,0xff,0x07,0xfe,0x9f,0xf8,0xf7,0x7e,
|
||||
0x80,0xff,0x60,0xff,0x18,0xff,0x60,0xff,0x83,0xfc,0xef,0x70,0xff,0x18,0xfc,0x63,
|
||||
0x03,0xfe,0x0f,0xf8,0x3f,0xe0,0xff,0x80,0xfc,0x03,0xe0,0x1c,0x80,0x60,0x00,0x80,
|
||||
0x80,0xff,0x60,0xff,0x18,0xff,0x60,0xff,0x80,0xff,0xe0,0x7f,0xf8,0x1f,0xe3,0x7f,
|
||||
0x02,0xff,0x08,0xff,0x20,0xff,0x80,0xff,0x03,0xff,0x1f,0xfc,0x7f,0xe0,0xff,0x80,
|
||||
0xfe,0x01,0xf8,0x06,0xc0,0x38,0x00,0xc0,0x01,0x01,0x04,0x07,0x10,0x1f,0x40,0x7f,
|
||||
0x01,0xc1,0x06,0x07,0x18,0x1f,0x06,0x3f,0x01,0xff,0x07,0xfe,0x1f,0xf8,0x07,0xfe,
|
||||
0x01,0xff,0x07,0xfe,0x3f,0xf8,0xff,0xc0,0xff,0x01,0xfc,0x07,0xf0,0x1f,0xc0,0x7f,
|
||||
0xff,0xc1,0xfe,0x07,0xf8,0x1f,0xc6,0x3f,0x01,0xff,0x07,0xfe,0x1f,0xf8,0x07,0xfe,
|
||||
0x81,0x8e,0x60,0xe1,0x18,0xf8,0x60,0xfc,0x80,0xff,0xe0,0x7f,0xf8,0x1f,0xe0,0x7f,
|
||||
0xff,0x00,0x1f,0xe0,0x01,0x1e,0x00,0x01,0x00,0x80,0x00,0xe0,0x00,0xf8,0x00,0xfe,
|
||||
0xfe,0x8f,0x7f,0xe1,0x1f,0xf8,0x63,0xfc,0x80,0xff,0xe0,0x7f,0xf8,0x1f,0xe0,0x7f,
|
||||
0x00,0xff,0xe0,0xff,0xfe,0x1f,0xff,0x01,0x7f,0x80,0x1f,0xe0,0x07,0xf8,0x01,0xfe,
|
||||
0x00,0x7f,0x00,0x1f,0x00,0x07,0x00,0x01,0x00,0x80,0x80,0x78,0xf8,0x07,0xff,0x00,
|
||||
0x01,0xff,0x06,0xff,0x18,0xff,0x06,0xff,0x01,0x3f,0x07,0x0e,0x1f,0x98,0x87,0x76,
|
||||
0x80,0x7f,0xe0,0x1f,0xf8,0x07,0xfe,0x01,0xff,0x80,0x7f,0xf8,0x07,0xff,0x00,0xff,
|
||||
0x01,0xff,0x06,0xff,0x18,0xff,0x06,0xff,0xc1,0x3f,0xf7,0x0e,0xff,0x98,0x7f,0xf6,
|
||||
0x80,0xff,0x60,0xff,0x18,0xff,0x60,0xff,0x80,0xfc,0xe0,0x70,0xf8,0x18,0xe0,0x63,
|
||||
0x02,0xfe,0x08,0xf8,0x20,0xe0,0x80,0x80,0x00,0x03,0x03,0x1c,0x1f,0x60,0x7f,0x80,
|
||||
0x80,0xff,0x60,0xff,0x18,0xff,0x60,0xff,0x83,0xfc,0xef,0x70,0xff,0x18,0xff,0x63,
|
||||
0x03,0xfe,0x0f,0xf8,0x3f,0xe0,0xff,0x80,0xff,0x03,0xfc,0x1f,0xe0,0x7f,0x80,0xff
|
||||
};
|
||||
|
||||
|
||||
const unsigned char tiles_map[2884] = {
|
||||
0x00,0x00,0x00,0x00,
|
||||
0x01,0x02,0x03,0x04,
|
||||
0x05,0x06,0x07,0x08,
|
||||
0x09,0x0a,0x03,0x04,
|
||||
0x05,0x06,0x07,0x08,
|
||||
0x0b,0x0c,0x03,0x04,
|
||||
0x05,0x06,0x07,0x08,
|
||||
0x01,0x02,0x0d,0x0e,
|
||||
0x05,0x06,0x07,0x08,
|
||||
0x09,0x0a,0x0d,0x0e,
|
||||
0x05,0x06,0x07,0x08,
|
||||
0x0b,0x0c,0x0d,0x0e,
|
||||
0x05,0x06,0x07,0x08,
|
||||
0x01,0x02,0x0f,0x10,
|
||||
0x05,0x06,0x07,0x08,
|
||||
0x09,0x0a,0x0f,0x10,
|
||||
0x05,0x06,0x07,0x08,
|
||||
0x0b,0x0c,0x0f,0x10,
|
||||
0x05,0x06,0x07,0x08,
|
||||
0x11,0x12,0x13,0x14,
|
||||
0x15,0x16,0x17,0x18,
|
||||
0x19,0x1a,0x13,0x14,
|
||||
0x15,0x16,0x17,0x18,
|
||||
0x1b,0x1c,0x13,0x14,
|
||||
0x15,0x16,0x17,0x18,
|
||||
0x11,0x12,0x1d,0x1e,
|
||||
0x15,0x16,0x17,0x18,
|
||||
0x19,0x1a,0x1d,0x1e,
|
||||
0x15,0x16,0x17,0x18,
|
||||
0x1b,0x1c,0x1d,0x1e,
|
||||
0x15,0x16,0x17,0x18,
|
||||
0x11,0x12,0x1f,0x20,
|
||||
0x15,0x16,0x17,0x18,
|
||||
0x19,0x1a,0x1f,0x20,
|
||||
0x15,0x16,0x17,0x18,
|
||||
0x1b,0x1c,0x1f,0x20,
|
||||
0x15,0x16,0x17,0x18,
|
||||
0x21,0x22,0x23,0x24,
|
||||
0x25,0x26,0x27,0x28,
|
||||
0x29,0x2a,0x23,0x24,
|
||||
0x25,0x26,0x27,0x28,
|
||||
0x2b,0x2c,0x23,0x24,
|
||||
0x25,0x26,0x27,0x28,
|
||||
0x21,0x22,0x2d,0x2e,
|
||||
0x25,0x26,0x27,0x28,
|
||||
0x29,0x2a,0x2d,0x2e,
|
||||
0x25,0x26,0x27,0x28,
|
||||
0x2b,0x2c,0x2d,0x2e,
|
||||
0x25,0x26,0x27,0x28,
|
||||
0x21,0x22,0x2f,0x30,
|
||||
0x25,0x26,0x27,0x28,
|
||||
0x29,0x2a,0x2f,0x30,
|
||||
0x25,0x26,0x27,0x28,
|
||||
0x2b,0x2c,0x2f,0x30,
|
||||
0x25,0x26,0x27,0x28,
|
||||
0x21,0x31,0x32,0x33,
|
||||
0x34,0x35,0x36,0x28,
|
||||
0x37,0x38,0x32,0x33,
|
||||
0x34,0x35,0x36,0x28,
|
||||
0x39,0x3a,0x32,0x33,
|
||||
0x34,0x35,0x36,0x28,
|
||||
0x21,0x31,0x3b,0x3c,
|
||||
0x34,0x35,0x36,0x28,
|
||||
0x37,0x38,0x3b,0x3c,
|
||||
0x34,0x35,0x36,0x28,
|
||||
0x39,0x3a,0x3b,0x3c,
|
||||
0x34,0x35,0x36,0x28,
|
||||
0x21,0x31,0x3d,0x3e,
|
||||
0x34,0x35,0x36,0x28,
|
||||
0x37,0x38,0x3d,0x3e,
|
||||
0x34,0x35,0x36,0x28,
|
||||
0x39,0x3a,0x3d,0x3e,
|
||||
0x34,0x35,0x36,0x28,
|
||||
0x3f,0x40,0x41,0x42,
|
||||
0x43,0x44,0x45,0x46,
|
||||
0x47,0x48,0x41,0x42,
|
||||
0x43,0x44,0x45,0x46,
|
||||
0x49,0x4a,0x41,0x42,
|
||||
0x43,0x44,0x45,0x46,
|
||||
0x3f,0x40,0x4b,0x4c,
|
||||
0x43,0x44,0x45,0x46,
|
||||
0x47,0x48,0x4b,0x4c,
|
||||
0x43,0x44,0x45,0x46,
|
||||
0x49,0x4a,0x4b,0x4c,
|
||||
0x43,0x44,0x45,0x46,
|
||||
0x3f,0x40,0x4d,0x4e,
|
||||
0x43,0x44,0x45,0x46,
|
||||
0x47,0x48,0x4d,0x4e,
|
||||
0x43,0x44,0x45,0x46,
|
||||
0x49,0x4a,0x4d,0x4e,
|
||||
0x43,0x44,0x45,0x46,
|
||||
0x3f,0x40,0x41,0x42,
|
||||
0x4f,0x50,0x45,0x46,
|
||||
0x47,0x48,0x41,0x42,
|
||||
0x4f,0x50,0x45,0x46,
|
||||
0x49,0x4a,0x41,0x42,
|
||||
0x4f,0x50,0x45,0x46,
|
||||
0x3f,0x40,0x4b,0x4c,
|
||||
0x4f,0x50,0x45,0x46,
|
||||
0x47,0x48,0x4b,0x4c,
|
||||
0x4f,0x50,0x45,0x46,
|
||||
0x49,0x4a,0x4b,0x4c,
|
||||
0x4f,0x50,0x45,0x46,
|
||||
0x3f,0x40,0x4d,0x4e,
|
||||
0x4f,0x50,0x45,0x46,
|
||||
0x47,0x48,0x4d,0x4e,
|
||||
0x4f,0x50,0x45,0x46,
|
||||
0x49,0x4a,0x4d,0x4e,
|
||||
0x4f,0x50,0x45,0x46,
|
||||
0x3f,0x40,0x41,0x42,
|
||||
0x51,0x52,0x45,0x46,
|
||||
0x47,0x48,0x41,0x42,
|
||||
0x51,0x52,0x45,0x46,
|
||||
0x49,0x4a,0x41,0x42,
|
||||
0x51,0x52,0x45,0x46,
|
||||
0x3f,0x40,0x4b,0x4c,
|
||||
0x51,0x52,0x45,0x46,
|
||||
0x47,0x48,0x4b,0x4c,
|
||||
0x51,0x52,0x45,0x46,
|
||||
0x49,0x4a,0x4b,0x4c,
|
||||
0x51,0x52,0x45,0x46,
|
||||
0x3f,0x40,0x4d,0x4e,
|
||||
0x51,0x52,0x45,0x46,
|
||||
0x47,0x48,0x4d,0x4e,
|
||||
0x51,0x52,0x45,0x46,
|
||||
0x49,0x4a,0x4d,0x4e,
|
||||
0x51,0x52,0x45,0x46,
|
||||
0x3f,0x40,0x41,0x42,
|
||||
0x43,0x44,0x53,0x54,
|
||||
0x47,0x48,0x41,0x42,
|
||||
0x43,0x44,0x53,0x54,
|
||||
0x49,0x4a,0x41,0x42,
|
||||
0x43,0x44,0x53,0x54,
|
||||
0x3f,0x40,0x4b,0x4c,
|
||||
0x43,0x44,0x53,0x54,
|
||||
0x47,0x48,0x4b,0x4c,
|
||||
0x43,0x44,0x53,0x54,
|
||||
0x49,0x4a,0x4b,0x4c,
|
||||
0x43,0x44,0x53,0x54,
|
||||
0x3f,0x40,0x4d,0x4e,
|
||||
0x43,0x44,0x53,0x54,
|
||||
0x47,0x48,0x4d,0x4e,
|
||||
0x43,0x44,0x53,0x54,
|
||||
0x49,0x4a,0x4d,0x4e,
|
||||
0x43,0x44,0x53,0x54,
|
||||
0x3f,0x40,0x41,0x42,
|
||||
0x4f,0x50,0x53,0x54,
|
||||
0x47,0x48,0x41,0x42,
|
||||
0x4f,0x50,0x53,0x54,
|
||||
0x49,0x4a,0x41,0x42,
|
||||
0x4f,0x50,0x53,0x54,
|
||||
0x3f,0x40,0x4b,0x4c,
|
||||
0x4f,0x50,0x53,0x54,
|
||||
0x47,0x48,0x4b,0x4c,
|
||||
0x4f,0x50,0x53,0x54,
|
||||
0x49,0x4a,0x4b,0x4c,
|
||||
0x4f,0x50,0x53,0x54,
|
||||
0x3f,0x40,0x4d,0x4e,
|
||||
0x4f,0x50,0x53,0x54,
|
||||
0x47,0x48,0x4d,0x4e,
|
||||
0x4f,0x50,0x53,0x54,
|
||||
0x49,0x4a,0x4d,0x4e,
|
||||
0x4f,0x50,0x53,0x54,
|
||||
0x3f,0x40,0x41,0x42,
|
||||
0x51,0x52,0x53,0x54,
|
||||
0x47,0x48,0x41,0x42,
|
||||
0x51,0x52,0x53,0x54,
|
||||
0x49,0x4a,0x41,0x42,
|
||||
0x51,0x52,0x53,0x54,
|
||||
0x3f,0x40,0x4b,0x4c,
|
||||
0x51,0x52,0x53,0x54,
|
||||
0x47,0x48,0x4b,0x4c,
|
||||
0x51,0x52,0x53,0x54,
|
||||
0x49,0x4a,0x4b,0x4c,
|
||||
0x51,0x52,0x53,0x54,
|
||||
0x3f,0x40,0x4d,0x4e,
|
||||
0x51,0x52,0x53,0x54,
|
||||
0x47,0x48,0x4d,0x4e,
|
||||
0x51,0x52,0x53,0x54,
|
||||
0x49,0x4a,0x4d,0x4e,
|
||||
0x51,0x52,0x53,0x54,
|
||||
0x3f,0x40,0x41,0x42,
|
||||
0x43,0x44,0x55,0x56,
|
||||
0x47,0x48,0x41,0x42,
|
||||
0x43,0x44,0x55,0x56,
|
||||
0x49,0x4a,0x41,0x42,
|
||||
0x43,0x44,0x55,0x56,
|
||||
0x3f,0x40,0x4b,0x4c,
|
||||
0x43,0x44,0x55,0x56,
|
||||
0x47,0x48,0x4b,0x4c,
|
||||
0x43,0x44,0x55,0x56,
|
||||
0x49,0x4a,0x4b,0x4c,
|
||||
0x43,0x44,0x55,0x56,
|
||||
0x3f,0x40,0x4d,0x4e,
|
||||
0x43,0x44,0x55,0x56,
|
||||
0x47,0x48,0x4d,0x4e,
|
||||
0x43,0x44,0x55,0x56,
|
||||
0x49,0x4a,0x4d,0x4e,
|
||||
0x43,0x44,0x55,0x56,
|
||||
0x3f,0x40,0x41,0x42,
|
||||
0x4f,0x50,0x55,0x56,
|
||||
0x47,0x48,0x41,0x42,
|
||||
0x4f,0x50,0x55,0x56,
|
||||
0x49,0x4a,0x41,0x42,
|
||||
0x4f,0x50,0x55,0x56,
|
||||
0x3f,0x40,0x4b,0x4c,
|
||||
0x4f,0x50,0x55,0x56,
|
||||
0x47,0x48,0x4b,0x4c,
|
||||
0x4f,0x50,0x55,0x56,
|
||||
0x49,0x4a,0x4b,0x4c,
|
||||
0x4f,0x50,0x55,0x56,
|
||||
0x3f,0x40,0x4d,0x4e,
|
||||
0x4f,0x50,0x55,0x56,
|
||||
0x47,0x48,0x4d,0x4e,
|
||||
0x4f,0x50,0x55,0x56,
|
||||
0x49,0x4a,0x4d,0x4e,
|
||||
0x4f,0x50,0x55,0x56,
|
||||
0x3f,0x40,0x41,0x42,
|
||||
0x51,0x52,0x55,0x56,
|
||||
0x47,0x48,0x41,0x42,
|
||||
0x51,0x52,0x55,0x56,
|
||||
0x49,0x4a,0x41,0x42,
|
||||
0x51,0x52,0x55,0x56,
|
||||
0x3f,0x40,0x4b,0x4c,
|
||||
0x51,0x52,0x55,0x56,
|
||||
0x47,0x48,0x4b,0x4c,
|
||||
0x51,0x52,0x55,0x56,
|
||||
0x49,0x4a,0x4b,0x4c,
|
||||
0x51,0x52,0x55,0x56,
|
||||
0x3f,0x40,0x4d,0x4e,
|
||||
0x51,0x52,0x55,0x56,
|
||||
0x47,0x48,0x4d,0x4e,
|
||||
0x51,0x52,0x55,0x56,
|
||||
0x49,0x4a,0x4d,0x4e,
|
||||
0x51,0x52,0x55,0x56,
|
||||
0x57,0x58,0x59,0x5a,
|
||||
0x5b,0x5c,0x5d,0x5e,
|
||||
0x5f,0x60,0x59,0x5a,
|
||||
0x5b,0x5c,0x5d,0x5e,
|
||||
0x61,0x62,0x59,0x5a,
|
||||
0x5b,0x5c,0x5d,0x5e,
|
||||
0x57,0x58,0x63,0x64,
|
||||
0x5b,0x5c,0x5d,0x5e,
|
||||
0x5f,0x60,0x63,0x64,
|
||||
0x5b,0x5c,0x5d,0x5e,
|
||||
0x61,0x62,0x63,0x64,
|
||||
0x5b,0x5c,0x5d,0x5e,
|
||||
0x57,0x58,0x65,0x66,
|
||||
0x5b,0x5c,0x5d,0x5e,
|
||||
0x5f,0x60,0x65,0x66,
|
||||
0x5b,0x5c,0x5d,0x5e,
|
||||
0x61,0x62,0x65,0x66,
|
||||
0x5b,0x5c,0x5d,0x5e,
|
||||
0x57,0x58,0x59,0x5a,
|
||||
0x67,0x68,0x5d,0x5e,
|
||||
0x5f,0x60,0x59,0x5a,
|
||||
0x67,0x68,0x5d,0x5e,
|
||||
0x61,0x62,0x59,0x5a,
|
||||
0x67,0x68,0x5d,0x5e,
|
||||
0x57,0x58,0x63,0x64,
|
||||
0x67,0x68,0x5d,0x5e,
|
||||
0x5f,0x60,0x63,0x64,
|
||||
0x67,0x68,0x5d,0x5e,
|
||||
0x61,0x62,0x63,0x64,
|
||||
0x67,0x68,0x5d,0x5e,
|
||||
0x57,0x58,0x65,0x66,
|
||||
0x67,0x68,0x5d,0x5e,
|
||||
0x5f,0x60,0x65,0x66,
|
||||
0x67,0x68,0x5d,0x5e,
|
||||
0x61,0x62,0x65,0x66,
|
||||
0x67,0x68,0x5d,0x5e,
|
||||
0x57,0x58,0x59,0x5a,
|
||||
0x69,0x6a,0x5d,0x5e,
|
||||
0x5f,0x60,0x59,0x5a,
|
||||
0x69,0x6a,0x5d,0x5e,
|
||||
0x61,0x62,0x59,0x5a,
|
||||
0x69,0x6a,0x5d,0x5e,
|
||||
0x57,0x58,0x63,0x64,
|
||||
0x69,0x6a,0x5d,0x5e,
|
||||
0x5f,0x60,0x63,0x64,
|
||||
0x69,0x6a,0x5d,0x5e,
|
||||
0x61,0x62,0x63,0x64,
|
||||
0x69,0x6a,0x5d,0x5e,
|
||||
0x57,0x58,0x65,0x66,
|
||||
0x69,0x6a,0x5d,0x5e,
|
||||
0x5f,0x60,0x65,0x66,
|
||||
0x69,0x6a,0x5d,0x5e,
|
||||
0x61,0x62,0x65,0x66,
|
||||
0x69,0x6a,0x5d,0x5e,
|
||||
0x57,0x58,0x59,0x5a,
|
||||
0x5b,0x5c,0x6b,0x6c,
|
||||
0x5f,0x60,0x59,0x5a,
|
||||
0x5b,0x5c,0x6b,0x6c,
|
||||
0x61,0x62,0x59,0x5a,
|
||||
0x5b,0x5c,0x6b,0x6c,
|
||||
0x57,0x58,0x63,0x64,
|
||||
0x5b,0x5c,0x6b,0x6c,
|
||||
0x5f,0x60,0x63,0x64,
|
||||
0x5b,0x5c,0x6b,0x6c,
|
||||
0x61,0x62,0x63,0x64,
|
||||
0x5b,0x5c,0x6b,0x6c,
|
||||
0x57,0x58,0x65,0x66,
|
||||
0x5b,0x5c,0x6b,0x6c,
|
||||
0x5f,0x60,0x65,0x66,
|
||||
0x5b,0x5c,0x6b,0x6c,
|
||||
0x61,0x62,0x65,0x66,
|
||||
0x5b,0x5c,0x6b,0x6c,
|
||||
0x57,0x58,0x59,0x5a,
|
||||
0x67,0x68,0x6b,0x6c,
|
||||
0x5f,0x60,0x59,0x5a,
|
||||
0x67,0x68,0x6b,0x6c,
|
||||
0x61,0x62,0x59,0x5a,
|
||||
0x67,0x68,0x6b,0x6c,
|
||||
0x57,0x58,0x63,0x64,
|
||||
0x67,0x68,0x6b,0x6c,
|
||||
0x5f,0x60,0x63,0x64,
|
||||
0x67,0x68,0x6b,0x6c,
|
||||
0x61,0x62,0x63,0x64,
|
||||
0x67,0x68,0x6b,0x6c,
|
||||
0x57,0x58,0x65,0x66,
|
||||
0x67,0x68,0x6b,0x6c,
|
||||
0x5f,0x60,0x65,0x66,
|
||||
0x67,0x68,0x6b,0x6c,
|
||||
0x61,0x62,0x65,0x66,
|
||||
0x67,0x68,0x6b,0x6c,
|
||||
0x57,0x58,0x59,0x5a,
|
||||
0x69,0x6a,0x6b,0x6c,
|
||||
0x5f,0x60,0x59,0x5a,
|
||||
0x69,0x6a,0x6b,0x6c,
|
||||
0x61,0x62,0x59,0x5a,
|
||||
0x69,0x6a,0x6b,0x6c,
|
||||
0x57,0x58,0x63,0x64,
|
||||
0x69,0x6a,0x6b,0x6c,
|
||||
0x5f,0x60,0x63,0x64,
|
||||
0x69,0x6a,0x6b,0x6c,
|
||||
0x61,0x62,0x63,0x64,
|
||||
0x69,0x6a,0x6b,0x6c,
|
||||
0x57,0x58,0x65,0x66,
|
||||
0x69,0x6a,0x6b,0x6c,
|
||||
0x5f,0x60,0x65,0x66,
|
||||
0x69,0x6a,0x6b,0x6c,
|
||||
0x61,0x62,0x65,0x66,
|
||||
0x69,0x6a,0x6b,0x6c,
|
||||
0x57,0x58,0x59,0x5a,
|
||||
0x5b,0x5c,0x6d,0x6e,
|
||||
0x5f,0x60,0x59,0x5a,
|
||||
0x5b,0x5c,0x6d,0x6e,
|
||||
0x61,0x62,0x59,0x5a,
|
||||
0x5b,0x5c,0x6d,0x6e,
|
||||
0x57,0x58,0x63,0x64,
|
||||
0x5b,0x5c,0x6d,0x6e,
|
||||
0x5f,0x60,0x63,0x64,
|
||||
0x5b,0x5c,0x6d,0x6e,
|
||||
0x61,0x62,0x63,0x64,
|
||||
0x5b,0x5c,0x6d,0x6e,
|
||||
0x57,0x58,0x65,0x66,
|
||||
0x5b,0x5c,0x6d,0x6e,
|
||||
0x5f,0x60,0x65,0x66,
|
||||
0x5b,0x5c,0x6d,0x6e,
|
||||
0x61,0x62,0x65,0x66,
|
||||
0x5b,0x5c,0x6d,0x6e,
|
||||
0x57,0x58,0x59,0x5a,
|
||||
0x67,0x68,0x6d,0x6e,
|
||||
0x5f,0x60,0x59,0x5a,
|
||||
0x67,0x68,0x6d,0x6e,
|
||||
0x61,0x62,0x59,0x5a,
|
||||
0x67,0x68,0x6d,0x6e,
|
||||
0x57,0x58,0x63,0x64,
|
||||
0x67,0x68,0x6d,0x6e,
|
||||
0x5f,0x60,0x63,0x64,
|
||||
0x67,0x68,0x6d,0x6e,
|
||||
0x61,0x62,0x63,0x64,
|
||||
0x67,0x68,0x6d,0x6e,
|
||||
0x57,0x58,0x65,0x66,
|
||||
0x67,0x68,0x6d,0x6e,
|
||||
0x5f,0x60,0x65,0x66,
|
||||
0x67,0x68,0x6d,0x6e,
|
||||
0x61,0x62,0x65,0x66,
|
||||
0x67,0x68,0x6d,0x6e,
|
||||
0x57,0x58,0x59,0x5a,
|
||||
0x69,0x6a,0x6d,0x6e,
|
||||
0x5f,0x60,0x59,0x5a,
|
||||
0x69,0x6a,0x6d,0x6e,
|
||||
0x61,0x62,0x59,0x5a,
|
||||
0x69,0x6a,0x6d,0x6e,
|
||||
0x57,0x58,0x63,0x64,
|
||||
0x69,0x6a,0x6d,0x6e,
|
||||
0x5f,0x60,0x63,0x64,
|
||||
0x69,0x6a,0x6d,0x6e,
|
||||
0x61,0x62,0x63,0x64,
|
||||
0x69,0x6a,0x6d,0x6e,
|
||||
0x57,0x58,0x65,0x66,
|
||||
0x69,0x6a,0x6d,0x6e,
|
||||
0x5f,0x60,0x65,0x66,
|
||||
0x69,0x6a,0x6d,0x6e,
|
||||
0x61,0x62,0x65,0x66,
|
||||
0x69,0x6a,0x6d,0x6e,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x77,0x78,0x71,0x72,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x79,0x7a,0x71,0x72,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x6f,0x70,0x7b,0x7c,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x77,0x78,0x7b,0x7c,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x79,0x7a,0x7b,0x7c,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x6f,0x70,0x7d,0x7e,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x77,0x78,0x7d,0x7e,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x79,0x7a,0x7d,0x7e,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x7f,0x80,0x75,0x76,
|
||||
0x77,0x78,0x71,0x72,
|
||||
0x7f,0x80,0x75,0x76,
|
||||
0x79,0x7a,0x71,0x72,
|
||||
0x7f,0x80,0x75,0x76,
|
||||
0x6f,0x70,0x7b,0x7c,
|
||||
0x7f,0x80,0x75,0x76,
|
||||
0x77,0x78,0x7b,0x7c,
|
||||
0x7f,0x80,0x75,0x76,
|
||||
0x79,0x7a,0x7b,0x7c,
|
||||
0x7f,0x80,0x75,0x76,
|
||||
0x6f,0x70,0x7d,0x7e,
|
||||
0x7f,0x80,0x75,0x76,
|
||||
0x77,0x78,0x7d,0x7e,
|
||||
0x7f,0x80,0x75,0x76,
|
||||
0x79,0x7a,0x7d,0x7e,
|
||||
0x7f,0x80,0x75,0x76,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x81,0x82,0x75,0x76,
|
||||
0x77,0x78,0x71,0x72,
|
||||
0x81,0x82,0x75,0x76,
|
||||
0x79,0x7a,0x71,0x72,
|
||||
0x81,0x82,0x75,0x76,
|
||||
0x6f,0x70,0x7b,0x7c,
|
||||
0x81,0x82,0x75,0x76,
|
||||
0x77,0x78,0x7b,0x7c,
|
||||
0x81,0x82,0x75,0x76,
|
||||
0x79,0x7a,0x7b,0x7c,
|
||||
0x81,0x82,0x75,0x76,
|
||||
0x6f,0x70,0x7d,0x7e,
|
||||
0x81,0x82,0x75,0x76,
|
||||
0x77,0x78,0x7d,0x7e,
|
||||
0x81,0x82,0x75,0x76,
|
||||
0x79,0x7a,0x7d,0x7e,
|
||||
0x81,0x82,0x75,0x76,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x73,0x74,0x83,0x84,
|
||||
0x77,0x78,0x71,0x72,
|
||||
0x73,0x74,0x83,0x84,
|
||||
0x79,0x7a,0x71,0x72,
|
||||
0x73,0x74,0x83,0x84,
|
||||
0x6f,0x70,0x7b,0x7c,
|
||||
0x73,0x74,0x83,0x84,
|
||||
0x77,0x78,0x7b,0x7c,
|
||||
0x73,0x74,0x83,0x84,
|
||||
0x79,0x7a,0x7b,0x7c,
|
||||
0x73,0x74,0x83,0x84,
|
||||
0x6f,0x70,0x7d,0x7e,
|
||||
0x73,0x74,0x83,0x84,
|
||||
0x77,0x78,0x7d,0x7e,
|
||||
0x73,0x74,0x83,0x84,
|
||||
0x79,0x7a,0x7d,0x7e,
|
||||
0x73,0x74,0x83,0x84,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x7f,0x80,0x83,0x84,
|
||||
0x77,0x78,0x71,0x72,
|
||||
0x7f,0x80,0x83,0x84,
|
||||
0x79,0x7a,0x71,0x72,
|
||||
0x7f,0x80,0x83,0x84,
|
||||
0x6f,0x70,0x7b,0x7c,
|
||||
0x7f,0x80,0x83,0x84,
|
||||
0x77,0x78,0x7b,0x7c,
|
||||
0x7f,0x80,0x83,0x84,
|
||||
0x79,0x7a,0x7b,0x7c,
|
||||
0x7f,0x80,0x83,0x84,
|
||||
0x6f,0x70,0x7d,0x7e,
|
||||
0x7f,0x80,0x83,0x84,
|
||||
0x77,0x78,0x7d,0x7e,
|
||||
0x7f,0x80,0x83,0x84,
|
||||
0x79,0x7a,0x7d,0x7e,
|
||||
0x7f,0x80,0x83,0x84,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x81,0x82,0x83,0x84,
|
||||
0x77,0x78,0x71,0x72,
|
||||
0x81,0x82,0x83,0x84,
|
||||
0x79,0x7a,0x71,0x72,
|
||||
0x81,0x82,0x83,0x84,
|
||||
0x6f,0x70,0x7b,0x7c,
|
||||
0x81,0x82,0x83,0x84,
|
||||
0x77,0x78,0x7b,0x7c,
|
||||
0x81,0x82,0x83,0x84,
|
||||
0x79,0x7a,0x7b,0x7c,
|
||||
0x81,0x82,0x83,0x84,
|
||||
0x6f,0x70,0x7d,0x7e,
|
||||
0x81,0x82,0x83,0x84,
|
||||
0x77,0x78,0x7d,0x7e,
|
||||
0x81,0x82,0x83,0x84,
|
||||
0x79,0x7a,0x7d,0x7e,
|
||||
0x81,0x82,0x83,0x84,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x73,0x74,0x85,0x86,
|
||||
0x77,0x78,0x71,0x72,
|
||||
0x73,0x74,0x85,0x86,
|
||||
0x79,0x7a,0x71,0x72,
|
||||
0x73,0x74,0x85,0x86,
|
||||
0x6f,0x70,0x7b,0x7c,
|
||||
0x73,0x74,0x85,0x86,
|
||||
0x77,0x78,0x7b,0x7c,
|
||||
0x73,0x74,0x85,0x86,
|
||||
0x79,0x7a,0x7b,0x7c,
|
||||
0x73,0x74,0x85,0x86,
|
||||
0x6f,0x70,0x7d,0x7e,
|
||||
0x73,0x74,0x85,0x86,
|
||||
0x77,0x78,0x7d,0x7e,
|
||||
0x73,0x74,0x85,0x86,
|
||||
0x79,0x7a,0x7d,0x7e,
|
||||
0x73,0x74,0x85,0x86,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x7f,0x80,0x85,0x86,
|
||||
0x77,0x78,0x71,0x72,
|
||||
0x7f,0x80,0x85,0x86,
|
||||
0x79,0x7a,0x71,0x72,
|
||||
0x7f,0x80,0x85,0x86,
|
||||
0x6f,0x70,0x7b,0x7c,
|
||||
0x7f,0x80,0x85,0x86,
|
||||
0x77,0x78,0x7b,0x7c,
|
||||
0x7f,0x80,0x85,0x86,
|
||||
0x79,0x7a,0x7b,0x7c,
|
||||
0x7f,0x80,0x85,0x86,
|
||||
0x6f,0x70,0x7d,0x7e,
|
||||
0x7f,0x80,0x85,0x86,
|
||||
0x77,0x78,0x7d,0x7e,
|
||||
0x7f,0x80,0x85,0x86,
|
||||
0x79,0x7a,0x7d,0x7e,
|
||||
0x7f,0x80,0x85,0x86,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x81,0x82,0x85,0x86,
|
||||
0x77,0x78,0x71,0x72,
|
||||
0x81,0x82,0x85,0x86,
|
||||
0x79,0x7a,0x71,0x72,
|
||||
0x81,0x82,0x85,0x86,
|
||||
0x6f,0x70,0x7b,0x7c,
|
||||
0x81,0x82,0x85,0x86,
|
||||
0x77,0x78,0x7b,0x7c,
|
||||
0x81,0x82,0x85,0x86,
|
||||
0x79,0x7a,0x7b,0x7c,
|
||||
0x81,0x82,0x85,0x86,
|
||||
0x6f,0x70,0x7d,0x7e,
|
||||
0x81,0x82,0x85,0x86,
|
||||
0x77,0x78,0x7d,0x7e,
|
||||
0x81,0x82,0x85,0x86,
|
||||
0x79,0x7a,0x7d,0x7e,
|
||||
0x81,0x82,0x85,0x86,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x87,0x88,0x71,0x72,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x89,0x8a,0x71,0x72,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x6f,0x70,0x8b,0x8c,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x87,0x88,0x8b,0x8c,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x89,0x8a,0x8b,0x8c,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x6f,0x70,0x8d,0x8e,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x87,0x88,0x8d,0x8e,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x89,0x8a,0x8d,0x8e,
|
||||
0x73,0x74,0x75,0x76,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x8f,0x90,0x75,0x76,
|
||||
0x87,0x88,0x71,0x72,
|
||||
0x8f,0x90,0x75,0x76,
|
||||
0x89,0x8a,0x71,0x72,
|
||||
0x8f,0x90,0x75,0x76,
|
||||
0x6f,0x70,0x8b,0x8c,
|
||||
0x8f,0x90,0x75,0x76,
|
||||
0x87,0x88,0x8b,0x8c,
|
||||
0x8f,0x90,0x75,0x76,
|
||||
0x89,0x8a,0x8b,0x8c,
|
||||
0x8f,0x90,0x75,0x76,
|
||||
0x6f,0x70,0x8d,0x8e,
|
||||
0x8f,0x90,0x75,0x76,
|
||||
0x87,0x88,0x8d,0x8e,
|
||||
0x8f,0x90,0x75,0x76,
|
||||
0x89,0x8a,0x8d,0x8e,
|
||||
0x8f,0x90,0x75,0x76,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x91,0x92,0x75,0x76,
|
||||
0x87,0x88,0x71,0x72,
|
||||
0x91,0x92,0x75,0x76,
|
||||
0x89,0x8a,0x71,0x72,
|
||||
0x91,0x92,0x75,0x76,
|
||||
0x6f,0x70,0x8b,0x8c,
|
||||
0x91,0x92,0x75,0x76,
|
||||
0x87,0x88,0x8b,0x8c,
|
||||
0x91,0x92,0x75,0x76,
|
||||
0x89,0x8a,0x8b,0x8c,
|
||||
0x91,0x92,0x75,0x76,
|
||||
0x6f,0x70,0x8d,0x8e,
|
||||
0x91,0x92,0x75,0x76,
|
||||
0x87,0x88,0x8d,0x8e,
|
||||
0x91,0x92,0x75,0x76,
|
||||
0x89,0x8a,0x8d,0x8e,
|
||||
0x91,0x92,0x75,0x76,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x73,0x74,0x93,0x94,
|
||||
0x87,0x88,0x71,0x72,
|
||||
0x73,0x74,0x93,0x94,
|
||||
0x89,0x8a,0x71,0x72,
|
||||
0x73,0x74,0x93,0x94,
|
||||
0x6f,0x70,0x8b,0x8c,
|
||||
0x73,0x74,0x93,0x94,
|
||||
0x87,0x88,0x8b,0x8c,
|
||||
0x73,0x74,0x93,0x94,
|
||||
0x89,0x8a,0x8b,0x8c,
|
||||
0x73,0x74,0x93,0x94,
|
||||
0x6f,0x70,0x8d,0x8e,
|
||||
0x73,0x74,0x93,0x94,
|
||||
0x87,0x88,0x8d,0x8e,
|
||||
0x73,0x74,0x93,0x94,
|
||||
0x89,0x8a,0x8d,0x8e,
|
||||
0x73,0x74,0x93,0x94,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x8f,0x90,0x93,0x94,
|
||||
0x87,0x88,0x71,0x72,
|
||||
0x8f,0x90,0x93,0x94,
|
||||
0x89,0x8a,0x71,0x72,
|
||||
0x8f,0x90,0x93,0x94,
|
||||
0x6f,0x70,0x8b,0x8c,
|
||||
0x8f,0x90,0x93,0x94,
|
||||
0x87,0x88,0x8b,0x8c,
|
||||
0x8f,0x90,0x93,0x94,
|
||||
0x89,0x8a,0x8b,0x8c,
|
||||
0x8f,0x90,0x93,0x94,
|
||||
0x6f,0x70,0x8d,0x8e,
|
||||
0x8f,0x90,0x93,0x94,
|
||||
0x87,0x88,0x8d,0x8e,
|
||||
0x8f,0x90,0x93,0x94,
|
||||
0x89,0x8a,0x8d,0x8e,
|
||||
0x8f,0x90,0x93,0x94,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x91,0x92,0x93,0x94,
|
||||
0x87,0x88,0x71,0x72,
|
||||
0x91,0x92,0x93,0x94,
|
||||
0x89,0x8a,0x71,0x72,
|
||||
0x91,0x92,0x93,0x94,
|
||||
0x6f,0x70,0x8b,0x8c,
|
||||
0x91,0x92,0x93,0x94,
|
||||
0x87,0x88,0x8b,0x8c,
|
||||
0x91,0x92,0x93,0x94,
|
||||
0x89,0x8a,0x8b,0x8c,
|
||||
0x91,0x92,0x93,0x94,
|
||||
0x6f,0x70,0x8d,0x8e,
|
||||
0x91,0x92,0x93,0x94,
|
||||
0x87,0x88,0x8d,0x8e,
|
||||
0x91,0x92,0x93,0x94,
|
||||
0x89,0x8a,0x8d,0x8e,
|
||||
0x91,0x92,0x93,0x94,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x73,0x74,0x95,0x96,
|
||||
0x87,0x88,0x71,0x72,
|
||||
0x73,0x74,0x95,0x96,
|
||||
0x89,0x8a,0x71,0x72,
|
||||
0x73,0x74,0x95,0x96,
|
||||
0x6f,0x70,0x8b,0x8c,
|
||||
0x73,0x74,0x95,0x96,
|
||||
0x87,0x88,0x8b,0x8c,
|
||||
0x73,0x74,0x95,0x96,
|
||||
0x89,0x8a,0x8b,0x8c,
|
||||
0x73,0x74,0x95,0x96,
|
||||
0x6f,0x70,0x8d,0x8e,
|
||||
0x73,0x74,0x95,0x96,
|
||||
0x87,0x88,0x8d,0x8e,
|
||||
0x73,0x74,0x95,0x96,
|
||||
0x89,0x8a,0x8d,0x8e,
|
||||
0x73,0x74,0x95,0x96,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x8f,0x90,0x95,0x96,
|
||||
0x87,0x88,0x71,0x72,
|
||||
0x8f,0x90,0x95,0x96,
|
||||
0x89,0x8a,0x71,0x72,
|
||||
0x8f,0x90,0x95,0x96,
|
||||
0x6f,0x70,0x8b,0x8c,
|
||||
0x8f,0x90,0x95,0x96,
|
||||
0x87,0x88,0x8b,0x8c,
|
||||
0x8f,0x90,0x95,0x96,
|
||||
0x89,0x8a,0x8b,0x8c,
|
||||
0x8f,0x90,0x95,0x96,
|
||||
0x6f,0x70,0x8d,0x8e,
|
||||
0x8f,0x90,0x95,0x96,
|
||||
0x87,0x88,0x8d,0x8e,
|
||||
0x8f,0x90,0x95,0x96,
|
||||
0x89,0x8a,0x8d,0x8e,
|
||||
0x8f,0x90,0x95,0x96,
|
||||
0x6f,0x70,0x71,0x72,
|
||||
0x91,0x92,0x95,0x96,
|
||||
0x87,0x88,0x71,0x72,
|
||||
0x91,0x92,0x95,0x96,
|
||||
0x89,0x8a,0x71,0x72,
|
||||
0x91,0x92,0x95,0x96,
|
||||
0x6f,0x70,0x8b,0x8c,
|
||||
0x91,0x92,0x95,0x96,
|
||||
0x87,0x88,0x8b,0x8c,
|
||||
0x91,0x92,0x95,0x96,
|
||||
0x89,0x8a,0x8b,0x8c,
|
||||
0x91,0x92,0x95,0x96,
|
||||
0x6f,0x70,0x8d,0x8e,
|
||||
0x91,0x92,0x95,0x96,
|
||||
0x87,0x88,0x8d,0x8e,
|
||||
0x91,0x92,0x95,0x96,
|
||||
0x89,0x8a,0x8d,0x8e,
|
||||
0x91,0x92,0x95,0x96,
|
||||
};
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /tiles.png -c /tiles.c -map -bpp 2 -noflip -keep_palette_order
|
||||
|
||||
#ifndef METASPRITE_tiles_H
|
||||
#define METASPRITE_tiles_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
#define tiles_TILE_ORIGIN 0
|
||||
#define tiles_TILE_W 8
|
||||
#define tiles_TILE_H 8
|
||||
#define tiles_WIDTH 32
|
||||
#define tiles_HEIGHT 5768
|
||||
#define tiles_TILE_COUNT 151
|
||||
#define tiles_PALETTE_COUNT 8
|
||||
#define tiles_COLORS_PER_PALETTE 4
|
||||
#define tiles_TOTAL_COLORS 32
|
||||
#define tiles_MAP_ATTRIBUTES 0
|
||||
extern const unsigned char tiles_map[2884];
|
||||
#define tiles_map_attributes tiles_map
|
||||
|
||||
BANKREF_EXTERN(tiles)
|
||||
|
||||
extern const palette_color_t tiles_palettes[32];
|
||||
extern const uint8_t tiles_tiles[2416];
|
||||
|
||||
#endif
|
||||
+256
@@ -0,0 +1,256 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /title_bg.png -c /title_bg.c -map -bpp 2 -noflip -keep_palette_order -max_palettes 1
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
BANKREF(title_bg)
|
||||
|
||||
const palette_color_t title_bg_palettes[4] = {
|
||||
RGB8(255,255,255), RGB8(170,170,170), RGB8( 85, 85, 85), RGB8( 0, 0, 0)
|
||||
};
|
||||
|
||||
const uint8_t title_bg_tiles[3504] = {
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xfd,0xf7,0xf9,0xf7,0xf9,0xff,0xf0,0xfe,0xf1,0xff,0xe0,0xff,0xe4,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
|
||||
0xff,0xff,0xff,0xf8,0xf7,0xf8,0xff,0xf0,0xfd,0xe1,0xfb,0xe7,0xff,0xe7,0xff,0xe3,
|
||||
0xff,0xff,0xff,0x7f,0xff,0x3f,0xfe,0x3f,0xff,0x9e,0xff,0x9c,0xdf,0xdc,0xdf,0xd8,
|
||||
0xff,0xff,0xff,0x8f,0xfb,0x07,0xff,0x01,0xff,0x31,0xff,0x79,0xff,0x79,0xff,0xfd,
|
||||
0xff,0xff,0xfb,0x03,0xff,0x01,0xff,0x00,0xff,0x80,0xff,0x8c,0xff,0x8e,0xef,0x9e,
|
||||
0xff,0xff,0xff,0xc3,0xff,0xe0,0xff,0xe0,0xff,0x71,0xff,0x33,0xff,0x33,0xbf,0x32,
|
||||
0xff,0xff,0xff,0xdf,0xff,0x1f,0xff,0x1f,0xff,0x9e,0xff,0xde,0xff,0xde,0xfd,0xdc,
|
||||
0xff,0xbf,0xdf,0x9f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff,0x1f,0xff,0x0f,0xff,0x4f,
|
||||
0xff,0xff,0xff,0x3f,0xff,0x3f,0xff,0x3e,0x7f,0x9e,0x7f,0x9e,0x7f,0x8c,0xff,0x0c,
|
||||
0xff,0xff,0xff,0xbf,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,
|
||||
0xff,0xff,0xbf,0x87,0xff,0xc0,0xff,0xe0,0xff,0xe7,0xff,0xe7,0xff,0xe6,0xff,0xe4,
|
||||
0xff,0xff,0xff,0xe0,0xff,0x20,0xef,0x20,0x7f,0x30,0xff,0xb1,0xff,0xb1,0xff,0xf1,
|
||||
0xff,0xff,0xff,0x7f,0xff,0x1f,0xff,0x0e,0xfd,0x04,0xff,0xc4,0xff,0xc4,0xf7,0xc4,
|
||||
0xff,0xff,0xbf,0xc7,0xff,0x01,0xfd,0x03,0xf7,0x39,0xff,0xf9,0xff,0xf9,0xff,0xf8,
|
||||
0xff,0xff,0xff,0xcf,0xff,0x8f,0xff,0x8f,0xff,0xc7,0xff,0xc7,0xff,0xc3,0xff,0xc1,
|
||||
0xff,0xef,0xff,0xff,0xff,0xdf,0xbf,0xdf,0xff,0x9f,0xff,0x9f,0xff,0x1f,0xff,0x1f,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,
|
||||
0xff,0xc4,0xff,0xc4,0xff,0xce,0xfd,0xcc,0xff,0xc0,0xff,0x81,0xff,0x1f,0xff,0x9f,
|
||||
0xff,0x7f,0xff,0x7f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0x7f,0x1f,0xff,0x9f,
|
||||
0xff,0xe1,0xff,0xe0,0xfd,0xf2,0xff,0xfe,0xff,0xbf,0xff,0xbf,0xff,0xbf,0xff,0x9f,
|
||||
0xdf,0xd8,0xff,0x78,0xff,0x18,0xff,0x08,0xff,0x88,0xff,0x88,0xff,0x88,0xff,0x8c,
|
||||
0xff,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
|
||||
0xff,0x8c,0xff,0x88,0xbf,0xc0,0xff,0x01,0xff,0x80,0xff,0x9c,0xfd,0x9e,0xff,0x9e,
|
||||
0xff,0x70,0xff,0xf0,0xff,0xf2,0xff,0xf2,0xff,0xf3,0xff,0x73,0xff,0x73,0xff,0x73,
|
||||
0xdf,0xdc,0xff,0xfc,0xff,0xf8,0xff,0xf8,0xff,0xf8,0xff,0xf0,0xff,0xc1,0xff,0xd9,
|
||||
0xff,0xc7,0xff,0xc7,0xff,0xc7,0xff,0xc3,0xff,0x03,0xff,0x23,0xff,0xf3,0xf7,0xf3,
|
||||
0xff,0x20,0xfd,0x33,0xff,0x33,0xff,0x33,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,
|
||||
0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,
|
||||
0xff,0xe0,0xff,0xe0,0xff,0xe4,0xff,0xe6,0xff,0xe6,0xff,0xe6,0xff,0xe7,0xff,0xe7,
|
||||
0xff,0xf9,0xff,0xf9,0xff,0xf8,0xff,0xf0,0xff,0xf8,0xff,0xf9,0xff,0xf9,0xff,0xf9,
|
||||
0xf7,0xc4,0xfd,0x8c,0xef,0x0c,0xff,0x1c,0xfd,0x0c,0xff,0x86,0xff,0xc6,0xfe,0xc6,
|
||||
0xff,0xf8,0xff,0xf8,0xff,0xf9,0xff,0xf9,0xff,0xf9,0xff,0xf9,0xff,0xf9,0xff,0xfb,
|
||||
0xff,0xc8,0xff,0xcc,0xff,0xcc,0xff,0xcc,0xff,0xce,0xff,0xcf,0xff,0xcf,0xff,0xcf,
|
||||
0xff,0x1f,0xff,0x5f,0x7f,0xdf,0xff,0xdf,0xff,0xdf,0xff,0xdf,0xff,0xdf,0xff,0xdf,
|
||||
0xff,0x9f,0xff,0x9f,0xff,0x9f,0xdf,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xbf,0x9f,0xff,0xcf,0xdf,0xef,0xff,0xcf,0xff,0xef,0xef,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xdf,0xff,0xcf,0xff,0xe6,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x7d,0x8c,0xff,0x1e,0xff,0x3e,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0x7b,0xff,0x33,0xdf,0x37,0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0x9e,0xff,0x9e,0xff,0xdf,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0x73,0xff,0x61,0xff,0x40,0xdf,0x7e,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xd1,0xff,0x93,0xff,0x13,0xff,0x13,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xfd,0xf9,0xff,0xf9,0xff,0xf9,0xff,0xfd,0xff,0xfd,0xff,0xfd,0xff,0xff,0xff,0xff,
|
||||
0xff,0x3f,0xff,0xbf,0xff,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0x3f,0xff,0x3f,0xff,0x3f,0xbf,0x3f,0x7f,0x7f,0xff,0xff,0xff,0xbf,0xff,0xbf,
|
||||
0xff,0xe7,0xff,0xe7,0xff,0xe7,0xff,0xe7,0xff,0xf7,0xff,0xf7,0xff,0xf7,0xff,0xff,
|
||||
0xff,0xf9,0xff,0xfb,0xfb,0xff,0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xdf,0xc7,0xff,0xe7,0xff,0xe7,0xff,0xef,0xff,0xef,0xef,0xef,0xff,0xff,0xff,0xff,
|
||||
0xff,0x73,0xff,0x33,0xff,0x07,0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xcf,0xff,0xcf,0xff,0xef,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xdf,0xff,0xdf,0xff,0xdf,0xff,0xdf,0xdf,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xbf,0xfd,0x82,0xfb,0x84,0xff,0x90,0xfe,0xb9,0xff,0xb8,0xbf,0xb8,0xff,0xf8,
|
||||
0xff,0xff,0xbf,0x45,0xff,0x09,0xff,0xc9,0xff,0xe9,0xff,0xe9,0xff,0xe9,0xff,0xe9,
|
||||
0xfb,0xf9,0xff,0xe1,0xff,0xe1,0xef,0xf1,0xff,0xf1,0xff,0xf3,0xff,0xf3,0xff,0xf3,
|
||||
0xff,0xff,0xff,0x00,0xbf,0xc0,0xf7,0x88,0xff,0xce,0xff,0xce,0xed,0xdf,0xff,0xc1,
|
||||
0xff,0xff,0xff,0x7e,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xf5,0x0b,0xfd,0x82,0xff,0xc0,0xff,0xc4,0xff,0xc7,0xff,0xc7,0xff,0xc7,
|
||||
0xff,0xff,0xff,0xff,0xff,0x7e,0xff,0x3e,0xff,0x3e,0xff,0x3c,0xff,0x3c,0xff,0xb8,
|
||||
0xff,0xbf,0xff,0xbe,0xff,0x3e,0xdf,0x1f,0xff,0x1f,0xef,0x1f,0x7f,0x8f,0xff,0x8f,
|
||||
0xff,0xff,0xff,0x07,0xff,0x03,0xfe,0x00,0xff,0x18,0xfb,0x18,0xff,0x18,0xff,0x18,
|
||||
0xff,0xff,0xef,0xe7,0xff,0xc7,0xbf,0xc7,0xbf,0xc7,0xff,0xcf,0xff,0xce,0xff,0xce,
|
||||
0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xbf,0x3f,
|
||||
0xff,0xf8,0xfb,0xfc,0xff,0xf9,0xff,0xf9,0xff,0xf9,0xff,0xf9,0xff,0xf9,0xff,0xf9,
|
||||
0xff,0xf8,0xff,0xf8,0xff,0xf0,0xff,0xf0,0xfe,0xf1,0xfe,0xf9,0xff,0xf9,0xfe,0xf9,
|
||||
0xff,0x03,0xff,0x03,0xff,0x01,0xff,0xf3,0xff,0xf3,0xff,0xf3,0xff,0xf3,0xff,0xf3,
|
||||
0xff,0xc1,0xff,0xc9,0xff,0xcd,0xff,0xcd,0xff,0xcd,0xff,0xcf,0xff,0xcf,0xfe,0xcf,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0x7f,0xff,0xff,0xff,
|
||||
0xff,0xc7,0xff,0xc7,0xff,0xc7,0xff,0xc7,0xff,0xc7,0xff,0xc7,0xff,0xcf,0xdf,0xce,
|
||||
0xff,0xb8,0xff,0xb9,0xff,0xb9,0x7f,0xb9,0x7f,0xb8,0x7e,0xa1,0xff,0x13,0xff,0x73,
|
||||
0xff,0x8f,0xff,0xc7,0xff,0xc7,0xbf,0xc7,0xff,0x07,0xfb,0xe7,0xff,0xf3,0xff,0xfb,
|
||||
0xff,0x99,0xe7,0x99,0xf7,0x8b,0xff,0x83,0xfe,0x91,0xff,0x98,0xff,0x98,0xff,0xbc,
|
||||
0xff,0xcc,0xf7,0xc8,0xfe,0xc1,0xff,0xc8,0xff,0xcc,0xff,0xce,0xff,0xcf,0xff,0xcf,
|
||||
0xff,0x7f,0xff,0xff,0x7f,0xff,0xff,0x7f,0xff,0x3f,0xff,0x3f,0xff,0x3f,0xff,0x3f,
|
||||
0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xd7,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xfd,0xfc,0xff,0xfe,
|
||||
0xff,0xff,0xff,0xfd,0xff,0xf7,0xfe,0xff,0xfc,0xef,0xdf,0xdd,0xbb,0xbb,0x57,0x77,
|
||||
0xff,0xf9,0xbb,0xf9,0x7f,0xfd,0x7f,0xfd,0xff,0xfd,0xfd,0xfd,0xff,0xff,0xff,0xff,
|
||||
0xfe,0xfd,0xfe,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xf3,0xff,0xf3,0xff,0xf3,0xff,0xf3,0xff,0xf3,0xf7,0xf3,0xfb,0xfb,0xff,0xff,
|
||||
0xff,0x82,0x0f,0xf0,0xfe,0xfd,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0x7f,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,
|
||||
0xff,0xec,0xff,0xe9,0xef,0xe3,0xf7,0xcf,0xff,0x3f,0xff,0x7f,0xff,0xff,0xff,0xff,
|
||||
0xfb,0xf3,0xfb,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xf9,0xff,0xf9,0xff,0xf9,0xff,0xfd,0xff,0xfd,0xff,0xfd,0xff,0xff,0xff,0xff,
|
||||
0xff,0xbc,0xbf,0xfd,0xbf,0xfd,0xfd,0xfd,0xff,0xfd,0xff,0xfd,0xff,0xff,0xff,0xff,
|
||||
0xff,0x3f,0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,0x7f,0x7f,0x7f,0xff,0xff,0xff,0xff,
|
||||
0xfe,0xff,0xfc,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x7f,0xff,0x3f,0x3f,0x4f,0x0f,0xfa,0xe3,0xf8,0xf8,0xfc,0xfc,0xff,0xff,0xff,0xff,
|
||||
0xfe,0xfe,0xfe,0xfe,0x6f,0xef,0xf1,0xf1,0xfe,0xfe,0x9c,0x9c,0xed,0xed,0xfb,0xfb,
|
||||
0xef,0xef,0xdf,0xdf,0x7f,0x7f,0x3f,0x3f,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xb3,0xff,0xe5,0x12,0xcd,0xd4,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x77,0xff,0xaa,0x22,0xca,0x26,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0x79,0xfc,0xbf,0x39,0xbe,0x7c,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc3,0xff,0x35,0x43,0x7e,0xe7,0xf6,0x6e,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xff,0xbe,0x30,0xb6,0x36,0x54,0xb1,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x87,0xff,0x5f,0x87,0xef,0xdf,0xdf,0xdf,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xff,0x9f,0xff,
|
||||
0xef,0xff,0xef,0xfb,0xcb,0xfb,0xd2,0xfa,0xc3,0xfb,0xc3,0xfb,0xc3,0xfb,0x83,0xfb,
|
||||
0xe3,0xe3,0xcb,0xcb,0x7b,0x7b,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xfb,0xff,0xff,
|
||||
0xfe,0xfe,0xfc,0xfe,0xfe,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xb5,0xcd,0x6e,0x2c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x8c,0xf3,0xe0,0x46,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x37,0xbb,0x3c,0x78,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x6e,0x6c,0x6d,0xed,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xae,0x15,0x9d,0xc6,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xdf,0xdf,0xbf,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x9f,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xf9,0xff,0xf8,0xff,0xfe,0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x83,0xfb,0x0b,0xfb,0x8b,0x7b,0xe3,0xe3,0xff,0xff,0xde,0xff,0xda,0xe3,0xfa,0x43,
|
||||
0xfd,0xff,0xfe,0xfd,0xfe,0xf1,0xf0,0x7f,0xf0,0x7f,0x1a,0xfd,0x1e,0xf8,0x10,0xfe,
|
||||
0xff,0xff,0xaf,0xdf,0xe7,0x8f,0xe3,0x8f,0x83,0x7f,0x03,0xff,0x43,0xbf,0xc3,0x1f,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xbf,0xff,0xbf,0xff,
|
||||
0xff,0xff,0xfd,0xff,0xfe,0xff,0xff,0xff,0xfe,0xfe,0xff,0xfe,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xfe,0xfd,0xff,0xff,0xff,0xfe,0xfe,0x7c,0x7c,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfd,0xfe,0xf7,0xfe,0xf7,0xfe,0xf7,0xfe,
|
||||
0xfb,0xc3,0xf3,0x83,0xe3,0x93,0xe2,0x03,0x92,0x03,0x82,0x23,0xcb,0x22,0xe3,0x0a,
|
||||
0x96,0xf9,0xfd,0xfa,0xdf,0xee,0xbb,0x86,0xff,0x80,0xfa,0x80,0xfa,0x80,0xfc,0x80,
|
||||
0xc0,0x1f,0xc0,0x0f,0x40,0x8f,0x00,0x8f,0x18,0x0e,0x3d,0x00,0x3f,0x00,0x0b,0x00,
|
||||
0xbf,0xff,0x7f,0xff,0x1f,0xff,0x1f,0xff,0x5f,0xff,0xff,0xff,0xf9,0x7f,0xff,0x38,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xfe,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xef,0xef,0xef,0xef,0xef,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xfe,0xfe,0xd2,0x52,0xdb,0xfb,0xff,0xff,0xff,0xff,0xbe,0xbe,0xab,0xaa,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7b,0x7f,
|
||||
0xef,0xff,0xef,0xff,0xef,0xff,0xe7,0xff,0xe7,0xff,0xef,0xff,0xe7,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0x7f,0xff,
|
||||
0xf6,0xfe,0xf6,0xfe,0xe6,0xf6,0xff,0xff,0xff,0xff,0xfc,0xfc,0xff,0xfc,0xff,0xfc,
|
||||
0xe3,0x02,0x83,0x62,0x03,0x02,0x03,0x02,0xfe,0xff,0x0f,0x0e,0x83,0x02,0x83,0x02,
|
||||
0xfc,0x80,0xfe,0x80,0xff,0x00,0xce,0x01,0x8e,0x00,0x88,0x44,0x80,0x08,0x80,0x00,
|
||||
0x0b,0x00,0x09,0x00,0x01,0x00,0x03,0x00,0x03,0x00,0x03,0x04,0x01,0x00,0x00,0x00,
|
||||
0xff,0x38,0xff,0x38,0xff,0x38,0xff,0x38,0xfe,0x19,0xfd,0x1a,0xbf,0x59,0x7f,0x99,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xff,0x79,0xfb,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0x7f,0xe7,0xdf,0xff,0xbf,0xff,0xff,
|
||||
0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0x7f,0x7f,
|
||||
0xff,0xff,0xf7,0xf7,0xf7,0xf7,0xf7,0xf7,0xef,0xef,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xeb,0xeb,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xfe,0xfe,0xfc,0xfd,0xfd,0xfd,0xfd,0xfd,0xf5,0xf5,0xf7,0xf7,0xf7,0xf7,0xff,0xff,
|
||||
0xf7,0xf7,0xef,0xef,0xff,0xef,0xdf,0xdf,0xdf,0xdf,0x9f,0x9f,0xbd,0xbd,0xbd,0xbd,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xbf,
|
||||
0xff,0xff,0xf9,0xff,0xf3,0xff,0xef,0xff,0xe7,0xff,0xef,0xff,0xef,0xff,0xef,0xff,
|
||||
0x7f,0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,
|
||||
0xfe,0xfd,0xfe,0xff,0xfc,0xfe,0xff,0xfc,0xff,0xfc,0xf3,0xf8,0xf3,0xfe,0xf7,0xfe,
|
||||
0xe3,0x02,0xe3,0x02,0xe3,0x02,0x03,0x22,0x03,0x22,0x03,0x12,0x03,0x12,0x83,0x12,
|
||||
0x00,0x00,0x80,0x80,0x80,0x00,0x80,0x00,0x80,0x00,0x40,0x80,0xc0,0x00,0xe0,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x03,0x00,
|
||||
0xff,0x7f,0xfc,0x1b,0xfc,0x1b,0xfc,0x1b,0xfc,0x1b,0x7c,0x9b,0xfc,0x1b,0xfc,0x3b,
|
||||
0xff,0xff,0x7f,0xff,0x7e,0xfe,0x7e,0xfe,0x7f,0xff,0x7f,0xff,0x7a,0xfa,0x7a,0xfa,
|
||||
0xff,0xff,0x23,0x23,0x11,0x11,0xdc,0xdc,0xdf,0xde,0x59,0x5b,0x95,0x95,0x1a,0x90,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0xdf,0xdf,0xff,0x5f,0xff,
|
||||
0xfb,0xfb,0xf7,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xbf,0xbf,0x7f,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xff,0xe7,0xf9,0xf7,
|
||||
0xfd,0xfa,0xff,0xfc,0xff,0xfc,0xff,0xff,0xfc,0xfe,0xe6,0xf0,0xff,0xfc,0xff,0xfc,
|
||||
0xc3,0x22,0x83,0x62,0x07,0x87,0xff,0xff,0x47,0x47,0x43,0x43,0x63,0x43,0x73,0x4b,
|
||||
0xd8,0x20,0x8d,0x72,0xfc,0xff,0xa1,0x7e,0xf8,0x27,0xe0,0xbf,0xe6,0xbf,0xe7,0xff,
|
||||
0x9f,0x98,0x6f,0xff,0x6f,0xef,0x6c,0xef,0x5c,0xdf,0x3e,0xdf,0x6d,0xef,0xef,0xef,
|
||||
0xfc,0xfb,0xfc,0xfb,0xff,0xff,0x79,0xff,0x7a,0xff,0xfb,0xff,0xfb,0xff,0xff,0xff,
|
||||
0x7e,0xfe,0x7e,0xfe,0xff,0xff,0x7f,0xff,0x7b,0xfb,0x62,0xf4,0xc2,0xc6,0xa0,0x86,
|
||||
0x3c,0x3c,0x0a,0x0e,0x7c,0x7d,0x7f,0x7f,0xc7,0x47,0xbf,0x9f,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xdf,0xff,0xef,0xaf,0xef,0xef,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0xff,0xdf,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xf7,0xff,0xff,0xe7,0xe7,0xff,0xef,0xff,0xef,0xff,0xef,0xff,
|
||||
0xff,0xfc,0xfd,0xfe,0xfd,0xfe,0xfd,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xf3,0x4b,0x7b,0xc3,0x7b,0xc3,0x7b,0xd3,0xf3,0x5b,0x7b,0xfb,0xfb,0xfb,0xff,0xff,
|
||||
0xf7,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xf5,0x6f,0xff,0xef,0xff,
|
||||
0xff,0xff,0xc9,0xc9,0xfb,0xf9,0xc9,0xcd,0xfd,0xfd,0xcf,0xcf,0xfe,0xff,0xc7,0xc7,
|
||||
0xfc,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfc,0xfc,0x79,0x78,0x14,0x14,0xa2,0x8a,
|
||||
0x80,0xa6,0x7f,0x33,0x55,0x3b,0x7e,0x39,0x3f,0x3c,0xff,0x1c,0x7f,0x6e,0x7f,0xbf,
|
||||
0xce,0x4e,0x24,0x20,0x91,0x99,0xdf,0xdf,0xcf,0x5f,0xed,0x7d,0xeb,0x3f,0x65,0x3f,
|
||||
0x5f,0x5f,0xbf,0xbf,0x7f,0x7f,0x7f,0x7f,0xff,0xff,0x77,0x7b,0xf7,0x7f,0xff,0x67,
|
||||
0xfe,0xff,0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x7f,0xff,0x7b,0xff,0xff,0xff,0xef,0xff,0xe7,0xff,0xef,0xff,0xef,0xff,0xed,0xf5,
|
||||
0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xff,0xfd,0xfd,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xe7,0xe7,0x63,0x1b,0xf3,0x8b,0xf3,0x8b,0xb3,0xcb,0xa3,0xdb,
|
||||
0xff,0xff,0xff,0xff,0xff,0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x7d,0xc5,0xbd,0xe5,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xc6,0xff,0xeb,0xf5,0xf5,0xfb,0xdf,0xef,0xef,0xf7,0xfd,0xf7,0xff,0xfd,0xff,0xff,
|
||||
0xdf,0x6f,0x0f,0xff,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,
|
||||
0xe9,0xf9,0xf8,0xf8,0xfc,0xfc,0xfe,0xfe,0xfc,0xfc,0xfc,0xfc,0xfb,0xf8,0xfb,0xfb,
|
||||
0xff,0xff,0xff,0xff,0xff,0x7f,0x3f,0x7f,0x5f,0x3f,0x3f,0x1f,0x1f,0x0f,0x0f,0x2f,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,
|
||||
0xff,0xff,0xfe,0xff,0xfd,0xff,0xfe,0xff,0xfe,0xff,0xfe,0xff,0xfe,0xff,0xff,0xff,
|
||||
0xdb,0xb7,0xbf,0xf7,0xbb,0xfb,0x3f,0xfb,0x3f,0xfb,0x7f,0xfb,0x7f,0xfb,0xff,0xfb,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc7,0xcf,0xc3,0xdd,0x82,0xbd,0xcf,0xc3,
|
||||
0xff,0xff,0xff,0xff,0x0f,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,
|
||||
0xfb,0xfb,0xff,0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xaf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,0xef,0xff,
|
||||
0xff,0xff,0x7f,0xff,0xff,0xff,0x7f,0xff,0x7f,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xfb,0xff,0xfb,0xfe,0xfa,0xfa,0xfa,0xff,0xff,0xff,0xff,0xff,0xe2,0xd6,0x9a,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,0x7f,0x7f,0xbf,0xbf,0x5f,0xdf,
|
||||
0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0x0f,0x01,0x16,0x11,0x3f,0x39,0xff,0xfd,0xff,0xff,0x9f,0xcf,0x37,0x0b,0x1f,0x27,
|
||||
0xff,0xff,0x7f,0xff,0xff,0xff,0xdf,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xef,0xff,0xef,0xff,0xef,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xbe,0xba,0xbf,0xbb,0xbf,0xbb,0xfe,0xfa,0xfe,0xfa,0xfe,0xfa,0xff,0xfb,0xff,0xfb,
|
||||
0xef,0xaf,0x6f,0x6f,0x7f,0x77,0xff,0xfb,0xef,0xeb,0x7d,0x5d,0x5a,0x5a,0x67,0x67,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0x7f,
|
||||
0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xfe,0xff,0xfe,0xff,
|
||||
0x0f,0x73,0x1f,0x6f,0x1f,0x7f,0x07,0x7f,0x7f,0x1f,0x7f,0xbf,0x3f,0xff,0x3f,0xff,
|
||||
0xff,0xff,0xe7,0xef,0xff,0xc7,0xa7,0xd7,0xb7,0x87,0xbb,0x77,0xff,0xff,0xff,0xff,
|
||||
0xef,0xff,0xf7,0x87,0x77,0xbe,0x85,0x66,0xad,0x74,0x1d,0x8b,0xff,0xff,0xff,0xff,
|
||||
0xf7,0xff,0x33,0x77,0xe6,0x33,0x3a,0xa2,0xa0,0x29,0xcf,0xa9,0xff,0xff,0xff,0xff,
|
||||
0xa1,0xff,0x6d,0x23,0x5f,0x2f,0xaf,0x43,0x4f,0x5f,0x47,0x43,0xff,0xff,0xff,0xff,
|
||||
0xcd,0xff,0x90,0xc5,0xd3,0xb4,0x86,0x86,0xb6,0xb6,0x06,0x8e,0xff,0xff,0xff,0xff,
|
||||
0xdf,0xff,0x9d,0xb9,0xb9,0x79,0xfa,0x79,0xf4,0xfa,0xfe,0xf2,0xff,0xff,0xff,0xff,
|
||||
0xdd,0xff,0x89,0xdd,0x9a,0x99,0xd9,0x16,0xa4,0x50,0xee,0x8e,0xff,0xff,0xff,0xff,
|
||||
0x80,0xff,0xea,0x84,0xff,0xce,0xee,0xde,0xde,0xde,0xdd,0xde,0xff,0xff,0xff,0xff,
|
||||
0x21,0xff,0xef,0x21,0x6f,0xee,0xce,0xe2,0xfe,0xce,0xe3,0xc2,0xff,0xff,0xff,0xff,
|
||||
0xbf,0xff,0x5f,0x0f,0x6f,0xef,0xcf,0xef,0xef,0xdf,0x3f,0x1e,0xff,0xfe,0xff,0xfd,
|
||||
0xff,0xff,0xbf,0xbf,0xbf,0xbf,0x6f,0x7f,0x77,0x7f,0xff,0xff,0xbf,0xff,0xff,0x7f
|
||||
};
|
||||
|
||||
|
||||
const unsigned char title_bg_map[360] = {
|
||||
0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x00,
|
||||
0x00,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x00,
|
||||
0x00,0x00,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0x34,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x33,0x57,0x00,0x00,0x00,0x00,
|
||||
0x00,0x58,0x59,0x5a,0x5b,0x00,0x00,0x5c,0x5d,0x5e,0x5f,0x60,0x61,0x62,0x00,0x00,0x00,0x00,0x00,0x63,
|
||||
0x00,0x00,0x64,0x65,0x00,0x00,0x00,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x00,0x00,0x00,0x00,0x00,0x6d,
|
||||
0x00,0x6e,0x6f,0x70,0x71,0x72,0x00,0x00,0x00,0x00,0x00,0x73,0x74,0x75,0x00,0x00,0x00,0x00,0x00,0x76,
|
||||
0x00,0x77,0x78,0x79,0x7a,0x7b,0x00,0x00,0x7c,0x7d,0x00,0x00,0x7e,0x00,0x7f,0x00,0x00,0x00,0x00,0x80,
|
||||
0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x00,0x8c,0x8d,0x8e,0x8f,0x00,0x00,0x00,0x90,
|
||||
0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x00,0x00,0x00,0x00,0x00,0x9a,0x9b,0x00,0x00,0x00,0x9c,
|
||||
0x00,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa6,
|
||||
0x00,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb1,
|
||||
0xb2,0xb3,0xb4,0x00,0xb5,0xb6,0xb7,0xb8,0xb9,0x00,0xba,0xbb,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xbc,
|
||||
0x00,0xbd,0xbe,0x00,0x00,0x00,0x00,0xbf,0xc0,0x00,0xc1,0xc2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc3,
|
||||
0xc4,0x00,0xc5,0xc6,0x00,0x00,0xc7,0xc8,0xc9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xca,
|
||||
0x00,0x00,0xcb,0xcc,0xcd,0x00,0xce,0xcf,0x00,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /title_bg.png -c /title_bg.c -map -bpp 2 -noflip -keep_palette_order -max_palettes 1
|
||||
|
||||
#ifndef METASPRITE_title_bg_H
|
||||
#define METASPRITE_title_bg_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
#define title_bg_TILE_ORIGIN 0
|
||||
#define title_bg_TILE_W 8
|
||||
#define title_bg_TILE_H 8
|
||||
#define title_bg_WIDTH 160
|
||||
#define title_bg_HEIGHT 144
|
||||
#define title_bg_TILE_COUNT 219
|
||||
#define title_bg_PALETTE_COUNT 1
|
||||
#define title_bg_COLORS_PER_PALETTE 4
|
||||
#define title_bg_TOTAL_COLORS 4
|
||||
#define title_bg_MAP_ATTRIBUTES 0
|
||||
extern const unsigned char title_bg_map[360];
|
||||
#define title_bg_map_attributes title_bg_map
|
||||
|
||||
BANKREF_EXTERN(title_bg)
|
||||
|
||||
extern const palette_color_t title_bg_palettes[4];
|
||||
extern const uint8_t title_bg_tiles[3504];
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,51 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /victory.png -c /victory.c -bpp 2 -noflip -keep_palette_order
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
BANKREF(victory)
|
||||
|
||||
const palette_color_t victory_palettes[32] = {
|
||||
RGB8(224,248,207), RGB8(134,192,108), RGB8( 48,104, 80), RGB8( 7, 24, 33),
|
||||
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),
|
||||
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),
|
||||
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),
|
||||
RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0), RGB8( 0, 0, 0)
|
||||
};
|
||||
|
||||
const uint8_t victory_tiles[224] = {
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x88,0xff,0x88,0xdd,0x88,0xdd,0x88,0xdd,
|
||||
0xc1,0xeb,0xc1,0xe3,0xe3,0xf7,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc3,0xff,0xc3,0xe7,0xe3,0xf7,0xe3,0xf7,
|
||||
0xe3,0xf7,0xe3,0xf7,0xc3,0xe7,0xc3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc3,0xff,0x81,0xc3,0x83,0xdf,0x8f,0xdf,
|
||||
0x8f,0xdf,0x83,0xdf,0x81,0xc3,0xc3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x81,0xff,0x80,0xc1,0xe3,0xf7,0xe3,0xf7,
|
||||
0xe3,0xf7,0xe3,0xf7,0xe3,0xf7,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc3,0xff,0x81,0xc3,0x81,0xdb,0x81,0xdb,
|
||||
0x81,0xdb,0x81,0xdb,0x81,0xc3,0xc3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x83,0xff,0x81,0xc3,0x81,0xdb,0x81,0xc3,
|
||||
0x81,0xdb,0x89,0xdb,0x89,0xdb,0x99,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
|
||||
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x99,0xff,0x88,0xdd,0xc1,0xeb,0xc1,0xe3,
|
||||
0xe3,0xf7,0xe3,0xf7,0xe3,0xf7,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
|
||||
};
|
||||
|
||||
const metasprite_t victory_metasprite0[] = {
|
||||
METASPR_ITEM(-8, -28, 0, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 2, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 4, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 6, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 8, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 10, S_PAL(0)),
|
||||
METASPR_ITEM(0, 8, 12, S_PAL(0)),
|
||||
METASPR_TERM
|
||||
};
|
||||
|
||||
const metasprite_t* const victory_metasprites[1] = {
|
||||
victory_metasprite0
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
//AUTOGENERATED FILE FROM png2asset
|
||||
// Conversion args: /victory.png -c /victory.c -bpp 2 -noflip -keep_palette_order
|
||||
|
||||
#ifndef METASPRITE_victory_H
|
||||
#define METASPRITE_victory_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gbdk/platform.h>
|
||||
#include <gbdk/metasprites.h>
|
||||
|
||||
#define victory_TILE_ORIGIN 0
|
||||
#define victory_TILE_W 8
|
||||
#define victory_TILE_H 16
|
||||
#define victory_WIDTH 56
|
||||
#define victory_HEIGHT 16
|
||||
#define victory_TILE_COUNT 14
|
||||
#define victory_PALETTE_COUNT 8
|
||||
#define victory_COLORS_PER_PALETTE 4
|
||||
#define victory_TOTAL_COLORS 32
|
||||
#define victory_PIVOT_X 28
|
||||
#define victory_PIVOT_Y 8
|
||||
#define victory_PIVOT_W 56
|
||||
#define victory_PIVOT_H 16
|
||||
extern const metasprite_t* const victory_metasprites[1];
|
||||
|
||||
BANKREF_EXTERN(victory)
|
||||
|
||||
extern const palette_color_t victory_palettes[32];
|
||||
extern const uint8_t victory_tiles[224];
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user