pokemon/graphic.hpp
Zack Buhman abe7bde678 graphic: display nearly-complete stats page #1
Type is not displayed because the type names have no
parsers/generators yet.
2023-08-04 03:28:17 +00:00

43 lines
1.3 KiB
C++

#pragma once
#include "coordinates.hpp"
#include "start_size.hpp"
#include "render_map.hpp" // for cell_offset
#include "vdp2.h"
#include "pokemon_instance.hpp"
static inline void put_char(const uint32_t base_pattern,
const int32_t x, const int32_t y, // in cells
const uint8_t c)
{
const int32_t ix = (0x2000 / 2)
+ ((cell_offset::y + y) * 64 + (cell_offset::x + x));
vdp2.vram.u16[ix] = ((base_pattern + c) & 0xfff) | PATTERN_NAME_TABLE_1WORD__PALETTE(1);
}
void draw_text(const uint32_t base_pattern,
const uint8_t * text,
const int32_t x, const int32_t y);
void draw_box_border(const uint32_t base_pattern,
const screen_cell_t& top_left, const screen_cell_t& bottom_right);
void draw_box_background(const uint32_t base_pattern,
const screen_cell_t& top_left, const screen_cell_t& bottom_right);
void draw_battle_border(const uint32_t base_pattern,
const screen_cell_t& top_corner, const screen_cell_t& bottom_corner);
void draw_stats1(const uint32_t base_pattern,
const pokemon_instance_t& pokemon_instance);
struct dialog_t
{
static constexpr screen_cell_t top_left = { 0, 12};
static constexpr screen_cell_t bottom_right = {19, 17};
static void draw(const uint32_t base_pattern,
const start_size_t& text);
};