mirror of
https://github.com/GearsProgress/Poke_Transporter_GB.git
synced 2026-08-22 08:45:16 -05:00
Adding support for Yellow and fixing other bugs
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <cstring>
|
||||
|
||||
#include "sprite_data.h"
|
||||
#include "text_engine.h"
|
||||
|
||||
#define CBB 0
|
||||
#define SBB 24
|
||||
@@ -14,4 +15,30 @@ void background_frame()
|
||||
|
||||
REG_BG0HOFS = x;
|
||||
REG_BG0VOFS = y;
|
||||
}
|
||||
|
||||
void set_textbox_large()
|
||||
{
|
||||
tte_set_pos(40, 24);
|
||||
tte_set_margins(40, 24, 206, 104);
|
||||
tte_erase_rect(0, 0, H_MAX, V_MAX);
|
||||
REG_BG2VOFS = 0;
|
||||
}
|
||||
void set_textbox_small()
|
||||
{
|
||||
tte_set_margins(LEFT, TOP, RIGHT, BOTTOM);
|
||||
tte_erase_rect(0, 0, H_MAX, V_MAX);
|
||||
REG_BG2VOFS = 96;
|
||||
}
|
||||
|
||||
void show_textbox()
|
||||
{
|
||||
REG_BG0CNT = (REG_BG0CNT & ~BG_PRIO_MASK) | BG_PRIO(3);
|
||||
REG_BG2CNT = (REG_BG2CNT & ~BG_PRIO_MASK) | BG_PRIO(2);
|
||||
}
|
||||
|
||||
void hide_textbox()
|
||||
{
|
||||
REG_BG0CNT = (REG_BG0CNT & ~BG_PRIO_MASK) | BG_PRIO(2);
|
||||
REG_BG2CNT = (REG_BG2CNT & ~BG_PRIO_MASK) | BG_PRIO(3);
|
||||
}
|
||||
Reference in New Issue
Block a user