Ejemplo n.º 1
0
void
init(void)
{
	CORE->palette.colors[PC_TRANSPARENT] = color_make(0x00, 0x00, 0x00, 0x00);
	CORE->palette.colors[PC_TRUE_BLACK]  = color_make(0x00, 0x00, 0x00, 0xff);
	set_palette_set(PS_WHITE); // IMPORTANT NOTE(bill): This must be white as the spritesheet is white

	CORE->palette.colors_count = PC_COUNT;
	canvas_clear(1);

	bitmap_load_resource(&spritesheet, "spritesheet.png");
	bitmap_load_resource(&title_screen, "title_screen.png");

	bitmap_load_resource(&font.bitmap, "font.png");
	font.char_width = 4;
	font.char_height = 7;


	CORE->font = &font;

	init_game();

#if 0
	set_palette_set(PS_WHITE);
#endif
}
Ejemplo n.º 2
0
void test_text(Screen* screen) {
	fill_screen(screen, color_make(2, 0, 0));
	Font* font = setup_font();

	char* str = "Lorem ipsum dolor sit amet consectetur apipiscing elit Donex purus arcu suscipit ed felis eu blandit blandit quam Donec finibus euismod lobortis Sed massa nunc malesuada ac ante eleifend dictum laoreet massa Aliquam nec dictum turpis pellentesque lacinia ligula Donec et tellus maximum dapibus justo auctor egestas sapien Integer venantis egesta malesdada Maecenas venenatis urna id posuere bibendum eros torto gravida ipsum sed tempor arcy andte ac odio Morbi elementum libero id velit bibendum auctor It sit amet ex eget urna venenatis laoreet Proin posuere urna nec ante tutum lobortis Cras nec elit tristique dolor congue eleifend";
	Label* label = create_label(rect_make(point_make(0, 0), size_make(screen->window->size.width, screen->window->size.height)), str);
	label->text_color = color_make(12, 0, 0);
	//draw_label(screen, label);
}
Ejemplo n.º 3
0
static void	set_colors(t_fdf *fdf, t_pt *pt1, t_pt *pt2, t_color **colors)
{
	double	tmp;

	tmp = (PT_COLOR2 - PT_COLOR1) / (fdf->max_height - fdf->min_height);
	tmp *= (pt1->z - fdf->min_height);
	tmp += PT_COLOR1;
	colors[0] = color_make(tmp);
	tmp = (PT_COLOR2 - PT_COLOR1) / (fdf->max_height - fdf->min_height);
	tmp *= (pt2->z - fdf->min_height);
	tmp += PT_COLOR1;
	colors[1] = color_make(tmp);
}
Ejemplo n.º 4
0
void test_circles(Screen* screen) {
	fill_screen(screen, color_make(2, 0, 0));

	Coordinate center = point_make(screen->window->size.width/2, screen->window->size.height/2);
	int radius = screen->window->size.height/2;

	for (int i = 0; i < 26; i++) {
		Circle c = circle_make(center, radius);
		draw_circle(screen, c, color_make(i, 0, 0), 1);

		radius -= 4;
	}
}
Ejemplo n.º 5
0
void test_lines(Screen* screen) {
	fill_screen(screen, color_make(2, 0, 0));

	for (int i = 0; i < 128; i++) {
		int p1x = rand() % (screen->window->size.width + 1);
		int p1y = rand() % (screen->window->size.height + 1);
		int p2x = rand() % (screen->window->size.width + 1);
		int p2y = rand() % (screen->window->size.height + 1);

		Coordinate p1 = point_make(p1x, p1y);
		Coordinate p2 = point_make(p2x, p2y);
		Line line = line_make(p1, p2);
		draw_line(screen, line, color_make(i, 0, 0), 1);
	}
}
Ejemplo n.º 6
0
int32 framebuffer_invert( framebuffer_t *dst, framebuffer_t *src )
{
    int32   x;
    int32   y;
    int32   r_inv;
    int32   g_inv;
    int32   b_inv;
    color_t t;

    if( dst->width != src->width )      return EINVAL;
    if( dst->height != src->height )    return EINVAL;

    // Invert image pixel by pixel
    for( y = 0; y < src->height; y++ )
    {
        for( x = 0; x < src->width; x++ )
        {            
            // Grab a pixel and invert it
            t = framebuffer_get( src, x, y);
            r_inv = MAX_VALUE - color_red(t);
            g_inv = MAX_VALUE - color_green(t);
            b_inv = MAX_VALUE - color_blue(t);

            // Write out inverted pixel
            framebuffer_set (dst, x, y, color_make(r_inv,g_inv,b_inv,255));
        }
    }

    return 0;
}
Ejemplo n.º 7
0
Window* create_window_int(Rect frame, bool root) {
	Window* window = (Window*)kmalloc(sizeof(Window));
	memset(window, 0, sizeof(Window));

	window->layer = create_layer(frame.size);
	window->size = frame.size;
	window->frame = frame;
	window->border_color = color_make(50, 122, 40);
	window->border_width = 1;
	window->subviews = array_m_create(MAX_ELEMENTS);
	window->title = "Window";
	window->animations = array_m_create(16);

	//root window doesn't have a title view
	if (!root) {
		window->title_view = create_title_view(window);
	}
	window->content_view = create_content_view(window, root);
	window->needs_redraw = 1;
	window->last_draw_timestamp = time();

	//if this window was created by a call to xserv_win_create(),
	//then we're in a syscall handler and getpid() will return the pid of the
	//proc that ran the syscall
	//this is how we know when a user proc is connected to a window
	window->owner_pid = getpid();

	return window;
}
Ejemplo n.º 8
0
void test_rects(Screen* screen) {
	fill_screen(screen, color_make(2, 0, 0));

	Coordinate origin = point_make(0, 0);
	Size sz = screen->window->size;
	
	for (int i = 0; i < 20; i++) {
		Rect rt = rect_make(origin, sz);
		draw_rect(screen, rt, color_make(i, 0, 0), 1);

		origin.x += 4;
		origin.y += 4;
		sz.width -= 8;
		sz.height -= 8;
	}
}
Ejemplo n.º 9
0
void test_gfx(int argc, char **argv) {
	int delay = 1000;
	
	Screen* screen = switch_to_vga();

	fill_screen(screen, color_make(2, 0, 0));

	draw_button(screen);
	sleep(delay);

	test_lines(screen);
	sleep(delay);

	test_circles(screen);
	sleep(delay);

	test_rects(screen);
	sleep(delay);

	test_triangles(screen);
	sleep(delay);

	test_text(screen);
	sleep(delay);

	draw_julia(screen);
	sleep(delay);
	
	draw_mandelbrot(screen);
	sleep(delay);

	gfx_teardown(screen);
	switch_to_text();
}
Ejemplo n.º 10
0
void test_xserv(Screen* vesa_screen) {
	Window* window = create_window(rect_make(point_make(50, 50), size_make(400, 500)));
	window->title = "Color test";
	add_subwindow(vesa_screen->window, window);
	
	Window* label_win = create_window(rect_make(point_make(350, 100), size_make(500, 200)));
	label_win->title = "Text test";
	Label* test_label = create_label(rect_make(point_make(0, 0), label_win->content_view->frame.size), "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque pulvinar dui bibendum nunc convallis, bibendum venenatis mauris ornare. Donec et libero lacus. Nulla tristique auctor pulvinar. Aenean enim elit, malesuada nec dignissim eget, varius ac nunc. Vestibulum varius lectus nisi, in dignissim orci volutpat in. Aliquam eget eros lorem. Quisque tempor est a rhoncus consequat. Quisque vestibulum finibus sapien. Etiam enim sem, vehicula ac lorem vitae, mattis mollis mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus eleifend dui vel nulla suscipit pretium. Suspendisse vel nunc efficitur, lobortis dui convallis, tristique tellus. Ut ut viverra est. Etiam tempor justo risus. Cras laoreet eu sapien et lacinia. Nunc imperdiet blandit purus a semper.");
	add_sublabel(label_win->content_view, test_label);
	add_subwindow(vesa_screen->window, label_win);

	//create evenly spaced subsections
	for (int i = 0; i < 34; i++) {
		double height = window->content_view->frame.size.height / 32;
		View* view = create_view(rect_make(point_make(0, height * i), size_make(window->content_view->frame.size.width, height)));
		add_subview(window->content_view, view);
	}
	for (int i = 0; i < 1000; i++) {
		for (int j = 0; j < window->content_view->subviews->size; j++) {
			View* subview = array_m_lookup(window->content_view->subviews, j);
			set_background_color(subview, color_make(rand() % 256, rand() % 256, rand() % 256));
		}
		sleep(50);
	}
}	
Ejemplo n.º 11
0
//draw Mandelbrot set
void draw_mandelbrot(Screen* screen) {
	//each iteration, we calculate: new = old * old + p, where p is current pixel,
	//old starts at the origin
	double pr, pi; //real and imaginary parts of pixel p
	double new_re, new_im, old_re, old_im; //real & imaginary parts of new and old z
	double zoom = 1, move_x = -0.5, move_y = 0; 
	int max_iterations = 300;

	//for every pixel
	for (int y = 0; y < screen->window->size.height; y++) {
		for (int x = 0; x < screen->window->size.width; x++) {
			//calculate real and imaginary part of z
			//based on pixel location and zoom and position vals
			pr = 1.5 * (x - screen->window->size.width / 2) / (0.5 * zoom * screen->window->size.width) + move_x;
			pi = (y - screen->window->size.height / 2) / (0.5 * zoom * screen->window->size.height) + move_y;
			new_re = new_im = old_re = old_im = 0; //start at 0.0

			int i;
			for (i = 0; i < max_iterations; i++) {
				//remember value of previous iteration
				old_re = new_re;
				old_im = new_im;

				//actual iteration, real and imaginary parts are calculated
				new_re = old_re * old_re - old_im * old_im + pr;
				new_im = 2 * old_re * old_im + pi;

				//if piont is outside circle with radius 2, stop
				if ((new_re * new_re + new_im * new_im) > 4) break;
			}
			Color color = color_make(5 + i % max_iterations, 0, 0);
			putpixel(screen, x, y, color);
		}
	}
}
Ejemplo n.º 12
0
void test_triangles(Screen* screen) {
	fill_screen(screen, color_make(2, 0, 0));

	Coordinate p1 = point_make(screen->window->size.width / 2, 0);
	Coordinate p2 = point_make(0, screen->window->size.height - 10);
	Coordinate p3 = point_make(screen->window->size.width, screen->window->size.height - 10);

	for (int i = 1; i <= 12; i++) {
		Triangle t = triangle_make(p1, p2, p3);
		draw_triangle(screen, t, color_make(i, 0, 0), THICKNESS_FILLED);

		p1.y += i * 2;
		p2.x += i * 1.5;
		p2.y -= i / 2;
		p3.x -= i * 1.5;
		p3.y -= i / 2;
	}
}
Ejemplo n.º 13
0
Archivo: view.c Proyecto: codyd51/axle
View* create_view(Rect frame) {
	View* view = (View*)kmalloc(sizeof(View));
	view->layer = create_layer(frame.size);
	view->frame = frame;
	view->superview = NULL;
	view->background_color = color_make(0, 255, 0);
	view->subviews = array_m_create(MAX_ELEMENTS);
	view->labels = array_m_create(MAX_ELEMENTS);
	view->bmps = array_m_create(MAX_ELEMENTS);
	view->buttons = array_m_create(MAX_ELEMENTS);
	view->needs_redraw = 1;
	return view;
}
Ejemplo n.º 14
0
static View* create_content_view(Window* window, bool root) {
	if (!window) return NULL;

	int title_height = 20;
	if (window->title_view) {
		title_height = window->title_view->frame.size.height;
	} if (root) title_height = 0;

	Rect inner_frame = rect_make(point_make((window->border_width * 2), title_height), size_make(window->frame.size.width - (window->border_width * 4), window->frame.size.height - title_height - (window->border_width * 2)));
	View* content_view = create_view(inner_frame);
	content_view->background_color = color_make(255, 255, 255);

	return content_view;
}
Ejemplo n.º 15
0
void draw_button(Screen* screen) {
	fill_screen(screen, color_make(2, 0, 0));

	Coordinate origin = point_make(screen->window->size.width * 0.25, screen->window->size.height * 0.25);
	Size sz = size_make(screen->window->size.width * 0.25, screen->window->size.height * 0.25);
	Rect r = rect_make(origin, sz);
	draw_rect(screen, r, color_make(2, 0, 0), 1);

	Coordinate in_origin = point_make(origin.x + 1, origin.y + 1);
	Size in_size = size_make(sz.width - 2, sz.height - 2);
	Rect in_rect = rect_make(in_origin, in_size);
	draw_rect(screen, in_rect, color_make(12, 0, 0), 30);

	Coordinate p1 = point_make(origin.x + sz.width * 0.1, origin.y + sz.height * 0.1);
	Coordinate p2 = point_make(origin.x + sz.width * 0.1, origin.y + sz.height * 0.9);
	Coordinate p3 = point_make(origin.x + sz.width * 0.4, origin.y + sz.height * 0.5);
	Triangle tri = triangle_make(p1, p2, p3);
	draw_triangle(screen, tri, color_make(15, 0, 0), 1);
	
	Rect label_rect = rect_make(point_make(p3.x + 5, p3.y - (8 / 2)), size_make(in_rect.size.width, in_rect.size.height));
	Label* play_label = create_label(label_rect, "Play");
	play_label->text_color = color_make(1, 0, 0);
	//draw_label(screen, play_label);
}
Ejemplo n.º 16
0
Archivo: color.c Proyecto: codyd51/axle
Color color_at_ratio(Gradient gradient, double percent) {
	Color from = gradient.from;
	Color to = gradient.to;

	uint8_t diff[3] = {
		from.val[0] - to.val[0],
	 	from.val[1] - to.val[1],
		from.val[2] - to.val[2]
	};
	return color_make(
		from.val[0] + percent * diff[0],
		from.val[1] + percent * diff[1],
		from.val[2] + percent * diff[2]
	);
}
Ejemplo n.º 17
0
//draw julia set
void draw_julia(Screen* screen) {
	//each iteration, we calculate: new = old * old + c
	//c is constant
	//old starts at current pixel
	double cRe, cIm; //real and imaginary parts of c
	double new_re, new_im, old_re, old_im; //real and imaginary parts of new and old
	double zoom = 1, move_x = 0, move_y = 0;
	int max_iterations = 300; 

	//pick some values for constant c
	//determines shape
	//cRe = -0.7;
	cRe = -0.7;
	//cIm = 0.27015;
	cIm = -0.61841;

	int w = screen->window->size.width;
	int h = screen->window->size.height;

	//for every pixel
	for (int y = 0; y < h; y++) {
		for (int x = 0; x < w; x++) {
			//calculate real and imaginary part of z
			//based on pixel location and zoom and position values
			new_re = 1.5 * (x - w / 2) / (0.5 * zoom * w) + move_x;
			new_im = (y - h / 2) / (0.5 * zoom * h) + move_y;
			
			int i;
			for (i = 0; i < max_iterations; i++) {
				//remember value of previous iteration
				old_re = new_re;
				old_im = new_im;

				//the actual iteration, real and imaginary part are calculated
				new_re = old_re * old_re - old_im * old_im + cRe;
				new_im = 2 * old_re * old_im + cIm;

				//if point is outside the circle with radius 2: stop
				if ((new_re * new_re + new_im * new_im) > 4) break;
			}

			//Color color = color_make(180 * (i % max_iterations), 20 * (i % max_iterations), 100 * (i % max_iterations));
			Color color = color_make(i % max_iterations + 2, 0, 0);
			putpixel(screen, x, y, color);
		}
	}
}
Ejemplo n.º 18
0
Archivo: color.c Proyecto: codyd51/axle
Color color_blue() {
	return color_make(0, 0, 255);
}
Ejemplo n.º 19
0
Archivo: color.c Proyecto: codyd51/axle
Color color_purple() {
	return color_make(148, 0, 211);
}
Ejemplo n.º 20
0
Archivo: color.c Proyecto: codyd51/axle
Color color_brown() {
	return color_make(165, 42, 42);
}
Ejemplo n.º 21
0
Archivo: color.c Proyecto: codyd51/axle
Color color_black() {
	return color_make(0, 0, 0);
}
Ejemplo n.º 22
0
void calculator_xserv(Point origin) {
	Size button_size = size_make(60, 60);
	int result_view_height = 50;
	int button_spacing = 0;

	//width is button_size * 4 because 3 rows of # buttons + 1 row of operators
	Window* calc_win = create_window(rect_make(origin, size_make(button_size.width * 4, WINDOW_TITLE_VIEW_HEIGHT + result_view_height + button_spacing + (button_size.height * 4))));
	calc_win->title = "Calculator";

	//number display
	View* label_view = create_view(rect_make(point_zero(), size_make(calc_win->frame.size.width, result_view_height)));
	result_label = create_label(rect_make(point_make(10, 10), label_view->frame.size), "0");
	label_view->background_color = color_white();
	add_sublabel(label_view, result_label);
	add_subview(calc_win->content_view, label_view);

	View* button_view = create_view(rect_make(point_make(0, rect_max_y(label_view->frame)), size_make(calc_win->frame.size.width, calc_win->frame.size.height - label_view->frame.size.height)));
	button_view->background_color = color_make(200, 200, 255);
	add_subview(calc_win->content_view, button_view);

	//number buttons 1-9
	for (int col = 0; col < 3; col++) {
		for (int row = 2; row >= 0; row--) {
			int val = ((3 - col) * 3) + row - 2;
			char title[32];
			itoa(val, (char*)&title);

			Button* b = create_button(rect_make(point_make((row * button_size.width) + button_spacing, (col * button_size.height) + button_spacing), button_size), title);
			b->mousedown_handler = (event_handler)&calc_num_click;
			add_button(button_view, b);
		}
	}
	//3 * button spacing to account for above buttons
	Button* zero = create_button(rect_make(point_make(button_spacing, 3 * button_size.height + button_spacing), size_make(button_size.width * 2, button_size.height)), "0");
	zero->mousedown_handler = (event_handler)&calc_num_click;
	add_button(button_view, zero);

	Button* equals = create_button(rect_make(point_make(rect_max_x(zero->frame), 3 * button_size.height + button_spacing), size_make(button_size.width, button_size.height)), "=");
	equals->mousedown_handler = (event_handler)&calc_op_click;
	add_button(button_view, equals);
	
	//operator buttons
	for (int i = 0; i < 4; i++){
		char* title;
		switch (i) {
			case 0:
				title = "/";
				break;
			case 1:
				title = "X";
				break;
			case 2:
				title = "-";
				break;
			case 3:
			default:
				title = "+";
				break;
		}
		Button* b = create_button(rect_make(point_make((3 * button_size.width) + button_spacing, button_size.height * i + button_spacing), button_size), title);
		b->mousedown_handler = (event_handler)&calc_op_click;
		add_button(button_view, b);
	}

	present_window(calc_win);
}
Ejemplo n.º 23
0
Archivo: color.c Proyecto: codyd51/axle
Color color_dark_grey() {
	return color_make(80, 80, 80);
}
Ejemplo n.º 24
0
Archivo: color.c Proyecto: codyd51/axle
Color color_light_grey() {
	return color_make(120, 120, 120);
}
Ejemplo n.º 25
0
Archivo: color.c Proyecto: codyd51/axle
Color color_white() {
	return color_make(255, 255, 255);
}
Ejemplo n.º 26
0
int32 framebuffer_dct( framebuffer_t *dst, framebuffer_t *src )
{
    int32   x;
    int32   y;
    int32   r;
    int32   c;
    int32   pixelValue;
    int32   input_block[BLOCK_SIZE][BLOCK_SIZE];
    int32   intermediate_block[BLOCK_SIZE][BLOCK_SIZE]; 
    int32   temp_block[BLOCK_SIZE][BLOCK_SIZE]; 
    int32   output_block[BLOCK_SIZE][BLOCK_SIZE];
    color_t t;
    int32 scale_factor = 16;

    if( dst->width != src->width )      return EINVAL;
    if( dst->height != src->height )    return EINVAL;

    // Make sure that the cosine matrices are initialized
    if (!dct_initialized)
       initialize_dct_matrix();
    if (!idct_initialized)
       initialize_idct_matrix();

    // Calculate the DCT of the image in blocks
    for( y = 0; y < src->height; y = y + BLOCK_SIZE )
    {
        for( x = 0; x < src->width; x = x + BLOCK_SIZE )
        {            


            // Form a  block of pixels
            for (r = 0; r < BLOCK_SIZE; r++)
            {
               for (c = 0; c < BLOCK_SIZE; c++)
               {
                    t = framebuffer_get( src, x+c, y+r );
                    pixelValue = color_green(t);
                    input_block[r][c] = pixelValue;
               }
            } 

            // Perform DCT on the block
            // Calculate:
            //  intermediate   = input_block * dct_matrix_trans
            //  ouptut         = dct_matrix * intermediate
            dct_matrix_mult( input_block, dct_matrix_trans, intermediate_block );
            dct_matrix_scale(intermediate_block, scale_factor, input_block);
            dct_matrix_mult( dct_matrix, input_block, output_block );
            dct_matrix_scale(output_block, scale_factor, temp_block);
/*
            // Perform IDCT on the block
            // Calculate:
            //  intermediate   = input_block * idct_matrix
            //  ouptut         = idct_matrix_trans * intermediate
            idct_matrix_mult( temp_block, idct_matrix, intermediate_block );
            idct_matrix_scale( intermediate_block, scale_factor, input_block);
            idct_matrix_mult( idct_matrix_trans, input_block, output_block );
            idct_matrix_scale( output_block, scale_factor, intermediate_block);
*/

            // Write the transformed block to the destination image
            for (r = 0; r < BLOCK_SIZE; r++)
            {
               for (c = 0; c < BLOCK_SIZE; c++)
               {
                    
                    pixelValue = intermediate_block[r][c];
                    framebuffer_set (dst, x+c, y+r, color_make(pixelValue,pixelValue,pixelValue,255));
               }
            } 


        }
    }

    return 0;
}
Ejemplo n.º 27
0
Archivo: color.c Proyecto: codyd51/axle
Color color_yellow() {
	return color_make(255, 255, 0);
}
Ejemplo n.º 28
0
Archivo: color.c Proyecto: codyd51/axle
Color color_green() {
	return color_make(0, 255, 0);
}
Ejemplo n.º 29
0
Archivo: color.c Proyecto: codyd51/axle
Color color_grey() {
	return color_make(127, 127, 127);
}
Ejemplo n.º 30
0
gb_internal void
set_palette_set(PaletteSet set)
{
	switch (set) {
	case PS_BEIGE:
		CORE->palette.colors[PC_WHITE]       = color_make(0xe6, 0xd6, 0x9c, 0xff);
		CORE->palette.colors[PC_LIGHT_GREY]  = color_make(0xb4, 0xa5, 0x6a, 0xff);
		CORE->palette.colors[PC_DARK_GREY]   = color_make(0x7b, 0x71, 0x62, 0xff);
		CORE->palette.colors[PC_BLACK]       = color_make(0x39, 0x38, 0x29, 0xff);
		break;
	case PS_GREEN:
		CORE->palette.colors[PC_WHITE]       = color_make(0xd7, 0xe8, 0x94, 0xff);
		CORE->palette.colors[PC_LIGHT_GREY]  = color_make(0xae, 0xc4, 0x40, 0xff);
		CORE->palette.colors[PC_DARK_GREY]   = color_make(0x52, 0x7f, 0x39, 0xff);
		CORE->palette.colors[PC_BLACK]       = color_make(0x20, 0x46, 0x31, 0xff);
		break;
	case PS_BLUE:
		CORE->palette.colors[PC_WHITE]       = color_make(0xe0, 0xf0, 0xe8, 0xff);
		CORE->palette.colors[PC_LIGHT_GREY]  = color_make(0xa8, 0xc0, 0xb0, 0xff);
		CORE->palette.colors[PC_DARK_GREY]   = color_make(0x50, 0x78, 0x68, 0xff);
		CORE->palette.colors[PC_BLACK]       = color_make(0x18, 0x30, 0x30, 0xff);
		break;
	case PS_RED:
		CORE->palette.colors[PC_WHITE]       = color_make(0xff, 0xe5, 0xe6, 0xff);
		CORE->palette.colors[PC_LIGHT_GREY]  = color_make(0xec, 0x8a, 0x8c, 0xff);
		CORE->palette.colors[PC_DARK_GREY]   = color_make(0xac, 0x26, 0x24, 0xff);
		CORE->palette.colors[PC_BLACK]       = color_make(0x63, 0x14, 0x14, 0xff);
		break;
	case PS_RED_GREEN:
		CORE->palette.colors[PC_WHITE]       = color_make(0xfc, 0xfa, 0xfc, 0xff);
		CORE->palette.colors[PC_LIGHT_GREY]  = color_make(0x04, 0xfa, 0x04, 0xff);
		CORE->palette.colors[PC_DARK_GREY]   = color_make(0xfc, 0x32, 0x04, 0xff);
		CORE->palette.colors[PC_BLACK]       = color_make(0x04, 0x02, 0x02, 0xff);
		break;
	case PS_PASTEL_MIX:
		CORE->palette.colors[PC_WHITE]       = color_make(0xfc, 0xfa, 0xac, 0xff);
		CORE->palette.colors[PC_LIGHT_GREY]  = color_make(0xec, 0x8a, 0x8c, 0xff);
		CORE->palette.colors[PC_DARK_GREY]   = color_make(0x9c, 0x92, 0xf4, 0xff);
		CORE->palette.colors[PC_BLACK]       = color_make(0x04, 0x02, 0x02, 0xff);
		break;
	case PS_WHITE:
		CORE->palette.colors[PC_WHITE]       = color_make(0xff, 0xff, 0xff, 0xff);
		CORE->palette.colors[PC_LIGHT_GREY]  = color_make(0x8f, 0x8f, 0x8f, 0xff);
		CORE->palette.colors[PC_DARK_GREY]   = color_make(0x6f, 0x6f, 0x6f, 0xff);
		CORE->palette.colors[PC_BLACK]       = color_make(0x31, 0x31, 0x31, 0xff);
		break;
	}
}