#include #include #include #include #include #include "hzk12.h" #include "asc126.h" #include "ezkernel.h" int current_y = 1; extern u8 pReadCache [MAX_pReadCache_size]EWRAM_BSS; //****************************************************************************** void IWRAM_CODE Clear(u16 x, u16 y, u16 w, u16 h, u16 c, u8 isDrawDirect) { u16 *p; u16 yi,ww,hh; if(isDrawDirect) p = VideoBuffer; else p = Vcache; hh = (y+h>160)?160:(y+h); ww = (x+w>240)?(240-x):w; //u16 tmp[240]; for(u32 i=0;i<240;i++) ((u16*)pReadCache)[i] = c; for(yi=y; yi < hh; yi++) dmaCopy(pReadCache,p+yi*240+x,ww*2); } //****************************************************************************** void IWRAM_CODE ClearWithBG(u16* pbg,u16 x, u16 y, u16 w, u16 h, u8 isDrawDirect) { u16 *p; u16 yi,ww,hh; if(isDrawDirect) p = VideoBuffer; else p = Vcache; hh = (y+h>160)?160:(y+h); ww = (x+w>240)?(240-x):w; for(yi=y; yi < hh; yi++) dmaCopy(pbg+yi*240+x,p+yi*240+x,ww*2); } //****************************************************************************** void IWRAM_CODE DrawPic(u16 *GFX, u16 x, u16 y, u16 w, u16 h, u8 isTrans, u16 tcolor, u8 isDrawDirect) { u16 *p,c; u16 xi,yi,ww,hh; if(isDrawDirect) p = VideoBuffer; else p = Vcache; hh = (y+h>160)?160:(y+h); ww = (x+w>240)?(240-x):w; if(isTrans) { for(yi=y; yi < hh; yi++) for(xi=x;xistrlen(str)) l=strlen(str); else l=len; if((u16)(len*6)>(u16)(240-x)) len=(240-x)/6; while(hi150) { wait_btn(); current_y=1; } } //--------------------------------------------------------------------------------- void ShowbootProgress(char *str) { u8 str_len = strlen(str); Clear(60,160-15,120,15,gl_color_cheat_black,1); DrawHZText12(str,0,(240-str_len*6)/2,160-15,gl_color_text,1); }