gbasys
view src/error.c @ 10:9d05431f4a16
fixed GET_R/GET_B macros which where reversed
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 30 Jan 2016 05:23:48 +0200 |
parents | e3dc7705ad9c |
children | 2b31bd7e96b4 |
line source
1 /*
2 gbasys - a gameboy advance hardware abstraction library
3 Copyright (C) 2004-2014 John Tsiombikas <nuclear@member.fsf.org>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #include "gfx.h"
20 void panic(const char *str) {
21 set_video_mode(VMODE_LFB_240x160_16, 0);
22 clear_buffer(front_buffer, RGB(140, 30, 20));
24 set_text_color(0xffff, RGB(140, 30, 20));
25 draw_string(" Don't Panic! ", 0, 0, front_buffer);
26 draw_string("_________________________", 0, 8, front_buffer);
27 if(str) draw_string(str, 0, 32, front_buffer);
29 for(;;);
30 }