svnno****@sourc*****
svnno****@sourc*****
2011年 7月 30日 (土) 00:49:52 JST
Revision: 169 http://sourceforge.jp/projects/negitoro/svn/view?view=rev&revision=169 Author: is2os Date: 2011-07-30 00:49:52 +0900 (Sat, 30 Jul 2011) Log Message: ----------- Negitoro 0.0.1 (unstable) ä»åã®ã³ãããã§ã¯ãã±ãã#25265ã§å ±åããããã°ãä¿®æ£ãã¾ãã ãã©ã³ããã¡ã¤ã«ã®èªã¿è¾¼ã¿ä½ç½®ã«ãã£ã¦å¼ããããã¦ãããã®ã®ããã§ãã [bootpack.c] ã»ã³ã¼ãå ã§ã®ãã©ã³ããã¡ã¤ã«ã®èªã¿è¾¼ã¿ä½ç½®ãå¤æ´(ãã±ãã#25265) [bootpack.h] ã»é¢æ°file_readfontã®é¢æ°å®ç¾©ãå¤æ´ [console.c] ã»ã³ã³ã½ã¼ã«ã®ã¨ã©ã¼ã¡ãã»ã¼ã¸ãå¤æ´ [file.c] ã»é¢æ°file_readfontã®ä»æ§ãå¤æ´ Ticket Links: :----------- http://sourceforge.jp/projects/negitoro/tracker/detail/25265 http://sourceforge.jp/projects/negitoro/tracker/detail/25265 Modified Paths: -------------- trunk/kernel/bootpack.c trunk/kernel/bootpack.h trunk/kernel/console.c trunk/kernel/file.c Modified: trunk/kernel/bootpack.c =================================================================== --- trunk/kernel/bootpack.c 2011-07-09 03:21:01 UTC (rev 168) +++ trunk/kernel/bootpack.c 2011-07-29 15:49:52 UTC (rev 169) @@ -101,6 +101,13 @@ /* t@CbNXgÌú»Æo^ */ init_file_lock(); file_lock(SYSTEMFILE_NAME, task_now()->id); + + /* tHgÇÝÝ */ + if (file_readfont(FONTFILE, nihongo)) { + debugmsg("Font loaded.. (%s)", FONTFILE); + } else { + debugmsg("Font loading error!"); + } /* wi(sht_back)ÌV[gÝè */ global_sht_back = sheet_alloc(); @@ -108,18 +115,14 @@ sheet_setbuf(global_sht_back, buf_back, binfo->scrnx, binfo->scrny, -1); /* §¾Fȵ */ sheet_slide(global_sht_back, 0, 0); sheet_updown(global_sht_back, 0); - + /* }EX(sht_mouse)ÌV[gÝè */ sht_mouse = sheet_alloc(); sheet_setbuf(sht_mouse, buf_mouse, 16, 16, 99); init_mouse_cursor8(buf_mouse, 99); mx = (binfo->scrnx - 16) / 2; my = (binfo->scrny - 28 - 16) / 2; - - /* tHgÇÝÝ */ - file_readfont(FONTFILE, nihongo); - debugmsg("Font loaded.. (%s)", FONTFILE); - + /* N®æÊ */ loading_screen(); Modified: trunk/kernel/bootpack.h =================================================================== --- trunk/kernel/bootpack.h 2011-07-09 03:21:01 UTC (rev 168) +++ trunk/kernel/bootpack.h 2011-07-29 15:49:52 UTC (rev 169) @@ -503,7 +503,7 @@ struct FILEINFO *file_createfile(char *filename, int *fat); void file_loadfile(int clustno, int size, char *buf); void file_writefile(struct FILEINFO *finfo, char *buf, int dsize); -void file_readfont(char *filename, UCHAR *fontbuf); +int file_readfont(char *filename, UCHAR *fontbuf); void write_history(char *cmdline); /* lock.c */ Modified: trunk/kernel/console.c =================================================================== --- trunk/kernel/console.c 2011-07-09 03:21:01 UTC (rev 168) +++ trunk/kernel/console.c 2011-07-29 15:49:52 UTC (rev 169) @@ -471,7 +471,7 @@ else if (cmdline[0]) { if (cmd_app(cmdline) == 0) { /* R}hÅÍÈAAvÅàÈA³çÉósÅàÈ¢ */ - cputs0("It may be wrong command or not existing file."); + cputs0("It may be wrong command or an unexisting file."); } } Modified: trunk/kernel/file.c =================================================================== --- trunk/kernel/file.c 2011-07-09 03:21:01 UTC (rev 168) +++ trunk/kernel/file.c 2011-07-29 15:49:52 UTC (rev 169) @@ -332,10 +332,10 @@ /// @brief tHgt@CÌÇÝÝ /// @param filename t@C¼ /// @param fontbuf tHgf[^ -void file_readfont(char *filename, UCHAR *fontbuf) +int file_readfont(char *filename, UCHAR *fontbuf) { struct FILEINFO *finfo; - int size; + int size, ret = 1; extern char hankaku[4096]; finfo = file_search(filename, (struct FILEINFO *) (ADR_DISKIMG + 0x002600), 224); @@ -343,6 +343,7 @@ if (finfo) { size = finfo->size; fontbuf = file_loadfile2(finfo->clustno, &size, global_alloc_fat); + ret = 1; } else { fontbuf = (UCHAR *) memman_alloc_4k(16 * 256 + 32 * 94 * 47); for (size = 0; size < 16 * 256; size++) { @@ -351,11 +352,12 @@ for (size = 16 * 256; size < 16 * 256 + 32 * 94 * 47; size++) { fontbuf[size] = 0xff; /* tHgªÈ©Á½ÌÅSpªð0xffÅßs· */ } + ret = 0; } } file_unlock(filename); *((int *) 0x0fe8) = (int)fontbuf; - return; + return ret; }