Skip to content

Commit a0c7f49

Browse files
committed
Moved the colors into a constants, getting sleepy
1 parent 629f86b commit a0c7f49

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

core/graphics/colors.constants.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// File for all of the colors for different GB Palletes
2+
3+
// Our default colors
4+
export class DefaultColor {
5+
// Obj 0
6+
static readonly obj0White: i32 = 0xf2f2f2;
7+
static readonly obj0LightGrey: i32 = 0xa0a0a0;
8+
static readonly obj0DarkGrey: i32 = 0x585858;
9+
static readonly obj0Black: i32 = 0x080808;
10+
11+
// Obj1
12+
static readonly obj1White: i32 = 0xf2f2f2;
13+
static readonly obj1LightGrey: i32 = 0xa0a0a0;
14+
static readonly obj1DarkGrey: i32 = 0x585858;
15+
static readonly obj1Black: i32 = 0x080808;
16+
17+
//Bg
18+
static readonly bgWhite: i32 = 0xf2f2f2;
19+
static readonly bgLightGrey: i32 = 0xa0a0a0;
20+
static readonly bgDarkGrey: i32 = 0x585858;
21+
static readonly bglack: i32 = 0x080808;
22+
}

core/graphics/colors.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
1-
// File for all of the colors for different GB Palletes
1+
// File for all of the logic of setting gameboy color plaettes
22

3-
// Our default colors
4-
class DefaultColor {
5-
// Obj 0
6-
static readonly obj0White: i32 = 0xf2f2f2;
7-
static readonly obj0LightGrey: i32 = 0xa0a0a0;
8-
static readonly obj0DarkGrey: i32 = 0x585858;
9-
static readonly obj0Black: i32 = 0x080808;
10-
11-
// Obj1
12-
static readonly obj1White: i32 = 0xf2f2f2;
13-
static readonly obj1LightGrey: i32 = 0xa0a0a0;
14-
static readonly obj1DarkGrey: i32 = 0x585858;
15-
static readonly obj1Black: i32 = 0x080808;
16-
17-
//Bg
18-
static readonly bgWhite: i32 = 0xf2f2f2;
19-
static readonly bgLightGrey: i32 = 0xa0a0a0;
20-
static readonly bgDarkGrey: i32 = 0x585858;
21-
static readonly bglack: i32 = 0x080808;
22-
}
3+
import { DefaultColor } from './colors.constants';
234

245
// Current / exported color
256
export class Color {

0 commit comments

Comments
 (0)