mirror of
https://github.com/risingPhil/libpokemegb.git
synced 2026-04-09 10:44:47 -05:00
Note: for Korean games, specifically, I did not implement the Korean character set (nor do I plan to) The reason is that it is entirely different and more complex to implement than the other character sets. I'm not personally invested nor interested enough to go through the hassle. This affects the pokémon names that will be displayed when using libpokemegb. Instead as a fallback, it will return "poke-<number>" for these roms. Feel free to contribute proper Korean character set (and pokémon names) support!
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
#ifndef _GEN2ICONDECODER_H
|
|
#define _GEN2ICONDECODER_H
|
|
|
|
#include "gen2/Gen2Common.h"
|
|
#include "gen2/Gen2Localization.h"
|
|
|
|
#define GEN2_TILE_BITS_PER_PIXEL 2
|
|
#define GEN2_BYTES_PER_TILE 16
|
|
#define GEN2_ICON_WIDTH_IN_TILES 2
|
|
#define GEN2_ICON_HEIGHT_IN_TILES 2
|
|
#define GEN2_ICON_NUM_BYTES GEN2_BYTES_PER_TILE * 4
|
|
|
|
class IRomReader;
|
|
|
|
/**
|
|
* @brief This class is responsible for decoding pokemon party menu icons for Gen 2 games
|
|
*/
|
|
class Gen2IconDecoder
|
|
{
|
|
public:
|
|
Gen2IconDecoder(IRomReader& romReader, Gen2GameType gameType);
|
|
|
|
/**
|
|
* @brief Decodes the specified icon type. either frame 1 or frame 2.
|
|
* This function returns a buffer containing gameboy tiles.
|
|
*
|
|
* The result is supposed to be fed to an instance of the SpriteRenderer class to convert it into an actual usable format
|
|
*
|
|
* @return Internal buffer containing the icon tiles in vertical tile order.
|
|
*/
|
|
uint8_t* decode(Gen2LocalizationLanguage language, Gen2PokemonIconType iconType, bool firstFrame);
|
|
protected:
|
|
private:
|
|
uint8_t buffer_[GEN2_ICON_NUM_BYTES];
|
|
IRomReader& romReader_;
|
|
Gen2GameType gameType_;
|
|
};
|
|
|
|
#endif |