Quiero crear una intro personalizada para el pokemon fire red asi como la de Shiny Quagsire que viene el quagsire caminando y luego se queda quieto al lado del nombre, bueno aqui el codigo con las imagenes de pichu

Como pueden ver el pichu no tiene movimiento primero solo estaba probando cargar la sprite animada y esto es lo que consegui.

Codigo:
#include "headers/important.h"
#include "resourcers/Fondo.h"
#include "resourcers/Pichu.h"
const struct Frame pichu_run[] = {
{0 * FRAME_32x32, 10},
{1 * FRAME_32x32, 10},
{2 * FRAME_32x32, 10},
{3 * FRAME_32x32, 10},
{4 * FRAME_32x32, 10},
{FRAME_LOOP, 0}
};
const struct Frame pichu_feliz[] = {
{5 * FRAME_32x32, 10},
{6 * FRAME_32x32, 10},
{7 * FRAME_32x32, 10},
{FRAME_LOOP, 0}
};
const struct Frame pichu_fin[] = {
{8 * FRAME_32x32, 10},
{FRAME_END, 0}
};
const struct Frame* pichu_anim_table[] = {
pichu_run,
pichu_feliz,
pichu_fin,
};
const struct OamData pichu_oam = {
.x = 96,
.y = 96,
.affine_mode = 0,
.priority = 2,
.h_flip = 0,
.v_flip = 0,
.size = SIZE_32x32,
};
#define PICHU_ID 0
bool intro_main()
{
if (get_time() == 0) {
load_bg_pal(0, &fondo_pal, false);
load_bg_data(3, &fondo_img, &fondo_raw);
load_sprite(&pichu_oam, &pichu_img, PICHU_ID, 1, 10, pichu_anim_table);
}
if (key_down(KEY_A | KEY_B | KEY_START) || get_time() == 50 * SECOND)
{
return true;
}
inc_timer();
return false;
}

Como pueden ver el pichu no tiene movimiento primero solo estaba probando cargar la sprite animada y esto es lo que consegui.

Codigo:
#include "headers/important.h"
#include "resourcers/Fondo.h"
#include "resourcers/Pichu.h"
const struct Frame pichu_run[] = {
{0 * FRAME_32x32, 10},
{1 * FRAME_32x32, 10},
{2 * FRAME_32x32, 10},
{3 * FRAME_32x32, 10},
{4 * FRAME_32x32, 10},
{FRAME_LOOP, 0}
};
const struct Frame pichu_feliz[] = {
{5 * FRAME_32x32, 10},
{6 * FRAME_32x32, 10},
{7 * FRAME_32x32, 10},
{FRAME_LOOP, 0}
};
const struct Frame pichu_fin[] = {
{8 * FRAME_32x32, 10},
{FRAME_END, 0}
};
const struct Frame* pichu_anim_table[] = {
pichu_run,
pichu_feliz,
pichu_fin,
};
const struct OamData pichu_oam = {
.x = 96,
.y = 96,
.affine_mode = 0,
.priority = 2,
.h_flip = 0,
.v_flip = 0,
.size = SIZE_32x32,
};
#define PICHU_ID 0
bool intro_main()
{
if (get_time() == 0) {
load_bg_pal(0, &fondo_pal, false);
load_bg_data(3, &fondo_img, &fondo_raw);
load_sprite(&pichu_oam, &pichu_img, PICHU_ID, 1, 10, pichu_anim_table);
}
if (key_down(KEY_A | KEY_B | KEY_START) || get_time() == 50 * SECOND)
{
return true;
}
inc_timer();
return false;
}
Última edición: