2021-10-05 09:49:52 +08:00
|
|
|
#include "Arm2D_common.h"
|
|
|
|
|
2022-09-07 01:14:27 +08:00
|
|
|
void Arm2D_BackGround___init__(PikaObj* self) {
|
2022-01-16 23:21:49 +08:00
|
|
|
obj_setStr(self, "color", "white");
|
2021-10-05 09:49:52 +08:00
|
|
|
}
|
|
|
|
|
2022-09-08 11:04:38 +08:00
|
|
|
int Arm2D_BackGround_getColor(PikaObj* self) {
|
|
|
|
return obj_getInt(self, "color");
|
2021-10-05 09:49:52 +08:00
|
|
|
}
|
|
|
|
|
2021-11-03 20:11:31 +08:00
|
|
|
void Arm2D_BackGround_update(PikaObj* self) {
|
2022-09-07 22:08:35 +08:00
|
|
|
void* target_tile = pika_arm2d_globals.pfb_tile_now;
|
2021-10-05 09:49:52 +08:00
|
|
|
|
2022-09-08 11:04:38 +08:00
|
|
|
int color = obj_getInt(self, "color");
|
|
|
|
uint16_t backGroundColor = 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
|
|
|
}
|
|
|
|
|
2022-09-08 11:04:38 +08:00
|
|
|
void Arm2D_BackGround_setColor(PikaObj* self, int color) {
|
|
|
|
obj_setInt(self, "color", color);
|
2021-10-05 09:49:52 +08:00
|
|
|
}
|