void vid_settitle(char * title) { char caption[30] = "Gnuboy EX - "; strncat(caption, title, 16); lcdc_set_vram_address((void*)0xAC200000); lcdc_set_window(104, 8, 320, 16); set_pen(create_rgb16(0, 0, 0)); draw_rect(0, 0, 320, 16); set_pen(create_rgb16(0xff, 0xff, 0xff)); render_text(0, 2, caption); lcdc_copy_vram(); }
void vid_init() { int scale = rc_getint("scale"); vid_set_window_size(scale); fb.pelsize = 2; fb.yuv = 0; fb.indexed = 0; fb.enabled = 1; fb.dirty = 0; fb.w = 160 * scale; fb.h = 144 * scale; fb.pitch = fb.w * fb.pelsize; fb.ptr = (byte *)0xAC202800; fb.cc[0].r = 3; /* 8-5 (wasted bits on red) */ fb.cc[0].l = 11; /* this is the offset to the R bits (16-5) */ fb.cc[1].r = 2; /* 8-6 (wasted bits on green) */ fb.cc[1].l = 5; /* This is the offset to the G bits (16-5-6) */ fb.cc[2].r = 3; /* 8-5 (wasted bits on red) */ fb.cc[2].l = 0; /* This is the offset to the B bits (16-5-6-5) */ set_pen(create_rgb16(0, 0, 0)); draw_rect(0, 0, fb.w, fb.h); lcdc_copy_vram(); }
void vid_preinit() { graphics_init(528, 320, (void*)0xAC200000); set_pen(create_rgb16(0, 0, 0)); if (!load_skin()) draw_rect(0, 0, 528, 320); lcdc_copy_vram(); }
//----------------------------------------------------------------------------- void mglCanvasGL::line_draw(long k1, long k2) { if(PDef==0) return; set_pen(PDef,PenWidth, pPos); glBegin(GL_LINES); glArrayElement(k1); glArrayElement(k2); glEnd(); }
//----------------------------------------------------------------------------- void mglCanvasGL::line_draw(const mglPnt &p1, const mglPnt &p2, const mglDrawReg *) { if(PDef==0) return; set_pen(PDef,PenWidth); glBegin(GL_LINES); glColor4f(p1.r,p1.g,p1.b,p1.a); glVertex3f(p1.x,p1.y,p1.z); glColor4f(p2.r,p2.g,p2.b,p2.a); glVertex3f(p2.x,p2.y,p2.z); glEnd(); }
//----------------------------------------------------------------------------- void mglCanvasGL::line_draw(long k1, long k2) { if(PDef==0) return; /* unsigned pdef = PDef*0x10001; pdef = pdef << (int(100*pPos+0.5)%16); set_pen(pdef&0xffff,PenWidth);*/ set_pen(PDef,PenWidth); glBegin(GL_LINES); glArrayElement(k1); glArrayElement(k2); glEnd(); }