s32 CON_InitTr(GXRModeObj *rmode, s32 conXOrigin,s32 conYOrigin,s32 conWidth,s32 conHeight, s32 bgColor) { VIDEO_SetPostRetraceCallback(NULL); if(_console_buffer) free(_console_buffer); _console_buffer = malloc(conWidth*conHeight*VI_DISPLAY_PIX_SZ); if(!_console_buffer) return -1; _con_free_bg_buff(); _bg_buffer = malloc(conWidth*conHeight*VI_DISPLAY_PIX_SZ); if(!_bg_buffer) return -1; _c_buffer_size = sizeof(struct _c1) * (conWidth / FONT_XSIZE) * (conHeight/FONT_YSIZE); _c_buffer = malloc(_c_buffer_size); if(!_c_buffer) return -1; memset(_c_buffer, 0, _c_buffer_size); if (bgColor < 0 || bgColor > 15) bgColor = 0; _bg_color = color_table[bgColor]; __console_init_ex(_console_buffer,conXOrigin,conYOrigin,rmode->fbWidth*VI_DISPLAY_PIX_SZ,conWidth,conHeight,conWidth*VI_DISPLAY_PIX_SZ); return 0; }
s32 CON_InitEx(GXRModeObj *rmode, s32 conXOrigin,s32 conYOrigin,s32 conWidth,s32 conHeight) { VIDEO_SetPostRetraceCallback(NULL); if(_console_buffer) free(_console_buffer); _console_buffer = malloc(conWidth*conHeight*VI_DISPLAY_PIX_SZ); if(!_console_buffer) return -1; __console_init_ex(_console_buffer,conXOrigin,conYOrigin,rmode->fbWidth*VI_DISPLAY_PIX_SZ,conWidth,conHeight,conWidth*VI_DISPLAY_PIX_SZ); return 0; }