mirror of https://github.com/nmlgc/ReC98.git
[Maintenance] [th01] Better distinguish boss "entities" from "other sprites"
Part of P0174, funded by Ember2528.
This commit is contained in:
parent
e1de05288b
commit
e4343b2c95
|
@ -71,19 +71,21 @@ enum anim_cel_t {
|
|||
#define ent_still boss_entities[0]
|
||||
#define ent_anim boss_entities[1]
|
||||
|
||||
static inline void ent_free(void) {
|
||||
bos_entity_free(0);
|
||||
bos_entity_free(1);
|
||||
}
|
||||
// --------
|
||||
|
||||
// .PTN
|
||||
// ----
|
||||
|
||||
static const main_ptn_slot_t PTN_SLOT_BG_ENT = PTN_SLOT_BOSS_1;
|
||||
static const main_ptn_slot_t PTN_SLOT_MISSILE = PTN_SLOT_BOSS_2;
|
||||
|
||||
// Three unused background .PTN IDs, for three unused 32×32 animations?
|
||||
static const int BG_ENT_OFFSET = 3;
|
||||
|
||||
static inline void ent_free(void) {
|
||||
bos_entity_free(0);
|
||||
bos_entity_free(1);
|
||||
ptn_free(PTN_SLOT_BG_ENT);
|
||||
ptn_free(PTN_SLOT_MISSILE);
|
||||
}
|
||||
// --------
|
||||
// ----
|
||||
|
||||
void mima_load(void)
|
||||
{
|
||||
|
@ -309,6 +311,8 @@ void mima_setup(void)
|
|||
void mima_free(void)
|
||||
{
|
||||
ent_free();
|
||||
ptn_free(PTN_SLOT_BG_ENT);
|
||||
ptn_free(PTN_SLOT_MISSILE);
|
||||
}
|
||||
|
||||
#define select_for_rank mima_select_for_rank
|
||||
|
|
|
@ -17,8 +17,8 @@ extern bool16 invincible;
|
|||
extern int invincibility_frame;
|
||||
extern bool initial_hp_rendered;
|
||||
|
||||
// Entities
|
||||
// --------
|
||||
// .PTN
|
||||
// ----
|
||||
|
||||
static const main_ptn_slot_t PTN_SLOT_MISSILE = PTN_SLOT_BOSS_1;
|
||||
// --------
|
||||
// ----
|
||||
|
|
|
@ -17,11 +17,11 @@ extern bool16 invincible;
|
|||
extern int invincibility_frame;
|
||||
extern bool initial_hp_rendered;
|
||||
|
||||
// Entities (and animations)
|
||||
// --------
|
||||
// .PTN
|
||||
// ----
|
||||
|
||||
static const main_ptn_slot_t PTN_SLOT_WAVE = PTN_SLOT_BOSS_1;
|
||||
// --------
|
||||
// ----
|
||||
|
||||
#define select_for_rank kikuri_select_for_rank
|
||||
#include "th01/main/select_r.cpp"
|
||||
|
|
|
@ -80,19 +80,20 @@ inline void ent_attack_sync_with_still_or_wave(void) {
|
|||
);
|
||||
}
|
||||
|
||||
static const main_ptn_slot_t PTN_SLOT_BG_ENT = PTN_SLOT_BOSS_1;
|
||||
static const main_ptn_slot_t PTN_SLOT_MISSILE = PTN_SLOT_BOSS_2;
|
||||
|
||||
static inline void ent_free(void) {
|
||||
bos_entity_free(0);
|
||||
bos_entity_free(1);
|
||||
bos_entity_free(2);
|
||||
grc_free(GRC_SLOT_BOSS_1);
|
||||
ptn_free(PTN_SLOT_BG_ENT);
|
||||
ptn_free(PTN_SLOT_MISSILE);
|
||||
}
|
||||
// --------
|
||||
|
||||
// .PTN
|
||||
// ----
|
||||
|
||||
static const main_ptn_slot_t PTN_SLOT_BG_ENT = PTN_SLOT_BOSS_1;
|
||||
static const main_ptn_slot_t PTN_SLOT_MISSILE = PTN_SLOT_BOSS_2;
|
||||
// ----
|
||||
|
||||
#define bg_func_init(left, top, entity_src) { \
|
||||
ent_attack_sync_with_still_or_wave(); \
|
||||
if(entity_src == 1) { \
|
||||
|
@ -197,6 +198,9 @@ void elis_setup(void)
|
|||
void elis_free(void)
|
||||
{
|
||||
ent_free();
|
||||
grc_free(GRC_SLOT_BOSS_1);
|
||||
ptn_free(PTN_SLOT_BG_ENT);
|
||||
ptn_free(PTN_SLOT_MISSILE);
|
||||
}
|
||||
|
||||
bool16 wave_teleport(screen_x_t target_left, screen_y_t target_top)
|
||||
|
|
|
@ -57,13 +57,17 @@ extern bool initial_hp_rendered;
|
|||
// Entities (and animations)
|
||||
// --------
|
||||
|
||||
static const main_ptn_slot_t PTN_SLOT_BG_ENT = PTN_SLOT_BOSS_1;
|
||||
|
||||
#define ent_shield boss_entities[0]
|
||||
#define anm_dress boss_anims[0]
|
||||
#define anm_wand boss_anims[1]
|
||||
// --------
|
||||
|
||||
// .PTN
|
||||
// ----
|
||||
|
||||
static const main_ptn_slot_t PTN_SLOT_BG_ENT = PTN_SLOT_BOSS_1;
|
||||
// ----
|
||||
|
||||
// File names
|
||||
// ----------
|
||||
|
||||
|
|
Loading…
Reference in New Issue