2020-07-23 19:20:24 +00:00
|
|
|
#include "th01/common.h"
|
2020-07-15 11:05:13 +00:00
|
|
|
#include "th01/score.h"
|
|
|
|
|
|
|
|
#define last_for_quarters(base, quarters) \
|
|
|
|
((base + ((quarters + 3) / 4)) - 1)
|
|
|
|
|
2020-07-16 19:28:52 +00:00
|
|
|
static const int CARDCOMBO_DIGITS = 2;
|
2020-11-25 20:09:47 +00:00
|
|
|
static const int PORTAL_ANIM_CELS = 2;
|
2021-10-01 19:57:33 +00:00
|
|
|
static const int TIMER_DIGITS = 4;
|
2020-07-16 19:28:52 +00:00
|
|
|
|
2021-10-10 10:37:14 +00:00
|
|
|
static const int DASH_CELS = 2;
|
|
|
|
|
2020-07-15 11:05:13 +00:00
|
|
|
typedef enum {
|
2020-07-22 12:32:29 +00:00
|
|
|
PTN_SLOT_STG = 0, // stg(_b).ptn
|
|
|
|
PTN_SLOT_MIKO = 1, // miko.ptn
|
2021-08-19 19:08:47 +00:00
|
|
|
PTN_SLOT_BG_BOSS = 2, // Backgrounds behind animated boss entities
|
2020-07-15 11:05:13 +00:00
|
|
|
PTN_SLOT_BG_HUD = 5,
|
2020-07-22 12:32:29 +00:00
|
|
|
PTN_SLOT_NUMB = 7, // numb.ptn
|
2020-07-15 11:05:13 +00:00
|
|
|
} main_ptn_slot_t;
|
|
|
|
|
|
|
|
typedef enum {
|
2020-07-22 12:32:29 +00:00
|
|
|
// stg(_b).ptn
|
|
|
|
// -----------
|
|
|
|
PTN_HUD = PTN_ID(PTN_SLOT_STG, 0),
|
|
|
|
PTN_SHOT,
|
|
|
|
PTN_BLAST, // ???
|
|
|
|
PTN_ORB,
|
2020-11-25 20:09:47 +00:00
|
|
|
|
|
|
|
PTN_CARD_UNUSED = 7,
|
|
|
|
PTN_CARD_3HP, PTN_CARD_3HP_HALF, PTN_CARD_3HP_EDGE,
|
|
|
|
PTN_CARD_2HP, PTN_CARD_2HP_HALF, PTN_CARD_2HP_EDGE,
|
|
|
|
PTN_CARD_1HP, PTN_CARD_1HP_HALF, PTN_CARD_1HP_EDGE,
|
|
|
|
PTN_CARD_0HP, PTN_CARD_0HP_HALF, PTN_CARD_0HP_EDGE,
|
|
|
|
PTN_CARD_REMOVED_HALF,
|
|
|
|
PTN_CARD_REMOVED,
|
|
|
|
|
|
|
|
PTN_BUMPER,
|
|
|
|
PTN_TURRET,
|
|
|
|
PTN_TURRET_FIRING,
|
|
|
|
PTN_BAR_TOP,
|
|
|
|
PTN_BAR_LEFT,
|
|
|
|
PTN_BAR_BOTTOM,
|
|
|
|
PTN_BAR_RIGHT,
|
|
|
|
PTN_PORTAL,
|
|
|
|
PTN_PORTAL_ANIM,
|
|
|
|
PTN_PORTAL_ANIM_last = (PTN_PORTAL_ANIM + (PORTAL_ANIM_CELS - 1)),
|
2021-09-18 12:25:15 +00:00
|
|
|
|
|
|
|
PTN_ITEM_BOMB,
|
2021-09-22 10:02:12 +00:00
|
|
|
PTN_ITEM_POINT,
|
2020-07-22 12:32:29 +00:00
|
|
|
// -----------
|
|
|
|
|
2021-10-10 10:37:14 +00:00
|
|
|
// miko.ptn
|
|
|
|
// --------
|
|
|
|
// Facing left
|
|
|
|
PTN_MIKO_L = PTN_ID(PTN_SLOT_MIKO, 0),
|
|
|
|
PTN_MIKO_L_DASH,
|
|
|
|
PTN_MIKO_L_DASH_last = (PTN_MIKO_L_DASH + DASH_CELS - 1),
|
|
|
|
PTN_MIKO_L_CAST,
|
|
|
|
PTN_MIKO_L_DASH_SHOOT,
|
2021-10-15 20:52:22 +00:00
|
|
|
PTN_MIKO_L_DASH_SHOOT_last = (PTN_MIKO_L_DASH_SHOOT + DASH_CELS - 1),
|
2021-10-10 10:37:14 +00:00
|
|
|
// Facing right
|
|
|
|
PTN_MIKO_R = PTN_ID(PTN_SLOT_MIKO, 10),
|
|
|
|
PTN_MIKO_R_DASH,
|
|
|
|
PTN_MIKO_R_DASH_last = (PTN_MIKO_R_DASH + DASH_CELS - 1),
|
|
|
|
PTN_MIKO_R_CAST,
|
|
|
|
PTN_MIKO_R_DASH_SHOOT,
|
2021-10-15 20:52:22 +00:00
|
|
|
PTN_MIKO_R_DASH_SHOOT_last = (PTN_MIKO_R_DASH_SHOOT + DASH_CELS - 1),
|
2021-10-10 10:37:14 +00:00
|
|
|
// --------
|
|
|
|
|
2020-07-15 11:05:13 +00:00
|
|
|
// HUD (snapped backgrounds)
|
|
|
|
// -------------------------
|
2020-07-23 19:20:24 +00:00
|
|
|
// The usage code doesn't really cap either of these, though...
|
|
|
|
PTN_BG_LIVES = PTN_ID(PTN_SLOT_BG_HUD, 0),
|
|
|
|
PTN_BG_LIVES_last = last_for_quarters(PTN_BG_LIVES, LIVES_MAX),
|
2020-07-26 12:59:40 +00:00
|
|
|
PTN_BG_STAGE,
|
2021-05-07 19:21:15 +00:00
|
|
|
PTN_BG_STAGE_last, // But the original game only need a single quarter?
|
2020-07-26 12:59:40 +00:00
|
|
|
PTN_BG_BOMBS,
|
2020-07-23 19:20:24 +00:00
|
|
|
PTN_BG_BOMBS_last = last_for_quarters(PTN_BG_BOMBS, BOMBS_MAX),
|
|
|
|
|
|
|
|
PTN_BG_CUR_SCORE,
|
2020-07-17 11:14:54 +00:00
|
|
|
PTN_BG_CUR_SCORE_last = last_for_quarters(PTN_BG_CUR_SCORE, SCORE_DIGITS),
|
|
|
|
PTN_BG_CUR_CARDCOMBO,
|
|
|
|
|
2020-07-15 11:05:13 +00:00
|
|
|
PTN_BG_MAX_SCORE = PTN_ID(PTN_SLOT_BG_HUD, 10),
|
|
|
|
PTN_BG_MAX_SCORE_last = last_for_quarters(PTN_BG_MAX_SCORE, SCORE_DIGITS),
|
2020-07-16 19:28:52 +00:00
|
|
|
PTN_BG_MAX_CARDCOMBO,
|
2020-12-09 20:42:10 +00:00
|
|
|
|
2021-10-01 19:57:33 +00:00
|
|
|
PTN_BG_TIMER,
|
|
|
|
PTN_BG_TIMER_last = last_for_quarters(PTN_BG_TIMER, (TIMER_DIGITS / 2)),
|
|
|
|
|
|
|
|
PTN_BG_HP,
|
2020-07-15 11:05:13 +00:00
|
|
|
// -------------------------
|
|
|
|
} main_ptn_id_t;
|