[Negitoro-svn] [169] Negitoro 0.0.1 (unstable)

Back to archive index

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ƒ@ƒCƒ‹ƒƒbƒNƒŠƒXƒg‚̏‰Šú‰»‚Æ“o˜^  */
 	init_file_lock();
 	file_lock(SYSTEMFILE_NAME, task_now()->id);
+
+	/* ƒtƒHƒ“ƒg“ǂݍž‚Ý */
+	if (file_readfont(FONTFILE, nihongo)) {
+		debugmsg("Font loaded.. (%s)", FONTFILE);
+	} else {
+		debugmsg("Font loading error!");
+	}
 	
 	/* ”wŒi(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);	
-
+	
 	/* ƒ}ƒEƒX(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;
-	
-	/* ƒtƒHƒ“ƒg“ǂݍž‚Ý */
-	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‚Å‚Í‚È‚­AƒAƒvƒŠ‚Å‚à‚È‚­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 ƒtƒHƒ“ƒgƒtƒ@ƒCƒ‹‚̓ǂݍž‚Ý
 /// @param filename ƒtƒ@ƒCƒ‹–¼
 /// @param fontbuf ƒtƒHƒ“ƒgƒf[ƒ^
-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; /* ƒtƒHƒ“ƒg‚ª‚È‚©‚Á‚½‚Ì‚Å‘SŠp•”•ª‚ð0xff‚Å–„‚ߐs‚­‚· */
 			}
+			ret = 0;
 		}
 	}
 	file_unlock(filename);
 	
 	*((int *) 0x0fe8) = (int)fontbuf;
 	
-	return;
+	return ret;
 }




Negitoro-svn メーリングリストの案内
Back to archive index