• R/O
  • SSH
  • HTTPS

gpsp-kai: Commit


Commit MetaInfo

Revision577 (tree)
Zeit2010-03-22 02:36:22
Autortakka

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- trunk/iso_tool/fnt_print.c (revision 576)
+++ trunk/iso_tool/fnt_print.c (revision 577)
@@ -11,7 +11,8 @@
1111
1212 static u32 nextx;
1313 static u32 nexty;
14-static int max_length;
14+static int max_x_length;
15+static int max_y_length;
1516
1617 static void *fnt_malloc(u32 size);
1718 static s32 fnt_mfree(void *ptr);
@@ -321,8 +322,8 @@
321322 u32 width; \
322323 \
323324 width = fnt_get_width_ucs2(font, ucs2, 1); \
324- if(nextx + width * mx > max_length) \
325- return -1; \
325+ if(nextx + width * mx > max_x_length) \
326+ return -1; \
326327 \
327328 index = fnt_get_bits(font, ucs2); \
328329 vptr_tmp = (depth *)vram + nextx + nexty * bufferwidth; \
@@ -509,7 +510,7 @@
509510 mx: 横方向倍率
510511 my: 縦方向倍率
511512 ---------------------------------------------------------------------------*/
512-u32 fnt_print_xy(const fnt_t* font, u16 x, u16 y, void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int length)
513+u32 fnt_print_xy(const fnt_t* font, u16 x, u16 y, void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int x_length, int y_length)
513514 {
514515 void *vram;
515516 int bufferwidth;
@@ -524,7 +525,7 @@
524525 if(vram == NULL)
525526 vram = (void*) (0x40000000 | (u32) sceGeEdramGetAddr());
526527
527- return fnt_print_vram(font, vram, bufferwidth, pixelformat, x, y, str, color, back, fill, rate, mx, my, length);
528+ return fnt_print_vram(font, vram, bufferwidth, pixelformat, x, y, str, color, back, fill, rate, mx, my, x_length, y_length);
528529 }
529530
530531 /*---------------------------------------------------------------------------
@@ -544,7 +545,7 @@
544545 my: 縦方向倍率
545546 return: エラー時は-1
546547 ---------------------------------------------------------------------------*/
547-u32 fnt_print_vram(const fnt_t* font, void *vram, u16 bufferwidth, u16 pixelformat, u16 x, u16 y, const void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int length)
548+u32 fnt_print_vram(const fnt_t* font, void *vram, u16 bufferwidth, u16 pixelformat, u16 x, u16 y, const void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int x_length, int y_length)
548549 {
549550 u16 i;
550551 u16 len;
@@ -553,11 +554,16 @@
553554
554555 if (bufferwidth == 0) return -1;
555556
556- if(length == 0)
557- max_length = 480;
557+ if(x_length == 0)
558+ max_x_length = 480;
558559 else
559- max_length = x + length;
560+ max_x_length = x + x_length;
560561
562+ if(y_length == 0)
563+ max_y_length = 272;
564+ else
565+ max_y_length = y + y_length;
566+
561567 nextx = x;
562568 nexty = y;
563569
@@ -600,6 +606,8 @@
600606 {
601607 nextx = x;
602608 nexty += font->height;
609+ if(nexty > max_y_length)
610+ return 0;
603611 ret = 0;
604612 }
605613 else
--- trunk/iso_tool/fnt_print.h (revision 576)
+++ trunk/iso_tool/fnt_print.h (revision 577)
@@ -124,7 +124,7 @@
124124 my: 縦方向倍率
125125 ---------------------------------------------------------------------------*/
126126 u32 fnt_print_xy(const fnt_t* font, u16 x, u16 y, void *str, u32 color,
127- u32 back, u8 fill, s16 rate, u16 mx, u16 my, int length);
127+ u32 back, u8 fill, s16 rate, u16 mx, u16 my, int x_length, int y_length);
128128
129129 /*---------------------------------------------------------------------------
130130 文字列表示(表示VRAMへの描画)
@@ -140,7 +140,7 @@
140140 my: 縦方向倍率
141141 ---------------------------------------------------------------------------*/
142142 u32 fnt_print_vram(const fnt_t* font, void *vram, u16 bufferwidth, u16 pixelformat,
143- u16 x, u16 y, const void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int length);
143+ u16 x, u16 y, const void *str, u32 color, u32 back, u8 fill, s16 rate, u16 mx, u16 my, int x_length, int y_length);
144144
145145 /*---------------------------------------------------------------------------
146146 UFT-8Nの一文字をUTF-16に変換する
--- trunk/iso_tool/screen.c (revision 576)
+++ trunk/iso_tool/screen.c (revision 577)
@@ -74,8 +74,9 @@
7474 #define REPEAT_SPEED (20)
7575
7676 #define MID_STR(x, str, num) ((x) - (fnt_get_width(&font, str, num) / 2))
77-#define print_xy(x, y, str, mx, my, length) fnt_print_xy(&font, ((x) * 16), ((y) * 16), (str), TEXT, BG, MODE, RATE, (mx), (my), (length) * 16)
78-#define print_xy_mid(x, y, str, mx, my, length) fnt_print_xy(&font, MID_STR(((x) * 16), (str), (mx)), ((y) * 16), (str), TEXT, BG, MODE, RATE, (mx), (my), (length) * 16)
77+#define print_xy(x, y, str, mx, my, x_len) fnt_print_xy(&font, ((x) * 16), ((y) * 16), (str), TEXT, BG, MODE, RATE, (mx), (my), (x_len) * 16, 0)
78+#define print_xy_mid(x, y, str, mx, my, length) fnt_print_xy(&font, MID_STR(((x) * 16), (str), (mx)), ((y) * 16), (str), TEXT, BG, MODE, RATE, (mx), (my), (length) * 16, 0)
79+#define print_xy_text(x, y, str, mx, my, x_len, y_len) fnt_print_xy(&font, ((x) * 16), ((y) * 16), (str), TEXT, BG, MODE, RATE, (mx), (my), (x_len) * 16, (y_len) * 16)
7980
8081 typedef enum {
8182 MENU_RET_START,
--- trunk/iso_tool/menu.c (revision 576)
+++ trunk/iso_tool/menu.c (revision 577)
@@ -233,7 +233,7 @@
233233 {
234234 // 複合化
235235 msg_win("EBOOT.BINを復号しています", 1, MSG_WAIT, 1);
236- o_size = pspDecryptPRX((u8 *)&read_ptr, (u8 *)write_ptr, i_size);
236+ o_size = pspDecryptPRX((u8 *)read_ptr, (u8 *)write_ptr, i_size);
237237 ERR_RET(o_size, DONE);
238238
239239 if(strncmp(&write_ptr[1], "ELF", 3) != 0)
@@ -1285,9 +1285,14 @@
12851285 sctrlSEMountUmdFromFile(path, 1, 1);
12861286 break;
12871287 }
1288+
1289+ sctrlSESetUmdFile(path);
1290+
1291+ sceKernelDelayThread(5000000);
12881292 sceUmdActivate(1, "disc0:");
1289-// sceUmdWaitDriveStat(UMD_WAITFORINIT);
1290-
1293+ sceKernelDelayThread(5000000);
1294+ sceUmdWaitDriveStat(PSP_UMD_READY);
1295+// ModuleMgrForKernel_1B91F6EC("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN", 0, &option);
12911296 sctrlKernelLoadExecVSHDisc("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN", NULL);
12921297 return DONE;
12931298 }
Show on old repository browser