2021-10-05 09:49:52 +08:00
|
|
|
#include "Arm2D_common.h"
|
|
|
|
|
|
|
|
void Arm2D_BackGround_init(PikaObj *self)
|
|
|
|
{
|
|
|
|
obj_setStr(self, "color", "white");
|
|
|
|
}
|
|
|
|
|
|
|
|
char *Arm2D_BackGround_getColor(PikaObj *self)
|
|
|
|
{
|
|
|
|
return obj_getStr(self, "color");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-11-02 22:58:30 +08:00
|
|
|
void Arm2D_BackGround_update(PikaObj *self)
|
2021-10-05 09:49:52 +08:00
|
|
|
{
|
2021-11-02 22:58:30 +08:00
|
|
|
void *target_tile = pika_arm2d_window.pfb_tile_now;
|
|
|
|
|
2021-10-05 09:49:52 +08:00
|
|
|
char *color = obj_getStr(self, "color");
|
|
|
|
uint16_t backGroundColor = getColorCode(color);
|
2021-11-02 22:58:30 +08:00
|
|
|
arm_2d_rgb16_fill_colour(target_tile, NULL, backGroundColor);
|
2021-10-05 09:49:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void Arm2D_BackGround_setColor(PikaObj *self, char *color)
|
|
|
|
{
|
|
|
|
obj_setStr(self, "color", color);
|
|
|
|
}
|