2021-10-05 09:49:52 +08:00
|
|
|
#ifndef __ARM_2D__COMMON_H
|
|
|
|
#define __ARM_2D__COMMON_H
|
|
|
|
|
2021-11-03 20:11:31 +08:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include "Arm2D_Box.h"
|
|
|
|
#include "BaseObj.h"
|
2021-10-05 09:49:52 +08:00
|
|
|
#include "arm_2d.h"
|
|
|
|
#include "arm_2d_helper.h"
|
2021-11-03 20:11:31 +08:00
|
|
|
#include "dataStrs.h"
|
2021-10-05 09:49:52 +08:00
|
|
|
#include "lcd_printf.h"
|
|
|
|
#include "pikaScript.h"
|
2021-11-02 22:58:30 +08:00
|
|
|
|
|
|
|
#ifndef ARM2DQEMUBOOTER_APP_ARM2D_H_
|
|
|
|
#define APPLICATIONS_APP_ARM2D_H_
|
|
|
|
|
|
|
|
typedef struct pika_arm2d_window_t_ {
|
2021-11-03 20:11:31 +08:00
|
|
|
arm_2d_tile_t* pfb_tile_now;
|
|
|
|
bool pfb_is_new_frame;
|
|
|
|
PikaObj* pika_windows_object;
|
|
|
|
PikaObj* pika_background_object;
|
|
|
|
PikaObj* pika_elems_object;
|
2021-11-02 22:58:30 +08:00
|
|
|
} pika_arm2d_window_t;
|
|
|
|
|
|
|
|
extern pika_arm2d_window_t pika_arm2d_window;
|
|
|
|
|
|
|
|
/* GLCD RGB color definitions */
|
2021-11-03 20:11:31 +08:00
|
|
|
#define GLCD_COLOR_BLACK 0x0000 /* 0, 0, 0 */
|
|
|
|
#define GLCD_COLOR_NAVY 0x000F /* 0, 0, 128 */
|
|
|
|
#define GLCD_COLOR_DARK_GREEN 0x03E0 /* 0, 128, 0 */
|
|
|
|
#define GLCD_COLOR_DARK_CYAN 0x03EF /* 0, 128, 128 */
|
|
|
|
#define GLCD_COLOR_MAROON 0x7800 /* 128, 0, 0 */
|
|
|
|
#define GLCD_COLOR_PURPLE 0x780F /* 128, 0, 128 */
|
|
|
|
#define GLCD_COLOR_OLIVE 0x7BE0 /* 128, 128, 0 */
|
|
|
|
#define GLCD_COLOR_LIGHT_GREY 0xC618 /* 192, 192, 192 */
|
|
|
|
#define GLCD_COLOR_DARK_GREY 0x7BEF /* 128, 128, 128 */
|
|
|
|
#define GLCD_COLOR_BLUE 0x001F /* 0, 0, 255 */
|
|
|
|
#define GLCD_COLOR_GREEN 0x07E0 /* 0, 255, 0 */
|
|
|
|
#define GLCD_COLOR_CYAN 0x07FF /* 0, 255, 255 */
|
|
|
|
#define GLCD_COLOR_RED 0xF800 /* 255, 0, 0 */
|
|
|
|
#define GLCD_COLOR_MAGENTA 0xF81F /* 255, 0, 255 */
|
|
|
|
#define GLCD_COLOR_YELLOW 0xFFE0 /* 255, 255, 0 */
|
|
|
|
#define GLCD_COLOR_WHITE 0xFFFF /* 255, 255, 255 */
|
2021-11-02 22:58:30 +08:00
|
|
|
|
|
|
|
void pika_arm2d_init(void);
|
|
|
|
void pika_arm2d_update();
|
|
|
|
|
|
|
|
#endif /* ARM2DQEMUBOOTER_APP_ARM2D_H_ */
|
2021-10-05 09:49:52 +08:00
|
|
|
|
2021-11-03 20:11:31 +08:00
|
|
|
uint16_t getColorCode(char* colorName);
|
2021-11-02 22:58:30 +08:00
|
|
|
typedef struct {
|
2021-11-03 20:11:31 +08:00
|
|
|
arm_2d_op_rotate_t tOP;
|
|
|
|
const arm_2d_tile_t* ptTile;
|
|
|
|
float fAngle;
|
|
|
|
float fAngleSpeed;
|
|
|
|
arm_2d_location_t tCentre;
|
|
|
|
arm_2d_region_t tRegion;
|
2021-10-05 09:49:52 +08:00
|
|
|
} rotate_tile_t;
|
|
|
|
|
2021-11-02 22:58:30 +08:00
|
|
|
#endif
|