All files / skin-lr2/src/ids bar.ts

100% Statements 4/4
100% Branches 0/0
100% Functions 0/0
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68      109x                                                     109x                                 109x                                     109x  
import type { LR2BarBodyKind, LR2BarLampKind } from '../skin.ts';
 
/** LR2's select bar bodies: which bar a `#SRC_BAR_BODY` draws (its index column). */
export const LR2_BAR_BODY = {
  /** A song. */
  SONG: 0,
  /** A folder. */
  FOLDER: 1,
  /** A custom folder. */
  CUSTOM_FOLDER: 2,
  /** The new-songs folder. */
  NEW_SONG_FOLDER: 3,
  /** A rival's folder. */
  RIVAL_FOLDER: 4,
  /** A song in rival mode. */
  RIVAL_SONG: 5,
  /** A folder of courses. */
  COURSE_FOLDER: 6,
  /** The NEW COURSE bar, which starts making a course. */
  COURSE_CREATE: 7,
  /** A course. */
  COURSE: 8,
  /** LR2's RANDOM MIX bar, which draws a course; Be-Music also draws a beatoraja random course with it. */
  RANDOM_COURSE: 9,
} as const;
 
/** One of LR2's bar bodies ({@link LR2_BAR_BODY}). */
export type LR2BarBody = (typeof LR2_BAR_BODY)[keyof typeof LR2_BAR_BODY];
 
/** The parsed kind of each bar body, by its {@link LR2_BAR_BODY} index. */
export const LR2_BAR_BODY_KINDS: readonly LR2BarBodyKind[] = [
  'song',
  'folder',
  'customFolder',
  'newSongFolder',
  'rivalFolder',
  'rivalSong',
  'courseFolder',
  'courseCreate',
  'course',
  'randomCourse',
];
 
/**
 * LR2's clear lamps as a `#SRC_BAR_LAMP` draws them (its index column). The select lamp ops follow the same order
 * (`LR2_OP.LAMP_NO_PLAY + index`).
 */
export const LR2_BAR_LAMP = {
  /** NO PLAY. */
  NO_PLAY: 0,
  /** FAILED. */
  FAILED: 1,
  /** EASY CLEAR (Be-Music's ASSIST EASY and EASY). */
  EASY: 2,
  /** CLEAR (Be-Music's NORMAL). */
  CLEAR: 3,
  /** HARD CLEAR (Be-Music's HARD and EX HARD). */
  HARD: 4,
  /** FULL COMBO (Be-Music's FULL COMBO, PERFECT and MAX). */
  FULL_COMBO: 5,
} as const;
 
/** One of LR2's bar lamps ({@link LR2_BAR_LAMP}). */
export type LR2BarLamp = (typeof LR2_BAR_LAMP)[keyof typeof LR2_BAR_LAMP];
 
/** The parsed kind of each bar lamp, by its {@link LR2_BAR_LAMP} index. */
export const LR2_BAR_LAMP_KINDS: readonly LR2BarLampKind[] = ['noplay', 'failed', 'easy', 'clear', 'hard', 'fullcombo'];