All files / client magicNumbers.js

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

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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95      149x 149x 149x 149x   149x 149x 149x 149x 149x   149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x 149x   149x   149x                                                                                            
/* ≈ Magic Numbers ≈ shared application constants */
 
// Fonts
const DEFAULT_FONT = 'CP437 8x16';
const DEFAULT_FONT_WIDTH = 8;
const DEFAULT_FONT_HEIGHT = 16;
const NFO_FONT = 'Topaz-437 8x16';
// ANSI & XBIN files
const COLOR_WHITE = 7;
const COLOR_BLACK = 0;
const DEFAULT_FOREGROUND = 7;
const DEFAULT_BACKGROUND = 0;
const BLANK_CELL = (32 << 8) + 7;
// CP437 Characters
const LIGHT_BLOCK = 176; // ░
const MEDIUM_BLOCK = 177; // ▒
const DARK_BLOCK = 178; // ▓
const FULL_BLOCK = 219; // █
const UPPER_HALFBLOCK = 220; // ▀
const LOWER_HALFBLOCK = 223; // ▄
const LEFT_HALFBLOCK = 221; // ▌
const RIGHT_HALFBLOCK = 222; // ▐
const MIDDLE_BLOCK = 254; // ■
const MIDDLE_DOT = 249; // ·
const CHAR_BELL = 7; // (BEL)
const CHAR_NULL = 0; // (NUL)
const CHAR_SPACE = 32; // ( )
const CHAR_NBSP = 255; // ()
const CHAR_SLASH = 47; // /
const CHAR_PIPE = 124; // |
const CHAR_CAPITAL_X = 88; // X
const CHAR_RIGHT_PARENTHESIS = 41; // )
const CHAR_LEFT_PARENTHESIS = 40; // (
const CHAR_RIGHT_SQUARE_BRACKET = 93; // ]
const CHAR_LEFT_SQUARE_BRACKET = 91; // [
const CHAR_RIGHT_CURLY_BRACE = 125; // }
const CHAR_LEFT_CURLY_BRACE = 123; // {
const CHAR_BACKSLASH = 92; // \
const CHAR_FORWARD_SLASH = 47; // /
const CHAR_APOSTROPHE = 39; // '
const CHAR_GRAVE_ACCENT = 96; // `
const CHAR_GREATER_THAN = 62; // >
const CHAR_LESS_THAN = 60; // <
const CHAR_CAPITAL_P = 80; // P
const CHAR_DIGIT_9 = 57; // 9
// Browser clipboard limiter
const MAX_COPY_LINES = 3;
// Multiplier to calculate panel width
const PANEL_WIDTH_MULTIPLIER = 20;
 
export default {
	DEFAULT_FONT,
	DEFAULT_FONT_WIDTH,
	DEFAULT_FONT_HEIGHT,
	NFO_FONT,
	COLOR_WHITE,
	COLOR_BLACK,
	DEFAULT_FOREGROUND,
	DEFAULT_BACKGROUND,
	BLANK_CELL,
	LIGHT_BLOCK,
	MEDIUM_BLOCK,
	DARK_BLOCK,
	FULL_BLOCK,
	LOWER_HALFBLOCK,
	UPPER_HALFBLOCK,
	LEFT_HALFBLOCK,
	RIGHT_HALFBLOCK,
	MIDDLE_BLOCK,
	MIDDLE_DOT,
	CHAR_BELL,
	CHAR_NULL,
	CHAR_NBSP,
	CHAR_SPACE,
	CHAR_SLASH,
	CHAR_PIPE,
	CHAR_CAPITAL_X,
	CHAR_RIGHT_PARENTHESIS,
	CHAR_LEFT_PARENTHESIS,
	CHAR_RIGHT_SQUARE_BRACKET,
	CHAR_LEFT_SQUARE_BRACKET,
	CHAR_RIGHT_CURLY_BRACE,
	CHAR_LEFT_CURLY_BRACE,
	CHAR_BACKSLASH,
	CHAR_FORWARD_SLASH,
	CHAR_APOSTROPHE,
	CHAR_GRAVE_ACCENT,
	CHAR_GREATER_THAN,
	CHAR_LESS_THAN,
	CHAR_CAPITAL_P,
	CHAR_DIGIT_9,
	MAX_COPY_LINES,
	PANEL_WIDTH_MULTIPLIER,
};