2022-03-23 15:38:29 +00:00
|
|
|
|
/// Shinki's 32×32 ball bullets
|
|
|
|
|
/// ---------------------------
|
|
|
|
|
|
2020-02-28 21:40:34 +00:00
|
|
|
|
#define B6BALL_COUNT 63
|
|
|
|
|
#define B6BALL_W 32
|
|
|
|
|
#define B6BALL_H 32
|
|
|
|
|
|
2022-03-23 15:38:29 +00:00
|
|
|
|
enum b6ball_flag_t {
|
|
|
|
|
B6BF_FREE = 0,
|
|
|
|
|
B6BF_CLOUD = 1,
|
|
|
|
|
B6BF_ALIVE = 2,
|
|
|
|
|
B6BF_DECAY = 3,
|
|
|
|
|
|
|
|
|
|
_b6ball_flag_t_FORCE_UINT8 = 0xFF
|
|
|
|
|
};
|
|
|
|
|
|
2020-02-28 21:40:34 +00:00
|
|
|
|
typedef struct {
|
2022-03-23 15:38:29 +00:00
|
|
|
|
b6ball_flag_t flag;
|
2022-04-20 21:12:59 +00:00
|
|
|
|
int8_t unused_1;
|
2021-06-30 14:30:06 +00:00
|
|
|
|
PlayfieldMotion pos;
|
2022-03-24 22:09:23 +00:00
|
|
|
|
unsigned int age; // unused and broken, because it's never reset
|
2020-02-28 21:40:34 +00:00
|
|
|
|
Subpixel cloud_radius;
|
|
|
|
|
int patnum_tiny;
|
|
|
|
|
int decay_frames;
|
2022-04-20 21:12:59 +00:00
|
|
|
|
int8_t unused_2[4];
|
2020-02-28 21:40:34 +00:00
|
|
|
|
} b6ball_t;
|
|
|
|
|
|
2022-04-20 21:12:59 +00:00
|
|
|
|
struct b6ball_template_t {
|
|
|
|
|
/* -------------------- */ int8_t _unused_1;
|
|
|
|
|
unsigned char angle;
|
|
|
|
|
PlayfieldPoint origin;
|
|
|
|
|
/* -------------------- */ int16_t _unused_2[6];
|
|
|
|
|
int patnum_tiny;
|
|
|
|
|
/* -------------------- */ int16_t _unused_3[2];
|
|
|
|
|
SubpixelLength8 speed;
|
|
|
|
|
};
|
|
|
|
|
|
2022-04-23 18:56:19 +00:00
|
|
|
|
// Supplements the actual load call from _DM05.TX2. It's understandable why
|
|
|
|
|
// you'd want to load these sprites as part of the dialog script (that's the
|
|
|
|
|
// best place to hide load times, after all), but tiny-format conversion should
|
|
|
|
|
// have really been part of the script commands as well, then.
|
|
|
|
|
#define b6balls_load() { \
|
|
|
|
|
for(int i = TINY_B6BALL_START; i < TINY_B6BALL_END; i++) { \
|
|
|
|
|
super_convert_tiny(i); \
|
|
|
|
|
} \
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-20 21:12:59 +00:00
|
|
|
|
#define b6ball_template ( \
|
|
|
|
|
reinterpret_cast<b6ball_template_t &>(custom_entities[0]) \
|
|
|
|
|
)
|
2020-02-28 21:40:34 +00:00
|
|
|
|
#define b6balls (reinterpret_cast<b6ball_t *>(&custom_entities[1]))
|
|
|
|
|
|
2022-04-20 21:12:59 +00:00
|
|
|
|
// Spawns a new ball bullet according to the [b6ball_template]. Reads all
|
|
|
|
|
// non-unused fields of the b6ball_template_t structure.
|
2022-03-23 15:38:29 +00:00
|
|
|
|
void near b6balls_add();
|
|
|
|
|
|
2022-03-24 22:09:23 +00:00
|
|
|
|
void near b6balls_update();
|